/* $OpenXM: OpenXM/rc/repl.c,v 1.3 2000/01/20 02:34:49 noro Exp $ */ #include #include #include #define BUFSIZE 10000 main() { char s[BUFSIZE]; char cwd[BUFSIZE]; char *slash; getcwd(cwd,BUFSIZE); slash = strrchr(cwd,'/'); *slash = 0; while (fgets(s,BUFSIZE,stdin) != NULL) { if (strcmp(s,"OpenXM_HOME=$HOME/OpenXM\n") == 0) { printf("OpenXM_HOME=%s\n",cwd); }else if (strcmp(s,"setenv OpenXM_HOME $HOME/OpenXM\n") == 0) { printf("setenv OpenXM_HOME %s\n",cwd); }else{ printf("%s",s); } } exit(0); }