summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-07-15 14:19:51 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-07-15 14:19:51 -0400
commit64b66547c713ea23bc16a741bb2ad2ccdff3c1c8 (patch)
tree6ff05d1bbc56f8d4345d84059b0ea6b93b5b19ae /misc.c
parentcee3bd6afd7f7eb92ad5185e436b156963fc23f5 (diff)
require #include filename to be a string literal
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index 8354b69..429e458 100644
--- a/misc.c
+++ b/misc.c
@@ -74,6 +74,10 @@ static inline bool streq(const char *a, const char *b) {
return strcmp(a, b) == 0;
}
+static inline void fprint_string(FILE *out, String s) {
+ fwrite(s.str, 1, s.len, out);
+}
+
static inline U32 rand_u32(U32 seed) {
U64 seed64 = (U64)seed;
return (U32)((seed64 * 0x832f0fda4e1a8642 + 0x41d49cd5459a2ab4) >> 32);