} else if ((bytes > 0) &&
} else if (bytes < 0) {	 bytes = bytes_last; total = total_last; } if ((bytes > 0) &&
PUBLIC void HTReadProgress ARGS2(	long,		bytes,	long,		total){    static long kb_units = 1024;    static time_t first, last;    static long bytes_last;    static long transfer_rate = 0;    long divisor;    char line[80];    time_t now = time((time_t *)0);  /* once per second */    static char *units = "bytes";    if (bytes == 0) {	first = last = now;	bytes_last = bytes;    } else if ((bytes > 0) &&	       (now != first))		/* 1 sec delay for transfer_rate calculation :-( */ {	if (transfer_rate <= 0)    /* the very first time */	    transfer_rate = (bytes) / (now - first);   /* bytes/sec */	/*	 * Optimal refresh time:  every 0.2 sec, use interpolation.  Transfer	 * rate is not constant when we have partial content in a proxy, so	 * interpolation lies - will check every second at least for sure.	 */	if (((bytes - bytes_last) > (transfer_rate / 5)) || (now != last)) {	    bytes_last += (transfer_rate / 5);	/* until we got next second */	    if (now != last) {		last = now;		bytes_last = bytes;		transfer_rate = (bytes_last) / (last - first); /* more accurate here */	    }	    units = gettext("bytes");	    divisor = 1;	    if (LYshow_kb_rate	      && (total >= kb_units || bytes >= kb_units)) {		units = gettext("KB");		divisor = kb_units;		bytes /= divisor;		if (total > 0) total /= divisor;	    }	    if (total >  0)		sprintf (line, gettext("Read %ld of %ld %s of data"), bytes, total, units);	    else		sprintf (line, gettext("Read %ld %s of data"), bytes, units);	    if ((transfer_rate > 0)		  && (!LYshow_kb_rate || (bytes * divisor >= kb_units)))		sprintf (line + strlen(line), gettext(", %ld %s/sec."), transfer_rate / divisor, units);	    else		sprintf (line + strlen(line), ".");	    if (total <  0) {		if (total < -1)		    strcat(line, gettext(" (Press 'z' to abort)"));	    }	    /* do not store the message for history page. */	    statusline(line);	    CTRACE(tfp, "%s\n", line);	}    }}