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.

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