search for: format_size

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

2016 Jan 19
6
FWD: [patch] scp + UTF-8
...clude <errno.h> #include <signal.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> +#include <wchar.h> #include "progressmeter.h" #include "atomicio.h" @@ -117,7 +119,7 @@ format_size(char *buf, int size, off_t b void refresh_progress_meter(void) { - char buf[MAX_WINSIZE + 1]; + char buf[(MAX_WINSIZE * 4) + 1]; time_t now; off_t transferred; double elapsed; @@ -125,8 +127,10 @@ refresh_progress_meter(void) off_t bytes_left; int cur_speed; int hours, minutes, secon...
2005 Nov 21
1
[PATCH] 64 bit clean compilation patches
...ssmeter.c:91: warning: long long int format, off_t arg (arg 4) progressmeter.c:91: warning: long long int format, off_t arg (arg 5) progressmeter.c:91: warning: long long int format, off_t arg (arg 4) progressmeter.c:91: warning: long long int format, off_t arg (arg 5) progressmeter.c: In function `format_size': progressmeter.c:104: warning: long long int format, off_t arg (arg 4) progressmeter.c:104: warning: long long int format, off_t arg (arg 4) loginrec.c: In function `lastlog_get_entry': loginrec.c:1592: warning: int format, different type arg (arg 4) loginrec.c: In function `record_failed_...
2009 Oct 25
0
alternate output for progressmeter
...0 +++ progressmeter_new.c 2009-10-24 20:32:45.455788330 +0200 @@ -74,12 +74,15 @@ ?static int win_size; ? ? ? ? ? /* terminal window size */ ?static volatile sig_atomic_t win_resized; /* for window resizing */ +int ? ?progresstype = 0; ? ? ? /* use default tty progress reporting */ + ?/* units for format_size */ ?static const char unit[] = " KMGT"; ?static int ?can_output(void) ?{ + ? ? ? if (progresstype) return 1; ? ? ? ?return (getpgrp() == tcgetpgrp(STDOUT_FILENO)); ?} @@ -158,9 +161,9 @@ ? ? ? ?/* filename */ ? ? ? ?buf[0] = '\0'; - ? ? ? file_len = win_size - 35; + ? ? ? file_...