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

Diff for /OpenXM/src/util/test.c between version 1.1 and 1.6

version 1.1, 2003/11/16 07:14:11 version 1.6, 2004/03/02 06:23:34
Line 1 
Line 1 
   /* $OpenXM: OpenXM/src/util/test.c,v 1.5 2003/12/03 03:21:16 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "ox_pathfinder.h"  #include "ox_pathfinder.h"
   
Line 7  sGC_malloc(int a) {
Line 8  sGC_malloc(int a) {
   
 /* which command */  /* which command */
 main(int argc,char *argv[]) {  main(int argc,char *argv[]) {
     char *s;
     char **a;
     int i;
   
     printf("hello\n"); fflush(NULL);
     a = getServerEnv("bin/ox_sm1");
     i = 0;
     if (a == NULL) {fprintf(stderr,"Not found.\n"); exit(10);}
     while (a[i] != NULL) {
           printf("i=%d,  %s\n",i,a[i++]);
     }
     exit(0);
   
   if (argc != 2) {    if (argc != 2) {
         fprintf(stderr,"test cmdname");          fprintf(stderr,"test cmdname\n\n");
   }    }
     printf("%s\n",generateTMPfileName2("hoge","poly",0,0));
     printf("%s\n",generateTMPfileName2("hoge","poly",1,0));
     printf("%s\n",generateTMPfileName2("hoge","poly",0,1));
     printf("%s\n",generateTMPfileName2("hoge","poly",1,1));
     printf("---------------- getCommandPath ----------------\n");
   printf("%s\n",getCommandPath(argv[1]));    printf("%s\n",getCommandPath(argv[1]));
   
     printf("%s (cyg) ==> %s (win)\n",argv[1],cygwinPathToWinPath(argv[1]));
     printf("%s (win) ==> %s (cyg)\n",argv[1],winPathToCygwinPath(argv[1]));
   
     printf("------------------  oxEvalEnvVar ---------------\n");
     s = "/hoge/afo:${PATH}";
     printf("%s ==> %s\n",s,oxEvalEnvVar(s));
     s = "${PATH}:/hoge/afo";
     printf("%s ==> %s\n",s,oxEvalEnvVar(s));
     s = "/hoge/afo:${PATH";
     printf("%s ==> %s\n",s,oxEvalEnvVar(s));
     s = "/hoge/afo:$PATH}";
     printf("%s ==> %s\n",s,oxEvalEnvVar(s));
     s = "${HOME}:${PATH}:/hoge/afo";
     printf("%s ==> %s\n",s,oxEvalEnvVar(s));
 }  }
   
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

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