X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/177f020f122827214159c46dcfe7ded1e3c8d1c3..c3238c0e:/uip/scansbr.c?ds=sidebyside diff --git a/uip/scansbr.c b/uip/scansbr.c index ce29fa8b..7023502f 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -12,15 +12,6 @@ #include #include -/* - * Buffer size for content part of header fields. We want this - * to be large enough so that we don't do a lot of extra FLDPLUS - * calls on m_getfld but small enough so that we don't snarf - * the entire message body when we're only going to display 30 - * characters of it. - */ -#define SBUFSIZ 512 - static struct format *fmt; static struct comp *datecomp; /* pntr to "date" comp */ static struct comp *bodycomp; /* pntr to "body" pseudo-comp * @@ -68,7 +59,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, width = INT_MAX; } dat[3] = slwidth = width; - *scanl = charstring_create (width < NMH_BUFSIZ ? width : NMH_BUFSIZ); + *scanl = charstring_create (min(width, NMH_BUFSIZ)); if (outnum) umask(~m_gmprot()); @@ -122,9 +113,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, nxtbuf = compbuffers = mh_xcalloc(ncomps, sizeof *nxtbuf); used_buf = mh_xcalloc(ncomps + 1, sizeof *used_buf); used_buf += ncomps+1; *--used_buf = 0; - rlwidth = bodycomp && (width > SBUFSIZ) - ? min (width, NMH_BUFSIZ) - : SBUFSIZ; + rlwidth = NMH_BUFSIZ; for (i = ncomps; i--; ) *nxtbuf++ = mh_xmalloc(rlwidth); }