Patches for hypermail 2a16p1

From: Paul Haldane <Paul.Haldane_at_newcastle.ac.uk_at_hypermail-project.org>
Date: Thu, 25 Mar 1999 15:29:12 +0000 (GMT)
Message-ID: <Pine.GSO.3.95-960729.990325152036.17541D-100000_at_carr6.ncl.ac.uk>


A few small patches based on source pulled from CVS today. Most of them are (I think) obvious but there's one set where our requirements may not be immediately obvious - see notes below.

Paul

-- 
Paul Haldane
Computing Service
University of Newcastle upon Tyne


printfile.c:
        break instead of continue when expanding %f

print.c:
        add extra argument to print_index_header()
        This is the file name of the current index (without the path)

        [query -  print_index_header is usually passed set_dir, set_label
        but call for thread index doesn't - seems to work anyway]

        printfooter() wasn't using the last argument passed to it
	(filename).  Changed function so that it uses filename 
	(passing it on to printfile) and changed calls (for index
	files) so that it gets just the file name rather than the
	full path.

The reason for wanting the 'short' name of the current index file is that
we split up our list archives by month and on each index page we have
links to the previous and next month (as well as to the index page for all
months).  What we want to be able to do (in fact alreay do with a hacked
version of hypermail-1) is have these links take the user to the same type
of index page (if you're looking at January's thread index and select 
'next month' then you get Feb's thread index rather than the default
index).

parse.c:
        getid() - pick last message-id from line rather than first.
        This makes threading work better with replies from Netscape
        mail (using References: rather than In-reply-to:) when the
        first message in the thread isn't in the current index.

threadprint.c
        print_a_single_thread - don't put out <UL> </UL> for top level
        entries - this makes formatting consistent with other index pages.



diff -c ../cvs/hypermail/src/parse.c ./parse.c

*** ../cvs/hypermail/src/parse.c Thu Mar 25 14:08:51 1999
--- ./parse.c Thu Mar 25 14:36:48 1999 ***************
*** 742,748 ****
INIT_PUSH(buff); ! if (strchr(line, '<') == NULL) { /* bozo alert! ** msg-id = "<" addr-spec ">" ** try to recover as best we can --- 742,748 ---- INIT_PUSH(buff); ! if (strrchr(line, '<') == NULL) { /* bozo alert! ** msg-id = "<" addr-spec ">" ** try to recover as best we can ***************
*** 754,760 ****
c++; } else ! c = strchr(line, '<') + 1; for (i=0; *c && *c != '>' && *c != '\n'; c++) { if (*c == '\\') --- 754,760 ---- c++; } else ! c = strrchr(line, '<') + 1; for (i=0; *c && *c != '>' && *c != '\n'; c++) { if (*c == '\\') diff -c ../cvs/hypermail/src/print.c ./print.c
*** ../cvs/hypermail/src/print.c Thu Mar 25 14:08:56 1999
--- ./print.c Thu Mar 25 15:06:28 1999 ***************
*** 1015,1021 ****
/* ** Print out the index file header */ ! print_index_header(fp, set_label, set_dir, lang[MSG_BY_DATE]); if (!set_usetable) { /* --- 1015,1021 ---- /* ** Print out the index file header */ ! print_index_header(fp, set_label, set_dir, lang[MSG_BY_DATE], datename); if (!set_usetable) { /* ***************
*** 1078,1084 ****
** Print the index page footer. */ printfooter(fp, ihtmlfooterfile, set_label, set_dir, lang[MSG_BY_DATE], ! filename); fclose(fp); --- 1078,1084 ---- ** Print the index page footer. */ printfooter(fp, ihtmlfooterfile, set_label, set_dir, lang[MSG_BY_DATE], ! datename); fclose(fp); ***************
*** 1203,1209 ****
if (set_showprogress) printf("%s \"%s\"...", lang[MSG_WRITING_THREAD_INDEX],filename); ! print_index_header(fp, label, dir, lang[MSG_BY_THREAD]); if (!set_usetable) { /* --- 1203,1209 ---- if (set_showprogress) printf("%s \"%s\"...", lang[MSG_WRITING_THREAD_INDEX],filename); ! print_index_header(fp, label, dir, lang[MSG_BY_THREAD], thrdname); if (!set_usetable) { /* ***************
*** 1258,1264 ****
} printfooter(fp, ihtmlfooterfile, set_label, set_dir, lang[MSG_BY_THREAD], ! filename); fclose(fp); --- 1258,1264 ---- } printfooter(fp, ihtmlfooterfile, set_label, set_dir, lang[MSG_BY_THREAD], ! thrdname); fclose(fp); ***************
*** 1325,1331 ****
if (set_showprogress) printf("%s \"%s\"...", lang[MSG_WRITING_SUBJECT_INDEX],filename); ! print_index_header(fp, set_label, set_dir, lang[MSG_BY_SUBJECT]); if (!set_usetable) { /* --- 1325,1331 ---- if (set_showprogress) printf("%s \"%s\"...", lang[MSG_WRITING_SUBJECT_INDEX],filename); ! print_index_header(fp, set_label, set_dir, lang[MSG_BY_SUBJECT], subjname); if (!set_usetable) { /* ***************
*** 1374,1380 ****
} printfooter(fp, ihtmlfooterfile, set_label, set_dir, lang[MSG_BY_SUBJECT], ! filename); fclose(fp); --- 1374,1380 ---- } printfooter(fp, ihtmlfooterfile, set_label, set_dir, lang[MSG_BY_SUBJECT], ! subjname); fclose(fp); ***************
*** 1442,1448 ****
if (set_showprogress) printf("%s \"%s\"...", lang[MSG_WRITING_AUTHOR_INDEX], filename); ! print_index_header(fp, set_label, set_dir, lang[MSG_BY_AUTHOR]); if (!set_usetable) { /* --- 1442,1448 ---- if (set_showprogress) printf("%s \"%s\"...", lang[MSG_WRITING_AUTHOR_INDEX], filename); ! print_index_header(fp, set_label, set_dir, lang[MSG_BY_AUTHOR], authname); if (!set_usetable) { /* ***************
*** 1491,1497 ****
} printfooter(fp, ihtmlfooterfile, set_label, set_dir, lang[MSG_BY_AUTHOR], ! filename); fclose(fp); --- 1491,1497 ---- } printfooter(fp, ihtmlfooterfile, set_label, set_dir, lang[MSG_BY_AUTHOR], ! authname); fclose(fp); diff -c ../cvs/hypermail/src/printfile.c ./printfile.c
*** ../cvs/hypermail/src/printfile.c Thu Mar 25 14:08:58 1999
--- ./printfile.c Thu Mar 25 14:31:16 1999 ***************
*** 113,119 ****
for (cp = filename; *cp; cp++) putc(*cp, fp); } ! break; case 'g': /* %g - date and time archive generated */ for (cp = getlocaltime(); *cp; cp++) putc(*cp, fp); --- 113,119 ---- for (cp = filename; *cp; cp++) putc(*cp, fp); } ! continue; case 'g': /* %g - date and time archive generated */ for (cp = getlocaltime(); *cp; cp++) putc(*cp, fp); ***************
*** 259,269 ****
** Prints the header for the by_date index page. */ ! void print_index_header(FILE *fp,char *label,char *dir,char *subject) { if (ihtmlheaderfile) printfile(fp, ihtmlheaderfile, label, subject, dir, NULL, NULL, NULL, ! NULL, NULL); else { print_main_header(fp, label, NULL, NULL, subject, NULL, NULL); fprintf(fp, "<H1 ALIGN=CENTER>%s<BR>%s</H1>\n", label, subject); --- 259,269 ---- ** Prints the header for the by_date index page. */ ! void print_index_header(FILE *fp,char *label,char *dir,char *subject, char *filename) { if (ihtmlheaderfile) printfile(fp, ihtmlheaderfile, label, subject, dir, NULL, NULL, NULL, ! NULL, filename); else { print_main_header(fp, label, NULL, NULL, subject, NULL, NULL); fprintf(fp, "<H1 ALIGN=CENTER>%s<BR>%s</H1>\n", label, subject); ***************
*** 276,282 ****
** Prints the HTML page footer. */ ! void printfooter(FILE *fp,char *htmlfooter,char *label,char *dir,char *subject) { printcomment(fp, "trailer", "footer"); --- 276,282 ---- ** Prints the HTML page footer. */ ! void printfooter(FILE *fp,char *htmlfooter,char *label,char *dir,char *subject, char *filename) { printcomment(fp, "trailer", "footer"); ***************
*** 283,289 ****
if (htmlfooter) printfile(fp, htmlfooter, label, subject, dir, NULL, NULL, NULL, ! NULL, NULL); else { if (set_showhr && !set_usetable) --- 283,289 ---- if (htmlfooter) printfile(fp, htmlfooter, label, subject, dir, NULL, NULL, NULL, ! NULL, filename); else { if (set_showhr && !set_usetable) diff -c ../cvs/hypermail/src/printfile.h ./printfile.h
*** ../cvs/hypermail/src/printfile.h Thu Mar 25 14:08:59 1999
--- ./printfile.h Thu Mar 25 14:30:15 1999 ***************
*** 13,19 ****
void print_msg_header(FILE *fp, char *label, char *subject, char *dir, char *name, char *email, char *msgid, char *charset, char *filename); ! void print_index_header(FILE *fp, char *label, char *dir, char *subject); void printfooter(FILE *fp, char *htmlfooter, char *label, char *dir, char *subject, char *filename); --- 13,19 ---- void print_msg_header(FILE *fp, char *label, char *subject, char *dir, char *name, char *email, char *msgid, char *charset, char *filename); ! void print_index_header(FILE *fp, char *label, char *dir, char *subject, char *filename); void printfooter(FILE *fp, char *htmlfooter, char *label, char *dir, char *subject, char *filename); diff -c ../cvs/hypermail/src/threadprint.c ./threadprint.c
*** ../cvs/hypermail/src/threadprint.c Thu Mar 25 14:09:14 1999
--- ./threadprint.c Thu Mar 25 14:52:57 1999 ***************
*** 43,49 ****
} if(!(email->flags&PRINT_THREAD)) { /* Don't "indent" more than wanted */ ! if (*level < set_thrdlevels) fprintf(fp, "<UL>\n"); (*level)++; --- 43,49 ---- } if(!(email->flags&PRINT_THREAD)) { /* Don't "indent" more than wanted */ ! if (*level != 0 && *level < set_thrdlevels) fprintf(fp, "<UL>\n"); (*level)++; ***************
*** 61,67 ****
(*level)--; /* Don't "indent" more than wanted */ ! if (*level < set_thrdlevels) fprintf(fp, "</UL>\n"); } #if 0 --- 61,67 ---- (*level)--; /* Don't "indent" more than wanted */ ! if (*level != 0 && *level < set_thrdlevels) fprintf(fp, "</UL>\n"); } #if 0
Received on Thu 25 Mar 1999 06:25:32 PM GMT

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