"Uwe Räsch"
2003-May-06 17:32 UTC
scp: missing progressbar, better behaviour on small windows
I miss the stars when doing scp. My suggestion for progressmeter.c makes scp to display different fields on different terminal widths. Maybe this is useful for you. Once in "start_progress_meter()" the outlook of the progressline is calculated. In "draw_progress_meter()" sprintf() instead of snprintf() together with some strlen()'s can be used, because the buffersize has been respected before. The remaining time can now have the form "> 99 days", "11d12:44" or as before "22:33:44" and " 33:44". Okay, with 80 columns the filename is displayed with only 24 characters instead of the 45 in the original code after 2002/12/13, but using 121 columns should not be a problem today. (See attached file: progressmeter.c) -- Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren dieser E-Mail oder die unbefugte Weitergabe der enthaltenenen Informationen ist nicht gestattet. The information contained in this message is confidential or protected by law. If you are not the intended recipient, please contact the sender and delete this message. Any unauthorised copying of this message or unauthorised distribution of the information contained herein is prohibited. -------------- next part -------------- A non-text attachment was scrubbed... Name: progressmeter.c Type: application/octet-stream Size: 10779 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20030506/49602fab/attachment.obj
Ben Lindstrom
2003-May-06 21:22 UTC
scp: missing progressbar, better behaviour on small windows
Why would we use 'sprintf'? We have been careful to keep that insecure garbage out of our code. - Ben On Tue, 6 May 2003, [iso-8859-1] "Uwe R?sch" wrote:> I miss the stars when doing scp. My suggestion for progressmeter.c makes scp to > display different fields on different terminal widths. Maybe this is useful for > you. > > Once in "start_progress_meter()" the outlook of the progressline is calculated. > In "draw_progress_meter()" sprintf() instead of snprintf() together with some > strlen()'s can be used, because the buffersize has been respected before. The > remaining time can now have the form "> 99 days", "11d12:44" or as before > "22:33:44" and " 33:44". > > Okay, with 80 columns the filename is displayed with only 24 characters instead > of the 45 in the original code after 2002/12/13, but using 121 columns should > not be a problem today. > > (See attached file: progressmeter.c) > -- > Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen. > Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte > sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren > dieser E-Mail oder die unbefugte Weitergabe der enthaltenenen Informationen > ist nicht gestattet. > > The information contained in this message is confidential or protected by > law. If you are not the intended recipient, please contact the sender and > delete this message. Any unauthorised copying of this message or > unauthorised distribution of the information contained herein is prohibited. >
Peter Stuge
2003-May-07 07:52 UTC
scp: missing progressbar, better behaviour on small windows
On Tue, May 06, 2003 at 07:32:27PM +0200, "Uwe R?sch" wrote:> The information contained in this message is confidential or protected by > law.Please do not send confidential messages to public mailing lists. //Peter