home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
200-299
/
ff294.lzh
/
DNet
/
amiga
/
lib
/
dlisten.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-12-11
|
420b
|
24 lines
/*
* DListen.c
*/
#include "lib.h"
PORT *
DListen(portnum)
uword portnum;
{
PORT *port = NULL;
char *ptr;
ptr = AllocMem(NAMELEN, MEMF_PUBLIC); /* memory the the name */
sprintf(ptr, NAMEPAT, portnum);
Forbid(); /* task-atomic operation */
if (FindPort(ptr) || !(port = CreatePort(ptr,0)))
FreeMem(ptr, NAMELEN);
Permit();
return(port);
}