[Libsysio-commit] HEAD: libsysio/src namei.c
Brought to you by:
lward
From: Ruth K. <rk...@us...> - 2004-01-12 23:02:15
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1:/tmp/cvs-serv18100 Modified Files: namei.c Log Message: Fortran libs prepend cwd to path, if first char is not '/', so remove everything up to the first ':' to get rid of Cplant prefix Index: namei.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/namei.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -b -B -p -r1.8 -r1.9 --- namei.c 28 Oct 2003 20:59:39 -0000 1.8 +++ namei.c 12 Jan 2004 23:02:08 -0000 1.9 @@ -435,28 +435,12 @@ _sysio_path_walk(struct pnode *parent, s } #ifdef CPLANT_YOD -static const char * -strip_prefix(const char *path) -{ - /* * for backward compatibility w/protocol switch - * remove 'prefix:' iff first ':' immediately - * precedes first '/' + * remove everything up to the first ':' + * fortran libs prepend cwd to path, so not much choice */ - - char *colon, *slash; - - colon = strchr(path, ':'); - slash = strchr(path, '/'); - - if (slash == colon + 1) - return(slash); - else - return(path); - -} -#define STRIP_PREFIX(p) strip_prefix(p) +#define STRIP_PREFIX(p) strchr(p,':') ? strchr(p,':')+1 : p #else #define STRIP_PREFIX(p) p #endif |