timekeeper

[Abandoned unfinished] CGI web application in C for time tracking. (My first, just a learning project)
Log | Files | Refs | README

commit 879ba90362fefcfcda2b1898ac1e7be930060311
parent 56217c2e4ee7e99093d202b31b2289994aa3f07b
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Mon, 11 Mar 2024 01:17:07 -0700

Properly close script elements

Diffstat:
Mpages/main.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pages/main.c b/pages/main.c @@ -83,9 +83,9 @@ printhours(struct pagedata *pd, time_t *times, int len) KATTR_HREF, pd->pages[PageMain], KATTR__MAX)) != KCGI_OK || (status = khtml_putc(&pd->html, ' ')) != KCGI_OK || (status = htmlwithin(pd, KELEM_BUTTON, "Reload")) != KCGI_OK || - (status = khtml_closeelem(&pd->html, 2)) != KCGI_OK || (status = khtml_attr(&pd->html, KELEM_SCRIPT, - KATTR_SRC, "scripts/counter.js", KATTR__MAX)) != KCGI_OK) + KATTR_SRC, "scripts/counter.js", KATTR__MAX)) != KCGI_OK || + (status = khtml_closeelem(&pd->html, 3)) != KCGI_OK) return status; } @@ -287,7 +287,8 @@ pagemain(struct pagedata *pd) if ((status = htmlwithin(pd, KELEM_H1, "Timekeeper")) != KCGI_OK || (status = printtimes(pd, times, ntimes)) != KCGI_OK || (status = khtml_attr(&pd->html, KELEM_SCRIPT, - KATTR_SRC, "scripts/localize.js", KATTR__MAX)) != KCGI_OK) { + KATTR_SRC, "scripts/localize.js", KATTR__MAX)) != KCGI_OK || + (status = khtml_closeelem(&pd->html, 1)) != KCGI_OK) { free(times); return status; }