Debian Bug report logs - #117476
lynx: download: better time display

version graph

Package: lynx; Maintainer for lynx is Atsuhito KOHDA <kohda@debian.org>; Source for lynx is src:lynx-cur.

Reported by: Darren Salt <linux@youmustbejoking.demon.co.uk>

Date: Mon, 29 Oct 2001 03:18:01 UTC

Severity: wishlist

Tags: confirmed, patch, upstream

Found in version 2.8.4.1b-1

Done: James Troup <james@nocrew.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to Adrian Bunk <bunk@fs.tum.de>:
Bug#117476; Package lynx. Full text and rfc822 format available.

Acknowledgement sent to Darren Salt <linux@youmustbejoking.demon.co.uk>:
New Bug report received and forwarded. Copy sent to Adrian Bunk <bunk@fs.tum.de>. Full text and rfc822 format available.

Message #5 received at maintonly@bugs.debian.org (full text, mbox):

From: Darren Salt <linux@youmustbejoking.demon.co.uk>
To: maintonly@bugs.debian.org
Subject: Lynx download: better time display
Date: Mon, 29 Oct 2001 03:00:33 +0000
Package: lynx
Version: 2.8.4.1b-1
Severity: wishlist

Rather than displaying the (estimated) number of seconds remaining until the
file has been downloaded or the number of seconds for which the download has
been stalled, wouldn't it be better to have this displayed in hours, minutes
and seconds?

Note: some mods to the translations will be required: basically, "%ld sec" is
now just "%s". Whether translations will be required for the strings in
sprint_tbuf(), I don't know :-)

==-8<-==
--- lynx-2.8.4.1b.orig/src/HTAlert.c	Sun Jun  3 20:58:00 2001
+++ lynx-2.8.4.1b.orig/src/HTAlert.c	Sun Oct 28 20:29:06 2001
@@ -173,6 +173,21 @@
     return u;
 }
 
+#define TIME_HMS_LENGTH (16)
+PRIVATE char *sprint_tbuf ARGS2(
+	char *,		s,
+	long,		t)
+{
+    if (t > 3600)
+	sprintf (s, "%ldh%ldm%lds", t / 3600, (t / 60) % 60, t % 60);
+    else if (t > 60)
+	sprintf (s, "%ldm%lds", t / 60, t % 60);
+    else
+	sprintf (s, "%lds", t);
+    return s;
+}
+
+
 /*	Issue a read-progress message.			HTReadProgress()
 **	------------------------------
 */
@@ -265,10 +280,11 @@
 #ifdef EXP_READPROGRESS
 	    if (LYTransferRate == rateEtaBYTES
 	     || LYTransferRate == rateEtaKB) {
+	     	char tbuf[TIME_HMS_LENGTH];
 		if (now - last_active >= 5)
-		    HTSprintf (&line, gettext(" (stalled for %ld sec)"), (long)(now - last_active));
+		    HTSprintf (&line, gettext(" (stalled for %s)"), sprint_tbuf (tbuf, (long)(now - last_active)));
 		if (total > 0 && transfer_rate)
-		    HTSprintf (&line, gettext(", ETA %ld sec"), (long)((total - bytes)/transfer_rate));
+		    HTSprintf (&line, gettext(", ETA %s"), sprint_tbuf (tbuf, (long)((total - bytes)/transfer_rate)));
 	    }
 #endif
 
==->8-==

-- 
| Darren Salt                    | Risc PC, Spec+3 | nr. Ashington,
| ds@youmustbejoking.demon.co.uk | A3010, BBC M128 | Northumberland
| ds@zap.tartarus.org            | Linux PC        | *Toon Army*
|   <URL:http://www.youmustbejoking.demon.co.uk/> (PGP 2.6, GPG keys)

Another such victory over the Romans, and we are undone.



Changed Bug title. Request was from James Troup <james@nocrew.org> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: confirmed Request was from James Troup <james@nocrew.org> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: patch Request was from James Troup <james@nocrew.org> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: upstream Request was from James Troup <james@nocrew.org> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to James Troup <james@nocrew.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Darren Salt <linux@youmustbejoking.demon.co.uk>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #18 received at 117476-done@bugs.debian.org (full text, mbox):

From: James Troup <james@nocrew.org>
To: 117476-done@bugs.debian.org
Subject: Re: lynx: download: better time display
Date: Fri, 06 Feb 2004 03:54:21 +0000
Darren Salt <linux@youmustbejoking.demon.co.uk> writes:

> Package: lynx
> Version: 2.8.4.1b-1
> Severity: wishlist
> 
> Rather than displaying the (estimated) number of seconds remaining until the
> file has been downloaded or the number of seconds for which the download has
> been stalled, wouldn't it be better to have this displayed in hours, minutes
> and seconds?
> 
> Note: some mods to the translations will be required: basically, "%ld sec" is
> now just "%s". Whether translations will be required for the strings in
> sprint_tbuf(), I don't know :-)

2002-10-06 (2.8.5dev.9)
* improve ETA data shown in experimental read-progress (from Debian #117476)

2.8.5-1 is now in unstable.

-- 
James



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 14:06:32 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.