version 1.48, 2004/09/16 04:39:16 |
version 1.49, 2005/10/12 06:50:42 |
|
|
{ |
{ |
sig_t oldintr; |
sig_t oldintr; |
int ch, ointer; |
int ch, ointer; |
char *cp, *tp, *tp2, tmpbuf[MAXPATHLEN]; |
char *cp, *tp, *tp2, tmpbuf[MAXPATHLEN], localcwd[MAXPATHLEN]; |
|
|
if (argc < 2 && !another(&argc, &argv, "remote-files")) { |
if (argc < 2 && !another(&argc, &argv, "remote-files")) { |
fprintf(ttyout, "usage: %s remote-files\n", argv[0]); |
fprintf(ttyout, "usage: %s remote-files\n", argv[0]); |
|
|
} |
} |
mname = argv[0]; |
mname = argv[0]; |
mflag = 1; |
mflag = 1; |
|
if (getcwd(localcwd, sizeof(localcwd)) == NULL) |
|
err(1, "can't get cwd"); |
|
|
oldintr = signal(SIGINT, mabort); |
oldintr = signal(SIGINT, mabort); |
(void)setjmp(jabort); |
(void)setjmp(jabort); |
while ((cp = remglob(argv, proxy, NULL)) != NULL) { |
while ((cp = remglob(argv, proxy, NULL)) != NULL) { |
|
|
mflag = 0; |
mflag = 0; |
continue; |
continue; |
} |
} |
if (mflag && confirm(argv[0], cp)) { |
if (!mflag) |
|
continue; |
|
if (!fileindir(cp, localcwd)) { |
|
fprintf(ttyout, "Skipping non-relative filename `%s'\n", |
|
cp); |
|
continue; |
|
} |
|
if (confirm(argv[0], cp)) { |
tp = cp; |
tp = cp; |
if (mcase) { |
if (mcase) { |
for (tp2 = tmpbuf; (ch = *tp++) != 0; ) |
for (tp2 = tmpbuf; (ch = *tp++) != 0; ) |