#ifndef _TERMTABLE_H_
#define _TERMTABLE_H_
+#include <zebra.h>
+
enum ttable_align {
LEFT,
RIGHT,
* columns were specified
*/
struct ttable_cell *ttable_insert_row(struct ttable *tt, unsigned int row,
- const char *format, ...);
+ const char *format, ...)
+ PRINTF_ATTRIBUTE(3, 4);
/**
* Inserts a new row at the end of the table.
*
* @return pointer to the first cell in the created row, or NULL if not enough
* columns were specified
*/
-struct ttable_cell *ttable_add_row(struct ttable *tt, const char *format, ...);
+struct ttable_cell *ttable_add_row(struct ttable *tt, const char *format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
/**
* Removes a row from the table.
filter = parse_filter (argv[idx]->arg);
if (!filter) {
vty_outln(vty, "Invalid filter \"%s\" specified; must contain at least"
- "one of 'RWTEXB'%s", argv[idx]->arg);
+ "one of 'RWTEXB'", argv[idx]->arg);
return CMD_WARNING;
}
}
filter = parse_filter (argv[idx]->arg);
if (!filter) {
vty_outln(vty, "Invalid filter \"%s\" specified; must contain at least"
- "one of 'RWTEXB'%s", argv[idx]->arg);
+ "one of 'RWTEXB'", argv[idx]->arg);
return CMD_WARNING;
}
}
#define IS_DIRECTORY_SEP(c) ((c) == DIRECTORY_SEP)
#endif
-/* GCC have printf type attribute check. */
-#ifdef __GNUC__
-#define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b)))
-#else
-#define PRINTF_ATTRIBUTE(a,b)
-#endif /* __GNUC__ */
-
/* Exported variables */
extern char integrate_default[];
#endif /* HAVE_BROKEN_CMSG_FIRSTHDR */
+/* GCC have printf type attribute check. */
+#ifdef __GNUC__
+#define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b)))
+#else
+#define PRINTF_ATTRIBUTE(a,b)
+#endif /* __GNUC__ */
/*
* RFC 3542 defines several macros for using struct cmsghdr.