PIPS
|
#include "printf-args.h"
Go to the source code of this file.
Data Structures | |
struct | char_directive |
A parsed directive. More... | |
struct | char_directives |
A parsed format string. More... | |
Macros | |
#define | FLAG_GROUP 1 /**' flag */ |
Parse printf format string. More... | |
#define | FLAG_LEFT 2 /**- flag */ |
#define | FLAG_SHOWSIGN 4 /**+ flag */ |
#define | FLAG_SPACE 8 /**space flag */ |
#define | FLAG_ALT 16 /**# flag */ |
#define | FLAG_ZERO 32 |
#define | ARG_NONE (~(size_t)0) |
arg_index value indicating that no argument is consumed. More... | |
#define | N_DIRECT_ALLOC_DIRECTIVES 7 |
xxx_directive: A parsed directive. More... | |
Functions | |
int | printf_parse (const char *format, char_directives *d, arguments *a) |
Parses the format string. More... | |
#define ARG_NONE (~(size_t)0) |
arg_index value indicating that no argument is consumed.
Definition at line 44 of file printf-parse.h.
#define FLAG_ALT 16 /**# flag */ |
Definition at line 37 of file printf-parse.h.
#define FLAG_GROUP 1 /**' flag */ |
Parse printf format string.
Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2014 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/.
This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. STATIC Set to 'static' to declare the function static.
Flags
Definition at line 33 of file printf-parse.h.
#define FLAG_LEFT 2 /**- flag */ |
Definition at line 34 of file printf-parse.h.
#define FLAG_SHOWSIGN 4 /**+ flag */ |
Definition at line 35 of file printf-parse.h.
#define FLAG_SPACE 8 /**space flag */ |
Definition at line 36 of file printf-parse.h.
#define FLAG_ZERO 32 |
Definition at line 38 of file printf-parse.h.
#define N_DIRECT_ALLOC_DIRECTIVES 7 |
xxx_directive: A parsed directive.
xxx_directives: A parsed format string.
Number of directly allocated directives (no malloc() needed).
Definition at line 50 of file printf-parse.h.
int printf_parse | ( | const char * | format, |
char_directives * | d, | ||
arguments * | a | ||
) |
Parses the format string.
Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments.