scribo

Email-based phlog generator
git clone git://git.z3bra.org/scribo.git
Log | Files | Refs

commit 1e2c694a88f3fb5f1cc3c42d9e079495cd530a83
parent 0e895bfa4bdd8266b659a9b2cab1c57ab7e1f45c
Author: Willy Goiffon <dev@z3bra.org>
Date:   Tue,  8 Sep 2020 14:33:12 +0200

Move title format in config.h

Diffstat:
Mconfig.def.h | 3+++
Mscribo.c | 3+--
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -5,6 +5,9 @@ char *author = "contact@z3bra.org"; char *host = "z3bra.org"; int port = 70; +/* must include "%s" */ +char *titlefmt = "%69s\n──────────────────────────────────────────────────────────────────────\n"; + char *head = "[i| Civis pacem para bloggum|Err||]\n" "[i|──────────────────────────────────────────────────────────────────────|Err||]\n" diff --git a/scribo.c b/scribo.c @@ -195,8 +195,7 @@ writeentry(FILE *in, char *dir, struct headers *head) strptime(date, "%a, %d %b %Y %T %z", &tm); strftime(stamp, sizeof(stamp), datefmt, &tm); - fprintf(out, "%69s\n", subject); - fprintf(out, "──────────────────────────────────────────────────────────────────────\n"); + fprintf(out, titlefmt, subject); while ((len = fread(buf, 1, sizeof(buf), in))) fwrite(buf, 1, len, out);