version 1.85, 2001/10/01 08:06:28 |
version 1.85.2.2, 2002/05/17 00:03:24 |
|
|
cursize = need; |
cursize = need; |
} |
} |
(void) snprintf(namebuf, need, "%s%s%s", targ, |
(void) snprintf(namebuf, need, "%s%s%s", targ, |
*targ ? "/" : "", cp); |
strcmp(targ, "/") ? "/" : "", cp); |
np = namebuf; |
np = namebuf; |
} else |
} else |
np = targ; |
np = targ; |
|
|
} |
} |
|
|
int |
int |
response() |
response(void) |
{ |
{ |
char ch, *cp, resp, rbuf[2048]; |
char ch, *cp, resp, rbuf[2048]; |
|
|
|
|
} |
} |
|
|
void |
void |
usage() |
usage(void) |
{ |
{ |
(void) fprintf(stderr, |
(void) fprintf(stderr, |
"usage: scp [-pqrvBC46] [-F config] [-S ssh] [-P port] [-c cipher] [-i identity]\n" |
"usage: scp [-pqrvBC46] [-F config] [-S ssh] [-P port] [-c cipher] [-i identity]\n" |
|
|
off_t cursize, abbrevsize; |
off_t cursize, abbrevsize; |
double elapsed; |
double elapsed; |
int ratio, barlength, i, remaining; |
int ratio, barlength, i, remaining; |
char buf[256]; |
char buf[512]; |
|
|
if (flag == -1) { |
if (flag == -1) { |
(void) gettimeofday(&start, (struct timezone *) 0); |
(void) gettimeofday(&start, (struct timezone *) 0); |
|
|
i = barlength * ratio / 100; |
i = barlength * ratio / 100; |
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), |
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), |
"|%.*s%*s|", i, |
"|%.*s%*s|", i, |
"***************************************" |
"*******************************************************" |
"***************************************" |
"*******************************************************" |
"***************************************" |
"*******************************************************" |
"***************************************", |
"*******************************************************" |
|
"*******************************************************" |
|
"*******************************************************" |
|
"*******************************************************", |
barlength - i, ""); |
barlength - i, ""); |
} |
} |
i = 0; |
i = 0; |