From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Dec 16 21:50:18 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EC5016A403 for ; Sat, 16 Dec 2006 21:50:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3245F43CA2 for ; Sat, 16 Dec 2006 21:50:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kBGLoHHB060738 for ; Sat, 16 Dec 2006 21:50:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kBGLoHYd060733; Sat, 16 Dec 2006 21:50:17 GMT (envelope-from gnats) Resent-Date: Sat, 16 Dec 2006 21:50:17 GMT Resent-Message-Id: <200612162150.kBGLoHYd060733@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jean-Francois Dockes Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D75E516A407 for ; Sat, 16 Dec 2006 21:40:59 +0000 (UTC) (envelope-from dockes@wanadoo.fr) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id C76DF43CA0 for ; Sat, 16 Dec 2006 21:40:58 +0000 (GMT) (envelope-from dockes@wanadoo.fr) Received: from y.dockes.com (obs92-1-82-225-153-66.fbx.proxad.net [82.225.153.66]) by smtp8-g19.free.fr (Postfix) with ESMTP id 9DB6754EA for ; Sat, 16 Dec 2006 22:40:56 +0100 (CET) Received: from mouton.dockes.com (mouton.dockes.com [192.168.4.5]) by y.dockes.com (8.13.1/8.12.11) with ESMTP id kBGLeeKV013410 for ; Sat, 16 Dec 2006 22:40:40 +0100 (CET) (envelope-from dockes@mouton.dockes.com) Received: from mouton.dockes.com (localhost [127.0.0.1]) by mouton.dockes.com (8.13.6/8.13.3) with ESMTP id kBGLeeBH077116 for ; Sat, 16 Dec 2006 22:40:40 +0100 (CET) (envelope-from dockes@mouton.dockes.com) Received: (from dockes@localhost) by mouton.dockes.com (8.13.6/8.13.6/Submit) id kBGLedWX077115; Sat, 16 Dec 2006 22:40:39 +0100 (CET) (envelope-from dockes) Message-Id: <200612162140.kBGLedWX077115@mouton.dockes.com> Date: Sat, 16 Dec 2006 22:40:39 +0100 (CET) From: Jean-Francois Dockes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/106818: Fix mail/metamail port for gcc4.1 compatibility X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jean-Francois Dockes List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 21:50:18 -0000 >Number: 106818 >Category: ports >Synopsis: Fix mail/metamail port for gcc4.1 compatibility >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Dec 16 21:50:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Jean-Francois Dockes >Release: FreeBSD 5.5-RELEASE i386 >Organization: >Environment: System: FreeBSD mouton 5.5-RELEASE FreeBSD 5.5-RELEASE #2: Fri May 26 07:37:48 CEST 2006 dockes@mouton:/usr/obj/usr/src/sys/MOUTON i386 >Description: Old port failed compilation with gcc4.1 >How-To-Repeat: >Fix: diff -Nru ./files/patch-aa ../metamail.new/files/patch-aa --- ./files/patch-aa Sat Jan 22 03:09:05 2000 +++ ../metamail.new/files/patch-aa Sat Dec 16 22:22:24 2006 @@ -1,5 +1,6 @@ -*** Makefile.orig Wed Jan 26 12:32:33 1994 ---- Makefile Wed Jan 19 18:53:05 2000 +diff -rc ./Makefile /usr/ports/mail/metamail/work/mm2.7/src/Makefile +*** ./Makefile Wed Jan 26 18:32:33 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/Makefile Sat Dec 16 22:21:45 2006 *************** *** 26,32 **** CP = cp @@ -126,3 +127,4 @@ uninstall-all: @(cd bin; \ +Only in /usr/ports/mail/metamail/work/mm2.7/src/: Makefile.orig diff -Nru ./files/patch-ab ../metamail.new/files/patch-ab --- ./files/patch-ab Sun Oct 23 02:19:50 1994 +++ ../metamail.new/files/patch-ab Sat Dec 16 22:22:24 2006 @@ -1,33 +1,101 @@ -*** config.h.orig Mon Oct 17 21:06:22 1994 ---- config.h Mon Oct 17 21:08:13 1994 +diff -rc ./bin/showaudio /usr/ports/mail/metamail/work/mm2.7/src/bin/showaudio +*** ./bin/showaudio Thu Feb 3 00:21:26 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/bin/showaudio Sat Dec 16 22:21:45 2006 *************** -*** 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" +*** 15,23 **** + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # + +! + if (! $?METAMAIL_TMPDIR) then +! set METAMAIL_TMPDIR=/tmp + endif + + # First, figure out which machine to play it on! +--- 15,49 ---- + # 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 +! 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! *************** -*** 155,161 **** ---- 155,165 ---- - #ifdef NeXT - #define sigtype void - #else -+ #ifdef __FreeBSD__ -+ #define sigtype void -+ #else - #define sigtype int -+ #endif - #endif - #endif +*** 33,39 **** + set ORG="Bellcore" + set STDINPUT=0 + if ("$1" == "-p") then +! set AUDIOPHONE=$2 + shift + shift + endif +--- 59,65 ---- + set ORG="Bellcore" + set STDINPUT=0 + if ("$1" == "-p") then +! set AUDIOPHONE="$2" + shift + shift + endif +*************** +*** 173,179 **** + set AUDIOPHONE=$< + endif + if ($thishost == $AUDIOPHONEHOST || $thishost == $AUDIOPHONEHOSTLONG) then +! 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 +--- 199,205 ---- + set AUDIOPHONE=$< + endif + if ($thishost == $AUDIOPHONEHOST || $thishost == $AUDIOPHONEHOSTLONG) then +! 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,212 **** + echo -n "File name:" + set fname=$< + endif +! cp $1 $fname + if ($status == 0) echo Wrote raw audio file: $fname + exit 0 + +--- 232,238 ---- + echo -n "File name:" + set fname=$< + endif +! cp "$1" $fname + if ($status == 0) echo Wrote raw audio file: $fname + exit 0 diff -Nru ./files/patch-ac ../metamail.new/files/patch-ac --- ./files/patch-ac Mon Dec 12 10:39:23 1994 +++ ../metamail.new/files/patch-ac Sat Dec 16 22:22:24 2006 @@ -1,19 +1,60 @@ -*** bin/sun2mime.ORIG Sat Nov 13 15:53:51 1993 ---- bin/sun2mime Mon Dec 12 10:07:44 1994 +diff -rc ./bin/showexternal /usr/ports/mail/metamail/work/mm2.7/src/bin/showexternal +*** ./bin/showexternal Tue Feb 8 17:39:05 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/bin/showexternal Sat Dec 16 22:21:45 2006 *************** -*** 11,17 **** - fi - TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ +*** 15,23 **** + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # -! /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.$$ + onintr cleanup + if (! $?METAMAIL_TMPDIR) then +! set METAMAIL_TMPDIR=/tmp + endif + if (! $?FTP) then + set FTP=ftp +--- 15,59 ---- + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # -! /usr/bin/awk ' - BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") - RS=""; FS="\n"; mode="HEADER" } - mode == "HEADER" { ++ # 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 +! 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 -Nru ./files/patch-ad ../metamail.new/files/patch-ad --- ./files/patch-ad Mon Aug 21 18:03:40 1995 +++ ../metamail.new/files/patch-ad Sat Dec 16 22:22:24 2006 @@ -1,35 +1,110 @@ -*** fonts/Makefile.orig Mon May 31 22:49:27 1993 ---- fonts/Makefile Thu May 18 21:55:42 1995 +diff -rc ./bin/showpartial /usr/ports/mail/metamail/work/mm2.7/src/bin/showpartial +*** ./bin/showpartial Thu Feb 3 00:21:29 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/bin/showpartial Sat Dec 16 22:21:45 2006 *************** -*** 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 +*** 2,9 **** + # (The "-fb" might need to be changed to "-f" on some systems) + # + + if (! $?METAMAIL_TMPDIR) then +! set METAMAIL_TMPDIR=/tmp + endif + + set TREEROOT=${METAMAIL_TMPDIR}/m-prts-`whoami` +--- 2,45 ---- + # (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 + -+ 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 ++ # 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 +! 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,24 **** + echo "Usage: showpartial file id partnum totalnum" + exit -1 + endif +! 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 totalnum=-1 + else +! @ totalnum = $4 + endif + + if (! -d $TREEROOT) then +--- 47,60 ---- + echo "Usage: showpartial file id partnum totalnum" + exit -1 + endif +! 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 totalnum=-1 + else +! @ totalnum = "$4" + endif - clean: - rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir + if (! -d $TREEROOT) then +*************** +*** 35,43 **** + exit -1 + endif + endif +! cp $file ${TREEROOT}/$id/$partnum + if ($status) then +! echo cp $file ${TREEROOT}/$id/$partnum failed + exit -1 + endif + if ($totalnum == -1) then +--- 71,79 ---- + exit -1 + endif + endif +! cp "$file" ${TREEROOT}/$id/$partnum + if ($status) then +! echo cp "$file" ${TREEROOT}/$id/$partnum failed + exit -1 + endif + if ($totalnum == -1) then diff -Nru ./files/patch-ae ../metamail.new/files/patch-ae --- ./files/patch-ae Sun Feb 29 17:41:07 2004 +++ ../metamail.new/files/patch-ae Sat Dec 16 22:22:24 2006 @@ -1,78 +1,80 @@ -*** metamail/splitmail.c.orig Mon Jan 31 23:23:14 1994 ---- metamail/splitmail.c Sat Feb 28 19:17:32 2004 +diff -rc ./bin/showpicture /usr/ports/mail/metamail/work/mm2.7/src/bin/showpicture +*** ./bin/showpicture Mon Feb 7 18:59:54 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/bin/showpicture Sat Dec 16 22:21:45 2006 *************** -*** 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 +*** 15,29 **** + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # - 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 + if (! $?METAMAIL_TMPDIR) then +! set METAMAIL_TMPDIR=/tmp + 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 - }; + if (! $?X_VIEWER) then +! set X_VIEWER="xloadimage -view -quiet -geometry +1+1" + # set X_VIEWER="xv -geometry +1+1" + endif +! if ($1 == "-viewer" && $#argv > 1) then + set X_VIEWER = "$2" + shift + shift +--- 15,56 ---- + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # -! ShareThisHeader(s, SubjectBuf, OrigID) - char *s; - char *SubjectBuf; - char **OrigID; - { - int i; ---- 339,348 ---- - NULL - }; ++ # 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 +! 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 -! ShareThisHeader(s, SubjectBuf, size, OrigID) - char *s; - char *SubjectBuf; -+ size_t size; - char **OrigID; - { - int i; + if (! $?X_VIEWER) then +! set X_VIEWER="xloadimage -view -quiet -geometry +1+1" + # set X_VIEWER="xv -geometry +1+1" + endif +! if ("$1" == "-viewer" && $#argv > 1) then + set X_VIEWER = "$2" + shift + shift *************** -*** 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")) { +*** 57,63 **** + endif + end + endif +! cp $1 $fname + if ($status == 0) echo Wrote file $fname + exit 0 + endif +--- 84,90 ---- + endif + end + endif +! cp "$1" $fname + if ($status == 0) echo Wrote file $fname + exit 0 + endif diff -Nru ./files/patch-af ../metamail.new/files/patch-af --- ./files/patch-af Thu Mar 10 14:53:57 2005 +++ ../metamail.new/files/patch-af Sat Dec 16 22:22:24 2006 @@ -1,260 +1,20 @@ -*** 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\\` --@ 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 -rc ./config.h /usr/ports/mail/metamail/work/mm2.7/src/config.h +*** ./config.h Wed Nov 24 16:36:07 1993 +--- /usr/ports/mail/metamail/work/mm2.7/src/config.h Sat Dec 16 22:21:45 2006 +*************** +*** 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 + +Only in /usr/ports/mail/metamail/work/mm2.7/src/: config.h.orig diff -Nru ./files/patch-ah ../metamail.new/files/patch-ah --- ./files/patch-ah Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-ah Sat Dec 16 22:22:24 2006 @@ -0,0 +1,37 @@ +diff -rc ./fonts/Makefile /usr/ports/mail/metamail/work/mm2.7/src/fonts/Makefile +*** ./fonts/Makefile Mon May 31 22:49:27 1993 +--- /usr/ports/mail/metamail/work/mm2.7/src/fonts/Makefile Sat Dec 16 22:21:45 2006 +*************** +*** 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 +Only in /usr/ports/mail/metamail/work/mm2.7/src/fonts: Makefile.orig diff -Nru ./files/patch-ai ../metamail.new/files/patch-ai --- ./files/patch-ai Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-ai Sat Dec 16 22:22:24 2006 @@ -0,0 +1,16 @@ +diff -rc ./metamail/codes.c /usr/ports/mail/metamail/work/mm2.7/src/metamail/codes.c +*** ./metamail/codes.c Mon Sep 20 15:13:22 1993 +--- /usr/ports/mail/metamail/work/mm2.7/src/metamail/codes.c Sat Dec 16 22:21:45 2006 +*************** +*** 13,18 **** +--- 13,19 ---- + WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + */ + #include ++ #include + #include + #include + +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: codes.c.orig +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: codes.o +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: mailto diff -Nru ./files/patch-aj ../metamail.new/files/patch-aj --- ./files/patch-aj Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-aj Sat Dec 16 22:22:24 2006 @@ -0,0 +1,134 @@ +diff -rc ./metamail/mailto.c /usr/ports/mail/metamail/work/mm2.7/src/metamail/mailto.c +*** ./metamail/mailto.c Wed Feb 9 21:30:26 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/metamail/mailto.c Sat Dec 16 22:21:45 2006 +*************** +*** 37,42 **** +--- 37,44 ---- + */ + + #include ++ #include ++ #include + #include + #include + #include +*************** +*** 60,66 **** + #include + #endif + +- extern char *malloc(), *realloc(), *index(), *getmyname(); + struct mailpart *CreateNewPart(); + + /* The main data structure for the multiple parts of the mail */ +--- 62,67 ---- +*************** +*** 570,575 **** +--- 571,577 ---- + 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 **** +--- 1132,1138 ---- + 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 **** +--- 1143,1149 ---- + 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 **** +--- 1749,1755 ---- + } + 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; +--- 1757,1765 ---- + 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); +--- 1797,1806 ---- + 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; +--- 1818,1824 ---- + } + 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 **** +--- 2146,2152 ---- + 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; +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: mailto.c.orig +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: mailto.o +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: metamail diff -Nru ./files/patch-ak ../metamail.new/files/patch-ak --- ./files/patch-ak Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-ak Sat Dec 16 22:22:24 2006 @@ -0,0 +1,201 @@ +diff -rc ./metamail/metamail.c /usr/ports/mail/metamail/work/mm2.7/src/metamail/metamail.c +*** ./metamail/metamail.c Thu Feb 17 02:57:19 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/metamail/metamail.c Sat Dec 16 22:21:45 2006 +*************** +*** 20,25 **** +--- 20,27 ---- + + ******************************************************* */ + #include ++ #include ++ #include + #include + #include + #include +*************** +*** 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" +--- 85,91 ---- + #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" +*************** +*** 100,105 **** +--- 102,108 ---- + #define CMDSIZE 1200 /* Maximum size of command to execute */ + + #define LINE_BUF_SIZE 2000 ++ #if 0 + #ifndef MICROSOFT + extern char *malloc(); + extern char *realloc(); +*************** +*** 107,116 **** + extern char *getenv(); + extern char *index(); + extern char *rindex(); + char fileToDelete[MAX_FILE_NAME_SIZE]; + + char *FindParam(); +- extern FILE *popen(); + static char *nomem = "Out of memory!"; + static char *mmversion = MM_VERSTRING; + static char *NoAskDefault = "text,text/plain,text/richtext"; +--- 110,121 ---- + extern char *getenv(); + extern char *index(); + extern char *rindex(); ++ extern FILE *popen(); ++ #endif ++ + char fileToDelete[MAX_FILE_NAME_SIZE]; + + char *FindParam(); + static char *nomem = "Out of memory!"; + static char *mmversion = MM_VERSTRING; + static char *NoAskDefault = "text,text/plain,text/richtext"; +*************** +*** 540,545 **** +--- 545,551 ---- + 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] == '/') { +--- 560,569 ---- + 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; +--- 587,598 ---- + 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 ++ #include + #include + #ifdef MSDOS + #include +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: mmencode.c.orig +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: mmencode.o diff -Nru ./files/patch-am ../metamail.new/files/patch-am --- ./files/patch-am Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-am Sat Dec 16 22:22:24 2006 @@ -0,0 +1,16 @@ +diff -rc ./metamail/putenv.c /usr/ports/mail/metamail/work/mm2.7/src/metamail/putenv.c +*** ./metamail/putenv.c Tue Oct 12 17:17:43 1993 +--- /usr/ports/mail/metamail/work/mm2.7/src/metamail/putenv.c Sat Dec 16 22:21:45 2006 +*************** +*** 17,22 **** +--- 17,24 ---- + Cambridge, MA 02139, USA. */ + + #include ++ #include ++ #include + #include + #include + #ifdef STDC_HEADERS +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: putenv.c.orig +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: putenv.o diff -Nru ./files/patch-an ../metamail.new/files/patch-an --- ./files/patch-an Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-an Sat Dec 16 22:22:24 2006 @@ -0,0 +1,24 @@ +diff -rc ./metamail/shared.c /usr/ports/mail/metamail/work/mm2.7/src/metamail/shared.c +*** ./metamail/shared.c Sun May 16 20:19:32 1993 +--- /usr/ports/mail/metamail/work/mm2.7/src/metamail/shared.c Sat Dec 16 22:21:45 2006 +*************** +*** 1,4 **** +--- 1,6 ---- + #include ++ #include ++ #include + #include + #include + #ifdef SYSV +*************** +*** 6,12 **** + #include + #endif + +- extern char *malloc(); + char **Exceptions; + int *NeedsPortableNewlines; + int ExceptionsAlloced = 0, ExceptionsUsed = 0; +--- 8,13 ---- +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: shared.c.orig +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: shared.o diff -Nru ./files/patch-ao ../metamail.new/files/patch-ao --- ./files/patch-ao Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-ao Sat Dec 16 22:22:24 2006 @@ -0,0 +1,110 @@ +diff -rc ./metamail/splitmail.c /usr/ports/mail/metamail/work/mm2.7/src/metamail/splitmail.c +*** ./metamail/splitmail.c Mon Jan 31 23:23:14 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/metamail/splitmail.c Sat Dec 16 22:22:12 2006 +*************** +*** 21,26 **** +--- 21,28 ---- + ******************************************************* */ + + #include ++ #include ++ #include + #include + #include + #include +*************** +*** 28,34 **** + #include + + #define MINCHUNKSIZE 20000 /* Better be enough to hold the headers, or we die! */ +! extern char *malloc(), *index(), *getmyname(); + + #ifdef AMIGA + #define Prototype extern +--- 30,36 ---- + #include + + #define MINCHUNKSIZE 20000 /* Better be enough to hold the headers, or we die! */ +! extern char *getmyname(); + + #ifdef AMIGA + #define Prototype extern +*************** +*** 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() { +--- 43,50 ---- + #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"); + } +--- 196,202 ---- + 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; +--- 341,350 ---- + 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")) { +--- 364,371 ---- + } + if (!ULstrcmp(s, "subject")) { + *colon = ':'; +! strncpy(SubjectBuf, ++colon, size); +! SubjectBuf[size - 1] = '\0'; + return(0); + } + if (!ULstrcmp(s, "content-type")) { +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: splitmail.c.orig +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: splitmail.c~ +Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: uue.o diff -Nru ./files/patch-ap ../metamail.new/files/patch-ap --- ./files/patch-ap Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-ap Sat Dec 16 22:22:24 2006 @@ -0,0 +1,14 @@ +diff -rc ./richmail/richlex.c /usr/ports/mail/metamail/work/mm2.7/src/richmail/richlex.c +*** ./richmail/richlex.c Thu Feb 3 03:29:37 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/richmail/richlex.c Sat Dec 16 22:21:45 2006 +*************** +*** 42,47 **** +--- 42,48 ---- + -------------------------------------------------------------------------*/ + + #include ++ #include + #include + #include "richlex.h" + #include "richset.h" +Only in /usr/ports/mail/metamail/work/mm2.7/src/richmail: richlex.c.orig diff -Nru ./files/patch-aq ../metamail.new/files/patch-aq --- ./files/patch-aq Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-aq Sat Dec 16 22:22:24 2006 @@ -0,0 +1,14 @@ +diff -rc ./richmail/richset.c /usr/ports/mail/metamail/work/mm2.7/src/richmail/richset.c +*** ./richmail/richset.c Wed Oct 21 19:04:19 1992 +--- /usr/ports/mail/metamail/work/mm2.7/src/richmail/richset.c Sat Dec 16 22:21:45 2006 +*************** +*** 34,39 **** +--- 34,40 ---- + -------------------------------------------------------------------------*/ + + #include ++ #include + #include "richlex.h" + #include "richset.h" + +Only in /usr/ports/mail/metamail/work/mm2.7/src/richmail: richset.c.orig diff -Nru ./files/patch-ar ../metamail.new/files/patch-ar --- ./files/patch-ar Thu Jan 1 01:00:00 1970 +++ ../metamail.new/files/patch-ar Sat Dec 16 22:22:24 2006 @@ -0,0 +1,53 @@ +diff -rc ./richmail/richtext.c /usr/ports/mail/metamail/work/mm2.7/src/richmail/richtext.c +*** ./richmail/richtext.c Wed Feb 9 17:31:18 1994 +--- /usr/ports/mail/metamail/work/mm2.7/src/richmail/richtext.c Sat Dec 16 22:21:45 2006 +*************** +*** 14,19 **** +--- 14,21 ---- + */ + + #include ++ #include ++ #include + #include + #include + #include "richlex.h" +*************** +*** 155,160 **** +--- 157,172 ---- + exit(-1); + #endif + } ++ static lc2strcmp(s1, s2) ++ char *s1, *s2; ++ { ++ if (!s1 || !s2) return (-1); ++ while (*s1 && *s2) { ++ if (*s1 != *s2 && (tolower(*s1) != *s2)) return(-1); ++ ++s1; ++s2; ++ } ++ return((*s1 == *s2) ? 0 : -1); ++ } + + #ifndef RICHTEXT_LIBRARY + +*************** +*** 989,1004 **** + while(*s) (*RichtextPutc)((int)(*s++),fp); + } + +- static lc2strcmp(s1, s2) +- char *s1, *s2; +- { +- if (!s1 || !s2) return (-1); +- while (*s1 && *s2) { +- if (*s1 != *s2 && (tolower(*s1) != *s2)) return(-1); +- ++s1; ++s2; +- } +- return((*s1 == *s2) ? 0 : -1); +- } + + static lc2strncmp(s1, s2, len) + char *s1, *s2; +--- 1001,1006 ---- +Only in /usr/ports/mail/metamail/work/mm2.7/src/richmail: richtext.c.orig >Release-Note: >Audit-Trail: >Unformatted: