home *** CD-ROM | disk | FTP | other *** search
- /*
- * $Header: /ax/networking:include/sys/pathname.h:networking 1.1 $
- * $Source: /ax/networking:include/sys/pathname.h: $
- *
- * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
- *
- * $Log: pathname.h,v $
- * Revision 1.1 95/01/11 10:19:32 kwelton
- * Initial revision
- *
- * Revision 1.3 88/06/17 20:20:15 beta
- * Acorn Unix initial beta version
- *
- */
- /* @(#)pathname.h 1.1 87/06/01 3.2/4.3NFSSRC */
-
- /*
- * Pathname structure.
- * System calls which operate on path names gather the
- * pathname from system call into this structure and reduce
- * it by peeling off translated components. If a symbolic
- * link is encountered the new pathname to be translated
- * is also assembled in this structure.
- */
- struct pathname {
- char *pn_buf; /* underlying storage */
- char *pn_path; /* remaining pathname */
- u_int pn_pathlen; /* remaining length */
- };
-
- #define pn_peekchar(PNP) ((PNP)->pn_pathlen!=0?*((PNP)->pn_path):0)
- #define pn_pathleft(PNP) ((PNP)->pn_pathlen)
-
- extern int pn_alloc(); /* allocat buffer for pathname */
- extern int pn_get(); /* allocate buf and copy path into it */
- #ifdef notneeded
- extern int pn_getchar(); /* get next pathname char */
- #endif
- extern int pn_set(); /* set pathname to string */
- extern int pn_combine(); /* combine to pathnames (for symlink) */
- extern int pn_getcomponent(); /* get next component of pathname */
- extern void pn_skipslash(); /* skip over slashes */
- extern void pn_free(); /* free pathname buffer */
-
- /* EOF pathname.h */
-