|
|
1.1 root 1: /*
2: * Header file for printf type functions.
3: * Copyright (C) 2006, 2007 Free Software Foundation.
4: *
5: * This program is free software; you can redistribute it and/or modify
6: * it under the terms of the GNU General Public License as published by
7: * the Free Software Foundation; either version 2, or (at your option)
8: * any later version.
9: *
10: * This program is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: * GNU General Public License for more details.
14: *
15: * You should have received a copy of the GNU General Public License
16: * along with this program; if not, write to the Free Software
17: * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18: */
19: /*
20: * String handling functions.
21: *
22: */
23:
24: #ifndef _MACH_SA_SYS_PRINTF_H_
25: #define _MACH_SA_SYS_PRINTF_H_
26:
27: #include <sys/types.h>
28: #include <stdarg.h>
29:
30: extern void printf_init (void);
31:
32: extern void _doprnt (const char *fmt,
33: va_list argp,
34: void (*putc)(char, vm_offset_t),
35: int radix,
36: vm_offset_t putc_arg);
37:
38: extern void printnum (unsigned long u, int base,
39: void (*putc)(char, vm_offset_t),
40: vm_offset_t putc_arg);
41:
42: extern int sprintf (char *buf, const char *fmt, ...);
1.1.1.2 ! root 43: extern int snprintf (char *buf, size_t size, const char *fmt, ...);
1.1 root 44: extern int vsnprintf (char *buf, size_t size, const char *fmt, va_list args);
45:
46: extern int printf (const char *fmt, ...);
47:
48: #define printf_once(fmt, ...) \
49: MACRO_BEGIN \
50: static int __once = 0; \
51: if (!__once) { \
52: printf(fmt, ##__VA_ARGS__); \
53: __once = 1; \
54: } \
55: MACRO_END
56:
57: extern int indent;
58: extern void iprintf (const char *fmt, ...);
59:
60: extern int vprintf(const char *fmt, va_list listp);
61:
62: extern void safe_gets (char *str, int maxlen);
63:
64: #endif /* _MACH_SA_SYS_PRINTF_H_ */
65:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.