From 2da3024caea2be71550f9eabd2fbc08fefe29bb5 Mon Sep 17 00:00:00 2001 From: Ruud de Rooij Date: Sun, 26 Sep 1999 17:45:55 +0000 Subject: [PATCH] * Added config.sub and config.guess to the list of files to be distributed. * Fixed bug in sbr/fmt_scan.c where an extra newline would be added if a list of addresses was split over several header lines. * In mts/smtp/smtp.c, undefine strlen and strcpy if they are macros, regardless of platform. * Allow q to quit mhshow, and n to skip to next part. Patch from Kimmo Suominen . * Modified mhstore to recognize attachments created by sendfiles with x-conversions=gzip. --- ChangeLog | 17 +++++++++++++++++ Makefile.in | 2 +- mts/smtp/smtp.c | 13 +++++++------ sbr/fmt_scan.c | 3 --- uip/mhshowsbr.c | 3 ++- uip/mhstoresbr.c | 18 ++++++++++++++---- 6 files changed, 41 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index a92dd7b..0f5d80a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Sat Sep 25 18:40:43 1999 Ruud de Rooij + + * Added config.sub and config.guess to the list of files to be + distributed. + + * Fixed bug in sbr/fmt_scan.c where an extra newline would be + added if a list of addresses was split over several header lines. + + * In mts/smtp/smtp.c, undefine strlen and strcpy if they are + macros, regardless of platform. + + * Allow q to quit mhshow, and n to skip to next part. Patch from + Kimmo Suominen . + + * Modified mhstore to recognize attachments created by sendfiles + with x-conversions=gzip. + Mon Sep 13 21:20:10 1999 Doug Morris * added explicit cast to long from time_t for tclock in diff --git a/Makefile.in b/Makefile.in index 60fb915..c6594d1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -73,7 +73,7 @@ INSTALL_DATA = @INSTALL_DATA@ DIST = README INSTALL MACHINES COPYRIGHT VERSION DIFFERENCES FAQ \ TODO COMPLETION-ZSH COMPLETION-TCSH MAIL.FILTERING \ ChangeLog install-sh mkinstalldirs Makefile.in aclocal.m4 \ - acconfig.h config.h.in configure.in configure stamp-h.in + acconfig.h config.h.in configure.in configure stamp-h.in config.sub config.guess # subdirectories in distribution SUBDIRS = h config sbr zotnet mts uip etc man diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index a0d84d5..025bb96 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -1011,16 +1011,17 @@ sm_wstream (char *buffer, int len) } -#ifdef _AIX /* - * AIX by default will inline the strlen and strcpy commands by redefining - * them as __strlen and __strcpy respectively. This causes compile problems - * with the #ifdef MPOP in the middle. Should the #ifdef MPOP be removed, - * remove these #undefs. + * On some systems, strlen and strcpy are defined as preprocessor macros. This + * causes compile problems with the #ifdef MPOP in the middle. Should the + * #ifdef MPOP be removed, remove these #undefs. */ +#ifdef strlen # undef strlen +#endif +#ifdef strcpy # undef strcpy -#endif /* _AIX */ +#endif static int sm_werror (void) diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index ae31162..b8273c9 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -760,9 +760,6 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) len -= sp - lp + 1; while (cp < ep && lp <= sp) *cp++ = *lp++; - *cp++ = '\n'; - for (i=indent; cp < ep && i > 0; i--) - *cp++ = ' '; while (isspace(*lp)) lp++, len--; if (*lp) { diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index e76dbaa..ef6f02c 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -509,10 +509,11 @@ show_content_aux2 (CT ct, int serial, int alternate, char *cracked, char *buffer read (fileno (stdout), prompt, sizeof(prompt)); } SIGNAL (SIGINT, istat); - if (intr != OK) { + if (intr != OK || prompt[0] == 'n') { (*ct->c_ceclosefnx) (ct); return (alternate ? DONE : NOTOK); } + if (prompt[0] == 'q') done(OK); } } diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 2d0fdc8..41aa1a4 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -218,7 +218,7 @@ store_application (CT ct) * attribute/value pairs which specify if this a tar file. */ if (!ct->c_storeproc && ct->c_subtype == APPLICATION_OCTETS) { - int tarP = 0, zP = 0; + int tarP = 0, zP = 0, gzP = 0; for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) { /* check for "type=tar" attribute */ @@ -236,18 +236,28 @@ store_application (CT ct) zP = 1; continue; } + /* check for "conversions=gzip" attribute */ + if ((!strcasecmp (*ap, "conversions") || !strcasecmp (*ap, "x-conversions")) + && (!strcasecmp (*ep, "gzip") || !strcasecmp (*ep, "x-gzip"))) { + gzP = 1; + continue; + } } if (tarP) { ct->c_showproc = add (zP ? "%euncompress | tar tvf -" - : "%etar tvf -", NULL); + : (gzP ? "%egzip -dc | tar tvf -" + : "%etar tvf -"), NULL); if (!ct->c_storeproc) { if (autosw) { ct->c_storeproc = add (zP ? "| uncompress | tar xvpf -" - : "| tar xvpf -", NULL); + : (gzP ? "| gzip -dc | tar xvpf -" + : "| tar xvpf -"), NULL); ct->c_umask = 0022; } else { - ct->c_storeproc= add (zP ? "%m%P.tar.Z" : "%m%P.tar", NULL); + ct->c_storeproc= add (zP ? "%m%P.tar.Z" + : (gzP ? "%m%P.tar.gz" + : "%m%P.tar"), NULL); } } } -- 1.7.10.4