home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / sys / h / pathname < prev    next >
Encoding:
Text File  |  1995-01-11  |  1.5 KB  |  46 lines

  1. /*
  2.  * $Header: /ax/networking:include/sys/pathname.h:networking  1.1  $
  3.  * $Source: /ax/networking:include/sys/pathname.h: $
  4.  *
  5.  * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
  6.  *
  7.  * $Log:    pathname.h,v $
  8.  * Revision 1.1  95/01/11  10:19:32  kwelton
  9.  * Initial revision
  10.  * 
  11.  * Revision 1.3  88/06/17  20:20:15  beta
  12.  * Acorn Unix initial beta version
  13.  * 
  14.  */
  15. /* @(#)pathname.h    1.1 87/06/01 3.2/4.3NFSSRC */
  16.  
  17. /*
  18.  * Pathname structure.
  19.  * System calls which operate on path names gather the
  20.  * pathname from system call into this structure and reduce
  21.  * it by peeling off translated components.  If a symbolic
  22.  * link is encountered the new pathname to be translated
  23.  * is also assembled in this structure.
  24.  */
  25. struct pathname {
  26.     char    *pn_buf;        /* underlying storage */
  27.     char    *pn_path;        /* remaining pathname */
  28.     u_int    pn_pathlen;        /* remaining length */
  29. };
  30.  
  31. #define    pn_peekchar(PNP)    ((PNP)->pn_pathlen!=0?*((PNP)->pn_path):0)
  32. #define pn_pathleft(PNP)    ((PNP)->pn_pathlen)
  33.  
  34. extern int    pn_alloc();        /* allocat buffer for pathname */
  35. extern int    pn_get();        /* allocate buf and copy path into it */
  36. #ifdef notneeded
  37. extern int    pn_getchar();        /* get next pathname char */
  38. #endif
  39. extern int    pn_set();        /* set pathname to string */
  40. extern int    pn_combine();        /* combine to pathnames (for symlink) */
  41. extern int    pn_getcomponent();    /* get next component of pathname */
  42. extern void    pn_skipslash();        /* skip over slashes */
  43. extern void    pn_free();        /* free pathname buffer */
  44.  
  45. /* EOF pathname.h */
  46.