[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LYNX-DEV Transfer speed patch, .lha bug?? (2.7.1), slang & background
From: |
Anthony Tong |
Subject: |
LYNX-DEV Transfer speed patch, .lha bug?? (2.7.1), slang & background |
Date: |
Mon, 9 Jun 1997 18:19:45 -0400 (EDT) |
I'm running lynx 2.7.1 with 6/9 Fote's patches under i586 linux.
1. Amiga files (.lha) doesn't seem to be properly recognized by lynx (lynx
does not prompt you to download when you follow a .lha href). I've checked
HTInit.c, and it seems to be in order; and I'm not over riding anything in
my lynx.cfg. Ditto with .hqx (BinHex).. possibly & likely more incorrectly
recognized file formats
2. backgrounding & downloads. I read that some people were interested in
backgroun downloads but this wasn't possible because lynx updates the
screen with its file transfer progress. I wrote a quickie patch based on
the perl code found on a lynx dev page but erased it because I didn't need
it--if you're USING slang, slang's smart enough not to write to the screen
when the program is in the background; hence you get background downloads.
3. patch (HTFormat.c). Shows transfer/download speed; I went with
something quick and simple because the slightly more complex methods
weren't that much more accurate.. besides, isn't it fun to see numbers fly
on your screen? :-)
BTW, this is the place to post patches, right?
Secondly, which developer version to use or base patches on? Fotes or
lynx-ac-*? Or plain 2.71?
Thanks..
Anthony Tong <antoine at eci.com>
http://www.eci.com/tong/antoine.asc for PGP Key
13a14
> #include <time.h>
478,479c479,481
< int bytes = 0;
< int rv = 0;
---
> char rate[25];
> int bytes = 0, bytes_sec = -1, rv = 0;
> time_t start_time = 0, now_time, dif_time;
561d562
<
562a564,573
>
> time( &now_time );
> if ( start_time == 0 )
> start_time = now_time;
> else {
> dif_time = now_time - start_time;
> if ( dif_time > 0 )
> bytes_sec = bytes / dif_time;
> }
>
564c575
< sprintf(line, "Read %d of %d bytes of data.",
---
> sprintf(line, "Read %d of %d bytes of data,",
567c578,584
< sprintf(line, "Read %d bytes of data.", bytes);
---
> sprintf(line, "Read %d bytes of data,", bytes);
>
> if ( bytes_sec >= 0 ) {
> sprintf(rate, " %d bytes/sec.", bytes_sec );
> strcat(line, rate);
> }
>
- LYNX-DEV Transfer speed patch, .lha bug?? (2.7.1), slang & background,
Anthony Tong <=