httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: cvs commit: apache-2.0/src/modules/standard mod_autoindex.c mod_log_config.c
Date Thu, 28 Oct 1999 18:00:32 GMT
On 24 Oct 1999 ben@hyperreal.org wrote:

> ben         99/10/24 12:24:16
> 
>   Modified:    src/include util_script.h
>                src/lib/apr/file_io/unix readwrite.c
>                src/main buff.c http_protocol.c rfc1413.c util_script.c
>                src/modules/standard mod_autoindex.c mod_log_config.c
>   Log:
>   Size rigour.
>   
>   Revision  Changes    Path
>   1.3       +1 -1      apache-2.0/src/include/util_script.h
>   
>   Index: util_script.h
>   ===================================================================
>   RCS file: /export/home/cvs/apache-2.0/src/include/util_script.h,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- util_script.h	1999/08/31 05:32:19	1.2
>   +++ util_script.h	1999/10/24 19:23:43	1.3
>   @@ -80,7 +80,7 @@
>    API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
>    				       int (*getsfunc) (char *, int, void *),
>    				       void *getsfunc_data);
>   -API_EXPORT(void) ap_send_size(size_t size, request_rec *r);
>   +API_EXPORT(void) ap_send_size(ap_ssize_t size, request_rec *r);

was this change in signedness deliberate?

>   1.14      +4 -4      apache-2.0/src/main/util_script.c
>   
>   Index: util_script.c
>   ===================================================================
>   RCS file: /export/home/cvs/apache-2.0/src/main/util_script.c,v
>   retrieving revision 1.13
>   retrieving revision 1.14
>   diff -u -r1.13 -r1.14
>   --- util_script.c	1999/10/20 12:49:56	1.13
>   +++ util_script.c	1999/10/24 19:24:02	1.14
>   @@ -626,10 +626,10 @@
>    }
>    
>    
>   -API_EXPORT(void) ap_send_size(size_t size, request_rec *r)
>   +API_EXPORT(void) ap_send_size(ap_ssize_t size, request_rec *r)
>    {
>        /* XXX: this -1 thing is a gross hack */
>   -    if (size == (size_t)-1) {
>   +    if (size == (ap_ssize_t)-1) {

hrm, you shouldn't need the cast if you're using signed size_t now,
which is cool.

>    	ap_rputs("    -", r);
>        }
>        else if (!size) {
>   @@ -639,13 +639,13 @@
>    	ap_rputs("   1k", r);
>        }
>        else if (size < 1048576) {
>   -	ap_rprintf(r, "%4dk", (size + 512) / 1024);
>   +	ap_rprintf(r, "%4ldk", (size + 512) / 1024);
>        }
>        else if (size < 103809024) {
>    	ap_rprintf(r, "%4.1fM", size / 1048576.0);
>        }
>        else {
>   -	ap_rprintf(r, "%4dM", (size + 524288) / 1048576);
>   +	ap_rprintf(r, "%4ldM", (size + 524288) / 1048576);
>        }
>    }


Dean


Mime
View raw message