123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- #ifndef _PRINTF_H
- #define _PRINTF_H 1
- #include <features.h>
- __BEGIN_DECLS
- #define __need_FILE
- #include <stdio.h>
- #define __need_size_t
- #define __need_wchar_t
- #include <stddef.h>
- #include <stdarg.h>
- struct printf_info
- {
- int prec;
- int width;
- wchar_t spec;
- unsigned int is_long_double:1;
- unsigned int is_short:1;
- unsigned int is_long:1;
- unsigned int alt:1;
- unsigned int space:1;
- unsigned int left:1;
- unsigned int showsign:1;
- unsigned int group:1;
- unsigned int extra:1;
- unsigned int is_char:1;
- unsigned int wide:1;
- unsigned int i18n:1;
- unsigned int __pad:4;
- unsigned short int user;
- wchar_t pad;
- };
- typedef int printf_function (FILE *__stream,
- const struct printf_info *__info,
- const void *const *__args);
- typedef int printf_arginfo_size_function (const struct printf_info *__info,
- size_t __n, int *__argtypes,
- int *__size);
- typedef int printf_arginfo_function (const struct printf_info *__info,
- size_t __n, int *__argtypes);
- typedef void printf_va_arg_function (void *__mem, va_list *__ap);
- extern int register_printf_specifier (int __spec, printf_function __func,
- printf_arginfo_size_function __arginfo)
- __THROW;
- extern int register_printf_function (int __spec, printf_function __func,
- printf_arginfo_function __arginfo)
- __THROW __attribute_deprecated__;
- extern int register_printf_modifier (const wchar_t *__str) __wur __THROW;
- extern int register_printf_type (printf_va_arg_function __fct) __wur __THROW;
- extern size_t parse_printf_format (const char *__restrict __fmt, size_t __n,
- int *__restrict __argtypes) __THROW;
- enum
- {
- PA_INT,
- PA_CHAR,
- PA_WCHAR,
- PA_STRING,
- PA_WSTRING,
- PA_POINTER,
- PA_FLOAT,
- PA_DOUBLE,
- PA_LAST
- };
- #define PA_FLAG_MASK 0xff00
- #define PA_FLAG_LONG_LONG (1 << 8)
- #define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
- #define PA_FLAG_LONG (1 << 9)
- #define PA_FLAG_SHORT (1 << 10)
- #define PA_FLAG_PTR (1 << 11)
- extern int printf_size (FILE *__restrict __fp,
- const struct printf_info *__info,
- const void *const *__restrict __args) __THROW;
- extern int printf_size_info (const struct printf_info *__restrict
- __info, size_t __n, int *__restrict __argtypes)
- __THROW;
- #ifdef __LDBL_COMPAT
- # include <bits/printf-ldbl.h>
- #endif
- __END_DECLS
- #endif
|