mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 15:54:22 +02:00
- (bal) Hand Sync of scp.c (reverted to upstream code)
- deraadt@cvs.openbsd.org 2002/03/30 17:45:46 [scp.c] stretch banners
This commit is contained in:
parent
38c4a28a7e
commit
cdb66e0e82
@ -1,3 +1,9 @@
|
|||||||
|
20020402
|
||||||
|
- (bal) Hand Sync of scp.c (reverted to upstream code)
|
||||||
|
- deraadt@cvs.openbsd.org 2002/03/30 17:45:46
|
||||||
|
[scp.c]
|
||||||
|
stretch banners
|
||||||
|
|
||||||
20020401
|
20020401
|
||||||
- (stevesk) [monitor.c] PAM should work again; will *not* work with
|
- (stevesk) [monitor.c] PAM should work again; will *not* work with
|
||||||
UsePrivilegeSeparation=yes.
|
UsePrivilegeSeparation=yes.
|
||||||
@ -8104,4 +8110,4 @@
|
|||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2006 2002/04/02 03:24:56 stevesk Exp $
|
$Id: ChangeLog,v 1.2007 2002/04/02 20:17:43 mouring Exp $
|
||||||
|
23
scp.c
23
scp.c
@ -75,7 +75,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: scp.c,v 1.86 2001/12/05 03:56:39 itojun Exp $");
|
RCSID("$OpenBSD: scp.c,v 1.87 2002/03/30 17:45:46 deraadt Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "atomicio.h"
|
#include "atomicio.h"
|
||||||
@ -94,14 +94,6 @@ char *__progname;
|
|||||||
/* alarm() interval for updating progress meter */
|
/* alarm() interval for updating progress meter */
|
||||||
#define PROGRESSTIME 1
|
#define PROGRESSTIME 1
|
||||||
|
|
||||||
/* Progress meter bar */
|
|
||||||
#define BAR \
|
|
||||||
"************************************************************"\
|
|
||||||
"************************************************************"\
|
|
||||||
"************************************************************"\
|
|
||||||
"************************************************************"
|
|
||||||
#define MAX_BARLENGTH (sizeof(BAR) - 1)
|
|
||||||
|
|
||||||
/* Visual statistics about files as they are transferred. */
|
/* Visual statistics about files as they are transferred. */
|
||||||
void progressmeter(int);
|
void progressmeter(int);
|
||||||
|
|
||||||
@ -1116,7 +1108,7 @@ progressmeter(int flag)
|
|||||||
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);
|
||||||
@ -1138,11 +1130,18 @@ progressmeter(int flag)
|
|||||||
snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio);
|
snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio);
|
||||||
|
|
||||||
barlength = getttywidth() - 51;
|
barlength = getttywidth() - 51;
|
||||||
barlength = (barlength <= MAX_BARLENGTH)?barlength:MAX_BARLENGTH;
|
|
||||||
if (barlength > 0) {
|
if (barlength > 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, BAR, barlength - i, "");
|
"|%.*s%*s|", i,
|
||||||
|
"*******************************************************"
|
||||||
|
"*******************************************************"
|
||||||
|
"*******************************************************"
|
||||||
|
"*******************************************************"
|
||||||
|
"*******************************************************"
|
||||||
|
"*******************************************************"
|
||||||
|
"*******************************************************",
|
||||||
|
barlength - i, "");
|
||||||
}
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
abbrevsize = cursize;
|
abbrevsize = cursize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user