fileio: fputs_with_space → _with_separator and modernization

This commit is contained in:
Mike Yuan
2024-01-26 00:37:59 +08:00
parent 368b2bccd3
commit 215286a405
5 changed files with 29 additions and 26 deletions
+3 -1
View File
@@ -894,13 +894,15 @@ int fputstrv(FILE *f, char * const *l, const char *separator, bool *space) {
bool b = false;
int r;
assert(f);
/* Like fputs(), but for strv, and with a less stupid argument order */
if (!space)
space = &b;
STRV_FOREACH(s, l) {
r = fputs_with_space(f, *s, separator, space);
r = fputs_with_separator(f, *s, separator, space);
if (r < 0)
return r;
}