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
+4 -1
View File
@@ -91,13 +91,16 @@ void ordered_set_print(FILE *f, const char *field, OrderedSet *s) {
bool space = false;
char *p;
assert(f);
assert(field);
if (ordered_set_isempty(s))
return;
fputs(field, f);
ORDERED_SET_FOREACH(p, s)
fputs_with_space(f, p, NULL, &space);
fputs_with_separator(f, p, NULL, &space);
fputc('\n', f);
}