diff options
Diffstat (limited to 'common.h')
| -rw-r--r-- | common.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -11,3 +11,20 @@ void writeall(const char *s, size_t n); void writechar(uint_least32_t cp); int convert(enum libcharconv_result (*conv)(const char *, size_t, size_t *, uint_least32_t *, size_t *)); + + +#define SIMPLE(FUNCTION)\ + USAGE("");\ + \ + int\ + main(int argc, char *argv[])\ + {\ + ARGBEGIN {\ + default:\ + usage();\ + } ARGEND;\ + if (argc)\ + usage();\ + \ + return convert(&FUNCTION);\ + } |
