Prefs/ScreenMode: change the way depth is selected
[AROS.git] / workbench / libs / rexxsyslib / createrexxmsg.c
blobd3e805a62a86193f6b0ccfdfc73ab7eba5978243
1 /*
2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "rexxsyslib_intern.h"
9 #include <stdio.h>
10 #include <string.h>
12 /*****************************************************************************
14 NAME */
15 #include <clib/rexxsyslib_protos.h>
17 AROS_LH3(struct RexxMsg *, CreateRexxMsg,
19 /* SYNOPSIS */
20 AROS_LHA(struct MsgPort *, port , A0),
21 AROS_LHA(UBYTE *, extension, A1),
22 AROS_LHA(UBYTE *, host , D0),
24 /* LOCATION */
25 struct RxsLib *, RexxSysBase, 24, RexxSys)
27 /* FUNCTION
28 Creation and initialization of a RexxMsg structure
30 INPUTS
31 port - ReplyPort where the message is replied when it has been
32 handled
33 extension - The filename extension to use when searching for macros
34 host - Name of the port to use as the initial command host
35 (e.g. as used in the ADDRESS Rexx statement). When NULL
36 is given "REXX" will be used.
38 RESULT
39 Pointer to the freshly allocated RexxMsg.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 DeleteRexxMsg(), IsRexxMsg(), FillRexxMsg(), ClearRexxMsg()
50 INTERNALS
51 The name in the Node part of this RexxMsg is set to a unique value
52 that is used in IsRexxMsg to test if it is a RexxMsg.
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
58 struct RexxMsg *rm = AllocMem(sizeof(struct RexxMsg), MEMF_PUBLIC|MEMF_CLEAR);
60 if (rm == NULL) ReturnPtr("CreateRexxMsg", struct RexxMsg *, NULL);
62 rm->rm_Node.mn_Node.ln_Type = NT_MESSAGE;
63 rm->rm_Node.mn_Node.ln_Name = RSBI(RexxSysBase)->rexxmsgid;
64 rm->rm_Node.mn_ReplyPort = port;
65 rm->rm_Node.mn_Length = sizeof(struct RexxMsg);
66 rm->rm_FileExt = (STRPTR)extension;
67 rm->rm_CommAddr = (STRPTR)host;
69 ReturnPtr("CreateRexxMsg", struct RexxMsg *, rm);
70 AROS_LIBFUNC_EXIT
71 } /* CreateRexxMsg */