2 ** OpenURL-Handler - Asynch ARexx handler for openurl.library
4 ** Written by Troels Walsted Hansen <troels@thule.no>
5 ** Placed in the public domain.
8 ** - Alfonso Ranieri <alforan@tin.it>
9 ** - Stefan Kost <ensonic@sonicpulse.de>
15 /***********************************************************************/
18 sendRexxMsg(struct MsgPort
*reply
,UBYTE
*rxport
,UBYTE
*rxcmd
)
20 struct RexxMsg
*rxmsg
;
22 if ((rxmsg
= CreateRexxMsg(reply
,NULL
,NULL
)))
24 rxmsg
->rm_Action
= RXCOMM
|RXFF_STRING
|RXFF_NOIO
;
26 if ((rxmsg
->rm_Args
[0] = CreateArgstring(rxcmd
,strlen(rxcmd
))))
32 if ((port
= FindPort(rxport
)))
34 PutMsg(port
,(struct Message
*)rxmsg
);
42 DeleteArgstring(rxmsg
->rm_Args
[0]);
51 /**************************************************************************/
56 void SAVEDS
handler(void)
60 struct Process
*me
= (struct Process
*)FindTask(NULL
);
61 struct startMsg
*smsg
;
65 WaitPort(&me
->pr_MsgPort
);
66 smsg
= (struct startMsg
*)GetMsg(&me
->pr_MsgPort
);
68 if ((sig
= AllocSignal(-1))>=0)
71 res
= sendRexxMsg(&port
,smsg
->port
,smsg
->cmd
);
76 ReplyMsg((struct Message
*)smsg
);
80 struct RexxMsg
*rxmsg
;
83 rxmsg
= (struct RexxMsg
*)GetMsg(&port
);
85 DeleteArgstring(rxmsg
->rm_Args
[0]);
89 if (sig
>=0) FreeSignal(sig
);
95 /**************************************************************************/