X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fprintf-parse.h;h=c819f944ab53ae6a6507314882f5bcd5c0307590;hb=b65bfcd7ba0be84de3d96f22103103f21679a721;hp=6bd11dfa1a5f9fbacc0ab3b751087863c6279fac;hpb=63bc47a1fecb6e16b620d95fc6f5313f317bb550;p=gnulib.git diff --git a/lib/printf-parse.h b/lib/printf-parse.h index 6bd11dfa1..c819f944a 100644 --- a/lib/printf-parse.h +++ b/lib/printf-parse.h @@ -1,5 +1,5 @@ /* Parse printf format string. - Copyright (C) 1999, 2002-2003, 2005, 2007, 2009-2010 Free Software + Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -23,6 +23,10 @@ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. STATIC Set to 'static' to declare the function static. */ +#if HAVE_FEATURES_H +# include /* for __GLIBC__, __UCLIBC__ */ +#endif + #include "printf-args.h" @@ -43,6 +47,9 @@ /* xxx_directive: A parsed directive. xxx_directives: A parsed format string. */ +/* Number of directly allocated directives (no malloc() needed). */ +#define N_DIRECT_ALLOC_DIRECTIVES 7 + /* A parsed directive. */ typedef struct { @@ -67,6 +74,7 @@ typedef struct char_directive *dir; size_t max_width_length; size_t max_precision_length; + char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } char_directives; @@ -96,6 +104,7 @@ typedef struct u8_directive *dir; size_t max_width_length; size_t max_precision_length; + u8_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u8_directives; @@ -123,6 +132,7 @@ typedef struct u16_directive *dir; size_t max_width_length; size_t max_precision_length; + u16_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u16_directives; @@ -150,6 +160,7 @@ typedef struct u32_directive *dir; size_t max_width_length; size_t max_precision_length; + u32_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u32_directives;