mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
3.7 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/tsa/metamail/15_mm-2.7-csh.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- mm2.7/src/metamail/mailto.c.cshfix Sat Oct 25 09:50:36 1997
  20. +++ mm2.7/src/metamail/mailto.c Sat Oct 25 09:51:03 1997
  21. @@ -200,9 +200,12 @@
  22. }
  23. TildeHelp() {
  24. - char *pager = getenv("PAGER");
  25. char TmpName[100], CmdBuf[150];
  26. + char *pager;
  27. FILE *fp;
  28. +
  29. + if ((pager = getenv("METAMAIL_PAGER")) == NULL)
  30. + pager = getenv("PAGER");
  31. strcpy(TmpName, tmpname());
  32. fp = fopen(TmpName, "w");
  33. --- mm2.7/src/bin/showexternal.cshfix Sat Oct 25 09:45:05 1997
  34. +++ mm2.7/src/bin/showexternal Sat Oct 25 09:46:25 1997
  35. @@ -19,6 +19,9 @@
  36. if (! $?METAMAIL_TMPDIR) then
  37. set METAMAIL_TMPDIR=/tmp
  38. endif
  39. +if (! $?METAMAIL_PAGER) then
  40. + set METAMAIL_PAGER=more
  41. +endif
  42. if (! $?FTP) then
  43. set FTP=ftp
  44. endif
  45. @@ -27,11 +30,19 @@
  46. echo "Usage: showexternal body-file access-type name [site [directory [mode [server]]]]"
  47. exit -1
  48. endif
  49. -set bodyfile=$1
  50. +# Check argument integrity. Don't trust mail headers
  51. +switch ("$1$2$3$4$5$6$7")
  52. +case "*[ ]*":
  53. + echo "Illegal white space in arguments -- possibly a mail bomb?!"
  54. + echo "Command was:"
  55. + echo \'$0\' \'$1\' \'$2\' \'$3\' \'$4\' \'$5\' \'$6\' \'$7\'
  56. + exit 2
  57. +endsw
  58. +set bodyfile="$1"
  59. set atype=`echo $2 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
  60. set name=$3
  61. if ($#argv > 3) then
  62. - set site=$4
  63. + set site="$4"
  64. else
  65. set site=""
  66. endif
  67. @@ -41,12 +52,12 @@
  68. set dir=""
  69. endif
  70. if ($#argv > 5) then
  71. - set mode=$6
  72. + set mode="$6"
  73. else
  74. set mode=""
  75. endif
  76. if ($#argv > 6) then
  77. - set server=$7
  78. + set server="$7"
  79. else
  80. set server=""
  81. endif
  82. @@ -96,7 +107,7 @@
  83. !
  84. sed -e 1,/^\$/d < $bodyfile >> ${METAMAIL_TMPDIR}/ext.junk.$$
  85. - more ${METAMAIL_TMPDIR}/ext.junk.$$
  86. + ${METAMAIL_PAGER} ${METAMAIL_TMPDIR}/ext.junk.$$
  87. rm ${METAMAIL_TMPDIR}/ext.junk.$$
  88. breaksw
  89. default:
  90. --- mm2.7/src/bin/showpartial.cshfix Sat Oct 25 09:46:37 1997
  91. +++ mm2.7/src/bin/showpartial Sat Oct 25 09:47:24 1997
  92. @@ -11,14 +11,14 @@
  93. echo "Usage: showpartial file id partnum totalnum"
  94. exit -1
  95. endif
  96. -set file=$1
  97. +set file="$1"
  98. # This next line is because message-id can contain weird chars
  99. set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\`
  100. @ partnum = $3
  101. if ($#argv == 3 || $4 == "") then
  102. set totalnum=-1
  103. else
  104. - @ totalnum = $4
  105. + @ totalnum = "$4"
  106. endif
  107. if (! -d $TREEROOT) then
  108. --- mm2.7/src/bin/sun-message.csh.cshfix Sat Oct 25 09:49:16 1997
  109. +++ mm2.7/src/bin/sun-message.csh Sat Oct 25 09:50:15 1997
  110. @@ -8,6 +8,10 @@
  111. mkdir /tmp/decode.$$
  112. cd /tmp/decode.$$
  113. +if (! $?METAMAIL_PAGER) then
  114. + set METAMAIL_PAGER=more
  115. +endif
  116. +
  117. if ($2 == "uuencode") then
  118. uudecode $1
  119. @@ -37,7 +41,7 @@
  120. cd /tmp; /bin/rm -rf /tmp/decode.$$
  121. exit 0
  122. else if ($ans == 1) then
  123. - more $fn
  124. + ${METAMAIL_PAGER} $fn
  125. else if ($ans == 2) then
  126. set nfn = ""
  127. echo -n "Save as: $HOME/"
  128. @@ -53,7 +57,7 @@
  129. set defans = "3"
  130. end
  131. else
  132. - more $1
  133. + ${METAMAIL_PAGER} $1
  134. endif