search for: barlength

Displaying 6 results from an estimated 6 matches for "barlength".

2000 Jul 02
1
minor cosmetic bug
...ss fix: ########################################################################### :; diff -u openssh-2.1.1p2/scp.c openssh-2.1.1p2+jhc/scp.c --- openssh-2.1.1p2+jhc/scp.c Thu Jun 22 07:32:32 2000 +++ openssh-2.1.1p2/scp.c Sat Jul 1 22:15:36 2000 @@ -1176,8 +1176,9 @@ i = barlength * ratio / 100; snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "|%.*s%*s|", i, - "*****************************************************************************" - "****************...
2002 Feb 06
2
SFTP Status Bar..
...t; */ + static const char prefixes[] = " KMGTP"; + static char *progressbar = NULL; + static struct timeval *start = NULL, lastupdate; + static off_t lastsize; + static size_t progressbar_size = 0; + struct timeval now, td, wait; + off_t cursize, abbrevsize; + double elapsed; + int ratio, barlength, i, remaining; + char buf[256]; + + if (!start) { + start = xmalloc(sizeof(struct timeval)); + (void) gettimeofday(start, (struct timezone *) 0); + lastupdate = *start; + lastsize = 0; + } + if (foregroundproc() == 0) + return; + + (void) gettimeofday(&now, (struct timezone *) 0); + cursiz...
2002 Jan 30
1
Quick sftp status indicator.
...st char prefixes[] = " KMGTP"; + static struct timeval lastupdate; + static off_t lastsize; + static u_char *progressbar = NULL; + static size_t progressbar_size = 0; + static struct timeval start; + struct timeval now, td, wait; + off_t cursize, abbrevsize; + double elapsed; + int ratio, barlength, i, remaining; + char buf[256]; + + if (flag == -1) { + (void) gettimeofday(&start, (struct timezone *) 0); + lastupdate = start; + lastsize = 0; + } + if (foregroundproc() == 0) + return; + + (void) gettimeofday(&now, (struct timezone *) 0); + cursize = statbytes; + if (totalbytes != 0...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...c const char prefixes[] = " KMGTP"; + static char *progressbar = NULL, file = NULL; + static struct timeval *start = NULL, lastupdate; + static off_t lastsize; + static size_t progressbar_size = 0; + struct timeval now, td, wait; + off_t cursize, abbrevsize; + double elapsed; + int ratio, barlength, i, remaining; + char buf[256]; + + if (!start) { + start = xmalloc(sizeof(struct timeval)); + (void) gettimeofday(start, (struct timezone *) 0); + lastupdate = *start; + lastsize = 0; + } + if (foregroundproc() == 0) + return; + + (void) gettimeofday(&now, (struct timezone *) 0); + cursiz...
2000 Aug 24
0
patch for a few things
...case 'b': + bitspersec = 1; + break; case '?': default: usage(); *************** *** 1129,1134 **** --- 1154,1162 ---- struct timeval now, td, wait; off_t cursize, abbrevsize; double elapsed; + double rate, abbrevrate; + int j; + char b; int ratio, barlength, i, remaining; char buf[256]; *************** *** 1148,1157 **** ratio = MIN(ratio, 100); } else ratio = 100; ! snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio); ! ! barlength = getttywidth() - 51; barlength = (barlength <= MAX_BARLENGTH)?barlen...
2002 Jul 13
0
[PATCH]: scp program improved
...quot;); exit(1); } @@ -1098,110 +1225,191 @@ #endif } -void -progressmeter(int flag) -{ - static const char prefixes[] = " KMGTP"; - static struct timeval lastupdate; - static off_t lastsize; - struct timeval now, td, wait; - off_t cursize, abbrevsize; - double elapsed; - int ratio, barlength, i, remaining; - char buf[512]; - - if (flag == -1) { - (void) gettimeofday(&start, (struct timezone *) 0); - lastupdate = start; - lastsize = 0; - } - if (foregroundproc() == 0) - return; +/* Functions for progress meter */ +#define MAX_PREFIXLEN 30 +#define MAX_GAUGELEN 200 - (void) get...