version 1.1, 2000/01/18 09:38:58 |
version 1.3, 2000/01/20 02:34:49 |
|
|
/* $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); |
} |
} |
|
|
|
|