smu

Simple markup processor
git clone https://git.sinitax.com/codemadness/smu
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit cb129c84baf96c17f24440a6a23255d8aadfd0c5
parent d86557e66a684ce2bd3b16dab9a5e16d47c9df89
Author: gottox@rootkit.lan <gottox@rootkit.lan>
Date:   Thu, 27 Dec 2007 19:22:34 +0100

correcting some minor issues

Diffstat:
Mcmarkdown.c | 6++++--
Mconfig.mk | 2+-
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/cmarkdown.c b/cmarkdown.c @@ -130,6 +130,7 @@ doamp(const char *begin, const char *end, int newblock) { fputs("&amp;",stdout); return 1; } + unsigned int dohtml(const char *begin, const char *end, int newblock) { const char *p, *tag, *tagend; @@ -156,6 +157,7 @@ dohtml(const char *begin, const char *end, int newblock) { } return 0; } + unsigned int dolineprefix(const char *begin, const char *end, int newblock) { unsigned int i, j, l; @@ -164,7 +166,7 @@ dolineprefix(const char *begin, const char *end, int newblock) { if(!newblock) return 0; - p = begin; + p = begin; for(i = 0; i < LENGTH(lineprefix); i++) { l = strlen(lineprefix[i].search); if(end - p < l) @@ -174,7 +176,7 @@ dolineprefix(const char *begin, const char *end, int newblock) { if(!(buffer = malloc(BUFFERSIZE))) eprint("Malloc failed."); buffer[0] = '\0'; - puts(lineprefix[i].before); + fputs(lineprefix[i].before,stdout); for(j = 0, p += l; p != end; p++, j++) { ADDC(buffer,j) = *p; if(*p == '\n') { diff --git a/config.mk b/config.mk @@ -10,7 +10,7 @@ INCS = -I. -I/usr/include LIBS = -L/usr/lib # flags -CFLAGS = -Os -Wall -Werror ${INCS} -DVERSION=\"${VERSION}\" +CFLAGS = -Os -Wall -Werror -ansi ${INCS} -DVERSION=\"${VERSION}\" LDFLAGS = ${LIBS} # compiler