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

Annotation of OpenXM/rc/repl.c, Revision 1.2

1.2     ! noro        1: /* $OpenXM: OpenXM/rc/repl.c,v 1.1 2000/01/18 09:38:58 takayama Exp $ */
1.1       takayama    2: #include <stdio.h>
                      3: #include <unistd.h>
                      4:
                      5: #define BUFSIZE 10000
                      6: main() {
                      7:   char s[BUFSIZE];
                      8:   char cwd[BUFSIZE];
                      9:   getcwd(cwd,BUFSIZE);
                     10:   while (fgets(s,BUFSIZE,stdin) != NULL) {
                     11:        if (strcmp(s,"OpenXM_HOME=$HOME/OpenXM\n") == 0) {
                     12:          printf("OpenXM_HOME=%s/../../OpenXM\n",cwd);
                     13:        }else if (strcmp(s,"setenv OpenXM_HOME $HOME/OpenXM\n") == 0) {
                     14:          printf("setenv OpenXM_HOME %s/../../OpenXM\n",cwd);
                     15:        }else{
                     16:          printf("%s",s);
                     17:        }
                     18:   }
1.2     ! noro       19:   exit(0);
1.1       takayama   20: }
                     21:
                     22:
                     23:

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