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 [PATCH] for snprintf and 'u' on Alpha (take 4)
Date Fri, 07 Feb 1997 00:17:05 GMT
    Another (final?) mod to Dean's primo patch, this one to obviate the
    goto.  I mean, people *look* at the source on this thing! <g>

    #ken    :-)}

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 23:51:10
***************
*** 671,683 ****
  	     *   It is reset to ' ' by non-numeric formats
  	     */
  	    switch (*fmt) {
- 	    case 'd':
- 	    case 'i':
  	    case 'u':
  		if (is_long)
! 		    i_num = va_arg(ap, wide_int);
  		else
! 		    i_num = (wide_int) va_arg(ap, int);
  		s = conv_10(i_num, (*fmt) == 'u', &is_negative,
  			    &num_buf[NUM_BUF_SIZE], &s_len);
  		FIX_PRECISION(adjust_precision, precision, s, s_len);
--- 671,696 ----
  	     *   It is reset to ' ' by non-numeric formats
  	     */
  	    switch (*fmt) {
  	    case 'u':
  		if (is_long)
! 		    i_num = va_arg(ap, u_wide_int);
  		else
! 		    i_num = (wide_int) va_arg(ap, unsigned int);
! 		/*
! 		 * The rest also applies to other integer formats, so fall
! 		 * into that case.
! 		 */
! 	    case 'd':
! 	    case 'i':
! 		/*
! 		 * Get the arg if we haven't already.
! 		 */
! 		if ((*fmt) != 'u') {
! 		    if (is_long)
! 			i_num = va_arg(ap, wide_int);
! 		    else
! 			i_num = (wide_int) va_arg(ap, int);
! 		};
  		s = conv_10(i_num, (*fmt) == 'u', &is_negative,
  			    &num_buf[NUM_BUF_SIZE], &s_len);
  		FIX_PRECISION(adjust_precision, precision, s, s_len);

Mime
View raw message