]> git.pld-linux.org Git - packages/metamail.git/blame - metamail-csh.patch
- changed all BuildRoot definitons
[packages/metamail.git] / metamail-csh.patch
CommitLineData
d3e996e7 1--- mm2.7/src/metamail/mailto.c.cshfix Sat Oct 25 09:50:36 1997
2+++ mm2.7/src/metamail/mailto.c Sat Oct 25 09:51:03 1997
3@@ -200,9 +200,12 @@
4 }
5
6 TildeHelp() {
7- char *pager = getenv("PAGER");
8 char TmpName[100], CmdBuf[150];
9+ char *pager;
10 FILE *fp;
11+
12+ if ((pager = getenv("METAMAIL_PAGER")) == NULL)
13+ pager = getenv("PAGER");
14
15 strcpy(TmpName, tmpname());
16 fp = fopen(TmpName, "w");
17--- mm2.7/src/bin/showexternal.cshfix Sat Oct 25 09:45:05 1997
18+++ mm2.7/src/bin/showexternal Sat Oct 25 09:46:25 1997
19@@ -19,6 +19,9 @@
20 if (! $?METAMAIL_TMPDIR) then
21 set METAMAIL_TMPDIR=/tmp
22 endif
23+if (! $?METAMAIL_PAGER) then
24+ set METAMAIL_PAGER=more
25+endif
26 if (! $?FTP) then
27 set FTP=ftp
28 endif
29@@ -27,11 +30,19 @@
30 echo "Usage: showexternal body-file access-type name [site [directory [mode [server]]]]"
31 exit -1
32 endif
33-set bodyfile=$1
34+# Check argument integrity. Don't trust mail headers
35+switch ("$1$2$3$4$5$6$7")
36+case "*[ ]*":
37+ echo "Illegal white space in arguments -- possibly a mail bomb?!"
38+ echo "Command was:"
39+ echo \'$0\' \'$1\' \'$2\' \'$3\' \'$4\' \'$5\' \'$6\' \'$7\'
40+ exit 2
41+endsw
42+set bodyfile="$1"
43 set atype=`echo $2 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
44 set name=$3
45 if ($#argv > 3) then
46- set site=$4
47+ set site="$4"
48 else
49 set site=""
50 endif
51@@ -41,12 +52,12 @@
52 set dir=""
53 endif
54 if ($#argv > 5) then
55- set mode=$6
56+ set mode="$6"
57 else
58 set mode=""
59 endif
60 if ($#argv > 6) then
61- set server=$7
62+ set server="$7"
63 else
64 set server=""
65 endif
66@@ -96,7 +107,7 @@
67
68 !
69 sed -e 1,/^\$/d < $bodyfile >> ${METAMAIL_TMPDIR}/ext.junk.$$
70- more ${METAMAIL_TMPDIR}/ext.junk.$$
71+ ${METAMAIL_PAGER} ${METAMAIL_TMPDIR}/ext.junk.$$
72 rm ${METAMAIL_TMPDIR}/ext.junk.$$
73 breaksw
74 default:
75--- mm2.7/src/bin/showpartial.cshfix Sat Oct 25 09:46:37 1997
76+++ mm2.7/src/bin/showpartial Sat Oct 25 09:47:24 1997
77@@ -11,14 +11,14 @@
78 echo "Usage: showpartial file id partnum totalnum"
79 exit -1
80 endif
81-set file=$1
82+set file="$1"
83 # This next line is because message-id can contain weird chars
84 set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\`
85 @ partnum = $3
86 if ($#argv == 3 || $4 == "") then
87 set totalnum=-1
88 else
89- @ totalnum = $4
90+ @ totalnum = "$4"
91 endif
92
93 if (! -d $TREEROOT) then
94--- mm2.7/src/bin/sun-message.csh.cshfix Sat Oct 25 09:49:16 1997
95+++ mm2.7/src/bin/sun-message.csh Sat Oct 25 09:50:15 1997
96@@ -8,6 +8,10 @@
97 mkdir /tmp/decode.$$
98 cd /tmp/decode.$$
99
100+if (! $?METAMAIL_PAGER) then
101+ set METAMAIL_PAGER=more
102+endif
103+
104 if ($2 == "uuencode") then
105 uudecode $1
106
107@@ -37,7 +41,7 @@
108 cd /tmp; /bin/rm -rf /tmp/decode.$$
109 exit 0
110 else if ($ans == 1) then
111- more $fn
112+ ${METAMAIL_PAGER} $fn
113 else if ($ans == 2) then
114 set nfn = ""
115 echo -n "Save as: $HOME/"
116@@ -53,7 +57,7 @@
117 set defans = "3"
118 end
119 else
120- more $1
121+ ${METAMAIL_PAGER} $1
122 endif
123
124
This page took 0.174357 seconds and 4 git commands to generate.