[BACK]Return to test.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / util

Annotation of OpenXM/src/util/test.c, Revision 1.5

1.5     ! takayama    1: /* $OpenXM: OpenXM/src/util/test.c,v 1.4 2003/12/01 03:15:37 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) {
1.5     ! takayama   13:        fprintf(stderr,"test cmdname\n\n");
1.1       takayama   14:   }
1.5     ! takayama   15:   printf("%s\n",generateTMPfileName2("hoge","poly",0,0));
        !            16:   printf("%s\n",generateTMPfileName2("hoge","poly",1,0));
        !            17:   printf("%s\n",generateTMPfileName2("hoge","poly",0,1));
        !            18:   printf("%s\n",generateTMPfileName2("hoge","poly",1,1));
        !            19:   printf("---------------- getCommandPath ----------------\n");
1.1       takayama   20:   printf("%s\n",getCommandPath(argv[1]));
1.3       takayama   21:
                     22:   printf("%s (cyg) ==> %s (win)\n",argv[1],cygwinPathToWinPath(argv[1]));
                     23:   printf("%s (win) ==> %s (cyg)\n",argv[1],winPathToCygwinPath(argv[1]));
1.4       takayama   24:
                     25:   printf("------------------  oxEvalEnvVar ---------------\n");
                     26:   s = "/hoge/afo:${PATH}";
                     27:   printf("%s ==> %s\n",s,oxEvalEnvVar(s));
                     28:   s = "${PATH}:/hoge/afo";
                     29:   printf("%s ==> %s\n",s,oxEvalEnvVar(s));
                     30:   s = "/hoge/afo:${PATH";
                     31:   printf("%s ==> %s\n",s,oxEvalEnvVar(s));
                     32:   s = "/hoge/afo:$PATH}";
                     33:   printf("%s ==> %s\n",s,oxEvalEnvVar(s));
                     34:   s = "${HOME}:${PATH}:/hoge/afo";
                     35:   printf("%s ==> %s\n",s,oxEvalEnvVar(s));
1.1       takayama   36: }
                     37:
                     38:
                     39:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>