diff --git a/build.sh b/build.sh index aee4218..ee64202 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Lint clang-format -i main.c @@ -26,6 +26,9 @@ cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wuninitializ # echo "$(du -b ./main | cut -f1) bytes written" # Run +if [ "$1" = "-t" ]; then + shift && ./tw.sh $@ +fi ./main ./thumbnailer.sh build diff --git a/main.c b/main.c index 041c00a..3846cb6 100644 --- a/main.c +++ b/main.c @@ -23,7 +23,7 @@ WITH REGARD TO THIS SOFTWARE. "nilix@nilfm.cc>
"\ "artist, programmer, philosopher

"\ "verify my signature: signing public key
"\ - "send me an encrypted message: encrypted public key" + "send me an encrypted message: encryption public key" #define SITEROOT "../www/" #define MAINCSS "/new.css" #define FRONTCSS "/front.css" @@ -80,7 +80,7 @@ int gettwtxt(FILE* f) { char line[256]; char datebuf[16] = {0}; char msgbuf[240] = {0}; - char* l; + char *l, *d, *m; FILE* twtxt = fopen(SITEROOT "twtxt.txt", "r"); scat(buf, "

recent activity:

"); @@ -102,6 +102,14 @@ int gettwtxt(FILE* f) { scat(buf, ": "); scat(buf, msgbuf); scat(buf, "
"); + d = datebuf; + while (*d) { + *d++ = 0; + } + m = msgbuf; + while (*m) { + *m++ = 0; + } i++; } scat(buf, "see all"); @@ -322,9 +330,7 @@ int fpfooter(FILE* f, char* name, char* path) { fputs("