[patches] Few more handy paches

From: Rick van der Zwet <rick_at_wzoeterwoude.net_at_hypermail-project.org>
Date: Thu, 11 Jan 2007 23:18:12 +0100
Message-ID: <45A6B7A4.3040600_at_wzoeterwoude.net>


File name more and less explain the meaning

cosmetic = tweaking the interface a small bit (right align, the message numbers, years in the date listing
spamify-domain = obfuscate the body of the message as well (will also obfuscate 'ssh rick_at_foo.bar' this of course), moved the domain obfuscate yes/no to the general to make the function more portable apple-fix = found this fix in darwinports will need this one, otherwhise complaining about something
build... = build script make (stolen from darwinports)

Cann't easy find the creator of the darwinport, but want to thank him anyway ;-)

Best regards,
/Rick

PS Right list, right?

-- 
http://rickvanderzwet.nl


#!/bin/sh make clean export CFLAGS="-no-cpp-precomp -I/opt/local/include -L/opt/local/lib" ./configure --prefix /opt/local --with-gdbm=/opt/local --enable-static --without-shared make
diff -ur ../hypermail-2.2.0-orig/src/date.c ./src/date.c --- ../hypermail-2.2.0-orig/src/date.c 2003-08-14 18:49:06.000000000 +0200 +++ ./src/date.c 2007-01-11 04:02:04.000000000 +0100
_at_@ -210,7 +210,7 @@
/* store the previous dateformat */ previous_dateformat = set_dateformat; - set_dateformat = "%A, %e %B"; + set_dateformat = "%A, %e %B %Y"; date = getdatestr (yearsecs); /* restore the previous dateformat */ set_dateformat = previous_dateformat; diff -ur ../hypermail-2.2.0-orig/src/date.c ./src/date.c --- ../hypermail-2.2.0-orig/src/date.c 2003-08-14 18:49:06.000000000 +0200 +++ ./src/date.c 2007-01-11 04:02:04.000000000 +0100
_at_@ -210,7 +210,7 @@
/* store the previous dateformat */ previous_dateformat = set_dateformat; - set_dateformat = "%A, %e %B"; + set_dateformat = "%A, %e %B %Y"; date = getdatestr (yearsecs); /* restore the previous dateformat */ set_dateformat = previous_dateformat; diff -ur ../hypermail-2.2.0-orig/src/print.c ./src/print.c --- ../hypermail-2.2.0-orig/src/print.c 2004-03-25 03:19:16.000000000 +0100 +++ ./src/print.c 2007-01-11 22:11:18.000000000 +0100
_at_@ -2927,7 +2927,7 @@
char *index_title; char *filename; char *saved_set_dateformat; - char *abbr_dateformat = "%e %b %Y"; + char *abbr_dateformat = "%d %b %Y"; char *verbose_dateformat = "%A, %e %B %Y"; FILE *fp;
_at_@ -3059,7 +3059,7 @@
} } if (started_line && fp) - fprintf(fp, "<td align=\"center\">%d</td></tr>\n", sd->count); + fprintf(fp, "<td align=\"right\">%d</td></tr>\n", sd->count); } set_dateformat = saved_set_dateformat;
diff -ur ../hypermail-2.2.0-orig/src/getname.c ./src/getname.c --- ../hypermail-2.2.0-orig/src/getname.c 2003-09-02 00:35:15.000000000 +0200 +++ ./src/getname.c 2007-01-11 22:37:15.000000000 +0100
_at_@ -16,6 +16,16 @@
char *spamify(char *input) { + if (set_antispamdomain) { + return spamify_replacedomain(input, set_antispamdomain); + } + else { + return spamify_small(input); + } +} + +char *spamify_small(char *input) +{ int insertlen = strlen(set_antispam_at); /* we should replace the _at_-letter in the email address */ int newlen = strlen(input) + insertlen; diff -ur ../hypermail-2.2.0-orig/src/getname.h ./src/getname.h --- ../hypermail-2.2.0-orig/src/getname.h 2002-08-07 20:10:26.000000000 +0200 +++ ./src/getname.h 2007-01-11 22:37:26.000000000 +0100
_at_@ -1,3 +1,4 @@
void getname(char *, char **, char **); char *spamify(char *input); +char *spamify_small(char *input); char *spamify_replacedomain(char *input, char *antispamdomain); diff -ur ../hypermail-2.2.0-orig/src/struct.c ./src/struct.c --- ../hypermail-2.2.0-orig/src/struct.c 2004-03-25 01:34:33.000000000 +0100 +++ ./src/struct.c 2007-01-11 22:26:39.000000000 +0100
_at_@ -726,7 +726,7 @@
if (!(flags & BODY_CONTINUE)) { newnode = (struct body *)emalloc(sizeof(struct body)); memset(newnode, 0, sizeof(struct body)); - newnode->line = strsav(line); + newnode->line = spamify(strsav(line)); newnode->html = (flags & BODY_HTMLIZED) ? 1 : 0; newnode->header = (flags & BODY_HEADER) ? 1 : 0; newnode->attached = (flags & BODY_ATTACHED) ? 1 : 0; --- ../../hypermail-2.2.0-orig/src/parse.c 2004-05-25 03:38:08.000000000 +0200 +++ parse.c 2007-01-11 22:48:51.000000000 +0100
_at_@ -1434,18 +1434,11 @@
else if (!strncasecmp(head->line, "From:", 5)) { getname(head->line, &namep, &emailp); head->parsedheader = TRUE; - if (set_spamprotect) { - if (set_antispamdomain) { - emailp=spamify_replacedomain(emailp,set_antispamdomain); - /* we need to "fix" the name as well, as sometimes - the email ends up in the name part */ - namep=spamify_replacedomain(namep,set_antispamdomain); - } else { + if (set_spamprotect) { emailp=spamify(emailp); /* we need to "fix" the name as well, as sometimes the email ends up in the name part */ namep=spamify(namep); - } } } else if (!strncasecmp(head->line, "Message-Id:", 11)) {
diff -ur ../hypermail-2.2.0-orig/src/proto.h ./src/proto.h --- ../hypermail-2.2.0-orig/src/proto.h 2003-08-14 18:49:06.000000000 +0200 +++ ./src/proto.h 2007-01-11 04:04:40.000000000 +0100
_at_@ -96,7 +96,9 @@
char *PushString(struct Push *, const char *); char *PushNString(struct Push *, const char *, int); +#ifndef HAVE_STRCASESTR char *strcasestr (char *, const char *); +#endif char *strsav(const char *); char *strreplace(char *, char *); void strcpymax(char *, const char *, int);
Received on Fri 12 Jan 2007 07:21:42 AM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:13 AM GMT GMT