1 |
149 |
jeremybenn |
/* Format checking tests: common header. */
|
2 |
|
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
3 |
|
|
|
4 |
|
|
#include <stdarg.h>
|
5 |
|
|
#include <stddef.h>
|
6 |
|
|
|
7 |
|
|
#ifndef _WINT_T
|
8 |
|
|
#ifndef __WINT_TYPE__
|
9 |
|
|
#define __WINT_TYPE__ unsigned int
|
10 |
|
|
#endif
|
11 |
|
|
typedef __WINT_TYPE__ wint_t;
|
12 |
|
|
#endif
|
13 |
|
|
|
14 |
|
|
/* Kludges to get types corresponding to size_t and ptrdiff_t. */
|
15 |
|
|
#define unsigned signed
|
16 |
|
|
typedef __SIZE_TYPE__ signed_size_t;
|
17 |
|
|
/* We also use this type to approximate ssize_t. */
|
18 |
|
|
typedef __SIZE_TYPE__ ssize_t;
|
19 |
|
|
#undef unsigned
|
20 |
|
|
#define signed /* Type might or might not have explicit 'signed'. */
|
21 |
|
|
typedef unsigned __PTRDIFF_TYPE__ unsigned_ptrdiff_t;
|
22 |
|
|
#undef signed
|
23 |
|
|
|
24 |
|
|
__extension__ typedef long long int llong;
|
25 |
|
|
__extension__ typedef unsigned long long int ullong;
|
26 |
|
|
|
27 |
|
|
/* %q formats want a "quad"; GCC considers this to be a long long. */
|
28 |
|
|
typedef llong quad_t;
|
29 |
|
|
typedef ullong u_quad_t;
|
30 |
|
|
|
31 |
|
|
__extension__ typedef __INTMAX_TYPE__ intmax_t;
|
32 |
|
|
__extension__ typedef __UINTMAX_TYPE__ uintmax_t;
|
33 |
|
|
|
34 |
|
|
#if __STDC_VERSION__ < 199901L && !defined(restrict)
|
35 |
|
|
#define restrict /* "restrict" not in old C standard. */
|
36 |
|
|
#endif
|
37 |
|
|
|
38 |
|
|
/* This may not be correct in the particular case, but allows the
|
39 |
|
|
prototypes to be declared, and we don't try to link.
|
40 |
|
|
*/
|
41 |
|
|
typedef struct _FILE FILE;
|
42 |
|
|
extern FILE *stdin;
|
43 |
|
|
extern FILE *stdout;
|
44 |
|
|
|
45 |
|
|
extern int fprintf (FILE *restrict, const char *restrict, ...);
|
46 |
|
|
extern int printf (const char *restrict, ...);
|
47 |
|
|
extern int fprintf_unlocked (FILE *restrict, const char *restrict, ...);
|
48 |
|
|
extern int printf_unlocked (const char *restrict, ...);
|
49 |
|
|
extern int sprintf (char *restrict, const char *restrict, ...);
|
50 |
|
|
extern int vfprintf (FILE *restrict, const char *restrict, va_list);
|
51 |
|
|
extern int vprintf (const char *restrict, va_list);
|
52 |
|
|
extern int vsprintf (char *restrict, const char *restrict, va_list);
|
53 |
|
|
extern int snprintf (char *restrict, size_t, const char *restrict, ...);
|
54 |
|
|
extern int vsnprintf (char *restrict, size_t, const char *restrict, va_list);
|
55 |
|
|
|
56 |
|
|
extern int fscanf (FILE *restrict, const char *restrict, ...);
|
57 |
|
|
extern int scanf (const char *restrict, ...);
|
58 |
|
|
extern int sscanf (const char *restrict, const char *restrict, ...);
|
59 |
|
|
extern int vfscanf (FILE *restrict, const char *restrict, va_list);
|
60 |
|
|
extern int vscanf (const char *restrict, va_list);
|
61 |
|
|
extern int vsscanf (const char *restrict, const char *restrict, va_list);
|
62 |
|
|
|
63 |
|
|
extern char *gettext (const char *);
|
64 |
|
|
extern char *dgettext (const char *, const char *);
|
65 |
|
|
extern char *dcgettext (const char *, const char *, int);
|
66 |
|
|
|
67 |
|
|
struct tm;
|
68 |
|
|
|
69 |
|
|
extern size_t strftime (char *restrict, size_t, const char *restrict,
|
70 |
|
|
const struct tm *restrict);
|
71 |
|
|
|
72 |
|
|
extern ssize_t strfmon (char *restrict, size_t, const char *restrict, ...);
|