slweb

Једноставни генератор статичких веб страна
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување ff18a11fe49b31b1b09144e4ed8c18c623b7dead
родитељ e39fde5791fedffae5551cb252f381f756a45c94
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Mon, 18 Jan 2021 21:17:54 +0100

Merge branch 'master' of github.com:Strahinja/slweb

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
MTODO | 16++--------------
Mindex.html | 2+-
Mslweb.c | 4++--
измењених датотека: 3, додавања: 5(+), брисања: 17(-)

diff --git a/TODO b/TODO @@ -1,18 +1,6 @@ TODO ==== - [x] Add csv templating directive - - [x] Move fprintf(output...) to a separate function - - [x] Record that function's output from {csv}..{/csv} into - "capture blocks" - no need to do that for all of them, - only the last one - - [x] Open CSV, for each row in CSV skipping the first one - output the current capture block substituting the variable - escapes $1..$9 (keeping it simple with 1-digit) with row fields; - don't skip header line - - [x] Update documentation + [ ] keep-macros variable: when present in an included file, macros from + child process get added to the parent diff --git a/index.html b/index.html @@ -134,7 +134,7 @@ this program. If not, see &lt;<a href="https://www.gnu.org/licenses">https://www <div id="git-log"> Previous commit: -index.slw 95fd070 2021-01-18 21:11:31 +0100 (Страхиња Радић) (HEAD -> master) +index.slw e39fde5 2021-01-18 21:16:44 +0100 (Страхиња Радић) (HEAD -> master) </div><!--git-log--> diff --git a/slweb.c b/slweb.c @@ -2288,7 +2288,7 @@ slweb_parse(uint8_t* buffer, FILE* output, BOOL body_only, *ptoken = 0; token_len = u8_strlen(token); - if (token_len + tag_len < BUFSIZE) + if (token_len + tag_len + 1 < BUFSIZE) { u8_strncat(token, tag, BUFSIZE-token_len-1); ptoken += tag_len; @@ -2387,7 +2387,7 @@ slweb_parse(uint8_t* buffer, FILE* output, BOOL body_only, token_len = u8_strlen(token); if (link_text) { - if (token_len > link_size) + if (token_len + 1 > link_size) { link_size = token_len+1; REALLOC(link_text, link_size)