5 #include <linux/compiler.h>
12 #if !defined(CONFIG_XPL_BUILD) || CONFIG_IS_ENABLED(SERIAL)
13 void putc(const char c);
14 void puts(const char *s);
15 #ifdef CONFIG_CONSOLE_FLUSH_SUPPORT
18 static inline void flush(void) {}
20 int __printf(1, 2) printf(const char *fmt, ...);
21 int vprintf(const char *fmt, va_list args);
23 static inline void putc(const char c)
27 static inline void puts(const char *s)
31 static inline void flush(void)
35 static inline int __printf(1, 2) printf(const char *fmt, ...)
40 static inline int vprintf(const char *fmt, va_list args)
47 * Format a string and place it in a buffer
49 * @buf: The buffer to place the result into
50 * @size: The size of the buffer, including the trailing null space
51 * @fmt: The format string to use
52 * @...: Arguments for the format string
53 * Return: the number of characters which would be
54 * generated for the given input, excluding the trailing null,
55 * as per ISO C99. If the return is greater than or equal to
56 * @size, the resulting string is truncated.
58 * See the vsprintf() documentation for format string extensions over C99.
60 int snprintf(char *buf, size_t size, const char *fmt, ...)
61 __attribute__ ((format (__printf__, 3, 4)));
64 * FILE based functions (can only be used AFTER relocation!)
72 #define eputc(c) fputc(stderr, c)
73 #define eputs(s) fputs(stderr, s)
74 #define eflush() fflush(stderr)
75 #define eprintf(fmt, args...) fprintf(stderr, fmt, ##args)
77 int __printf(2, 3) fprintf(int file, const char *fmt, ...);
78 void fputs(int file, const char *s);
79 void fputc(int file, const char c);
80 #ifdef CONFIG_CONSOLE_FLUSH_SUPPORT
81 void fflush(int file);
83 static inline void fflush(int file) {}
88 #endif /* __STDIO_H */