aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tty.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/tty.h b/tty.h
index ca4b554..9ef4d0b 100644
--- a/tty.h
+++ b/tty.h
@@ -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));