version 1.13, 1997/02/03 01:02:32 |
version 1.14, 1997/02/03 01:05:33 |
|
|
|
/* $OpenBSD$ */ |
/* $NetBSD: cmds.c,v 1.18 1997/02/01 10:44:54 lukem Exp $ */ |
/* $NetBSD: cmds.c,v 1.18 1997/02/01 10:44:54 lukem Exp $ */ |
|
|
/* |
/* |
|
|
#if 0 |
#if 0 |
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94"; |
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94"; |
#else |
#else |
static char rcsid[] = "$NetBSD: cmds.c,v 1.18 1997/02/01 10:44:54 lukem Exp $"; |
static char rcsid[] = "$OpenBSD$"; |
#endif |
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
|
|
printf("%s%s", sep, p->t_name); |
printf("%s%s", sep, p->t_name); |
sep = " | "; |
sep = " | "; |
} |
} |
printf(" ]\n"); |
puts(" ]"); |
code = -1; |
code = -1; |
return; |
return; |
} |
} |
|
|
else |
else |
comret = command("TYPE %s", p->t_mode); |
comret = command("TYPE %s", p->t_mode); |
if (comret == COMPLETE) { |
if (comret == COMPLETE) { |
(void) strcpy(typename, p->t_name); |
(void)strcpy(typename, p->t_name); |
curtype = type = p->t_type; |
curtype = type = p->t_type; |
} |
} |
} |
} |
|
|
mname = argv[0]; |
mname = argv[0]; |
mflag = 1; |
mflag = 1; |
oldintr = signal(SIGINT, mabort); |
oldintr = signal(SIGINT, mabort); |
(void) setjmp(jabort); |
(void)setjmp(jabort); |
if (proxy) { |
if (proxy) { |
char *cp, *tp2, tmpbuf[MAXPATHLEN]; |
char *cp, *tp2, tmpbuf[MAXPATHLEN]; |
|
|
|
|
} |
} |
} |
} |
} |
} |
(void) signal(SIGINT, oldintr); |
(void)signal(SIGINT, oldintr); |
mflag = 0; |
mflag = 0; |
return; |
return; |
} |
} |
|
|
} |
} |
globfree(&gl); |
globfree(&gl); |
} |
} |
(void) signal(SIGINT, oldintr); |
(void)signal(SIGINT, oldintr); |
mflag = 0; |
mflag = 0; |
} |
} |
|
|
|
|
char *argv[]; |
char *argv[]; |
{ |
{ |
|
|
(void) getit(argc, argv, 1, "r+w"); |
(void)getit(argc, argv, 1, "r+w"); |
} |
} |
|
|
void |
void |
|
|
char *argv[]; |
char *argv[]; |
{ |
{ |
|
|
(void) getit(argc, argv, 0, restart_point ? "r+w" : "w" ); |
(void)getit(argc, argv, 0, restart_point ? "r+w" : "w" ); |
} |
} |
|
|
/* |
/* |
|
|
int ointer, oconf; |
int ointer, oconf; |
|
|
alarmtimer(0); |
alarmtimer(0); |
printf("\n"); |
putchar('\n'); |
(void) fflush(stdout); |
(void)fflush(stdout); |
if (mflag && fromatty) { |
if (mflag && fromatty) { |
ointer = interactive; |
ointer = interactive; |
oconf = confirmrest; |
oconf = confirmrest; |
|
|
mname = argv[0]; |
mname = argv[0]; |
mflag = 1; |
mflag = 1; |
oldintr = signal(SIGINT, mabort); |
oldintr = signal(SIGINT, mabort); |
(void) setjmp(jabort); |
(void)setjmp(jabort); |
while ((cp = remglob(argv, proxy)) != NULL) { |
while ((cp = remglob(argv, proxy)) != NULL) { |
if (*cp == '\0') { |
if (*cp == '\0') { |
mflag = 0; |
mflag = 0; |
|
|
} |
} |
} |
} |
} |
} |
(void) signal(SIGINT, oldintr); |
(void)signal(SIGINT, oldintr); |
mflag = 0; |
mflag = 0; |
} |
} |
|
|
|
|
if (connected) |
if (connected) |
printf("Connected to %s.\n", hostname); |
printf("Connected to %s.\n", hostname); |
else |
else |
printf("Not connected.\n"); |
puts("Not connected."); |
if (!proxy) { |
if (!proxy) { |
pswitch(1); |
pswitch(1); |
if (connected) { |
if (connected) { |
|
|
hostname); |
hostname); |
} |
} |
else { |
else { |
printf("No proxy connection.\n"); |
puts("No proxy connection."); |
} |
} |
pswitch(0); |
pswitch(0); |
} |
} |
|
|
printf("Ntrans: (in) %s (out) %s\n", ntin, ntout); |
printf("Ntrans: (in) %s (out) %s\n", ntin, ntout); |
} |
} |
else { |
else { |
printf("Ntrans: off\n"); |
puts("Ntrans: off"); |
} |
} |
if (mapflag) { |
if (mapflag) { |
printf("Nmap: (in) %s (out) %s\n", mapin, mapout); |
printf("Nmap: (in) %s (out) %s\n", mapin, mapout); |
} |
} |
else { |
else { |
printf("Nmap: off\n"); |
puts("Nmap: off"); |
} |
} |
printf("Hash mark printing: %s; Mark count: %d; Progress bar: %s\n", |
printf("Hash mark printing: %s; Mark count: %d; Progress bar: %s\n", |
onoff(hash), mark, onoff(progress)); |
onoff(hash), mark, onoff(progress)); |
|
|
printf("Command line editing: %s\n", onoff(editing)); |
printf("Command line editing: %s\n", onoff(editing)); |
#endif /* !SMALLFTP */ |
#endif /* !SMALLFTP */ |
if (macnum > 0) { |
if (macnum > 0) { |
printf("Macros:\n"); |
puts("Macros:"); |
for (i=0; i<macnum; i++) { |
for (i=0; i<macnum; i++) { |
printf("\t%s\n", macros[i].mac_name); |
printf("\t%s\n", macros[i].mac_name); |
} |
} |
|
|
return -1; |
return -1; |
} |
} |
printf("%s %s.\n", mesg, onoff(*var)); |
printf("%s %s.\n", mesg, onoff(*var)); |
return *var; |
return (*var); |
} |
} |
|
|
/* |
/* |
|
|
printf("Hash mark printing %s", onoff(hash)); |
printf("Hash mark printing %s", onoff(hash)); |
if (hash) |
if (hash) |
printf(" (%d bytes/hash mark)", mark); |
printf(" (%d bytes/hash mark)", mark); |
printf(".\n"); |
puts("."); |
code = hash; |
code = hash; |
} |
} |
|
|
|
|
r = command("CWD %s", argv[1]); |
r = command("CWD %s", argv[1]); |
if (r == ERROR && code == 500) { |
if (r == ERROR && code == 500) { |
if (verbose) |
if (verbose) |
printf("CWD command not recognized, trying XCWD\n"); |
puts("CWD command not recognized, trying XCWD"); |
r = command("XCWD %s", argv[1]); |
r = command("XCWD %s", argv[1]); |
} |
} |
if (r == COMPLETE) |
if (r == COMPLETE) |
|
|
code = -1; |
code = -1; |
return; |
return; |
} |
} |
(void) command("DELE %s", argv[1]); |
(void)command("DELE %s", argv[1]); |
} |
} |
|
|
/* |
/* |
|
|
mname = argv[0]; |
mname = argv[0]; |
mflag = 1; |
mflag = 1; |
oldintr = signal(SIGINT, mabort); |
oldintr = signal(SIGINT, mabort); |
(void) setjmp(jabort); |
(void)setjmp(jabort); |
while ((cp = remglob(argv, 0)) != NULL) { |
while ((cp = remglob(argv, 0)) != NULL) { |
if (*cp == '\0') { |
if (*cp == '\0') { |
mflag = 0; |
mflag = 0; |
continue; |
continue; |
} |
} |
if (mflag && confirm(argv[0], cp)) { |
if (mflag && confirm(argv[0], cp)) { |
(void) command("DELE %s", cp); |
(void)command("DELE %s", cp); |
if (!mflag && fromatty) { |
if (!mflag && fromatty) { |
ointer = interactive; |
ointer = interactive; |
interactive = 1; |
interactive = 1; |
|
|
} |
} |
} |
} |
} |
} |
(void) signal(SIGINT, oldintr); |
(void)signal(SIGINT, oldintr); |
mflag = 0; |
mflag = 0; |
} |
} |
|
|
|
|
return; |
return; |
} |
} |
if (command("RNFR %s", argv[1]) == CONTINUE) |
if (command("RNFR %s", argv[1]) == CONTINUE) |
(void) command("RNTO %s", argv[2]); |
(void)command("RNTO %s", argv[2]); |
} |
} |
|
|
/* |
/* |
|
|
mname = argv[0]; |
mname = argv[0]; |
mflag = 1; |
mflag = 1; |
oldintr = signal(SIGINT, mabort); |
oldintr = signal(SIGINT, mabort); |
(void) setjmp(jabort); |
(void)setjmp(jabort); |
for (i = 1; mflag && i < argc-1; ++i) { |
for (i = 1; mflag && i < argc-1; ++i) { |
*mode = (i == 1) ? 'w' : 'a'; |
*mode = (i == 1) ? 'w' : 'a'; |
recvrequest(cmd, dest, argv[i], mode, 0); |
recvrequest(cmd, dest, argv[i], mode, 0); |
|
|
interactive = ointer; |
interactive = ointer; |
} |
} |
} |
} |
(void) signal(SIGINT, oldintr); |
(void)signal(SIGINT, oldintr); |
mflag = 0; |
mflag = 0; |
} |
} |
|
|
|
|
old2 = signal (SIGQUIT, SIG_IGN); |
old2 = signal (SIGQUIT, SIG_IGN); |
if ((pid = fork()) == 0) { |
if ((pid = fork()) == 0) { |
for (pid = 3; pid < 20; pid++) |
for (pid = 3; pid < 20; pid++) |
(void) close(pid); |
(void)close(pid); |
(void) signal(SIGINT, SIG_DFL); |
(void)signal(SIGINT, SIG_DFL); |
(void) signal(SIGQUIT, SIG_DFL); |
(void)signal(SIGQUIT, SIG_DFL); |
shell = getenv("SHELL"); |
shell = getenv("SHELL"); |
if (shell == NULL) |
if (shell == NULL) |
shell = _PATH_BSHELL; |
shell = _PATH_BSHELL; |
|
|
if (namep == NULL) |
if (namep == NULL) |
namep = shell; |
namep = shell; |
shellnam[0] = '-'; |
shellnam[0] = '-'; |
(void) strncpy(shellnam + 1, ++namep, sizeof(shellnam) - 1); |
(void)strncpy(shellnam + 1, ++namep, sizeof(shellnam) - 2); |
|
shellnam[sizeof(shellnam) - 1] = '\0'; |
if (strcmp(namep, "sh") != 0) |
if (strcmp(namep, "sh") != 0) |
shellnam[0] = '+'; |
shellnam[0] = '+'; |
if (debug) { |
if (debug) { |
printf ("%s\n", shell); |
puts(shell); |
(void) fflush (stdout); |
(void)fflush(stdout); |
} |
} |
if (argc > 1) { |
if (argc > 1) { |
execl(shell, shellnam, "-c", altarg, (char *)0); |
execl(shell, shellnam, "-c", altarg, (char *)0); |
|
|
if (pid > 0) |
if (pid > 0) |
while (wait((int *)&status) != pid) |
while (wait((int *)&status) != pid) |
; |
; |
(void) signal(SIGINT, old1); |
(void)signal(SIGINT, old1); |
(void) signal(SIGQUIT, old2); |
(void)signal(SIGQUIT, old2); |
if (pid == -1) { |
if (pid == -1) { |
warn("%s", "Try again later"); |
warn("%s", "Try again later"); |
code = -1; |
code = -1; |
|
|
int n, aflag = 0; |
int n, aflag = 0; |
|
|
if (argc < 2) |
if (argc < 2) |
(void) another(&argc, &argv, "username"); |
(void)another(&argc, &argv, "username"); |
if (argc < 2 || argc > 4) { |
if (argc < 2 || argc > 4) { |
printf("usage: %s username [password] [account]\n", argv[0]); |
printf("usage: %s username [password] [account]\n", argv[0]); |
code = -1; |
code = -1; |
|
|
} |
} |
if (n == CONTINUE) { |
if (n == CONTINUE) { |
if (argc < 4) { |
if (argc < 4) { |
printf("Account: "); (void) fflush(stdout); |
(void)fputs("Account: ", stdout); |
(void) fgets(acct, sizeof(acct) - 1, stdin); |
(void)fflush(stdout); |
|
(void)fgets(acct, sizeof(acct) - 1, stdin); |
acct[strlen(acct) - 1] = '\0'; |
acct[strlen(acct) - 1] = '\0'; |
argv[3] = acct; argc++; |
argv[3] = acct; argc++; |
} |
} |
|
|
aflag++; |
aflag++; |
} |
} |
if (n != COMPLETE) { |
if (n != COMPLETE) { |
fprintf(stdout, "Login failed.\n"); |
puts("Login failed."); |
return; |
return; |
} |
} |
if (!aflag && argc == 4) { |
if (!aflag && argc == 4) { |
(void) command("ACCT %s", argv[3]); |
(void)command("ACCT %s", argv[3]); |
} |
} |
} |
} |
|
|
|
|
*/ |
*/ |
verbose = 1; |
verbose = 1; |
if (command("PWD") == ERROR && code == 500) { |
if (command("PWD") == ERROR && code == 500) { |
printf("PWD command not recognized, trying XPWD\n"); |
puts("PWD command not recognized, trying XPWD"); |
(void) command("XPWD"); |
(void)command("XPWD"); |
} |
} |
verbose = oldverbose; |
verbose = oldverbose; |
} |
} |
|
|
} |
} |
if (command("MKD %s", argv[1]) == ERROR && code == 500) { |
if (command("MKD %s", argv[1]) == ERROR && code == 500) { |
if (verbose) |
if (verbose) |
printf("MKD command not recognized, trying XMKD\n"); |
puts("MKD command not recognized, trying XMKD"); |
(void) command("XMKD %s", argv[1]); |
(void)command("XMKD %s", argv[1]); |
} |
} |
} |
} |
|
|
|
|
} |
} |
if (command("RMD %s", argv[1]) == ERROR && code == 500) { |
if (command("RMD %s", argv[1]) == ERROR && code == 500) { |
if (verbose) |
if (verbose) |
printf("RMD command not recognized, trying XRMD\n"); |
puts("RMD command not recognized, trying XRMD"); |
(void) command("XRMD %s", argv[1]); |
(void)command("XRMD %s", argv[1]); |
} |
} |
} |
} |
|
|
|
|
int i, len; |
int i, len; |
char buf[BUFSIZ]; /* must be >= sizeof(line) */ |
char buf[BUFSIZ]; /* must be >= sizeof(line) */ |
|
|
(void) strncpy(buf, initial, sizeof(buf)); |
(void)strncpy(buf, initial, sizeof(buf) - 1); |
|
buf[sizeof(buf) - 1] = '\0'; |
if (argc > 1) { |
if (argc > 1) { |
len = strlen(buf); |
len = strlen(buf); |
len += strlen(strncpy(&buf[len], argv[1], sizeof(buf) - len)); |
len += strlen(strncpy(&buf[len], argv[1], sizeof(buf) - len - 1)); |
for (i = 2; i < argc; i++) { |
for (i = 2; i < argc && len < sizeof(buf); i++) { |
buf[len++] = ' '; |
buf[len++] = ' '; |
len += strlen(strncpy(&buf[len], argv[i], |
len += strlen(strncpy(&buf[len], argv[i], |
sizeof(buf) - len)); |
sizeof(buf) - len) - 1); |
} |
} |
} |
} |
if (command(buf) == PRELIM) { |
if (command(buf) == PRELIM) { |
|
|
code = -1; |
code = -1; |
return; |
return; |
} |
} |
(void) command("SITE CHMOD %s %s", argv[1], argv[2]); |
(void)command("SITE CHMOD %s %s", argv[1], argv[2]); |
} |
} |
|
|
void |
void |
|
|
int oldverbose = verbose; |
int oldverbose = verbose; |
|
|
verbose = 1; |
verbose = 1; |
(void) command(argc == 1 ? "SITE UMASK" : "SITE UMASK %s", argv[1]); |
(void)command(argc == 1 ? "SITE UMASK" : "SITE UMASK %s", argv[1]); |
verbose = oldverbose; |
verbose = oldverbose; |
} |
} |
|
|
|
|
int oldverbose = verbose; |
int oldverbose = verbose; |
|
|
verbose = 1; |
verbose = 1; |
(void) command(argc == 1 ? "SITE IDLE" : "SITE IDLE %s", argv[1]); |
(void)command(argc == 1 ? "SITE IDLE" : "SITE IDLE %s", argv[1]); |
verbose = oldverbose; |
verbose = oldverbose; |
} |
} |
|
|
|
|
int oldverbose = verbose; |
int oldverbose = verbose; |
|
|
verbose = 1; |
verbose = 1; |
(void) command(argc == 1 ? "HELP" : "HELP %s", argv[1]); |
(void)command(argc == 1 ? "HELP" : "HELP %s", argv[1]); |
verbose = oldverbose; |
verbose = oldverbose; |
} |
} |
|
|
|
|
|
|
if (!connected) |
if (!connected) |
return; |
return; |
(void) command("QUIT"); |
(void)command("QUIT"); |
if (cout) { |
if (cout) { |
(void) fclose(cout); |
(void)fclose(cout); |
} |
} |
cout = NULL; |
cout = NULL; |
connected = 0; |
connected = 0; |
|
|
ap = argv[1]; |
ap = argv[1]; |
else |
else |
ap = getpass("Account:"); |
ap = getpass("Account:"); |
(void) command("ACCT %s", ap); |
(void)command("ACCT %s", ap); |
} |
} |
|
|
jmp_buf abortprox; |
jmp_buf abortprox; |
|
|
} |
} |
c = getcmd(argv[1]); |
c = getcmd(argv[1]); |
if (c == (struct cmd *) -1) { |
if (c == (struct cmd *) -1) { |
printf("?Ambiguous command\n"); |
puts("?Ambiguous command"); |
(void) fflush(stdout); |
(void)fflush(stdout); |
code = -1; |
code = -1; |
return; |
return; |
} |
} |
if (c == 0) { |
if (c == 0) { |
printf("?Invalid command\n"); |
puts("?Invalid command"); |
(void) fflush(stdout); |
(void)fflush(stdout); |
code = -1; |
code = -1; |
return; |
return; |
} |
} |
if (!c->c_proxy) { |
if (!c->c_proxy) { |
printf("?Invalid proxy command\n"); |
puts("?Invalid proxy command"); |
(void) fflush(stdout); |
(void)fflush(stdout); |
code = -1; |
code = -1; |
return; |
return; |
} |
} |
|
|
oldintr = signal(SIGINT, proxabort); |
oldintr = signal(SIGINT, proxabort); |
pswitch(1); |
pswitch(1); |
if (c->c_conn && !connected) { |
if (c->c_conn && !connected) { |
printf("Not connected\n"); |
puts("Not connected"); |
(void) fflush(stdout); |
(void)fflush(stdout); |
pswitch(0); |
pswitch(0); |
(void) signal(SIGINT, oldintr); |
(void)signal(SIGINT, oldintr); |
code = -1; |
code = -1; |
return; |
return; |
} |
} |
|
|
proxflag = 0; |
proxflag = 0; |
} |
} |
pswitch(0); |
pswitch(0); |
(void) signal(SIGINT, oldintr); |
(void)signal(SIGINT, oldintr); |
} |
} |
|
|
void |
void |
|
|
{ |
{ |
if (argc == 1) { |
if (argc == 1) { |
ntflag = 0; |
ntflag = 0; |
printf("Ntrans off.\n"); |
puts("Ntrans off."); |
code = ntflag; |
code = ntflag; |
return; |
return; |
} |
} |
ntflag++; |
ntflag++; |
code = ntflag; |
code = ntflag; |
(void) strncpy(ntin, argv[1], 16); |
(void)strncpy(ntin, argv[1], sizeof(ntin) - 1); |
ntin[16] = '\0'; |
ntin[sizeof(ntin) - 1] = '\0'; |
if (argc == 2) { |
if (argc == 2) { |
ntout[0] = '\0'; |
ntout[0] = '\0'; |
return; |
return; |
} |
} |
(void) strncpy(ntout, argv[2], 16); |
(void)strncpy(ntout, argv[2], sizeof(ntout) - 1); |
ntout[16] = '\0'; |
ntout[sizeof(ntout) - 1] = '\0'; |
} |
} |
|
|
char * |
char * |
|
|
|
|
if (argc == 1) { |
if (argc == 1) { |
mapflag = 0; |
mapflag = 0; |
printf("Nmap off.\n"); |
puts("Nmap off."); |
code = mapflag; |
code = mapflag; |
return; |
return; |
} |
} |
|
|
cp = strchr(altarg, ' '); |
cp = strchr(altarg, ' '); |
} |
} |
*cp = '\0'; |
*cp = '\0'; |
(void) strncpy(mapin, altarg, MAXPATHLEN - 1); |
(void)strncpy(mapin, altarg, MAXPATHLEN - 1); |
while (*++cp == ' ') |
while (*++cp == ' ') |
continue; |
continue; |
(void) strncpy(mapout, cp, MAXPATHLEN - 1); |
(void)strncpy(mapout, cp, MAXPATHLEN - 1); |
} |
} |
|
|
char * |
char * |
|
|
} |
} |
} |
} |
if (!*cp2) { |
if (!*cp2) { |
printf("nmap: unbalanced " |
puts("nmap: unbalanced brackets"); |
"brackets\n"); |
|
return (name); |
return (name); |
} |
} |
match = 1; |
match = 1; |
|
|
} |
} |
} |
} |
if (!*cp2) { |
if (!*cp2) { |
printf("nmap: unbalanced " |
puts("nmap: unbalanced brackets"); |
"brackets\n"); |
|
return (name); |
return (name); |
} |
} |
break; |
break; |
|
|
r = command("CDUP"); |
r = command("CDUP"); |
if (r == ERROR && code == 500) { |
if (r == ERROR && code == 500) { |
if (verbose) |
if (verbose) |
printf("CDUP command not recognized, trying XCUP\n"); |
puts("CDUP command not recognized, trying XCUP"); |
r = command("XCUP"); |
r = command("XCUP"); |
} |
} |
if (r == COMPLETE) |
if (r == COMPLETE) |
|
|
{ |
{ |
|
|
if (argc != 2) |
if (argc != 2) |
printf("restart: offset not specified\n"); |
puts("restart: offset not specified"); |
else { |
else { |
restart_point = atol(argv[1]); |
restart_point = atol(argv[1]); |
printf("Restarting at %qd. Execute get, put or append to" |
printf("Restarting at %qd. Execute get, put or append to" |
|
|
char *argv[]; |
char *argv[]; |
{ |
{ |
|
|
(void) command("SYST"); |
(void)command("SYST"); |
} |
} |
|
|
void |
void |
|
|
int c; |
int c; |
|
|
if (macnum == 16) { |
if (macnum == 16) { |
printf("Limit of 16 macros have already been defined\n"); |
puts("Limit of 16 macros have already been defined"); |
code = -1; |
code = -1; |
return; |
return; |
} |
} |
|
|
return; |
return; |
} |
} |
if (interactive) { |
if (interactive) { |
printf("Enter macro line by line, terminating it with a " |
puts("Enter macro line by line, terminating it with a null line"); |
"null line\n"); |
|
} |
} |
(void) strncpy(macros[macnum].mac_name, argv[1], 8); |
(void)strncpy(macros[macnum].mac_name, argv[1], |
if (macnum == 0) { |
sizeof(macros[macnum].mac_name) - 1); |
|
macros[macnum].mac_name[sizeof(macros[macnum].mac_name) - 1] = '\0'; |
|
if (macnum == 0) |
macros[macnum].mac_start = macbuf; |
macros[macnum].mac_start = macbuf; |
} |
else |
else { |
|
macros[macnum].mac_start = macros[macnum - 1].mac_end + 1; |
macros[macnum].mac_start = macros[macnum - 1].mac_end + 1; |
} |
|
tmp = macros[macnum].mac_start; |
tmp = macros[macnum].mac_start; |
while (tmp != macbuf+4096) { |
while (tmp != macbuf+4096) { |
if ((c = getchar()) == EOF) { |
if ((c = getchar()) == EOF) { |
printf("macdef:end of file encountered\n"); |
puts("macdef: end of file encountered"); |
code = -1; |
code = -1; |
return; |
return; |
} |
} |
|
|
while ((c = getchar()) != '\n' && c != EOF) |
while ((c = getchar()) != '\n' && c != EOF) |
/* LOOP */; |
/* LOOP */; |
if (c == EOF || getchar() == '\n') { |
if (c == EOF || getchar() == '\n') { |
printf("Macro not defined - 4k buffer exceeded\n"); |
puts("Macro not defined - 4k buffer exceeded"); |
code = -1; |
code = -1; |
return; |
return; |
} |
} |
|
|
char *argv[]; |
char *argv[]; |
{ |
{ |
|
|
(void) command(argc > 1 ? "STAT %s" : "STAT" , argv[1]); |
(void)command(argc > 1 ? "STAT %s" : "STAT" , argv[1]); |
} |
} |
|
|
/* |
/* |