2 This file is part of systemd.
4 Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
6 With parts from the GNU C Library
7 Copyright 1991-2014 Free Software Foundation, Inc.
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
35 PA_CHAR, /* int, cast to char */
36 PA_WCHAR, /* wide char */
37 PA_STRING, /* const char *, a '\0'-terminated string */
38 PA_WSTRING, /* const wchar_t *, wide character string */
39 PA_POINTER, /* void * */
41 PA_DOUBLE, /* double */
45 /* Flag bits that can be set in a type returned by `parse_printf_format'. */
46 #define PA_FLAG_MASK 0xff00
47 #define PA_FLAG_LONG_LONG (1 << 8)
48 #define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
49 #define PA_FLAG_LONG (1 << 9)
50 #define PA_FLAG_SHORT (1 << 10)
51 #define PA_FLAG_PTR (1 << 11)
53 size_t parse_printf_format(const char *fmt, size_t n, int *types);
55 #endif /* HAVE_PRINTF_H */