From 8f6d0a2c1c54542ec32a627054bfe1d015480c87 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 14 Apr 2020 11:07:33 -0400 Subject: Add decoding stubs --- parse.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'parse.c') diff --git a/parse.c b/parse.c index ff97789..d491e53 100644 --- a/parse.c +++ b/parse.c @@ -29,9 +29,7 @@ static struct Address parseAddress(struct List list) { } struct Address addr = {0}; if (list.ptr[0].type == String) { - // TODO: Decode UTF-8 in name. - addr.name = strdup(list.ptr[0].string); - if (!addr.name) err(EX_OSERR, "strdup"); + addr.name = decodeHeader(list.ptr[0].string); } if (list.ptr[2].type == String) addr.mailbox = list.ptr[2].string; if (list.ptr[3].type == String) addr.host = list.ptr[3].string; @@ -83,9 +81,9 @@ void parseEnvelope(struct Envelope *envelope, struct List list) { if (!date) errx(EX_PROTOCOL, "invalid envelope date format"); envelope->time = mktime(&time); - // TODO: Decode UTF-8 in subject. - envelope->subject = strdup(dataCheck(list.ptr[Subject], String).string); - if (!envelope->subject) err(EX_OSERR, "strdup"); + envelope->subject = decodeHeader( + dataCheck(list.ptr[Subject], String).string + ); for (size_t i = From; i <= Bcc; ++i) { if (list.ptr[i].type == List) continue; -- cgit 1.4.1 .causal.agency/cgit/tests/Makefile?id=717a0fc69c87b51b851c4db53a8bfe5c0cae39f9&follow=1'>commit diff
path: root/www/git.causal.agency/cgit/tests/Makefile (unfollow)
Commit message (Expand)Author
2021-09-22Remove Linux-specific utilitiesJune McEnroe
2021-09-22Call sandbox in CGI modeJune McEnroe
2021-09-22Support HTTP PUT in upJune McEnroe
2021-09-22Remove default faviconJune McEnroe
2021-09-21Use Z_FILTERED strategyJune McEnroe
2021-09-21Recalculate various lengths only as neededJune McEnroe
2021-09-21Rewrite pngo, add explicit optionsJune McEnroe
2021-09-16Fix /* **/ comment matchingJune McEnroe
2021-09-15Remove typer, add downgrade to READMEJune McEnroe
2021-09-15Set bot mode on downgradeJune McEnroe
2021-09-15Enter capsicum in downgradeJune McEnroe
2021-09-15Factor out common parts of downgrade messagesJune McEnroe
2021-09-14Add downgrade IRC botJune McEnroe
2021-09-14Sort by title if authors matchJune McEnroe
2021-09-13Swap-remove tags as they're foundJune McEnroe
2021-09-12Replace htagml regex with strncmpJune McEnroe
2021-09-11Also defer printing comment for lone close-parensJune McEnroe
2021-09-10Publish "git-comment"June McEnroe
2021-09-10Add git comment --pretty optionJune McEnroe
2021-09-08Defer printing comment if line is blank or closing braceJune McEnroe
2021-09-08Up default min-repeat to 30 linesJune McEnroe
2021-09-08Handle dirty lines in git-commentJune McEnroe
2021-09-08Document and install git-commentJune McEnroe
2021-09-08Add repeat and all options to git-commentJune McEnroe
2021-09-08Add group threshold to git-commentJune McEnroe