=================================================================== RCS file: /home/cvs/OpenXM/rc/repl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -r1.2 -r1.3 --- OpenXM/rc/repl.c 2000/01/19 06:10:33 1.2 +++ OpenXM/rc/repl.c 2000/01/20 02:34:49 1.3 @@ -1,17 +1,22 @@ -/* $OpenXM: OpenXM/rc/repl.c,v 1.1 2000/01/18 09:38:58 takayama Exp $ */ +/* $OpenXM: OpenXM/rc/repl.c,v 1.2 2000/01/19 06:10:33 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/../../OpenXM\n",cwd); + printf("OpenXM_HOME=%s\n",cwd); }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{ printf("%s",s); }