sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 0a8c1ae036aea0844cff10f998f404b9cca973b0
parent a3764054ad7a0aede952a1c253070c9b77017951
Author: Quentin Rameau <quinq@fifth.space>
Date:   Sun,  6 Jan 2019 01:13:36 +0100

build-page: remove unnecessary calls to fputs

Diffstat:
Mbuild-page.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/build-page.c b/build-page.c @@ -235,7 +235,7 @@ menu_panel(char *domain, char *page, char *this, int depth) continue; for (i = 0; i < depth + 1; ++i) - fputs("\t", stdout); + putchar('\t'); fputs("<li><a", stdout); if (page && !strncmp(newdir, page, strlen(newdir))) fputs(" class=\"thisPage\"", stdout); @@ -243,17 +243,17 @@ menu_panel(char *domain, char *page, char *this, int depth) print_name(d); fputs("/</a>", stdout); if (page && !strncmp(newdir, page, strlen(newdir))) { - fputs("\n", stdout); + putchar('\n'); for (i = 0; i < depth + 2; ++i) - fputs("\t", stdout); + putchar('\t'); /* TODO: empty <ul></ul> is printed for subitems */ puts("<ul>"); menu_panel(domain, page, newdir, depth + 1); for (i = 0; i < depth + 2; ++i) - fputs("\t", stdout); - fputs("</ul>\n", stdout); + putchar('\t'); + puts("</ul>"); for (i = 0; i < depth + 1; ++i) - fputs("\t", stdout); + putchar('\t'); } puts("</li>"); }