diff options
Diffstat (limited to 'strings/apr_snprintf.c')
-rw-r--r-- | strings/apr_snprintf.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c index 4acbe2fa5..6c2549f42 100644 --- a/strings/apr_snprintf.c +++ b/strings/apr_snprintf.c @@ -83,13 +83,13 @@ static const char null_string[] = "(null)"; #define NDIG 80 /* buf must have at least NDIG bytes */ -static char *apr_cvt(double arg, int ndigits, int *decpt, int *sign, +static char *apr_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf) { register int r2; double fi, fj; register char *p, *p1; - + if (ndigits >= NDIG - 1) ndigits = NDIG - 2; r2 = 0; @@ -340,7 +340,7 @@ static char *conv_10(register apr_int32_t num, register int is_unsigned, *is_negative = (num < 0); /* - * On a 2's complement machine, negating the most negative integer + * On a 2's complement machine, negating the most negative integer * results in a number that cannot be represented as a signed integer. * Here is what we do to obtain the number's magnitude: * a. add 1 to the number @@ -355,7 +355,7 @@ static char *conv_10(register apr_int32_t num, register int is_unsigned, } /* - * We use a do-while loop so that we write at least 1 digit + * We use a do-while loop so that we write at least 1 digit */ do { register apr_uint32_t new_magnitude = magnitude / 10; @@ -392,7 +392,7 @@ static char *conv_10_quad(apr_int64_t num, register int is_unsigned, *is_negative = (num < 0); /* - * On a 2's complement machine, negating the most negative integer + * On a 2's complement machine, negating the most negative integer * results in a number that cannot be represented as a signed integer. * Here is what we do to obtain the number's magnitude: * a. add 1 to the number @@ -407,7 +407,7 @@ static char *conv_10_quad(apr_int64_t num, register int is_unsigned, } /* - * We use a do-while loop so that we write at least 1 digit + * We use a do-while loop so that we write at least 1 digit */ do { apr_uint64_t new_magnitude = magnitude / 10; @@ -823,7 +823,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *), (sizeof(APR_OFF_T_FMT) == 3 && fmt[0] == APR_OFF_T_FMT[0]) || (sizeof(APR_OFF_T_FMT) > 4 && - strncmp(fmt, APR_OFF_T_FMT, + strncmp(fmt, APR_OFF_T_FMT, sizeof(APR_OFF_T_FMT) - 2) == 0))) { /* Need to account for trailing 'd' and null in sizeof() */ var_type = IS_QUAD; @@ -835,7 +835,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *), (sizeof(APR_INT64_T_FMT) == 3 && fmt[0] == APR_INT64_T_FMT[0]) || (sizeof(APR_INT64_T_FMT) > 4 && - strncmp(fmt, APR_INT64_T_FMT, + strncmp(fmt, APR_INT64_T_FMT, sizeof(APR_INT64_T_FMT) - 2) == 0)) { /* Need to account for trailing 'd' and null in sizeof() */ var_type = IS_QUAD; @@ -1323,7 +1323,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *), } /* - * Print the string s. + * Print the string s. */ if (print_something == YES) { for (i = s_len; i != 0; i--) { @@ -1352,7 +1352,7 @@ static int snprintf_flush(apr_vformatter_buff_t *vbuff) } -APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len, +APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len, const char *format, ...) { int cc; |