Don't call ReadArgs() if started from WB.
[tangerine.git] / compiler / alib / createport.c
blob4314e76fae83884f769db9b722f5ffa4da55e10e
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: amiga.lib function CreatePort()
6 Lang: english
7 */
9 #include <proto/exec.h>
11 /*****************************************************************************
13 NAME */
14 #include <exec/ports.h>
15 #include <proto/alib.h>
17 struct MsgPort * CreatePort (
19 /* SYNOPSIS */
20 STRPTR name,
21 LONG pri)
23 /* FUNCTION
24 Allocate and initialize a new Exec message port. You must
25 use DeletePort() to get rid of it.
27 INPUTS
28 name - The name of the new port. The string is not copied
29 pri - The priority of the port.
31 RESULT
32 A pointer to the new message port or NULL if no memory or
33 no signal was available.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 DeletePort(), CreateMsgPort(), DeleteMsgPort()
44 INTERNALS
46 HISTORY
48 ******************************************************************************/
50 AROS_GET_SYSBASE_OK
51 struct MsgPort * mp;
53 mp = CreateMsgPort ();
55 if (mp)
57 mp->mp_Node.ln_Name = name;
58 mp->mp_Node.ln_Pri = pri;
60 if (name)
61 AddPort (mp);
64 return mp;
65 } /* CreatePort */