Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Dec 2006 22:40:39 +0100 (CET)
From:      Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/106818: Fix mail/metamail port for gcc4.1 compatibility
Message-ID:  <200612162140.kBGLedWX077115@mouton.dockes.com>
Resent-Message-ID: <200612162150.kBGLoHYd060733@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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<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;
+diff -rc ./bin/sun2mime /usr/ports/mail/metamail/work/mm2.7/src/bin/sun2mime
+*** ./bin/sun2mime	Sat Nov 13 15:54:05 1993
+--- /usr/ports/mail/metamail/work/mm2.7/src/bin/sun2mime	Sat Dec 16 22:21:45 2006
+***************
+*** 11,17 ****
+  fi
+  TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$
   
-!         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;
+! /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.$$
   
-!         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);
+! /usr/bin/awk '
+    BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n")
+            RS=""; FS="\n"; mode="HEADER" }
+    mode == "HEADER" {
diff -Nru ./files/patch-ag ../metamail.new/files/patch-ag
--- ./files/patch-ag	Thu May 22 06:35:44 1997
+++ ../metamail.new/files/patch-ag	Sat Dec 16 22:22:24 2006
@@ -1,260 +1,35 @@
-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 -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 <stdio.h>
++ #include <string.h>
+  #include <ctype.h>
+  #include <config.h>
+  
+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 <stdio.h>
++ #include <stdlib.h>
++ #include <string.h>
+  #include <ctype.h>
+  #include <config.h>
+  #include <pwd.h>
+***************
+*** 60,66 ****
+  #include <unistd.h>
+  #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 <stdio.h>
++ #include <stdlib.h>
++ #include <string.h>
+  #include <ctype.h>
+  #include <sys/types.h>
+  #include <sys/stat.h>
+***************
+*** 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<CParamsUsed; ++j) {
+          fprintf(outfp, " ; ");
+!         fprintf(outfp, CParams[j]);
+          fprintf(outfp, " = ");
+!         fprintf(outfp, CParamValues[j]);
+      }
+      fprintf(outfp, "\n\n"); 
+      TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType);
+--- 1212,1220 ----
+      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') {
+--- 1833,1841 ----
+          } 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);
+          }
+--- 2033,2040 ----
+      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);
+--- 2044,2050 ----
+          }
+      }
+      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);
+Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: metamail.c.orig
+Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: metamail.o
+Only in /usr/ports/mail/metamail/work/mm2.7/src/metamail: mmencode
diff -Nru ./files/patch-al ../metamail.new/files/patch-al
--- ./files/patch-al	Thu Jan  1 01:00:00 1970
+++ ../metamail.new/files/patch-al	Sat Dec 16 22:22:24 2006
@@ -0,0 +1,15 @@
+diff -rc ./metamail/mmencode.c /usr/ports/mail/metamail/work/mm2.7/src/metamail/mmencode.c
+*** ./metamail/mmencode.c	Wed Jan 26 19:47:37 1994
+--- /usr/ports/mail/metamail/work/mm2.7/src/metamail/mmencode.c	Sat Dec 16 22:21:45 2006
+***************
+*** 13,18 ****
+--- 13,19 ----
+  WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+  */
+  #include <stdio.h>
++ #include <stdlib.h>
+  #include <config.h>
+  #ifdef MSDOS
+  #include <fcntl.h>
+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 <config.h>
++ #include <stdlib.h>
++ #include <string.h>
+  #include <sys/types.h>
+  #include <errno.h>
+  #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 <stdio.h>
++ #include <stdlib.h>
++ #include <string.h>
+  #include <ctype.h>
+  #include <config.h>
+  #ifdef SYSV
+***************
+*** 6,12 ****
+  #include <sys/utsname.h>
+  #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 <stdio.h>
++ #include <stdlib.h>
++ #include <string.h>
+  #include <sys/types.h>
+  #include <sys/stat.h>
+  #include <config.h>
+***************
+*** 28,34 ****
+  #include <time.h>
+  
+  #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 <time.h>
+  
+  #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 <stdio.h>
++ #include <string.h>
+  #include <ctype.h>
+  #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 <stdio.h>
++ #include <stdlib.h>
+  #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 <stdio.h>
++ #include <stdlib.h>
++ #include <string.h>
+  #include <ctype.h>
+  #include <signal.h>
+  #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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612162140.kBGLedWX077115>