search for: max_barlength

Displaying 3 results from an estimated 3 matches for "max_barlength".

2000 Jul 02
1
minor cosmetic bug
The progress metre in scp(1) breaks when the tty is too wide. This patch is the effortless 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 *
2002 Feb 06
2
SFTP Status Bar..
...********************************************************"\ - "************************************************************"\ - "************************************************************"\ - "************************************************************" -#define MAX_BARLENGTH (sizeof(BAR) - 1) - -/* Visual statistics about files as they are transferred. */ -void progressmeter(int); - -/* Returns width of the terminal (for progress meter calculations). */ -int getttywidth(void); +static void updateprogressmeter(int done); int do_cmd(char *host, char *remuser, char *cmd,...
2000 Aug 24
0
patch for a few things
...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)?barlength:MAX_BARLENGTH; if (barlength > 0) { i = barlength * ratio / 100; --- 1176,1184 ---- ratio = MIN(ratio, 100); } else ratio = 100; + snprintf(buf, sizeof(buf), "\r%-18.18s %3d%% ", curfile, ratio); ! barlength = getttywidth() - 58; barlength = (barlen...