OpenSDE Packages Database (without history before r20070)
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.

141 lines
3.6 KiB

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