Annotation of OpenXM/src/util/test.c, Revision 1.4
1.4 ! takayama 1: /* $OpenXM: OpenXM/src/util/test.c,v 1.3 2003/11/24 11:47:35 takayama Exp $ */
1.1 takayama 2: #include <stdio.h>
3: #include "ox_pathfinder.h"
4:
5: sGC_malloc(int a) {
6: return GC_malloc(a);
7: }
8:
9: /* which command */
10: main(int argc,char *argv[]) {
1.4 ! takayama 11: char *s;
1.1 takayama 12: if (argc != 2) {
13: fprintf(stderr,"test cmdname");
14: }
15: printf("%s\n",getCommandPath(argv[1]));
1.3 takayama 16:
17: printf("%s (cyg) ==> %s (win)\n",argv[1],cygwinPathToWinPath(argv[1]));
18: printf("%s (win) ==> %s (cyg)\n",argv[1],winPathToCygwinPath(argv[1]));
1.4 ! takayama 19:
! 20: printf("------------------ oxEvalEnvVar ---------------\n");
! 21: s = "/hoge/afo:${PATH}";
! 22: printf("%s ==> %s\n",s,oxEvalEnvVar(s));
! 23: s = "${PATH}:/hoge/afo";
! 24: printf("%s ==> %s\n",s,oxEvalEnvVar(s));
! 25: s = "/hoge/afo:${PATH";
! 26: printf("%s ==> %s\n",s,oxEvalEnvVar(s));
! 27: s = "/hoge/afo:$PATH}";
! 28: printf("%s ==> %s\n",s,oxEvalEnvVar(s));
! 29: s = "${HOME}:${PATH}:/hoge/afo";
! 30: printf("%s ==> %s\n",s,oxEvalEnvVar(s));
1.1 takayama 31: }
32:
33:
34:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>