ToolChain/bin/targets/m68k-amigaos/ndk/Tutorials/ARexx/Host/Host.c
struct ChildMessage *
CreateChildMessage(struct MsgPort *ReplyPort,const STRPTR Command,struct RexxMsg *RexxMessage)
{
	UWORD Length;
	struct ChildMessage *ChildMessage;

		/* Make room for the message plus the command string. */

	Length = sizeof(struct ChildMessage) + strlen(Command);

	ChildMessage = (struct ChildMessage *)AllocMem(Length,MEMF_CLEAR|MEMF_PUBLIC);

	if(ChildMessage != NULL)
	{
			/* Initialize the message. */

		ChildMessage->Message.mn_Length = Length;
		ChildMessage->Message.mn_ReplyPort = ReplyPort;

		strcpy(ChildMessage->Command,Command);
	}

	return(ChildMessage);
}
/* CreateChildMessage():
	 *
	 *	This routine sets up a custom message to send to a
	 *	child process which gets launched if the RX command
	 *	is invoked with the CONSOLE keyword.
	 */
This routine sets up a custom message to send to a
child process which gets launched if the RX command
is invoked with the CONSOLE keyword.
This routine sets up a custom message to send to a child process which gets launched if the RX command is invoked with the CONSOLE keyword .
struct ChildMessage *
CreateChildMessage(struct MsgPort *ReplyPort,const STRPTR Command,struct RexxMsg *RexxMessage)
{
	UWORD Length;
	struct ChildMessage *ChildMessage;
	Length = sizeof(struct ChildMessage) + strlen(Command);
	ChildMessage = (struct ChildMessage *)AllocMem(Length,MEMF_CLEAR|MEMF_PUBLIC);
	if(ChildMessage != NULL)
	{
		ChildMessage->Message.mn_Length = Length;
		ChildMessage->Message.mn_ReplyPort = ReplyPort;
		strcpy(ChildMessage->Command,Command);
	}
	return(ChildMessage);
}
struct ChildMessage * CreateChildMessage ( struct MsgPort * ReplyPort , const STRPTR Command , struct RexxMsg * RexxMessage ) { UWORD Length ; struct ChildMessage * ChildMessage ; Length = sizeof ( struct ChildMessage ) + strlen ( Command ) ; ChildMessage = ( struct ChildMessage * ) AllocMem ( Length , MEMF_CLEAR | MEMF_PUBLIC ) ; if ( ChildMessage != NULL ) { ChildMessage -> Message . mn_Length = Length ; ChildMessage -> Message . mn_ReplyPort = ReplyPort ; strcpy ( ChildMessage -> Command , Command ) ; } return ( ChildMessage ) ; }
CreateChildMessage():
      This routine sets up a custom message to send to a
      child process which gets launched if the RX command
      is invoked with the CONSOLE keyword.
CreateChildMessage () : This routine sets up a custom message to send to a child process which gets launched if the RX command is invoked with the CONSOLE keyword .
/* Make room for the message plus the command string. */ /* Initialize the message. */