diff -ur hypermail-2b25.orig/src/hypermail.c hypermail-2b25/src/hypermail.c --- hypermail-2b25.orig/src/hypermail.c Thu Sep 30 22:35:04 1999 +++ hypermail-2b25/src/hypermail.c Thu Nov 4 15:42:06 1999 @@ -132,9 +132,9 @@ printf(" -V : %s\n", lang[MSG_OPTION_VERSION]); printf(" -u : %s\n", lang[MSG_OPTION_U]); printf(" -x : %s\n", lang[MSG_OPTION_X]); - printf(" -1 : %s\n", lang[MSG_OPTION_1]); + printf(" -1 : %s\n", lang[MSG_OPTION_1]); + printf(" -S word : strip 'word' from all subjects.\n"); printf(" -L lang : %s (", lang[MSG_OPTION_LANG]); - printf(" -M use metadata\n"); /* Print out languages supported */ lte = <able[0]; @@ -143,6 +143,8 @@ lte++; } printf(")\n"); + + printf(" -M use metadata\n"); #if 0 printf("%s : %s\n", lang[MSG_VERSION], VERSION); printf("%s : %s\n", lang[MSG_PATCHLEVEL], PATCHLEVEL); @@ -177,7 +179,7 @@ cmd_show_variables = 0; /* get pre config options here */ - while ((i = (int)getopt(argc,argv,"a:b:c:d:hil:L:m:n:o:ps:tTuvVxz1M?")) != -1) { + while ((i = (int)getopt(argc,argv,"a:b:c:d:hil:L:m:n:o:ps:S:tTuvVxz1M?")) != -1) { switch((char) i) { case 'c': configfile = strreplace(configfile, optarg); @@ -199,6 +201,7 @@ case 'o': case 's': case 'p': + case 'S': case 't': case 'T': case 'u': @@ -231,7 +234,7 @@ /* now get the post-config options! */ - while ((i = (int)getopt(argc,argv,"a:b:c:d:hil:L:m:n:o:ps:tTuvxz1M?")) != -1) { + while ((i = (int)getopt(argc,argv,"a:b:c:d:hil:L:m:n:o:ps:S:tTuvxz1M?")) != -1) { switch((char) i) { case 'a': set_archives = strreplace(set_archives, optarg); @@ -268,6 +271,9 @@ break; case 'p': set_showprogress = TRUE; + break; + case 'S': + set_stripsubject = strreplace(set_stripsubject, optarg); break; case 't': set_usetable = TRUE; diff -ur hypermail-2b25.orig/src/parse.c hypermail-2b25/src/parse.c --- hypermail-2b25.orig/src/parse.c Thu Sep 30 22:35:09 1999 +++ hypermail-2b25/src/parse.c Thu Nov 4 19:22:37 1999 @@ -536,11 +536,12 @@ ** Returns ALLOCATED string. */ + char *getsubject(char *line) { int i; int len; - char *c; + char *c, *b; char *startp; char *postre=NULL; @@ -554,6 +555,8 @@ c += 2; + if (set_stripsubject) c = b = replace(c, set_stripsubject, ""); + while (isspace(*c)) c++; @@ -578,6 +581,8 @@ PushString(&buff, NOSUBJECT); else PushNString(&buff, startp, len); + + if (set_stripsubject) free(b); RETURN_PUSH(buff); } diff -ur hypermail-2b25.orig/src/setup.c hypermail-2b25/src/setup.c --- hypermail-2b25.orig/src/setup.c Thu Sep 30 22:35:12 1999 +++ hypermail-2b25/src/setup.c Thu Nov 4 15:41:03 1999 @@ -57,6 +57,7 @@ char *set_label; char *set_dateformat; +char *set_stripsubject; struct hmlist *set_text_types; struct hmlist *set_inline_types; @@ -276,6 +277,10 @@ {"dateformat", &set_dateformat, NULL, CFG_STRING, "# Format (see strftime(3)) for displaying dates.\n"}, + + {"stripsubject", &set_stripsubject, NULL, CFG_STRING, + "# A word to be stripped from all subject lines. Helps unclutter\n" + "# mailing lists which add tags to subject lines.\n"}, {"attachmentlink", &set_attachmentlink, NULL, CFG_STRING, "# Format of the attachment links.\n" Only in hypermail-2b25/src: setup.c~ diff -ur hypermail-2b25.orig/src/setup.h hypermail-2b25/src/setup.h --- hypermail-2b25.orig/src/setup.h Thu Sep 30 22:35:12 1999 +++ hypermail-2b25/src/setup.h Wed Nov 3 16:30:38 1999 @@ -74,6 +74,7 @@ extern char *set_htmlbody; extern char *set_dateformat; +extern char *set_stripsubject; extern struct hmlist *set_text_types; extern struct hmlist *set_inline_types;