diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2006-12-19 01:47:36 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2006-12-19 01:47:36 +0000 |
commit | 4f0cc5947d897a906a80e723b93e840a18a42394 (patch) | |
tree | b47da6f760ca1d8941d9aea332415f27c2d3122a /mail | |
parent | c417b0776e1bfbfa293728e5bf8bbf9b62194d6e (diff) | |
download | ports-4f0cc5947d897a906a80e723b93e840a18a42394.tar.gz ports-4f0cc5947d897a906a80e723b93e840a18a42394.zip |
Notes
Diffstat (limited to 'mail')
-rw-r--r-- | mail/metamail/files/patch-Makefile | 74 | ||||
-rw-r--r-- | mail/metamail/files/patch-aa | 128 | ||||
-rw-r--r-- | mail/metamail/files/patch-ab | 33 | ||||
-rw-r--r-- | mail/metamail/files/patch-ac | 19 | ||||
-rw-r--r-- | mail/metamail/files/patch-ad | 35 | ||||
-rw-r--r-- | mail/metamail/files/patch-ae | 78 | ||||
-rw-r--r-- | mail/metamail/files/patch-af | 260 | ||||
-rw-r--r-- | mail/metamail/files/patch-ag | 260 | ||||
-rw-r--r-- | mail/metamail/files/patch-bin_showaudio | 67 | ||||
-rw-r--r-- | mail/metamail/files/patch-bin_showexternal | 49 | ||||
-rw-r--r-- | mail/metamail/files/patch-bin_showpartial | 80 | ||||
-rw-r--r-- | mail/metamail/files/patch-bin_showpicture | 57 | ||||
-rw-r--r-- | mail/metamail/files/patch-bin_sun2mime | 11 | ||||
-rw-r--r-- | mail/metamail/files/patch-config.h | 23 | ||||
-rw-r--r-- | mail/metamail/files/patch-fonts_Makefile | 23 | ||||
-rw-r--r-- | mail/metamail/files/patch-metamail_mailto.c | 74 | ||||
-rw-r--r-- | mail/metamail/files/patch-metamail_metamail.c | 87 | ||||
-rw-r--r-- | mail/metamail/files/patch-metamail_splitmail.c | 44 |
18 files changed, 589 insertions, 813 deletions
diff --git a/mail/metamail/files/patch-Makefile b/mail/metamail/files/patch-Makefile new file mode 100644 index 000000000000..7d820f8f668b --- /dev/null +++ b/mail/metamail/files/patch-Makefile @@ -0,0 +1,74 @@ +--- Makefile.orig Wed Jan 26 18:32:33 1994 ++++ Makefile Mon Dec 18 11:46:21 2006 +@@ -26,7 +26,7 @@ + CP = cp + + # How to compile C programs +-CC = cc ++#CC = cc + + # You may also want to change the CFLAGS variable, which will be passed on + # to all subdirectories. If you do that, the changes will only work right if you +@@ -38,7 +38,7 @@ + + STATICFLAG=FOOBAR${HOST_ARCH} + +-CFLAGS = -g -I. ${$(STATICFLAG)} ++CFLAGS += -I. ${$(STATICFLAG)} + # The following is better if you want to make sure you run with SYSV defined + # CFLAGS = -g -I. ${$(STATICFLAG)} -DSYSV + # Also, for SGI Irix, compile in K&R mode +@@ -49,9 +49,9 @@ + # LDLIBS variable. + # + # For Sun and BSD systems, the following should work... +-LDLIBS = ++# LDLIBS = + # On BSD 4.4 systems, you will need the following +-# LDLIBS = -lcompat ++LDLIBS = -s -lcompat + # On SGI machines, we need -lsun for getpw...(), and -lc_s saves some space. + # LDLIBS = -lsun -lc_s + # ISC SysVr3.2.2 has a shared C library and requires libinet.a to resolve +@@ -72,10 +72,10 @@ + # install -s -c $(LOCALBINDIR) $$file + # + #INSTALL = cp +-INSTALL = install -c -s ++INSTALL = install -c + + # Root of installation tree +-INSTROOT = /usr/local ++INSTROOT = ${PREFIX} + # + # This is where binaries should be copied + LOCALBINDIR = ${INSTROOT}/bin +@@ -96,9 +96,9 @@ + # This helps with the "for" constructs below on some platforms: + SHELL=/bin/sh + +-install: basics ++install: install-all + +-basics:: ++all basics:: + (cd metamail ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}") + -${RM} bin/metamail + (cd bin; ${LN} ../metamail/metamail metamail) +@@ -117,7 +117,7 @@ + (cd bin; ${LN} ../richmail/richtext richtext) + -${RM} bin/richtoatk + (cd bin; ${LN} ../richmail/richtoatk richtoatk) +- (cd fonts ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}") ++ (cd fonts ; $(MAKE) PREFIX=${PREFIX} CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}") + -${RM} bin/shownonascii + (cd bin; ${LN} ../fonts/shownonascii shownonascii) + -${RM} bin/mailto-hebrew +@@ -149,6 +149,7 @@ + -mv $(MAILCAPDIR)/mailcap $(MAILCAPDIR)/mailcap.old + @echo "installing file $(MAILCAPDIR)/mailcap" + ${CP} mailcap $(MAILCAPDIR) ++ (cd fonts ; $(MAKE) PREFIX=${PREFIX} CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}" install) + + uninstall-all: + @(cd bin; \ diff --git a/mail/metamail/files/patch-aa b/mail/metamail/files/patch-aa deleted file mode 100644 index da49eeac5de8..000000000000 --- a/mail/metamail/files/patch-aa +++ /dev/null @@ -1,128 +0,0 @@ -*** Makefile.orig Wed Jan 26 12:32:33 1994 ---- Makefile Wed Jan 19 18:53:05 2000 -*************** -*** 26,32 **** - CP = cp - - # How to compile C programs -! CC = cc - - # You may also want to change the CFLAGS variable, which will be passed on - # to all subdirectories. If you do that, the changes will only work right if you ---- 26,32 ---- - CP = cp - - # How to compile C programs -! #CC = cc - - # You may also want to change the CFLAGS variable, which will be passed on - # to all subdirectories. If you do that, the changes will only work right if you -*************** -*** 38,44 **** - - STATICFLAG=FOOBAR${HOST_ARCH} - -! CFLAGS = -g -I. ${$(STATICFLAG)} - # The following is better if you want to make sure you run with SYSV defined - # CFLAGS = -g -I. ${$(STATICFLAG)} -DSYSV - # Also, for SGI Irix, compile in K&R mode ---- 38,44 ---- - - STATICFLAG=FOOBAR${HOST_ARCH} - -! CFLAGS += -I. ${$(STATICFLAG)} - # The following is better if you want to make sure you run with SYSV defined - # CFLAGS = -g -I. ${$(STATICFLAG)} -DSYSV - # Also, for SGI Irix, compile in K&R mode -*************** -*** 49,57 **** - # LDLIBS variable. - # - # For Sun and BSD systems, the following should work... -! LDLIBS = - # On BSD 4.4 systems, you will need the following -! # LDLIBS = -lcompat - # On SGI machines, we need -lsun for getpw...(), and -lc_s saves some space. - # LDLIBS = -lsun -lc_s - # ISC SysVr3.2.2 has a shared C library and requires libinet.a to resolve ---- 49,57 ---- - # LDLIBS variable. - # - # For Sun and BSD systems, the following should work... -! # LDLIBS = - # On BSD 4.4 systems, you will need the following -! LDLIBS = -s -lcompat - # On SGI machines, we need -lsun for getpw...(), and -lc_s saves some space. - # LDLIBS = -lsun -lc_s - # ISC SysVr3.2.2 has a shared C library and requires libinet.a to resolve -*************** -*** 72,81 **** - # install -s -c $(LOCALBINDIR) $$file - # - #INSTALL = cp -! INSTALL = install -c -s - - # Root of installation tree -! INSTROOT = /usr/local - # - # This is where binaries should be copied - LOCALBINDIR = ${INSTROOT}/bin ---- 72,81 ---- - # install -s -c $(LOCALBINDIR) $$file - # - #INSTALL = cp -! INSTALL = install -c - - # Root of installation tree -! INSTROOT = ${PREFIX} - # - # This is where binaries should be copied - LOCALBINDIR = ${INSTROOT}/bin -*************** -*** 96,104 **** - # This helps with the "for" constructs below on some platforms: - SHELL=/bin/sh - -! install: basics - -! basics:: - (cd metamail ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}") - -${RM} bin/metamail - (cd bin; ${LN} ../metamail/metamail metamail) ---- 96,104 ---- - # This helps with the "for" constructs below on some platforms: - SHELL=/bin/sh - -! install: install-all - -! all basics:: - (cd metamail ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}") - -${RM} bin/metamail - (cd bin; ${LN} ../metamail/metamail metamail) -*************** -*** 117,123 **** - (cd bin; ${LN} ../richmail/richtext richtext) - -${RM} bin/richtoatk - (cd bin; ${LN} ../richmail/richtoatk richtoatk) -! (cd fonts ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}") - -${RM} bin/shownonascii - (cd bin; ${LN} ../fonts/shownonascii shownonascii) - -${RM} bin/mailto-hebrew ---- 117,123 ---- - (cd bin; ${LN} ../richmail/richtext richtext) - -${RM} bin/richtoatk - (cd bin; ${LN} ../richmail/richtoatk richtoatk) -! (cd fonts ; $(MAKE) PREFIX=${PREFIX} CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}") - -${RM} bin/shownonascii - (cd bin; ${LN} ../fonts/shownonascii shownonascii) - -${RM} bin/mailto-hebrew -*************** -*** 149,154 **** ---- 149,155 ---- - -mv $(MAILCAPDIR)/mailcap $(MAILCAPDIR)/mailcap.old - @echo "installing file $(MAILCAPDIR)/mailcap" - ${CP} mailcap $(MAILCAPDIR) -+ (cd fonts ; $(MAKE) PREFIX=${PREFIX} CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}" install) - - uninstall-all: - @(cd bin; \ diff --git a/mail/metamail/files/patch-ab b/mail/metamail/files/patch-ab deleted file mode 100644 index 87f0b6b6f1c9..000000000000 --- a/mail/metamail/files/patch-ab +++ /dev/null @@ -1,33 +0,0 @@ -*** config.h.orig Mon Oct 17 21:06:22 1994 ---- config.h Mon Oct 17 21:08:13 1994 -*************** -*** 73,79 **** - #ifdef SYSV - #define RESET_PROGRAM "tput clear" - #else -! #ifdef __BSD_4_4__ - #define RESET_PROGRAM "/usr/bin/reset" - #else - #define RESET_PROGRAM "/usr/ucb/reset" ---- 73,79 ---- - #ifdef SYSV - #define RESET_PROGRAM "tput clear" - #else -! #if defined(__BSD_4_4__) || defined(__FreeBSD__) - #define RESET_PROGRAM "/usr/bin/reset" - #else - #define RESET_PROGRAM "/usr/ucb/reset" -*************** -*** 155,161 **** ---- 155,165 ---- - #ifdef NeXT - #define sigtype void - #else -+ #ifdef __FreeBSD__ -+ #define sigtype void -+ #else - #define sigtype int -+ #endif - #endif - #endif - diff --git a/mail/metamail/files/patch-ac b/mail/metamail/files/patch-ac deleted file mode 100644 index 22277ebe313b..000000000000 --- a/mail/metamail/files/patch-ac +++ /dev/null @@ -1,19 +0,0 @@ -*** bin/sun2mime.ORIG Sat Nov 13 15:53:51 1993 ---- bin/sun2mime Mon Dec 12 10:07:44 1994 -*************** -*** 11,17 **** - fi - TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ - -! /bin/nawk ' - BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") - RS=""; FS="\n"; mode="HEADER" } - mode == "HEADER" { ---- 11,17 ---- - fi - TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ - -! /usr/bin/awk ' - BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") - RS=""; FS="\n"; mode="HEADER" } - mode == "HEADER" { diff --git a/mail/metamail/files/patch-ad b/mail/metamail/files/patch-ad deleted file mode 100644 index 10e02f259ea5..000000000000 --- a/mail/metamail/files/patch-ad +++ /dev/null @@ -1,35 +0,0 @@ -*** fonts/Makefile.orig Mon May 31 22:49:27 1993 ---- fonts/Makefile Thu May 18 21:55:42 1995 -*************** -*** 28,39 **** - -${DIRBUILDER} - - shownonascii: Xshownonascii -! sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xshownonascii > shownonascii - chmod +x shownonascii - - mailto-hebrew: Xmailto-hebrew -! sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xmailto-hebrew > mailto-hebrew - chmod +x mailto-hebrew - - clean: - rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir ---- 28,45 ---- - -${DIRBUILDER} - - shownonascii: Xshownonascii -! sed -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xshownonascii > shownonascii - chmod +x shownonascii - - mailto-hebrew: Xmailto-hebrew -! sed -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xmailto-hebrew > mailto-hebrew - chmod +x mailto-hebrew -+ -+ install: -+ mkdir -p ${PREFIX}/lib/metamail/fonts -+ install -c heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} \ -+ heb8x13B.${FONTSUFFIX} fonts.alias ${PREFIX}/lib/metamail/fonts -+ if [ -d /usr/X11R6 ]; then mkfontdir ${PREFIX}/lib/metamail/fonts ; fi - - clean: - rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir diff --git a/mail/metamail/files/patch-ae b/mail/metamail/files/patch-ae deleted file mode 100644 index b2fa41111c6a..000000000000 --- a/mail/metamail/files/patch-ae +++ /dev/null @@ -1,78 +0,0 @@ -*** metamail/splitmail.c.orig Mon Jan 31 23:23:14 1994 ---- metamail/splitmail.c Sat Feb 28 19:17:32 2004 -*************** -*** 41,48 **** - #define VERBOSEDELIVERYCMD VerboseDeliveryCmd - #else - extern char *getenv(); -! #define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi" -! #define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi" - #endif - - usageexit() { ---- 41,48 ---- - #define VERBOSEDELIVERYCMD VerboseDeliveryCmd - #else - extern char *getenv(); -! #define NORMALDELIVERYCMD "/usr/sbin/sendmail -t -oi" -! #define VERBOSEDELIVERYCMD "/usr/sbin/sendmail -t -v -oi" - #endif - - usageexit() { -*************** -*** 194,200 **** - s = endofheader(from); /* would be index(from, '\n'), - but need to check for continuation lines */ - *s = '\0'; -! if (ShareThisHeader(from, SubjectBuf, &OrigID)) { - strcat(SharedHeaders, from); - strcat(SharedHeaders, "\n"); - } ---- 194,200 ---- - s = endofheader(from); /* would be index(from, '\n'), - but need to check for continuation lines */ - *s = '\0'; -! if (ShareThisHeader(from, SubjectBuf, sizeof(SubjectBuf), &OrigID)) { - strcat(SharedHeaders, from); - strcat(SharedHeaders, "\n"); - } -*************** -*** 339,347 **** - NULL - }; - -! ShareThisHeader(s, SubjectBuf, OrigID) - char *s; - char *SubjectBuf; - char **OrigID; - { - int i; ---- 339,348 ---- - NULL - }; - -! ShareThisHeader(s, SubjectBuf, size, OrigID) - char *s; - char *SubjectBuf; -+ size_t size; - char **OrigID; - { - int i; -*************** -*** 361,367 **** - } - if (!ULstrcmp(s, "subject")) { - *colon = ':'; -! strcpy(SubjectBuf, ++colon); - return(0); - } - if (!ULstrcmp(s, "content-type")) { ---- 362,369 ---- - } - if (!ULstrcmp(s, "subject")) { - *colon = ':'; -! strncpy(SubjectBuf, ++colon, size); -! SubjectBuf[size - 1] = '\0'; - return(0); - } - if (!ULstrcmp(s, "content-type")) { diff --git a/mail/metamail/files/patch-af b/mail/metamail/files/patch-af deleted file mode 100644 index 730c76348e9f..000000000000 --- a/mail/metamail/files/patch-af +++ /dev/null @@ -1,260 +0,0 @@ -*** metamail.old/mailto.c Wed Feb 9 21:30:26 1994 ---- metamail/mailto.c Thu Jul 29 14:32:28 2004 -*************** -*** 570,575 **** ---- 570,576 ---- - if (isupper(*sdum)) *sdum = tolower(*sdum); - } - if (strcmp(CharacterSet, "us-ascii") -+ && strcmp(CharacterSet, "koi8-r") - && strncmp(CharacterSet, "iso-8859-", 9)) { - fprintf(stderr, "mailto: Unsupported character set: %s\n", CharacterSet); - exit(-1); -*************** -*** 1130,1135 **** ---- 1131,1137 ---- - if (part->isrich) { - if (strcmp(CharacterSet, "us-ascii") - && (strncmp(CharacterSet, "iso-8859-", 9) -+ && strcmp(CharacterSet, "koi8-r") - || part->encoding_type_needed != ENC_NONE)) { - fprintf(fp, "Content-type: text/richtext; charset=\"%s\"\n", CharacterSet); - } else { -*************** -*** 1140,1145 **** ---- 1142,1148 ---- - WriteCtypeNicely(fp, part->content_type); - if (strcmp(CharacterSet, "us-ascii") - && (strncmp(CharacterSet, "iso-8859-", 9) -+ && strcmp(CharacterSet, "koi8-r") - || part->encoding_type_needed != ENC_NONE)) { - fprintf(fp, "; charset=\"%s\"\n", CharacterSet); - } else fputs("\n", fp); -*************** -*** 1745,1750 **** ---- 1748,1754 ---- - } - printf("\n\nEnter your choice as a number from 0 to %d: ", i); - fflush(stdout); -+ *LineBuf = '\0'; - fgets(LineBuf, sizeof(LineBuf), stdin); - ans = atoi(LineBuf); - if (ans == 0 || ans == 1) { -*************** -*** 1752,1759 **** - FILE *fpi, *fpo; - printf("\nIf you want to include non-textual data from a file, enter the file name.\nTo include the output of a command, enter \"|\" followed by the command.\nIf you do not want to include anything, just press ENTER (RETURN).\n> "); - fflush(stdout); - fgets(CTLineBuf, sizeof(CTLineBuf), stdin); -! sdum = CTLineBuf+strlen(CTLineBuf) -1; - while (sdum >= CTLineBuf && isspace((unsigned char) *sdum)) { - *sdum = '\0'; - --sdum; ---- 1756,1764 ---- - FILE *fpi, *fpo; - printf("\nIf you want to include non-textual data from a file, enter the file name.\nTo include the output of a command, enter \"|\" followed by the command.\nIf you do not want to include anything, just press ENTER (RETURN).\n> "); - fflush(stdout); -+ *CTLineBuf = '\0'; - fgets(CTLineBuf, sizeof(CTLineBuf), stdin); -! sdum = *CTLineBuf ? CTLineBuf+strlen(CTLineBuf) -1 : CTLineBuf; - while (sdum >= CTLineBuf && isspace((unsigned char) *sdum)) { - *sdum = '\0'; - --sdum; -*************** -*** 1791,1797 **** - int ct; - printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); - fflush(stdout); -! gets(LineBuf); - if (index(LineBuf, '/')) { - char lc[100], *s, AnsBuf[100]; - strcpy(lc, LineBuf); ---- 1796,1805 ---- - int ct; - printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); - fflush(stdout); -! *LineBuf = '\0'; -! fgets(LineBuf, sizeof(LineBuf), stdin); -! if (*LineBuf) -! LineBuf[strlen(LineBuf) - 1] = '\0'; - if (index(LineBuf, '/')) { - char lc[100], *s, AnsBuf[100]; - strcpy(lc, LineBuf); -*************** -*** 1809,1815 **** - } - if (mc) break; - printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); -! s = gets(AnsBuf); - while (s && *s && isspace((unsigned char) *s)) ++s; - if (s && (*s == 'y' || *s == 'Y')) break; - continue; ---- 1817,1823 ---- - } - if (mc) break; - printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); -! s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - while (s && *s && isspace((unsigned char) *s)) ++s; - if (s && (*s == 'y' || *s == 'Y')) break; - continue; -*************** -*** 2137,2142 **** ---- 2145,2151 ---- - printf("2: %s\n", CmdBuf); - printf("\n\nEnter 1 or 2, or 0 to not edit it: "); - fflush(stdout); -+ *LineBuf = '\0'; - fgets(LineBuf, sizeof(LineBuf), stdin); - ans = atoi(LineBuf); - } else ans = 2; -*** metamail.old/metamail.c Thu Feb 17 02:57:19 1994 ---- metamail/metamail.c Wed Mar 9 21:30:22 2005 -*************** -*** 83,89 **** - #define MAX_FILE_NAME_SIZE 256 - #define WRITE_BINARY "w" - #else /* AMIGA */ -! extern char **environ, *gets(); - #define CATCOMMAND "cat" - #define CATTEMPLATE "cat %s" - #define METAMAIL "metamail" ---- 83,89 ---- - #define MAX_FILE_NAME_SIZE 256 - #define WRITE_BINARY "w" - #else /* AMIGA */ -! extern char **environ; - #define CATCOMMAND "cat" - #define CATTEMPLATE "cat %s" - #define METAMAIL "metamail" -*************** -*** 540,545 **** ---- 540,546 ---- - ans = 2; - } else { - printf("\nWhat do you want to do with the %s data?\n1 -- See it as text\n2 -- Write it to a file\n3 -- Just skip it\n\n", octetstream ? "raw" : ContentType); -+ *Fname = '\0'; - fgets(Fname, sizeof(Fname), stdin); - ans = atoi(Fname); - } -*************** -*** 554,561 **** - needname = 0; - printf("Please enter the name of a file to which the data should be written\n(Default: %s) > ", suggestedname); - fflush(stdout); - fgets(Fname, sizeof(Fname), stdin); -! Fname[strlen(Fname) - 1] = '\0'; /* bogus newline */ - #if !defined(AMIGA) && !defined(MSDOS) - if (!Fname[0]) strcpy(Fname, suggestedname); - if (Fname[0] == '~' && Fname[1] == '/') { ---- 555,564 ---- - needname = 0; - printf("Please enter the name of a file to which the data should be written\n(Default: %s) > ", suggestedname); - fflush(stdout); -+ *Fname = '\0'; - fgets(Fname, sizeof(Fname), stdin); -! if (*Fname) -! Fname[strlen(Fname) - 1] = '\0'; /* bogus newline */ - #if !defined(AMIGA) && !defined(MSDOS) - if (!Fname[0]) strcpy(Fname, suggestedname); - if (Fname[0] == '~' && Fname[1] == '/') { -*************** -*** 579,588 **** - int overwriteans = -1; - do { - printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); -! s = gets(AnsBuf); - if (!s) { - overwriteans = 0; - } else { - while (s && *s && isspace((unsigned char) *s)) ++s; - if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') { - overwriteans = 1; ---- 582,593 ---- - int overwriteans = -1; - do { - printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); -! *AnsBuf = '\0'; -! s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - if (!s) { - overwriteans = 0; - } else { -+ s[strlen(s) - 1] = '\0'; - while (s && *s && isspace((unsigned char) *s)) ++s; - if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') { - overwriteans = 1; -*************** -*** 1202,1210 **** - fprintf(outfp, "Content-type: %s", ContentType); - for (j=0; j<CParamsUsed; ++j) { - fprintf(outfp, " ; "); -! fprintf(outfp, CParams[j]); - fprintf(outfp, " = "); -! fprintf(outfp, CParamValues[j]); - } - fprintf(outfp, "\n\n"); - TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType); ---- 1207,1215 ---- - fprintf(outfp, "Content-type: %s", ContentType); - for (j=0; j<CParamsUsed; ++j) { - fprintf(outfp, " ; "); -! fprintf(outfp, "%s", CParams[j]); - fprintf(outfp, " = "); -! fprintf(outfp, "%s", CParamValues[j]); - } - fprintf(outfp, "\n\n"); - TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType); -*************** -*** 1823,1830 **** - } else { - printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname)); - } -! s = gets(AnsBuf); - if (!s) return(0); /* EOF */ - while (s && *s && isspace((unsigned char) *s)) ++s; - if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); - if (*s == 'n' || *s == 'N' || *s == 'q' || *s == 'Q') { ---- 1828,1836 ---- - } else { - printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname)); - } -! s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - if (!s) return(0); /* EOF */ -+ s[strlen(s) - 1] = '\0'; - while (s && *s && isspace((unsigned char) *s)) ++s; - if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); - if (*s == 'n' || *s == 'N' || *s == 'q' || *s == 'Q') { -*************** -*** 2022,2028 **** - if (lc2strcmp(charset, PrevCharset)) { - char *s2, *charsetinuse; - -! strcpy(PrevCharset, charset); - for (s2=PrevCharset; *s2; ++s2) { - if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2); - } ---- 2028,2035 ---- - if (lc2strcmp(charset, PrevCharset)) { - char *s2, *charsetinuse; - -! strncpy(PrevCharset, charset, sizeof(PrevCharset)); -! PrevCharset[sizeof(PrevCharset) - 1] = '\0'; - for (s2=PrevCharset; *s2; ++s2) { - if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2); - } -*************** -*** 2032,2038 **** - } - } - if (ecode == ENCODING_NONE) { -! printf(txt+1); - } else { - /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ - MkTmpFileName(TmpFile); ---- 2039,2045 ---- - } - } - if (ecode == ENCODING_NONE) { -! printf("%s", txt+1); - } else { - /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ - MkTmpFileName(TmpFile); diff --git a/mail/metamail/files/patch-ag b/mail/metamail/files/patch-ag deleted file mode 100644 index 1c10eaedcaee..000000000000 --- a/mail/metamail/files/patch-ag +++ /dev/null @@ -1,260 +0,0 @@ -diff -u -r mm2.7.org/src/bin/showaudio mm2.7/src/bin/showaudio ---- bin/showaudio Wed Feb 2 16:21:26 1994 -+++ bin/showaudio Wed May 21 21:34:08 1997 -@@ -15,9 +15,35 @@ - # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - # - -- -+# Set a sensible value for the temporary directory, if its not -+# already set. If TMPDIR is set previously, then we will -+# assume it is adequately protected. - if (! $?METAMAIL_TMPDIR) then -- set METAMAIL_TMPDIR=/tmp -+ if ($?TMPDIR) then -+ set METAMAIL_TMPDIR="$TMPDIR" -+ else -+ set METAMAIL_TMPDIR=~/metamail_tmp -+ endif -+endif -+ -+# Set a sensible umask value -+umask 077 -+ -+# Make sure that the temporary directory is available -+if (! -d "$METAMAIL_TMPDIR") then -+ -+ if (! -e "$METAMAIL_TMPDIR") then -+ mkdir "$METAMAIL_TMPDIR" -+ else -+ echo "$METAMAIL_TMPDIR exists, but is not a directory" -+ exit 2 -+ endif -+ -+ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then -+ echo "Error creating $METAMAIL_TMPDIR" -+ exit 2 -+ endif -+ - endif - - # First, figure out which machine to play it on! -@@ -33,7 +59,7 @@ - set ORG="Bellcore" - set STDINPUT=0 - if ("$1" == "-p") then -- set AUDIOPHONE=$2 -+ set AUDIOPHONE="$2" - shift - shift - endif -@@ -173,7 +199,7 @@ - set AUDIOPHONE=$< - endif - if ($thishost == $AUDIOPHONEHOST || $thishost == $AUDIOPHONEHOSTLONG) then -- echo Calling Phone number $AUDIOPHONE -+ echo Calling Phone number "$AUDIOPHONE" - echo "You MUST SAY HELLO when you answer the phone, or you will not hear the message." - mail -s "showaudio: `whoami` called $AUDIOPHONE" $AUDIOLOGMAIL < /dev/null - if ($STDINPUT) then -@@ -206,7 +232,7 @@ - echo -n "File name:" - set fname=$< - endif --cp $1 $fname -+cp "$1" $fname - if ($status == 0) echo Wrote raw audio file: $fname - exit 0 - -Only in mm2.7/src/bin: showaudio~ -diff -u -r mm2.7.org/src/bin/showexternal mm2.7/src/bin/showexternal ---- bin/showexternal Tue Feb 8 09:39:05 1994 -+++ bin/showexternal Wed May 21 21:41:39 1997 -@@ -15,9 +15,45 @@ - # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - # - -+# Check argument integrity. Don't trust mail headers -+switch ("$1$2$3$4$5$6$7") -+case "*[\t ]*": -+ echo "Illegal white space in arguments\!" -+ echo "Command was:" -+ echo "'$0' '$1' '$2' '$3' '$4' '$5' '$6' '$7'" -+ exit 2 -+endsw -+ - onintr cleanup -+# Set a sensible value for the temporary directory, if its not -+# already set. If TMPDIR is set previously, then we will -+# assume it is adequately protected. - if (! $?METAMAIL_TMPDIR) then -- set METAMAIL_TMPDIR=/tmp -+ if ($?TMPDIR) then -+ set METAMAIL_TMPDIR="$TMPDIR" -+ else -+ set METAMAIL_TMPDIR=~/metamail_tmp -+ endif -+endif -+ -+# Set a sensible umask value -+umask 077 -+ -+# Make sure that the temporary directory is available -+if (! -d "$METAMAIL_TMPDIR") then -+ -+ if (! -e "$METAMAIL_TMPDIR") then -+ mkdir "$METAMAIL_TMPDIR" -+ else -+ echo "$METAMAIL_TMPDIR exists, but is not a directory" -+ exit 2 -+ endif -+ -+ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then -+ echo "Error creating $METAMAIL_TMPDIR" -+ exit 2 -+ endif -+ - endif - if (! $?FTP) then - set FTP=ftp -Only in mm2.7/src/bin: showexternal~ -diff -u -r mm2.7.org/src/bin/showpartial mm2.7/src/bin/showpartial ---- bin/showpartial Wed Feb 2 16:21:29 1994 -+++ bin/showpartial Wed May 21 21:39:49 1997 -@@ -2,8 +2,44 @@ - # (The "-fb" might need to be changed to "-f" on some systems) - # - -+# Check argument integrity. Don't trust mail headers -+switch ("$1$2$3$4") -+case "*[\t ]*": -+ echo "Illegal white space in arguments\!" -+ echo "Command was:" -+ echo "'$0' '$1' '$2' '$3' '$4'" -+ exit 2 -+endsw -+ -+# Set a sensible value for the temporary directory, if its not -+# already set. If TMPDIR is set previously, then we will -+# assume it is adequately protected. - if (! $?METAMAIL_TMPDIR) then -- set METAMAIL_TMPDIR=/tmp -+ if ($?TMPDIR) then -+ set METAMAIL_TMPDIR="$TMPDIR" -+ else -+ set METAMAIL_TMPDIR=~/metamail_tmp -+ endif -+endif -+ -+# Set a sensible umask value -+umask 077 -+ -+# Make sure that the temporary directory is available -+if (! -d "$METAMAIL_TMPDIR") then -+ -+ if (! -e "$METAMAIL_TMPDIR") then -+ mkdir "$METAMAIL_TMPDIR" -+ else -+ echo "$METAMAIL_TMPDIR exists, but is not a directory" -+ exit 2 -+ endif -+ -+ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then -+ echo "Error creating $METAMAIL_TMPDIR" -+ exit 2 -+ endif -+ - endif - - set TREEROOT=${METAMAIL_TMPDIR}/m-prts-`whoami` -@@ -11,14 +47,14 @@ - echo "Usage: showpartial file id partnum totalnum" - exit -1 - endif --set file=$1 -+set file="$1" - # This next line is because message-id can contain weird chars --set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` --@ partnum = $3 --if ($#argv == 3 || $4 == "") then -+set id=`echo "$2" | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` -+@ partnum = "$3" -+if ($#argv == 3 || "$4" == "") then - set totalnum=-1 - else -- @ totalnum = $4 -+ @ totalnum = "$4" - endif - - if (! -d $TREEROOT) then -@@ -35,9 +71,9 @@ - exit -1 - endif - endif --cp $file ${TREEROOT}/$id/$partnum -+cp "$file" ${TREEROOT}/$id/$partnum - if ($status) then -- echo cp $file ${TREEROOT}/$id/$partnum failed -+ echo cp "$file" ${TREEROOT}/$id/$partnum failed - exit -1 - endif - if ($totalnum == -1) then -Only in mm2.7/src/bin: showpartial~ -diff -u -r mm2.7.org/src/bin/showpicture mm2.7/src/bin/showpicture ---- bin/showpicture Mon Feb 7 10:59:54 1994 -+++ bin/showpicture Wed May 21 21:34:59 1997 -@@ -15,15 +15,42 @@ - # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - # - -+# Set a sensible value for the temporary directory, if its not -+# already set. If TMPDIR is set previously, then we will -+# assume it is adequately protected. - if (! $?METAMAIL_TMPDIR) then -- set METAMAIL_TMPDIR=/tmp -+ if ($?TMPDIR) then -+ set METAMAIL_TMPDIR="$TMPDIR" -+ else -+ set METAMAIL_TMPDIR=~/metamail_tmp -+ endif -+endif -+ -+# Set a sensible umask value -+umask 077 -+ -+# Make sure that the temporary directory is available -+if (! -d "$METAMAIL_TMPDIR") then -+ -+ if (! -e "$METAMAIL_TMPDIR") then -+ mkdir "$METAMAIL_TMPDIR" -+ else -+ echo "$METAMAIL_TMPDIR exists, but is not a directory" -+ exit 2 -+ endif -+ -+ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then -+ echo "Error creating $METAMAIL_TMPDIR" -+ exit 2 -+ endif -+ - endif - - if (! $?X_VIEWER) then --set X_VIEWER="xloadimage -view -quiet -geometry +1+1" -+ set X_VIEWER="xloadimage -view -quiet -geometry +1+1" - # set X_VIEWER="xv -geometry +1+1" - endif --if ($1 == "-viewer" && $#argv > 1) then -+if ("$1" == "-viewer" && $#argv > 1) then - set X_VIEWER = "$2" - shift - shift -@@ -57,7 +84,7 @@ - endif - end - endif -- cp $1 $fname -+ cp "$1" $fname - if ($status == 0) echo Wrote file $fname - exit 0 - endif diff --git a/mail/metamail/files/patch-bin_showaudio b/mail/metamail/files/patch-bin_showaudio new file mode 100644 index 000000000000..6b69cbf86ddb --- /dev/null +++ b/mail/metamail/files/patch-bin_showaudio @@ -0,0 +1,67 @@ +--- bin/showaudio.orig Thu Feb 3 00:21:26 1994 ++++ bin/showaudio Mon Dec 18 11:50:24 2006 +@@ -15,9 +15,35 @@ + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # + +- ++# Set a sensible value for the temporary directory, if its not ++# already set. If TMPDIR is set previously, then we will ++# assume it is adequately protected. + if (! $?METAMAIL_TMPDIR) then +- set METAMAIL_TMPDIR=/tmp ++ if ($?TMPDIR) then ++ set METAMAIL_TMPDIR="$TMPDIR" ++ else ++ set METAMAIL_TMPDIR=~/metamail_tmp ++ endif ++endif ++ ++# Set a sensible umask value ++umask 077 ++ ++# Make sure that the temporary directory is available ++if (! -d "$METAMAIL_TMPDIR") then ++ ++ if (! -e "$METAMAIL_TMPDIR") then ++ mkdir "$METAMAIL_TMPDIR" ++ else ++ echo "$METAMAIL_TMPDIR exists, but is not a directory" ++ exit 2 ++ endif ++ ++ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then ++ echo "Error creating $METAMAIL_TMPDIR" ++ exit 2 ++ endif ++ + endif + + # First, figure out which machine to play it on! +@@ -33,7 +59,7 @@ + set ORG="Bellcore" + set STDINPUT=0 + if ("$1" == "-p") then +- set AUDIOPHONE=$2 ++ set AUDIOPHONE="$2" + shift + shift + endif +@@ -173,7 +199,7 @@ + set AUDIOPHONE=$< + endif + if ($thishost == $AUDIOPHONEHOST || $thishost == $AUDIOPHONEHOSTLONG) then +- echo Calling Phone number $AUDIOPHONE ++ echo Calling Phone number "$AUDIOPHONE" + echo "You MUST SAY HELLO when you answer the phone, or you will not hear the message." + mail -s "showaudio: `whoami` called $AUDIOPHONE" $AUDIOLOGMAIL < /dev/null + if ($STDINPUT) then +@@ -206,7 +232,7 @@ + echo -n "File name:" + set fname=$< + endif +-cp $1 $fname ++cp "$1" $fname + if ($status == 0) echo Wrote raw audio file: $fname + exit 0 + diff --git a/mail/metamail/files/patch-bin_showexternal b/mail/metamail/files/patch-bin_showexternal new file mode 100644 index 000000000000..5df9630771c9 --- /dev/null +++ b/mail/metamail/files/patch-bin_showexternal @@ -0,0 +1,49 @@ +--- bin/showexternal.orig Tue Feb 8 17:39:05 1994 ++++ bin/showexternal Mon Dec 18 11:50:24 2006 +@@ -15,9 +15,45 @@ + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # + ++# Check argument integrity. Don't trust mail headers ++switch ("$1$2$3$4$5$6$7") ++case "*[\t ]*": ++ echo "Illegal white space in arguments\!" ++ echo "Command was:" ++ echo "'$0' '$1' '$2' '$3' '$4' '$5' '$6' '$7'" ++ exit 2 ++endsw ++ + onintr cleanup ++# Set a sensible value for the temporary directory, if its not ++# already set. If TMPDIR is set previously, then we will ++# assume it is adequately protected. + if (! $?METAMAIL_TMPDIR) then +- set METAMAIL_TMPDIR=/tmp ++ if ($?TMPDIR) then ++ set METAMAIL_TMPDIR="$TMPDIR" ++ else ++ set METAMAIL_TMPDIR=~/metamail_tmp ++ endif ++endif ++ ++# Set a sensible umask value ++umask 077 ++ ++# Make sure that the temporary directory is available ++if (! -d "$METAMAIL_TMPDIR") then ++ ++ if (! -e "$METAMAIL_TMPDIR") then ++ mkdir "$METAMAIL_TMPDIR" ++ else ++ echo "$METAMAIL_TMPDIR exists, but is not a directory" ++ exit 2 ++ endif ++ ++ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then ++ echo "Error creating $METAMAIL_TMPDIR" ++ exit 2 ++ endif ++ + endif + if (! $?FTP) then + set FTP=ftp diff --git a/mail/metamail/files/patch-bin_showpartial b/mail/metamail/files/patch-bin_showpartial new file mode 100644 index 000000000000..5dffd927e8b0 --- /dev/null +++ b/mail/metamail/files/patch-bin_showpartial @@ -0,0 +1,80 @@ +--- bin/showpartial.orig Thu Feb 3 00:21:29 1994 ++++ bin/showpartial Mon Dec 18 11:50:24 2006 +@@ -2,8 +2,44 @@ + # (The "-fb" might need to be changed to "-f" on some systems) + # + ++# Check argument integrity. Don't trust mail headers ++switch ("$1$2$3$4") ++case "*[\t ]*": ++ echo "Illegal white space in arguments\!" ++ echo "Command was:" ++ echo "'$0' '$1' '$2' '$3' '$4'" ++ exit 2 ++endsw ++ ++# Set a sensible value for the temporary directory, if its not ++# already set. If TMPDIR is set previously, then we will ++# assume it is adequately protected. + if (! $?METAMAIL_TMPDIR) then +- set METAMAIL_TMPDIR=/tmp ++ if ($?TMPDIR) then ++ set METAMAIL_TMPDIR="$TMPDIR" ++ else ++ set METAMAIL_TMPDIR=~/metamail_tmp ++ endif ++endif ++ ++# Set a sensible umask value ++umask 077 ++ ++# Make sure that the temporary directory is available ++if (! -d "$METAMAIL_TMPDIR") then ++ ++ if (! -e "$METAMAIL_TMPDIR") then ++ mkdir "$METAMAIL_TMPDIR" ++ else ++ echo "$METAMAIL_TMPDIR exists, but is not a directory" ++ exit 2 ++ endif ++ ++ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then ++ echo "Error creating $METAMAIL_TMPDIR" ++ exit 2 ++ endif ++ + endif + + set TREEROOT=${METAMAIL_TMPDIR}/m-prts-`whoami` +@@ -11,14 +47,14 @@ + echo "Usage: showpartial file id partnum totalnum" + exit -1 + endif +-set file=$1 ++set file="$1" + # This next line is because message-id can contain weird chars +-set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` +-@ partnum = $3 +-if ($#argv == 3 || $4 == "") then ++set id=`echo "$2" | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` ++@ partnum = "$3" ++if ($#argv == 3 || "$4" == "") then + set totalnum=-1 + else +- @ totalnum = $4 ++ @ totalnum = "$4" + endif + + if (! -d $TREEROOT) then +@@ -35,9 +71,9 @@ + exit -1 + endif + endif +-cp $file ${TREEROOT}/$id/$partnum ++cp "$file" ${TREEROOT}/$id/$partnum + if ($status) then +- echo cp $file ${TREEROOT}/$id/$partnum failed ++ echo cp "$file" ${TREEROOT}/$id/$partnum failed + exit -1 + endif + if ($totalnum == -1) then diff --git a/mail/metamail/files/patch-bin_showpicture b/mail/metamail/files/patch-bin_showpicture new file mode 100644 index 000000000000..81433c05ff0f --- /dev/null +++ b/mail/metamail/files/patch-bin_showpicture @@ -0,0 +1,57 @@ +--- bin/showpicture.orig Mon Feb 7 18:59:54 1994 ++++ bin/showpicture Mon Dec 18 11:50:24 2006 +@@ -15,15 +15,42 @@ + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # + ++# Set a sensible value for the temporary directory, if its not ++# already set. If TMPDIR is set previously, then we will ++# assume it is adequately protected. + if (! $?METAMAIL_TMPDIR) then +- set METAMAIL_TMPDIR=/tmp ++ if ($?TMPDIR) then ++ set METAMAIL_TMPDIR="$TMPDIR" ++ else ++ set METAMAIL_TMPDIR=~/metamail_tmp ++ endif ++endif ++ ++# Set a sensible umask value ++umask 077 ++ ++# Make sure that the temporary directory is available ++if (! -d "$METAMAIL_TMPDIR") then ++ ++ if (! -e "$METAMAIL_TMPDIR") then ++ mkdir "$METAMAIL_TMPDIR" ++ else ++ echo "$METAMAIL_TMPDIR exists, but is not a directory" ++ exit 2 ++ endif ++ ++ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then ++ echo "Error creating $METAMAIL_TMPDIR" ++ exit 2 ++ endif ++ + endif + + if (! $?X_VIEWER) then +-set X_VIEWER="xloadimage -view -quiet -geometry +1+1" ++ set X_VIEWER="xloadimage -view -quiet -geometry +1+1" + # set X_VIEWER="xv -geometry +1+1" + endif +-if ($1 == "-viewer" && $#argv > 1) then ++if ("$1" == "-viewer" && $#argv > 1) then + set X_VIEWER = "$2" + shift + shift +@@ -57,7 +84,7 @@ + endif + end + endif +- cp $1 $fname ++ cp "$1" $fname + if ($status == 0) echo Wrote file $fname + exit 0 + endif diff --git a/mail/metamail/files/patch-bin_sun2mime b/mail/metamail/files/patch-bin_sun2mime new file mode 100644 index 000000000000..bfa2f8bdb438 --- /dev/null +++ b/mail/metamail/files/patch-bin_sun2mime @@ -0,0 +1,11 @@ +--- bin/sun2mime.orig Sat Nov 13 15:54:05 1993 ++++ bin/sun2mime Mon Dec 18 11:50:06 2006 +@@ -11,7 +11,7 @@ + fi + TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ + +-/bin/nawk ' ++/usr/bin/awk ' + BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") + RS=""; FS="\n"; mode="HEADER" } + mode == "HEADER" { diff --git a/mail/metamail/files/patch-config.h b/mail/metamail/files/patch-config.h new file mode 100644 index 000000000000..491176a93412 --- /dev/null +++ b/mail/metamail/files/patch-config.h @@ -0,0 +1,23 @@ +--- config.h.orig Wed Nov 24 16:36:07 1993 ++++ config.h Mon Dec 18 11:46:21 2006 +@@ -73,7 +73,7 @@ + #ifdef SYSV + #define RESET_PROGRAM "tput clear" + #else +-#ifdef __BSD_4_4__ ++#if defined(__BSD_4_4__) || defined(__FreeBSD__) + #define RESET_PROGRAM "/usr/bin/reset" + #else + #define RESET_PROGRAM "/usr/ucb/reset" +@@ -155,7 +155,11 @@ + #ifdef NeXT + #define sigtype void + #else ++#ifdef __FreeBSD__ ++#define sigtype void ++#else + #define sigtype int ++#endif + #endif + #endif + diff --git a/mail/metamail/files/patch-fonts_Makefile b/mail/metamail/files/patch-fonts_Makefile new file mode 100644 index 000000000000..d08abdfff4df --- /dev/null +++ b/mail/metamail/files/patch-fonts_Makefile @@ -0,0 +1,23 @@ +--- fonts/Makefile.orig Mon May 31 22:49:27 1993 ++++ fonts/Makefile Mon Dec 18 11:46:21 2006 +@@ -28,12 +28,18 @@ + -${DIRBUILDER} + + shownonascii: Xshownonascii +- sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xshownonascii > shownonascii ++ sed -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xshownonascii > shownonascii + chmod +x shownonascii + + mailto-hebrew: Xmailto-hebrew +- sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xmailto-hebrew > mailto-hebrew ++ sed -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xmailto-hebrew > mailto-hebrew + chmod +x mailto-hebrew ++ ++install: ++ mkdir -p ${PREFIX}/lib/metamail/fonts ++ install -c heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} \ ++ heb8x13B.${FONTSUFFIX} fonts.alias ${PREFIX}/lib/metamail/fonts ++ if [ -d /usr/X11R6 ]; then mkfontdir ${PREFIX}/lib/metamail/fonts ; fi + + clean: + rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir diff --git a/mail/metamail/files/patch-metamail_mailto.c b/mail/metamail/files/patch-metamail_mailto.c new file mode 100644 index 000000000000..e240ede37c91 --- /dev/null +++ b/mail/metamail/files/patch-metamail_mailto.c @@ -0,0 +1,74 @@ +--- metamail/mailto.c.orig Wed Feb 9 21:30:26 1994 ++++ metamail/mailto.c Mon Dec 18 11:46:21 2006 +@@ -570,6 +571,7 @@ + if (isupper(*sdum)) *sdum = tolower(*sdum); + } + if (strcmp(CharacterSet, "us-ascii") ++ && strcmp(CharacterSet, "koi8-r") + && strncmp(CharacterSet, "iso-8859-", 9)) { + fprintf(stderr, "mailto: Unsupported character set: %s\n", CharacterSet); + exit(-1); +@@ -1130,6 +1132,7 @@ + if (part->isrich) { + if (strcmp(CharacterSet, "us-ascii") + && (strncmp(CharacterSet, "iso-8859-", 9) ++ && strcmp(CharacterSet, "koi8-r") + || part->encoding_type_needed != ENC_NONE)) { + fprintf(fp, "Content-type: text/richtext; charset=\"%s\"\n", CharacterSet); + } else { +@@ -1140,6 +1143,7 @@ + WriteCtypeNicely(fp, part->content_type); + if (strcmp(CharacterSet, "us-ascii") + && (strncmp(CharacterSet, "iso-8859-", 9) ++ && strcmp(CharacterSet, "koi8-r") + || part->encoding_type_needed != ENC_NONE)) { + fprintf(fp, "; charset=\"%s\"\n", CharacterSet); + } else fputs("\n", fp); +@@ -1745,6 +1749,7 @@ + } + printf("\n\nEnter your choice as a number from 0 to %d: ", i); + fflush(stdout); ++ *LineBuf = '\0'; + fgets(LineBuf, sizeof(LineBuf), stdin); + ans = atoi(LineBuf); + if (ans == 0 || ans == 1) { +@@ -1752,8 +1757,9 @@ + FILE *fpi, *fpo; + printf("\nIf you want to include non-textual data from a file, enter the file name.\nTo include the output of a command, enter \"|\" followed by the command.\nIf you do not want to include anything, just press ENTER (RETURN).\n> "); + fflush(stdout); ++ *CTLineBuf = '\0'; + fgets(CTLineBuf, sizeof(CTLineBuf), stdin); +- sdum = CTLineBuf+strlen(CTLineBuf) -1; ++ sdum = *CTLineBuf ? CTLineBuf+strlen(CTLineBuf) -1 : CTLineBuf; + while (sdum >= CTLineBuf && isspace((unsigned char) *sdum)) { + *sdum = '\0'; + --sdum; +@@ -1791,7 +1797,10 @@ + int ct; + printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); + fflush(stdout); +- gets(LineBuf); ++ *LineBuf = '\0'; ++ fgets(LineBuf, sizeof(LineBuf), stdin); ++ if (*LineBuf) ++ LineBuf[strlen(LineBuf) - 1] = '\0'; + if (index(LineBuf, '/')) { + char lc[100], *s, AnsBuf[100]; + strcpy(lc, LineBuf); +@@ -1809,7 +1818,7 @@ + } + if (mc) break; + printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); +- s = gets(AnsBuf); ++ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); + while (s && *s && isspace((unsigned char) *s)) ++s; + if (s && (*s == 'y' || *s == 'Y')) break; + continue; +@@ -2137,6 +2146,7 @@ + printf("2: %s\n", CmdBuf); + printf("\n\nEnter 1 or 2, or 0 to not edit it: "); + fflush(stdout); ++ *LineBuf = '\0'; + fgets(LineBuf, sizeof(LineBuf), stdin); + ans = atoi(LineBuf); + } else ans = 2; diff --git a/mail/metamail/files/patch-metamail_metamail.c b/mail/metamail/files/patch-metamail_metamail.c new file mode 100644 index 000000000000..ed211c08cdd5 --- /dev/null +++ b/mail/metamail/files/patch-metamail_metamail.c @@ -0,0 +1,87 @@ +--- metamail/metamail.c.orig Thu Feb 17 02:57:19 1994 ++++ metamail/metamail.c Mon Dec 18 11:46:22 2006 +@@ -83,7 +85,7 @@ + #define MAX_FILE_NAME_SIZE 256 + #define WRITE_BINARY "w" + #else /* AMIGA */ +-extern char **environ, *gets(); ++extern char **environ; + #define CATCOMMAND "cat" + #define CATTEMPLATE "cat %s" + #define METAMAIL "metamail" +@@ -540,6 +545,7 @@ + ans = 2; + } else { + printf("\nWhat do you want to do with the %s data?\n1 -- See it as text\n2 -- Write it to a file\n3 -- Just skip it\n\n", octetstream ? "raw" : ContentType); ++ *Fname = '\0'; + fgets(Fname, sizeof(Fname), stdin); + ans = atoi(Fname); + } +@@ -554,8 +560,10 @@ + needname = 0; + printf("Please enter the name of a file to which the data should be written\n(Default: %s) > ", suggestedname); + fflush(stdout); ++ *Fname = '\0'; + fgets(Fname, sizeof(Fname), stdin); +- Fname[strlen(Fname) - 1] = '\0'; /* bogus newline */ ++ if (*Fname) ++ Fname[strlen(Fname) - 1] = '\0'; /* bogus newline */ + #if !defined(AMIGA) && !defined(MSDOS) + if (!Fname[0]) strcpy(Fname, suggestedname); + if (Fname[0] == '~' && Fname[1] == '/') { +@@ -579,10 +587,12 @@ + int overwriteans = -1; + do { + printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); +- s = gets(AnsBuf); ++ *AnsBuf = '\0'; ++ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); + if (!s) { + overwriteans = 0; + } else { ++ s[strlen(s) - 1] = '\0'; + while (s && *s && isspace((unsigned char) *s)) ++s; + if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') { + overwriteans = 1; +@@ -1202,9 +1212,9 @@ + fprintf(outfp, "Content-type: %s", ContentType); + for (j=0; j<CParamsUsed; ++j) { + fprintf(outfp, " ; "); +- fprintf(outfp, CParams[j]); ++ fprintf(outfp, "%s", CParams[j]); + fprintf(outfp, " = "); +- fprintf(outfp, CParamValues[j]); ++ fprintf(outfp, "%s", CParamValues[j]); + } + fprintf(outfp, "\n\n"); + TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType); +@@ -1823,8 +1833,9 @@ + } else { + printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname)); + } +- s = gets(AnsBuf); ++ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); + if (!s) return(0); /* EOF */ ++ s[strlen(s) - 1] = '\0'; + while (s && *s && isspace((unsigned char) *s)) ++s; + if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); + if (*s == 'n' || *s == 'N' || *s == 'q' || *s == 'Q') { +@@ -2022,7 +2033,8 @@ + if (lc2strcmp(charset, PrevCharset)) { + char *s2, *charsetinuse; + +- strcpy(PrevCharset, charset); ++ strncpy(PrevCharset, charset, sizeof(PrevCharset)); ++ PrevCharset[sizeof(PrevCharset) - 1] = '\0'; + for (s2=PrevCharset; *s2; ++s2) { + if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2); + } +@@ -2032,7 +2044,7 @@ + } + } + if (ecode == ENCODING_NONE) { +- printf(txt+1); ++ printf("%s", txt+1); + } else { + /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ + MkTmpFileName(TmpFile); diff --git a/mail/metamail/files/patch-metamail_splitmail.c b/mail/metamail/files/patch-metamail_splitmail.c new file mode 100644 index 000000000000..6e26b97c43be --- /dev/null +++ b/mail/metamail/files/patch-metamail_splitmail.c @@ -0,0 +1,44 @@ +--- metamail/splitmail.c.orig Mon Jan 31 23:23:14 1994 ++++ metamail/splitmail.c Mon Dec 18 11:46:22 2006 +@@ -41,8 +43,8 @@ + #define VERBOSEDELIVERYCMD VerboseDeliveryCmd + #else + extern char *getenv(); +-#define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi" +-#define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi" ++#define NORMALDELIVERYCMD "/usr/sbin/sendmail -t -oi" ++#define VERBOSEDELIVERYCMD "/usr/sbin/sendmail -t -v -oi" + #endif + + usageexit() { +@@ -194,7 +196,7 @@ + s = endofheader(from); /* would be index(from, '\n'), + but need to check for continuation lines */ + *s = '\0'; +- if (ShareThisHeader(from, SubjectBuf, &OrigID)) { ++ if (ShareThisHeader(from, SubjectBuf, sizeof(SubjectBuf), &OrigID)) { + strcat(SharedHeaders, from); + strcat(SharedHeaders, "\n"); + } +@@ -339,9 +341,10 @@ + NULL + }; + +-ShareThisHeader(s, SubjectBuf, OrigID) ++ShareThisHeader(s, SubjectBuf, size, OrigID) + char *s; + char *SubjectBuf; ++size_t size; + char **OrigID; + { + int i; +@@ -361,7 +364,8 @@ + } + if (!ULstrcmp(s, "subject")) { + *colon = ':'; +- strcpy(SubjectBuf, ++colon); ++ strncpy(SubjectBuf, ++colon, size); ++ SubjectBuf[size - 1] = '\0'; + return(0); + } + if (!ULstrcmp(s, "content-type")) { |