Commit Graph

11 Commits

Author SHA1 Message Date
Dan Cross
e8eef519ed Whitespace cleanups: trailing spaces.
Remove them.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-31 09:31:14 +10:00
Andrew Pamment
71b465eba2 Improvements to www_tree and move over last 10 2018-10-21 20:11:30 +10:00
Andrew Pamment
ee194c102f fix path to last 10 and automessage 2018-10-18 21:03:52 +10:00
Andrew Pamment
b500a450dd Couple of minor fixes
Duplicate string in www_email
fread returns number of elements read not number of bytes
Missing clear screen after my changing of strings
2018-10-14 10:46:52 +10:00
Dan Cross
303810acaa Trivial formatting cleanups
Just another clang-format run to catch regressions that
have snuck in via other patches.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-14 10:35:29 +10:00
Dan Cross
42eb413c91 More changing formatting to use stralloc.
Specifically, change the www_last10 HTML rendering logic
to use stralloc and strftime().  This eliminates a lot of
duplication.

It would be easier to test this with a unit test if the
logic of reading the last10 entries from a file were
separated from the HTML rendering logic.  An area for
future enhancement.

Also start in on www_email.c, which is the last bastion
of significant realloc() use for page generation.  An
explicit goal is to get rid of unsafe string handling
functions such as strcpy, strcat, sprintf, etc.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-14 10:35:18 +10:00
Dan Cross
fa014f3a88 Simplify dynamic memory management.
Add utility routines and use them to simplify the
use of dynamically allocated memory.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-10 10:25:29 +10:00
Dan Cross
d6826137dd clang-format
Fix a bunch of trivial formatting issues by running
`clang-format`.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-09 15:48:42 +10:00
Andrew Pamment
70dcde1f75 New Last 10 Callers 2018-02-25 16:25:53 +10:00
Andrew Pamment
a2d80b90fd Add support for US style dates 2017-10-03 12:09:50 +10:00
Andrew Pamment
ffaca86565 Redo Make file setup.. please standby 2017-09-25 13:27:22 +10:00