#include "retr.h"
struct progress_implementation {
- char *name;
+ const char *name;
int interactive;
void *(*create) PARAMS ((long, long));
void (*update) PARAMS ((void *, long, double));
/* " 1012.45K/s" */
if (hist->total_time && hist->total_bytes)
{
- static char *short_units[] = { "B/s", "K/s", "M/s", "G/s" };
+ static const char *short_units[] = { "B/s", "K/s", "M/s", "G/s" };
int units = 0;
/* Calculate the download speed using the history ring and
recent data that hasn't made it to the ring yet. */
/* " ETA xx:xx:xx"; wait for three seconds before displaying the ETA.
That's because the ETA value needs a while to become
reliable. */
- if (bp->total_length > 0 && dl_total_time > 3000)
+ if (bp->total_length > 0 && bp->count > 0 && dl_total_time > 3000)
{
long eta;
int eta_hrs, eta_min, eta_sec;