diff options
author | agc <agc@pkgsrc.org> | 1997-11-19 13:03:40 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 1997-11-19 13:03:40 +0000 |
commit | efe27579530cf1c3f1544e4aa9fecb30ca3588b3 (patch) | |
tree | 797f58940c728cc8a885b071e8245b4a886cade3 /mail/metamail/patches | |
parent | 115e2fe67c84e85cc8deee30fdf1bb2401487b36 (diff) | |
download | pkgsrc-efe27579530cf1c3f1544e4aa9fecb30ca3588b3.tar.gz |
Initial import of the metamail-2.7 FreeBSD port into the NetBSD
packages collection.
Diffstat (limited to 'mail/metamail/patches')
-rw-r--r-- | mail/metamail/patches/patch-aa | 111 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ab | 33 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ac | 19 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ad | 35 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ae | 21 | ||||
-rw-r--r-- | mail/metamail/patches/patch-af | 129 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ag | 260 |
7 files changed, 608 insertions, 0 deletions
diff --git a/mail/metamail/patches/patch-aa b/mail/metamail/patches/patch-aa new file mode 100644 index 00000000000..ca7d93ccaab --- /dev/null +++ b/mail/metamail/patches/patch-aa @@ -0,0 +1,111 @@ +*** Makefile.orig Wed Jan 26 20:32:33 1994 +--- Makefile Mon Nov 20 01:31:41 1995 +*************** +*** 38,44 **** + + STATICFLAG=FOOBAR${HOST_ARCH} + +! CFLAGS = -g -I. ${$(STATICFLAG)} + # The following is better if you want to make sure you run with SYSV defined + # CFLAGS = -g -I. ${$(STATICFLAG)} -DSYSV + # Also, for SGI Irix, compile in K&R mode +--- 38,44 ---- + + STATICFLAG=FOOBAR${HOST_ARCH} + +! CFLAGS += -I. ${$(STATICFLAG)} + # The following is better if you want to make sure you run with SYSV defined + # CFLAGS = -g -I. ${$(STATICFLAG)} -DSYSV + # Also, for SGI Irix, compile in K&R mode +*************** +*** 49,57 **** + # LDLIBS variable. + # + # For Sun and BSD systems, the following should work... +! LDLIBS = + # On BSD 4.4 systems, you will need the following +! # LDLIBS = -lcompat + # On SGI machines, we need -lsun for getpw...(), and -lc_s saves some space. + # LDLIBS = -lsun -lc_s + # ISC SysVr3.2.2 has a shared C library and requires libinet.a to resolve +--- 49,57 ---- + # LDLIBS variable. + # + # For Sun and BSD systems, the following should work... +! # LDLIBS = + # On BSD 4.4 systems, you will need the following +! LDLIBS = -s -lcompat + # On SGI machines, we need -lsun for getpw...(), and -lc_s saves some space. + # LDLIBS = -lsun -lc_s + # ISC SysVr3.2.2 has a shared C library and requires libinet.a to resolve +*************** +*** 72,81 **** + # install -s -c $(LOCALBINDIR) $$file + # + #INSTALL = cp +! INSTALL = install -c -s + + # Root of installation tree +! INSTROOT = /usr/local + # + # This is where binaries should be copied + LOCALBINDIR = ${INSTROOT}/bin +--- 72,81 ---- + # install -s -c $(LOCALBINDIR) $$file + # + #INSTALL = cp +! INSTALL = install -c + + # Root of installation tree +! INSTROOT = ${PREFIX} + # + # This is where binaries should be copied + LOCALBINDIR = ${INSTROOT}/bin +*************** +*** 96,104 **** + # This helps with the "for" constructs below on some platforms: + SHELL=/bin/sh + +! install: basics + +! basics:: + (cd metamail ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}") + -${RM} bin/metamail + (cd bin; ${LN} ../metamail/metamail metamail) +--- 96,104 ---- + # This helps with the "for" constructs below on some platforms: + SHELL=/bin/sh + +! install: install-all + +! all basics:: + (cd metamail ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}") + -${RM} bin/metamail + (cd bin; ${LN} ../metamail/metamail metamail) +*************** +*** 117,123 **** + (cd bin; ${LN} ../richmail/richtext richtext) + -${RM} bin/richtoatk + (cd bin; ${LN} ../richmail/richtoatk richtoatk) +! (cd fonts ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}") + -${RM} bin/shownonascii + (cd bin; ${LN} ../fonts/shownonascii shownonascii) + -${RM} bin/mailto-hebrew +--- 117,123 ---- + (cd bin; ${LN} ../richmail/richtext richtext) + -${RM} bin/richtoatk + (cd bin; ${LN} ../richmail/richtoatk richtoatk) +! (cd fonts ; $(MAKE) PREFIX=${PREFIX} CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}") + -${RM} bin/shownonascii + (cd bin; ${LN} ../fonts/shownonascii shownonascii) + -${RM} bin/mailto-hebrew +*************** +*** 149,154 **** +--- 149,155 ---- + -mv $(MAILCAPDIR)/mailcap $(MAILCAPDIR)/mailcap.old + @echo "installing file $(MAILCAPDIR)/mailcap" + ${CP} mailcap $(MAILCAPDIR) ++ (cd fonts ; $(MAKE) PREFIX=${PREFIX} CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}" install) + + uninstall-all: + @(cd bin; \ diff --git a/mail/metamail/patches/patch-ab b/mail/metamail/patches/patch-ab new file mode 100644 index 00000000000..87f0b6b6f1c --- /dev/null +++ b/mail/metamail/patches/patch-ab @@ -0,0 +1,33 @@ +*** config.h.orig Mon Oct 17 21:06:22 1994 +--- config.h Mon Oct 17 21:08:13 1994 +*************** +*** 73,79 **** + #ifdef SYSV + #define RESET_PROGRAM "tput clear" + #else +! #ifdef __BSD_4_4__ + #define RESET_PROGRAM "/usr/bin/reset" + #else + #define RESET_PROGRAM "/usr/ucb/reset" +--- 73,79 ---- + #ifdef SYSV + #define RESET_PROGRAM "tput clear" + #else +! #if defined(__BSD_4_4__) || defined(__FreeBSD__) + #define RESET_PROGRAM "/usr/bin/reset" + #else + #define RESET_PROGRAM "/usr/ucb/reset" +*************** +*** 155,161 **** +--- 155,165 ---- + #ifdef NeXT + #define sigtype void + #else ++ #ifdef __FreeBSD__ ++ #define sigtype void ++ #else + #define sigtype int ++ #endif + #endif + #endif + diff --git a/mail/metamail/patches/patch-ac b/mail/metamail/patches/patch-ac new file mode 100644 index 00000000000..22277ebe313 --- /dev/null +++ b/mail/metamail/patches/patch-ac @@ -0,0 +1,19 @@ +*** bin/sun2mime.ORIG Sat Nov 13 15:53:51 1993 +--- bin/sun2mime Mon Dec 12 10:07:44 1994 +*************** +*** 11,17 **** + fi + TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ + +! /bin/nawk ' + BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") + RS=""; FS="\n"; mode="HEADER" } + mode == "HEADER" { +--- 11,17 ---- + fi + TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ + +! /usr/bin/awk ' + BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") + RS=""; FS="\n"; mode="HEADER" } + mode == "HEADER" { diff --git a/mail/metamail/patches/patch-ad b/mail/metamail/patches/patch-ad new file mode 100644 index 00000000000..10e02f259ea --- /dev/null +++ b/mail/metamail/patches/patch-ad @@ -0,0 +1,35 @@ +*** fonts/Makefile.orig Mon May 31 22:49:27 1993 +--- fonts/Makefile Thu May 18 21:55:42 1995 +*************** +*** 28,39 **** + -${DIRBUILDER} + + shownonascii: Xshownonascii +! sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xshownonascii > shownonascii + chmod +x shownonascii + + mailto-hebrew: Xmailto-hebrew +! sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xmailto-hebrew > mailto-hebrew + chmod +x mailto-hebrew + + clean: + rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir +--- 28,45 ---- + -${DIRBUILDER} + + shownonascii: Xshownonascii +! sed -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xshownonascii > shownonascii + chmod +x shownonascii + + mailto-hebrew: Xmailto-hebrew +! sed -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xmailto-hebrew > mailto-hebrew + chmod +x mailto-hebrew ++ ++ install: ++ mkdir -p ${PREFIX}/lib/metamail/fonts ++ install -c heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} \ ++ heb8x13B.${FONTSUFFIX} fonts.alias ${PREFIX}/lib/metamail/fonts ++ if [ -d /usr/X11R6 ]; then mkfontdir ${PREFIX}/lib/metamail/fonts ; fi + + clean: + rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir diff --git a/mail/metamail/patches/patch-ae b/mail/metamail/patches/patch-ae new file mode 100644 index 00000000000..26338280343 --- /dev/null +++ b/mail/metamail/patches/patch-ae @@ -0,0 +1,21 @@ +*** metamail/splitmail.c.orig Sun Jun 18 13:13:56 1995 +--- metamail/splitmail.c Sun Jun 18 13:14:48 1995 +*************** +*** 41,48 **** + #define VERBOSEDELIVERYCMD VerboseDeliveryCmd + #else + extern char *getenv(); +! #define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi" +! #define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi" + #endif + + usageexit() { +--- 41,48 ---- + #define VERBOSEDELIVERYCMD VerboseDeliveryCmd + #else + extern char *getenv(); +! #define NORMALDELIVERYCMD "/usr/sbin/sendmail -t -oi" +! #define VERBOSEDELIVERYCMD "/usr/sbin/sendmail -t -v -oi" + #endif + + usageexit() { diff --git a/mail/metamail/patches/patch-af b/mail/metamail/patches/patch-af new file mode 100644 index 00000000000..2cb4033d6e5 --- /dev/null +++ b/mail/metamail/patches/patch-af @@ -0,0 +1,129 @@ +*** mailto.c.orig Wed Feb 9 23:30:26 1994 +--- metamail/mailto.c Mon Nov 20 01:21:37 1995 +*************** +*** 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) { +*************** +*** 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); +--- 1795,1801 ---- + 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); +! fgets(LineBuf, sizeof(LineBuf), stdin); + 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; +--- 1813,1819 ---- + } + 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; +*** metamail.c.bak Thu Feb 17 04:57:19 1994 +--- metamail/metamail.c Mon Nov 20 01:21:37 1995 +*************** +*** 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" +*************** +*** 579,585 **** + 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 { +--- 579,585 ---- + int overwriteans = -1; + do { + printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); +! s = fgets(AnsBuf, sizeof(AnsBuf), stdin); + if (!s) { + overwriteans = 0; + } else { +*************** +*** 1823,1829 **** + } 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); +--- 1823,1829 ---- + } 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 */ + while (s && *s && isspace((unsigned char) *s)) ++s; + if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); diff --git a/mail/metamail/patches/patch-ag b/mail/metamail/patches/patch-ag new file mode 100644 index 00000000000..1c10eaedcae --- /dev/null +++ b/mail/metamail/patches/patch-ag @@ -0,0 +1,260 @@ +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 |