diff options
| author | WormHeamer | 2025-12-01 19:00:25 -0500 |
|---|---|---|
| committer | WormHeamer | 2025-12-01 19:00:25 -0500 |
| commit | f981c3943ba7050a0d8ee3b8eb254c8bb3000a17 (patch) | |
| tree | 1e36442700240be89dc2dc43133f7214069fee5e | |
| parent | 91b61fad23ca7f295f2a922a952725d8f795d832 (diff) | |
remove spurious "/o" from fopen() mode strings
| -rw-r--r-- | main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -293,7 +293,7 @@ void pic_load(Pic *pfp, Str src, int min_lines, int min_cols, Arena *a) { } void pic_load_path(Pic *dest, const char *path, Str or_src, int min_lines, int min_cols, Arena *a) { - FILE *f = fopen(path, "r/o"); + FILE *f = fopen(path, "r"); if (f) { Str pic_src = {0}; read_all(f, &pic_src, a); @@ -317,7 +317,7 @@ User *user_load(Str name, Str homedir, Str binkdir, Arena *a) { pic_load_path(&u->banner, cstr_fmt(a, "%S/.binkbanner", homedir), S(""), 0, 0, a); - FILE *f = fopen(cstr_fmt(a, "%S/.pronouns", homedir), "r/o"); + FILE *f = fopen(cstr_fmt(a, "%S/.pronouns", homedir), "r"); if (f) { Str buf = { 0 }; read_all(f, &buf, a); @@ -428,7 +428,7 @@ void posts_load(PostList *posts, Arena *a) { if (posts->len > POST_LIMIT) posts->len = POST_LIMIT; for (int i = 0; i < posts->len; i++) { Post *p = &posts->data[i]; - FILE *f = fopen(p->path, "r/o"); + FILE *f = fopen(p->path, "r"); if (!f) { log_err("couldn't open %s", p->path); continue; @@ -981,7 +981,7 @@ void new_post(Arena *temp) { if (edit_file(tmpf, temp)) return; Str body = { 0 }; - FILE *f = fopen(tmpf, "r/o"); + FILE *f = fopen(tmpf, "r"); if (!f) return; if (read_all(f, &body, temp)) { fclose(f); @@ -1002,7 +1002,7 @@ void new_post(Arena *temp) { const char *outf = cstr_fmt(temp, "/home/%s/.bink/%U%09u", getlogin(), (uint64_t)ts.tv_sec, (uint32_t)ts.tv_nsec); - f = fopen(outf, "w/o"); + f = fopen(outf, "w"); if (!f) { log_err("failed to open %s", outf); return; @@ -1078,11 +1078,11 @@ FILE *open_config_file(Arena *a) { } } else { s = cstr_fmt(a, "/home/%s/.cbinkrc", getlogin()); - f = fopen(s, "r/o"); + f = fopen(s, "r"); if (f) return f; s = cstr_fmt(a, "/home/%s/.config/cbink/cbinkrc", getlogin()); } - f = fopen(s, "r/o"); + f = fopen(s, "r"); return f; } |
