search for: can_output

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

Did you mean: man_output
2009 Oct 25
0
alternate output for progressmeter
...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_len = (progresstype)?(strlen(file)+11):(win_size - 35); ? ? ? ?if (file_len...
2007 Nov 09
1
Patch for progressmeter.c
...@ -224,6 +237,7 @@ refresh_progress_meter(void) atomicio(vwrite, STDOUT_FILENO, buf, win_size - 1); last_update = now; + last_pos = cur_pos; } /*ARGSUSED*/ @@ -270,6 +284,7 @@ void stop_progress_meter(void) { alarm(0); + char lbuf[10]; if (!can_output()) return; @@ -277,7 +292,9 @@ stop_progress_meter(void) /* Ensure we complete the progress */ if (cur_pos != end_pos) refresh_progress_meter(); - + + format_rate(lbuf, sizeof(lbuf), max_delta_pos); + printf("\nMax throughput: %s/...
2023 Feb 06
20
[Bug 3534] New: probable underflow calculating display width of file name
https://bugzilla.mindrot.org/show_bug.cgi?id=3534 Bug ID: 3534 Summary: probable underflow calculating display width of file name Product: Portable OpenSSH Version: -current Hardware: amd64 OS: Linux Status: NEW Severity: normal Priority: P5 Component: scp