version 1.5, 1997/04/02 01:47:01 |
version 1.6, 1997/08/22 22:42:07 |
|
|
/* |
/* |
* get the UNIX receiving file's name |
* get the UNIX receiving file's name |
*/ |
*/ |
if (prompt("Local file name? ", copyname)) |
if (prompt("Local file name? ", copyname, sizeof(copyname))) |
return; |
return; |
cp = expand(copyname); |
cp = expand(copyname); |
if ((sfd = creat(cp, 0666)) < 0) { |
if ((sfd = creat(cp, 0666)) < 0) { |
|
|
/* |
/* |
* collect parameters |
* collect parameters |
*/ |
*/ |
if (prompt("List command for remote system? ", buf)) { |
if (prompt("List command for remote system? ", buf, sizeof(buf))) { |
unlink(copyname); |
unlink(copyname); |
return; |
return; |
} |
} |
|
|
int fd, argc; |
int fd, argc; |
char line[BUFSIZ], *expand(), *cp; |
char line[BUFSIZ], *expand(), *cp; |
|
|
if (prompt("[take] ", copyname)) |
if (prompt("[take] ", copyname, sizeof(copyname))) |
return; |
return; |
if ((argc = args(copyname, argv)) < 1 || argc > 2) { |
if ((argc = args(copyname, argv)) < 1 || argc > 2) { |
printf("usage: <take> from [to]\r\n"); |
printf("usage: <take> from [to]\r\n"); |
|
|
int status, p; |
int status, p; |
extern int errno; |
extern int errno; |
|
|
if (prompt("Local command? ", buf)) |
if (prompt("Local command? ", buf, sizeof(buf))) |
return; |
return; |
|
|
if (pipe(pdes)) { |
if (pipe(pdes)) { |
|
|
printf("can't fork!\r\n"); |
printf("can't fork!\r\n"); |
return; |
return; |
} else if (cpid) { |
} else if (cpid) { |
if (prompt("List command for remote system? ", buf)) { |
if (prompt("List command for remote system? ", buf, sizeof(buf))) { |
close(pdes[0]), close(pdes[1]); |
close(pdes[0]), close(pdes[1]); |
kill (cpid, SIGKILL); |
kill (cpid, SIGKILL); |
} else { |
} else { |
|
|
/* |
/* |
* get file name |
* get file name |
*/ |
*/ |
if (prompt("Local file name? ", fname)) |
if (prompt("Local file name? ", fname, sizeof(fname))) |
return; |
return; |
|
|
/* |
/* |
|
|
char *expand(); |
char *expand(); |
char *copynamex; |
char *copynamex; |
|
|
if (prompt("[put] ", copyname)) |
if (prompt("[put] ", copyname, sizeof(copyname))) |
return; |
return; |
if ((argc = args(copyname, argv)) < 1 || argc > 2) { |
if ((argc = args(copyname, argv)) < 1 || argc > 2) { |
printf("usage: <put> from [to]\r\n"); |
printf("usage: <put> from [to]\r\n"); |
|
|
time_t start; |
time_t start; |
|
|
putchar(c); |
putchar(c); |
if (prompt("Local command? ", buf)) |
if (prompt("Local command? ", buf, sizeof(buf))) |
return; |
return; |
kill(pid, SIGIOT); /* put TIPOUT into a wait state */ |
kill(pid, SIGIOT); /* put TIPOUT into a wait state */ |
signal(SIGINT, SIG_IGN); |
signal(SIGINT, SIG_IGN); |
|
|
time_t start; |
time_t start; |
|
|
putchar(c); |
putchar(c); |
if (prompt("Local command? ", buf)) |
if (prompt("Local command? ", buf, sizeof(buf))) |
return; |
return; |
kill(pid, SIGIOT); /* put TIPOUT into a wait state */ |
kill(pid, SIGIOT); /* put TIPOUT into a wait state */ |
signal(SIGINT, SIG_IGN); |
signal(SIGINT, SIG_IGN); |
|
|
*/ |
*/ |
chdirectory() |
chdirectory() |
{ |
{ |
char dirname[80]; |
char dirname[PATH_MAX]; |
register char *cp = dirname; |
register char *cp = dirname; |
|
|
if (prompt("[cd] ", dirname)) { |
if (prompt("[cd] ", dirname, sizeof(dirname))) { |
if (stoprompt) |
if (stoprompt) |
return; |
return; |
cp = value(HOME); |
cp = value(HOME); |
|
|
{ |
{ |
char buf[256]; |
char buf[256]; |
|
|
if (prompt("[set] ", buf)) |
if (prompt("[set] ", buf, sizeof(buf))) |
return; |
return; |
vlex(buf); |
vlex(buf); |
if (vtable[BEAUTIFY].v_access&CHANGED) { |
if (vtable[BEAUTIFY].v_access&CHANGED) { |