| version 1.7, 2002/04/05 01:55:59 |
version 1.10, 2003/01/16 08:27:23 |
|
|
| /* $OpenXM: OpenXM/rc/repl.c,v 1.6 2002/04/05 01:49:09 takayama Exp $ */ |
/* $OpenXM: OpenXM/rc/repl.c,v 1.9 2003/01/16 07:57:42 maekawa Exp $ */ |
| |
|
| #include <stdio.h> |
#include <stdio.h> |
| #include <unistd.h> |
#include <stdlib.h> |
| |
|
| |
#include <errno.h> |
| #include <string.h> |
#include <string.h> |
| |
#include <unistd.h> |
| |
|
| #define BUFSIZE 10000 |
#define BUFSIZE 10000 |
| |
|
| |
int |
| main(int argc,char *argv[]) { |
main(int argc,char *argv[]) { |
| char s[BUFSIZE]; |
char s[BUFSIZE]; |
| char cwd[BUFSIZE]; |
char cwd[BUFSIZE]; |
| Line 17 main(int argc,char *argv[]) { |
|
| Line 23 main(int argc,char *argv[]) { |
|
| } |
} |
| } |
} |
| |
|
| getcwd(cwd,BUFSIZE); |
if (getcwd(cwd, sizeof(cwd)) == NULL) { |
| slash = strrchr(cwd,'/'); |
fprintf(stderr, "getcwd: %s\n", strerror(errno)); |
| |
exit(1); |
| |
} |
| |
if ((slash = strrchr(cwd, '/')) == cwd) { |
| |
fprintf(stderr, "The current working directory is /.\n"); |
| |
exit(1); |
| |
} |
| *slash = 0; |
*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) { |
| Line 60 main(int argc,char *argv[]) { |
|
| Line 72 main(int argc,char *argv[]) { |
|
| } |
} |
| system("rm -f /tmp/repl_test.*"); |
system("rm -f /tmp/repl_test.*"); |
| |
|
| |
|
| exit(0); |
exit(0); |
| } |
} |
| |
|
| |
|
| |
|