Change Details
eeshow/misc/util.h |
14 | 14 | #ifndef MISC_UTIL_H |
15 | 15 | #define MISC_UTIL_H |
16 | 16 | |
17 | | #include <stdio.h> |
| 17 | #include <stdbool.h> |
18 | 18 | #include <stdlib.h> |
| 19 | #include <stdio.h> |
19 | 20 | #include <string.h> |
20 | 21 | |
21 | 22 | |
... | ... | |
63 | 64 | #define unsupported(s) \ |
64 | 65 | fprintf(stderr, __FILE__ ":%d: unsupported: " s "\n", __LINE__) |
65 | 66 | |
| 67 | |
| 68 | static inline bool strbegins(const char *s, const char *prefix) |
| 69 | { |
| 70 | return !strncmp(s, prefix, strlen(prefix)); |
| 71 | } |
| 72 | |
66 | 73 | #endif /* !MISC_UTIL_H */ |
Download the corresponding diff file