[BACK]Return to repl.c CVS log [TXT][DIR] Up to [local] / OpenXM / rc

Diff for /OpenXM/rc/repl.c between version 1.1 and 1.3

version 1.1, 2000/01/18 09:38:58 version 1.3, 2000/01/20 02:34:49
Line 1 
Line 1 
 /* $OpenXM$ */  /* $OpenXM: OpenXM/rc/repl.c,v 1.2 2000/01/19 06:10:33 noro Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include <unistd.h>  #include <unistd.h>
   #include <string.h>
   
 #define BUFSIZE 10000  #define BUFSIZE 10000
 main() {  main() {
   char s[BUFSIZE];    char s[BUFSIZE];
   char cwd[BUFSIZE];    char cwd[BUFSIZE];
     char *slash;
   
   getcwd(cwd,BUFSIZE);    getcwd(cwd,BUFSIZE);
     slash = strrchr(cwd,'/');
     *slash = 0;
   while (fgets(s,BUFSIZE,stdin) != NULL) {    while (fgets(s,BUFSIZE,stdin) != NULL) {
         if (strcmp(s,"OpenXM_HOME=$HOME/OpenXM\n") == 0) {          if (strcmp(s,"OpenXM_HOME=$HOME/OpenXM\n") == 0) {
           printf("OpenXM_HOME=%s/../../OpenXM\n",cwd);            printf("OpenXM_HOME=%s\n",cwd);
         }else if (strcmp(s,"setenv OpenXM_HOME $HOME/OpenXM\n") == 0) {          }else if (strcmp(s,"setenv OpenXM_HOME $HOME/OpenXM\n") == 0) {
           printf("setenv OpenXM_HOME %s/../../OpenXM\n",cwd);            printf("setenv OpenXM_HOME %s\n",cwd);
         }else{          }else{
           printf("%s",s);            printf("%s",s);
         }          }
   }    }
     exit(0);
 }  }
   
   

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

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