home *** CD-ROM | disk | FTP | other *** search
- *** postd/mn.c Thu Aug 23 18:16:31 1990
- --- mn.c Thu Aug 23 18:33:32 1990
- ***************
- *** 5,10
- of output, mainly for human consumption.
-
- */
- /*
- options:
-
-
- --- 5,11 -----
- of output, mainly for human consumption.
-
- */
- + /* Version:1 Patchlevel:1 */
- /*
- options:
-
- ***************
- *** 56,61
-
- extern char *index(), *rindex(), *malloc(); /* minimal header files? */
- char *dynamicize();
-
- main(argc, argv) int argc; char **argv;
- {int state; /* 0 = waiting for 'from', 1=in header, 2=in body */
-
- --- 57,63 -----
-
- extern char *index(), *rindex(), *malloc(); /* minimal header files? */
- char *dynamicize();
- + static char *nullsub = "";
-
- main(argc, argv) int argc; char **argv;
- {int state; /* 0 = waiting for 'from', 1=in header, 2=in body */
- ***************
- *** 197,202
- ; /* search for first blank */
- buf[i] = (char)0; /* terminate the string there */
- from = dynamicize(buf+FROMOFF);
- }
- if(state==1 && !(style==OFROM || style==ADDRONLY) &&
- !strncmp("Subject:", buf, SUBOFF)) /* grab the subj string */
-
- --- 199,206 -----
- ; /* search for first blank */
- buf[i] = (char)0; /* terminate the string there */
- from = dynamicize(buf+FROMOFF);
- + if(sub) free(sub); /* don't reuse old subject lines */
- + sub = NULL;
- }
- if(state==1 && !(style==OFROM || style==ADDRONLY) &&
- !strncmp("Subject:", buf, SUBOFF)) /* grab the subj string */
- ***************
- *** 237,242
- if(!index(buf+STATOFF, 'R')) /* read mail? */
- unread++; else tych = (tych == 'U')?'O':'?';
-
- switch(style) /* output this msg. in correct style */
- {
- case SIMPLE:
-
- --- 241,248 -----
- if(!index(buf+STATOFF, 'R')) /* read mail? */
- unread++; else tych = (tych == 'U')?'O':'?';
-
- + if(!sub) sub = nullsub; /* non-dynamic null string to ease output */
- + /* should be reset to NULL after output so as not to be freed */
- switch(style) /* output this msg. in correct style */
- {
- case SIMPLE:
- ***************
- *** 290,295
- default:
- puts("Unimplemented style"); break; /* this should never happen ;-) */
- } /* end of style-output switch() */
- } /* end of if(Status:) test */
- if(remains > 0 && (state == 0 || state == 2)) /*need to fill rest of line?*/
- {char *cp; int spflag = 0; /* stick this line onto end of line */
-
- --- 296,302 -----
- default:
- puts("Unimplemented style"); break; /* this should never happen ;-) */
- } /* end of style-output switch() */
- + if(sub == nullsub) sub = NULL; /* reset null sub. to NULL again */
- } /* end of if(Status:) test */
- if(remains > 0 && (state == 0 || state == 2)) /*need to fill rest of line?*/
- {char *cp; int spflag = 0; /* stick this line onto end of line */
-