]> andersk Git - openssh.git/commitdiff
- (bal) Hand Sync of scp.c (reverted to upstream code)
authormouring <mouring>
Tue, 2 Apr 2002 20:17:43 +0000 (20:17 +0000)
committermouring <mouring>
Tue, 2 Apr 2002 20:17:43 +0000 (20:17 +0000)
   - deraadt@cvs.openbsd.org 2002/03/30 17:45:46
     [scp.c]
     stretch banners

ChangeLog
scp.c

index 08e0bdd016d30d18eed7313d0489a6879086a031..c5267ab95c8f54e21bceb9669726851a190f2228 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
  - (stevesk) [monitor.c] PAM should work again; will *not* work with
    UsePrivilegeSeparation=yes.
diff --git a/scp.c b/scp.c
index 83e7769d6458380b2a3ba0f59e697c51c79a524c..fcf55abde44bfcaa82295235cfde9137b0b7c139 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -75,7 +75,7 @@
  */
 
 #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 "atomicio.h"
@@ -94,14 +94,6 @@ char *__progname;
 /* alarm() interval for updating progress meter */
 #define PROGRESSTIME   1
 
-/* Progress meter bar */
-#define BAR \
-       "************************************************************"\
-       "************************************************************"\
-       "************************************************************"\
-       "************************************************************"
-#define MAX_BARLENGTH (sizeof(BAR) - 1)
-
 /* Visual statistics about files as they are transferred. */
 void progressmeter(int);
 
@@ -1116,7 +1108,7 @@ progressmeter(int flag)
        off_t cursize, abbrevsize;
        double elapsed;
        int ratio, barlength, i, remaining;
-       char buf[256];
+       char buf[512];
 
        if (flag == -1) {
                (void) gettimeofday(&start, (struct timezone *) 0);
@@ -1138,11 +1130,18 @@ progressmeter(int flag)
        snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio);
 
        barlength = getttywidth() - 51;
-       barlength = (barlength <= MAX_BARLENGTH)?barlength:MAX_BARLENGTH;
        if (barlength > 0) {
                i = barlength * ratio / 100;
                snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
-                        "|%.*s%*s|", i, BAR, barlength - i, "");
+                   "|%.*s%*s|", i,
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************",
+                   barlength - i, "");
        }
        i = 0;
        abbrevsize = cursize;
This page took 0.199808 seconds and 5 git commands to generate.