This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 0/6] Some vfprintf refactoring
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Sun, 1 Mar 2015 22:55:36 +0100
- Subject: [PATCH 0/6] Some vfprintf refactoring
- Authentication-results: sourceware.org; auth=none
These patches move around some code in vfprintf, and finally split off
the positional argument handling code from the main vfprintf function.
Tested on x86_64-redhat-linux-gnu, with no regressions.
2015-03-01 Florian Weimer <fweimer@redhat.com>
* stdio-common/vfprintf.c (THOUSANDS_SEP_T): New typedef.
(group_number, vfprintf): Use it.
(JUMP_TABLE_BASE_LABEL): New preprocessor macro.
(JUMP, REF): Use it.
(WORK_BUFFER_SIZE): New preprocessor macro.
(process_arg, vfprintf): Use it.
(jump_table): Move out of the vfprintf function.
(NOT_IN_JUMP_RANGE, CHAR_CLASS, LABEL, REF, JUMP, STEP0_3_TABLE,
STEP4_TABLE, process_arg): Move macro definitions
out of the vfprintf function. (Cosmetic change only.)
(vfprintf): Move local variables args_malloced, specs,
specs_malloced, and the code after do_positional to the
printf_positional function.
(printf_positional): New function.
(LABEL, JUMP_TABLE_BASE_LABEL, REF): Adjust jump table label
generation macros.
Florian Weimer (6):
vfprintf: Introduce THOUSANDS_SEP_T
vfprintf: Introduce JUMP_TABLE_BASE_LABEL
vfprintf: Define WORK_BUFFER_SIZE
vfprintf: Move jump table definition and the macros out of function
vfprintf: Introduce printf_positional function
vfprintf: Remove label name switching for the jump table
stdio-common/vfprintf.c | 856 ++++++++++++++++++++++++------------------------
1 file changed, 427 insertions(+), 429 deletions(-)
--
2.1.0