diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2021-06-04 21:11:27 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2021-06-04 21:11:27 -0400 |
commit | c32f7dd056a97fc322d1328c9c44d2e05d8bd7c6 (patch) | |
tree | 7e7698cd0ac796c05e585c2213b33d742489d330 /config.c | |
parent | fb609a2d7857049ba1eda73d055add640c8ff91f (diff) |
Added `find_line()`.
Which finds the next line in the buffer.
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -56,6 +56,11 @@ char *read_file(const char *filename, long *size) { return buf; } +char *find_line(char *str) { + for (; *str != '\n' && *str != '\0'; str++); + return str; +} + config *parse_config(const char *filename) { /* Size of the file, in bytes. */ long filesize = 0; |