Skip to content

Commit 58d1a7c

Browse files
committed
Function rename and comment improvement.
1 parent 80ebfd7 commit 58d1a7c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

printf.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,9 @@ static size_t _out_rev(out_fct_type out, char* buffer, size_t idx, size_t maxlen
300300
}
301301

302302

303-
// internal itoa format
304-
static size_t print_integer_format(out_fct_type out, char* buffer, size_t idx, size_t maxlen, char* buf, size_t len, bool negative, numeric_base_t base, unsigned int precision, unsigned int width, unsigned int flags)
303+
// Invoked by print_integer after the actual number has been printed, performing necessary
304+
// work on the number's prefix (as the number is initially printed in reverse order)
305+
static size_t print_integer_finalization(out_fct_type out, char* buffer, size_t idx, size_t maxlen, char* buf, size_t len, bool negative, numeric_base_t base, unsigned int precision, unsigned int width, unsigned int flags)
305306
{
306307
size_t unpadded_len = len;
307308

@@ -397,7 +398,7 @@ static size_t print_integer(out_fct_type out, char* buffer, size_t idx, size_t m
397398
} while (value && (len < PRINT_INTEGER_BUFFER_SIZE));
398399
}
399400

400-
return print_integer_format(out, buffer, idx, maxlen, buf, len, negative, base, precision, width, flags);
401+
return print_integer_finalization(out, buffer, idx, maxlen, buf, len, negative, base, precision, width, flags);
401402
}
402403

403404
#if (PRINTF_SUPPORT_DECIMAL_SPECIFIERS || PRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS)

0 commit comments

Comments
 (0)