diff options
-rw-r--r-- | tty.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -40,9 +40,16 @@ void input_moveto __P ((int new_pos)); #else /* USE_LOCALE */ +#ifdef __GNUC__ + #define PRINTF_FUNCTION(string, first) \ + __attribute__ ((format (printf, string, first))) +#else + #define PRINTF_FUNCTION(string, first) +#endif + void tty_puts __P ((const char *s)); void tty_putc __P ((char c)); -void tty_printf __P ((const char *format, ...)); +void tty_printf __P ((const char *format, ...)) PRINTF_FUNCTION(1, 2); int tty_read __P ((char *buf, size_t count)); void tty_gets __P ((char *s, int size)); void tty_flush __P ((void)); |