Index: config.h =================================================================== RCS file: /home/hyper/cvsroot/hypermail/config.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** config.h 1997/06/09 18:37:35 1.1.1.1 --- config.h 1997/06/09 19:47:29 1.2 *************** *** 122,128 **** */ #ifndef DIRMODE ! #define DIRMODE 0777 #endif /* Define as the permissions mode to change any created directories to. --- 122,128 ---- */ #ifndef DIRMODE ! #define DIRMODE 0755 #endif /* Define as the permissions mode to change any created directories to. *************** *** 130,136 **** */ #ifndef FILEMODE ! #define FILEMODE 0666 #endif /* Define as the permissions mode to change any created HTML files to. --- 130,136 ---- */ #ifndef FILEMODE ! #define FILEMODE 0644 #endif /* Define as the permissions mode to change any created HTML files to. Index: date.c =================================================================== RCS file: /home/hyper/cvsroot/hypermail/date.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** date.c 1997/06/09 18:37:35 1.1.1.1 --- date.c 1997/06/09 19:47:30 1.2 *************** *** 94,129 **** long getyearsecs(shortdate) char *shortdate; { ! int i, yearday, yearsecs, prevyeardays; ! int month, day, year; splitshortdate(shortdate, &month, &day, &year); year += CENTURY; ! for (yearday = i = 0; i < month - 1; i++) { ! if (i == 1 && IS_LEAP(year)) ! yearday++; ! yearday += monthdays[i]; } - yearday += day; ! prevyeardays = 0; ! for (i = BASEYEAR; i != year; i++) { ! if (IS_LEAP(i)) ! prevyeardays++; ! prevyeardays += DAYSPERYEAR; } ! yearsecs = (yearday + prevyeardays) * SECSPERDAY; ! ! return yearsecs; } /* Given a long date string, it returns the number of seconds ** since BASEYEAR. */ ! int convtoyearsecs(date) char *date; { char hourstr[3], minstr[3], secstr[3], shortdate[SHORTDATELEN]; --- 94,125 ---- long getyearsecs(shortdate) char *shortdate; { ! int i, month, day, year; ! long dayspast = 0; splitshortdate(shortdate, &month, &day, &year); year += CENTURY; ! for (i = BASEYEAR; i < year; i++) { ! if (IS_LEAP(i)) dayspast++; ! dayspast += DAYSPERYEAR; } ! for (i = 0; i < month - 1; i++) { ! dayspast += monthdays[i]; } + if (month > 2 && IS_LEAP(year)) dayspast++; ! dayspast += day; ! ! return (dayspast * SECSPERDAY); } /* Given a long date string, it returns the number of seconds ** since BASEYEAR. */ ! long convtoyearsecs(date) char *date; { char hourstr[3], minstr[3], secstr[3], shortdate[SHORTDATELEN]; *************** *** 141,148 **** minutes = atoi(minstr); seconds = atoi(secstr); ! return (int) (yearsecs + (hours * SECSPERHOUR) + ! (minutes * SECSPERMIN) + seconds); } /* Gets the local time and returns it formatted. --- 137,144 ---- minutes = atoi(minstr); seconds = atoi(secstr); ! return (yearsecs + (hours * SECSPERHOUR) + ! (minutes * SECSPERMIN) + seconds); } /* Gets the local time and returns it formatted. *************** *** 196,202 **** register int day, year, month, hours, minutes; static char date[DATESTRLEN]; ! for (day = 0; yearsecs > SECSPERDAY; day++) yearsecs -= SECSPERDAY; for (year = BASEYEAR; day > DAYSPERYEAR; year++) { --- 192,198 ---- register int day, year, month, hours, minutes; static char date[DATESTRLEN]; ! for (day = 0; yearsecs >= SECSPERDAY; day++) yearsecs -= SECSPERDAY; for (year = BASEYEAR; day > DAYSPERYEAR; year++) { *************** *** 205,222 **** day -= DAYSPERYEAR; } ! if (IS_LEAP(year) && day > (monthdays[0] + monthdays[1])) { ! day--; ! yearsecs -= SECSPERDAY; ! } ! ! for (month = 0; day > monthdays[month]; month++) day -= monthdays[month]; ! for (hours = 0; yearsecs > SECSPERHOUR; hours++) yearsecs -= SECSPERHOUR; ! for (minutes = 0; yearsecs > SECSPERMIN; minutes++) yearsecs -= SECSPERMIN; #ifdef EURODATE --- 201,220 ---- day -= DAYSPERYEAR; } ! for (month = 0; day > monthdays[month]; month++) { ! if (month == 1 && IS_LEAP(year)) { ! if (day == 29) ! break; ! else ! day--; ! } day -= monthdays[month]; + } ! for (hours = 0; yearsecs >= SECSPERHOUR; hours++) yearsecs -= SECSPERHOUR; ! for (minutes = 0; yearsecs >= SECSPERMIN; minutes++) yearsecs -= SECSPERMIN; #ifdef EURODATE Index: date.h =================================================================== RCS file: /home/hyper/cvsroot/hypermail/date.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** date.h 1997/06/09 18:37:35 1.1.1.1 --- date.h 1997/06/09 19:47:31 1.2 *************** *** 8,14 **** void convtoshortdate(); void splitshortdate(); long getyearsecs(); ! int convtoyearsecs(); char *getlocaltime(); void gettimezone(); void getthisyear(); --- 8,14 ---- void convtoshortdate(); void splitshortdate(); long getyearsecs(); ! long convtoyearsecs(); char *getlocaltime(); void gettimezone(); void getthisyear(); Index: file.c =================================================================== RCS file: /home/hyper/cvsroot/hypermail/file.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** file.c 1997/06/09 18:37:34 1.1.1.1 --- file.c 1997/06/09 19:47:32 1.2 *************** *** 7,12 **** --- 7,13 ---- #include "hypermail.h" #include "file.h" + #include "string.h" /* Is a file a directory? */ *************** *** 88,94 **** else { if ((fp = fopen(path, "r")) == NULL) return; ! printf("path: %s\n", path); } while (fgets(line, MAXLINE, fp) != NULL) { if (line[0] == '#' || line[0] == '\n') --- 89,95 ---- else { if ((fp = fopen(path, "r")) == NULL) return; ! if (showprogress) printf("path: %s\n", path); } while (fgets(line, MAXLINE, fp) != NULL) { if (line[0] == '#' || line[0] == '\n') Index: hypermail.h =================================================================== RCS file: /home/hyper/cvsroot/hypermail/hypermail.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** hypermail.h 1997/06/09 18:37:33 1.1.1.1 --- hypermail.h 1997/06/09 19:47:33 1.2 *************** *** 92,98 **** char *name; char *subject; char *datestr; ! int datenum; struct header *left; struct header *right; }; --- 92,98 ---- char *name; char *subject; char *datestr; ! long datenum; struct header *left; struct header *right; }; *************** *** 112,119 **** VAR char subjname[NAMESTRLEN]; VAR char authname[NAMESTRLEN]; VAR char errmsg[MAXLINE]; ! VAR int firstdatenum; ! VAR int lastdatenum; VAR int bignum; VAR int showprogress; VAR int reverse; --- 112,119 ---- VAR char subjname[NAMESTRLEN]; VAR char authname[NAMESTRLEN]; VAR char errmsg[MAXLINE]; ! VAR long firstdatenum; ! VAR long lastdatenum; VAR int bignum; VAR int showprogress; VAR int reverse; Index: parse.c =================================================================== RCS file: /home/hyper/cvsroot/hypermail/parse.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** parse.c 1997/06/09 18:37:35 1.1.1.1 --- parse.c 1997/06/09 19:47:34 1.2 *************** *** 7,12 **** --- 7,13 ---- #include "hypermail.h" #include "parse.h" + #include "struct.h" /* Parsing...the heart of Hypermail! ** This loads in the articles from stdin or a mailbox, adding the right *************** *** 630,636 **** char *c; static char msgid[MSGDSTRLEN]; ! c = (char *) strchr(line, '<') + 1; for (i = 0; *c && *c != '>' && *c != '\n' && i < MSGDSTRLEN; c++) { if (*c == '\\') continue; --- 631,646 ---- char *c; static char msgid[MSGDSTRLEN]; ! if ((char *)strchr(line, '<') == NULL) { ! /* bozo alert! ! ** msg-id = "<" addr-spec ">" ! ** try to recover as best we can ! */ ! c = (char *) strchr(line, ':') + 1; /* we know this exists! */ ! while (*c && *c == ' ') c++; /* skip spaces before message ID */ ! } else { ! c = (char *) strchr(line, '<') + 1; ! } for (i = 0; *c && *c != '>' && *c != '\n' && i < MSGDSTRLEN; c++) { if (*c == '\\') continue; *************** *** 638,643 **** --- 648,655 ---- } msgid[i] = '\0'; + if (strlen(msgid) == 0) strcpy(msgid, "BOZO"); + return msgid; } *************** *** 660,666 **** for (i--; i >= 0 && isspace(subject[i]); i--) subject[i] = '\0'; ! if (subject[0] == NULL || isspace(subject[0]) || subject[0] == '\n' || !strcasecmp(subject, "Re:")) strcpy(subject, NOSUBJECT); --- 672,678 ---- for (i--; i >= 0 && isspace(subject[i]); i--) subject[i] = '\0'; ! if (subject[0] == '\0' || isspace(subject[0]) || subject[0] == '\n' || !strcasecmp(subject, "Re:")) strcpy(subject, NOSUBJECT); Index: print.c =================================================================== RCS file: /home/hyper/cvsroot/hypermail/print.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** print.c 1997/06/09 18:37:34 1.1.1.1 --- print.c 1997/06/09 19:47:36 1.2 *************** *** 446,454 **** fprintf(fp, "
\n", getlocaltime()); fprintf(fp, "
\n", getlocaltime()); fprintf(fp, "
\n", getlocaltime()); fprintf(fp, "
\n", getlocaltime()); fprintf(fp, "
\n", getlocaltime()); fprintf(fp, "
\n", getlocaltime()); fprintf(fp, "
\n", getlocaltime()); fprintf(fp, "
\n", getlocaltime()); fprintf(fp, "