httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@decus.org (Rodent of Unusual Size)
Subject Re: [PATCH] ap_snprintf, '%u', and Alpha (was Re: Agenda for 1.2b7)
Date Thu, 06 Feb 1997 16:46:18 GMT
>From the fingers of Ben Laurie flowed the following:
>
>The following slightly strange, but correct, construction should also do the
>job portably, and perhaps would be considered more rigorous:
>
>	magnitude = (u_wide_int) (unsigned) num;

    Doh!  Of course.  My only excuse is that I'm nothing like being a C
    whiz.  Too bad you're too far away for me to come kneel at your
    feet.. <g>

    Modified patch (for ease of application) follows.  I've changed the
    "(unsigned)" to "(unsigned int)" to eschew obfuscation.

    #ken    :-D}

Index: util_snprintf.c
===================================================================
RCS file: /usr/users/coar/myApache/repository/apache/src/util_snprintf.c,v
retrieving revision 1.4
diff -c -r1.4 util_snprintf.c
*** 1.4	1997/01/20 23:55:11
--- util_snprintf.c	1997/02/06 16:45:07
***************
*** 360,366 ****
      register u_wide_int magnitude;
  
      if (is_unsigned) {
! 	magnitude = (u_wide_int) num;
  	*is_negative = FALSE;
      }
      else {
--- 360,366 ----
      register u_wide_int magnitude;
  
      if (is_unsigned) {
! 	magnitude = (u_wide_int) (unsigned int) num;
  	*is_negative = FALSE;
      }
      else {

Mime
View raw message