home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / exec / findport.c < prev    next >
Encoding:
C/C++ Source or Header  |  1978-03-06  |  1.4 KB  |  67 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: findport.c,v 1.5 1996/10/24 15:50:48 aros Exp $
  4.     $Log: findport.c,v $
  5.     Revision 1.5  1996/10/24 15:50:48  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:56:01  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:10  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang: english
  18. */
  19. #include <exec/execbase.h>
  20. #include <aros/libcall.h>
  21.  
  22. /*****************************************************************************
  23.  
  24.     NAME */
  25.     #include <clib/exec_protos.h>
  26.  
  27.     AROS_LH1(struct MsgPort *, FindPort,
  28.  
  29. /*  SYNOPSIS */
  30.     AROS_LHA(STRPTR, name,A1),
  31.  
  32. /*  LOCATION */
  33.     struct ExecBase *, SysBase, 65, Exec)
  34.  
  35. /*  FUNCTION
  36.     Look for a public messageport by name. This function doesn't
  37.     arbitrate for the port list and must be protected with a Forbid()
  38.     Permit() pair.
  39.  
  40.     INPUTS
  41.     port - Pointer to NUL terminated C string.
  42.  
  43.     RESULT
  44.     Pointer to struct MsgPort or NULL if there is no port of that name.
  45.  
  46.     NOTES
  47.  
  48.     EXAMPLE
  49.  
  50.     BUGS
  51.  
  52.     SEE ALSO
  53.  
  54.     INTERNALS
  55.  
  56.     HISTORY
  57.  
  58. ******************************************************************************/
  59. {
  60.     AROS_LIBFUNC_INIT
  61.  
  62.     /* Nothing spectacular - just look for that name. */
  63.     return (struct MsgPort *)FindName(&SysBase->PortList,name);
  64.     AROS_LIBFUNC_EXIT
  65. } /* FindPort */
  66.  
  67.