[BACK]Return to scanner.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/scanner.c between version 1.1 and 1.3

version 1.1, 1999/10/08 02:12:01 version 1.3, 2000/03/20 01:53:46
Line 1 
Line 1 
   /*$OpenXM: OpenXM/src/kan96xx/Kan/scanner.c,v 1.2 1999/11/18 08:08:24 takayama Exp $*/
 /*  scanner.c (SM StackMachine) */  /*  scanner.c (SM StackMachine) */
 /* export: struct tokens getokenSM(actionType kind,char *str);  /* export: struct tokens getokenSM(actionType kind,char *str);
    scanner.c is used to get tokens from streams.     scanner.c is used to get tokens from streams.
Line 38  struct tokens{
Line 39  struct tokens{
   
   
   
 FILE *BaseFp = stdin;       /* file pointer of the first file. */  FILE *BaseFp = NULL;       /* Initialized to stdin in stackmachine_init().
                                 file pointer of the first file. */
   
 int EchoInScanner = 0;      /* echo in scanner */  int EchoInScanner = 0;      /* echo in scanner */
   
Line 393  char *getLOAD_SM1_PATH() {
Line 395  char *getLOAD_SM1_PATH() {
   char *getenv(char *s);    char *getenv(char *s);
   p = getenv("LOAD_SM1_PATH");    p = getenv("LOAD_SM1_PATH");
   if (p == NULL) {    if (p == NULL) {
     return("/usr/local/lib/sm1/");      p = getenv("OpenXM_HOME");
       if (p == NULL) {
         return("/usr/local/lib/sm1/");
       }else{
         if (strlen(p) == 0) return(p);
         p2 = (char *) sGC_malloc(sizeof(char)*(strlen(p)+strlen("/lib/sm1/")+3));
         if (p2 == NULL) { fprintf(stderr,"No more memory.\n"); exit(10); }
         if (p[strlen(p)-1] != '/') {
           strcpy(p2,p); strcat(p2,"/lib/sm1/");
         }else{
           strcpy(p2,p); strcat(p2,"lib/sm1/");
         }
         return(p2);
       }
   }else{    }else{
     if (strlen(p) == 0) return(p);      if (strlen(p) == 0) return(p);
     if (p[strlen(p)-1] == '/') return(p);      if (p[strlen(p)-1] == '/') return(p);

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

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