=================================================================== RCS file: /home/cvs/OpenXM/src/util/ox_pathfinder.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -p -r1.9 -r1.10 --- OpenXM/src/util/ox_pathfinder.c 2003/11/24 11:47:35 1.9 +++ OpenXM/src/util/ox_pathfinder.c 2003/12/01 03:15:37 1.10 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/util/ox_pathfinder.c,v 1.8 2003/11/16 07:14:11 takayama Exp $ */ +/* $OpenXM: OpenXM/src/util/ox_pathfinder.c,v 1.9 2003/11/24 11:47:35 takayama Exp $ */ /* Moved from misc-2003/07/cygwin/test.c */ #include @@ -956,5 +956,48 @@ char *oxWhich_unix(char *cmdname,char *path) { } } return NULL; +} + +char *oxEvalEnvVar(char *s) { + int n, i,j; + char *es; + char *news; + int flag,flag2; + flag=-1; + n = strlen(s); + es = (char *)mymalloc(n+1); es[0] = 0; + if (es == NULL) nomemory(1); + for (i=0; i= 0) { + es = (char *)getenv(es); + if (es == NULL) es=""; + news = (char *) mymalloc(n+5+strlen(es)); + if (news == NULL) nomemory(1); + j = 0; + for (i=0; i