lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev [PATCH 2.8.4dev.18] ETA fixes


From: Ilya Zakharevich
Subject: lynx-dev [PATCH 2.8.4dev.18] ETA fixes
Date: Wed, 14 Feb 2001 02:46:44 -0500
User-agent: Mutt/1.2.5i

ETA logic was screwed up.

Enjoy,
Ilya

P.S.  Would not it be nice to have these KB,ETA etc lynx.cfg values
      documented... 

--- ./src/HTAlert.c=pre Mon Feb 12 22:57:40 2001
+++ ./src/HTAlert.c     Wed Feb 14 00:16:10 2001
@@ -147,7 +147,8 @@ PRIVATE char *sprint_bytes ARGS3(
     u = kbunits;
     if ((LYTransferRate == rateKB) && (n >= 10 * kb_units))
        sprintf(s, "%ld", n/kb_units);
-    else if ((LYTransferRate == rateKB) && (n >= kb_units))
+    else if ((LYTransferRate == rateKB || LYTransferRate == rateEtaKB_maybe)
+            && (n > 999))      /* Avoid switching between 1016b/s and 1K/s */
        sprintf(s, "%.2g", ((double)n)/kb_units);
     else {
        sprintf(s, "%ld", n);
--- ./src/LYMain.c-pre  Tue Feb 13 14:04:34 2001
+++ ./src/LYMain.c      Wed Feb 14 00:23:32 2001
@@ -437,7 +437,7 @@ BOOLEAN persistent_cookies = FALSE; /* d
 PUBLIC char *LYCookieFile = NULL;      /* cookie read file */
 PUBLIC char *LYCookieSaveFile = NULL;  /* cookie save file */
 #endif /* EXP_PERSISTENT_COOKIES */
-PUBLIC int LYTransferRate = rateKB;
+PUBLIC int LYTransferRate = rateEtaKB_maybe;
 PUBLIC char *XLoadImageCommand = NULL; /* Default image viewer for X */
 PUBLIC BOOLEAN LYNoISMAPifUSEMAP = FALSE; /* Omit ISMAP link if MAP present? */
 PUBLIC int LYHiddenLinks = HIDDENLINKS_SEPARATE; /* Show hidden links? */
--- ./src/LYGlobalDefs.h-pre-eta        Wed Feb 14 00:48:02 2001
+++ ./src/LYGlobalDefs.h        Wed Feb 14 02:44:18 2001
@@ -140,6 +140,12 @@ typedef enum {
 #endif
 } TransferRate;
 
+#ifdef EXP_READPROGRESS
+#  define rateEtaKB_maybe      rateEtaKB
+#else
+#  define rateEtaKB_maybe      rateKB
+#endif
+
 extern BOOLEAN LYCursesON;     /* start_curses()->TRUE, stop_curses()->FALSE */
 extern BOOLEAN LYJumpFileURL;   /* URL from the jump file shortcuts? */
 extern BOOLEAN LYNewsPosting;  /* News posting supported if TRUE */

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]