diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-13 21:01:39 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-13 21:01:39 -0400 |
commit | b7b02528d7121b71adced7f79af48d09558dfa85 (patch) | |
tree | f5ee23641d27236c8a62f49a7701028e5571a8e9 /misc.c | |
parent | 83718e0953f7489bdffd6c75f55ce51b385a1a51 (diff) |
check for circular includes
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -66,20 +66,19 @@ static inline char *str_to_cstr(String s) { return cstr(s.str, s.len); } -static bool str_eq_cstr(String s, const char *str) { +static inline bool str_eq_cstr(String s, const char *str) { return strncmp(s.str, str, s.len) == 0; } +static inline bool streq(const char *a, const char *b) { + return strcmp(a, b) == 0; +} + static inline U32 rand_u32(U32 seed) { U64 seed64 = (U64)seed; return (U32)((seed64 * 0x832f0fda4e1a8642 + 0x41d49cd5459a2ab4) >> 32); } - -static inline bool strs_equal(const char *a, const char *b) { - return strcmp(a, b) == 0; -} - #define plural_suffix(x) ((x) == 1 ? "" : "s") static const char *indefinite_article(const char *s) { /* usually, words starting with "u" use "a" - "a unique thing", "a u64" */ |