diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-23 22:37:28 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-23 22:37:28 -0700 |
| commit | 938ff73730b49488e06677fed8c2980638cbeeca (patch) | |
| tree | f88eabbb93aabfbb8785b264d77477f3ac4c86a0 /utils.h | |
| parent | 452c7df023181954d48c5338ba8cb10dbeae1a94 (diff) | |
More rigorous compile-time checks via __attribute__s
Diffstat (limited to 'utils.h')
| -rw-r--r-- | utils.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -17,10 +17,15 @@ #define check(cond, ...) do { if (!(cond)) { fprintf(stderr, __VA_ARGS__); fwrite("\n", 1, 1, stderr); _exit(1); } } while(0) #define debug(...) do { if (verbose) fprintf(stderr, __VA_ARGS__); } while(0) +__attribute__((nonnull)) char unescapechar(const char *escaped, const char **end); +__attribute__((pure, nonnull, returns_nonnull)) const char *after_name(const char *str); +__attribute__((pure, nonnull, returns_nonnull)) const char *after_spaces(const char *str); +__attribute__((nonnull)) int matchchar(const char **str, char c); +__attribute__((nonnull)) size_t unescape_string(char *dest, const char *src, size_t bufsize); #endif |
