home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / base / root.15 / usr / lib / mail / metamail / showpicture / showpicture
Encoding:
Text File  |  1998-08-19  |  5.9 KB  |  231 lines

  1. #!/bin/sh
  2. # The following was generated from 
  3. # NLS/en/metamail.gen
  4. #
  5. MF_METAMAIL=metamail.cat@mail
  6. #
  7. MS_EXTCOMPOSE=1
  8. EXTCOMPOSE_MSG_WHERE=1
  9. EXTCOMPOSE_MSG_LOCAL=2
  10. EXTCOMPOSE_MSG_AFS=3
  11. EXTCOMPOSE_MSG_ANON=4
  12. EXTCOMPOSE_MSG_LOGIN=5
  13. EXTCOMPOSE_MSG_MAILSRVR=6
  14. EXTCOMPOSE_MSG_NUMBER=7
  15. EXTCOMPOSE_MSG_DOMAIN=8
  16. EXTCOMPOSE_MSG_DIR=9
  17. EXTCOMPOSE_MSG_NAME=10
  18. EXTCOMPOSE_MSG_TRANSFER=11
  19. EXTCOMPOSE_MSG_PATH=12
  20. EXTCOMPOSE_MSG_ADDR=13
  21. EXTCOMPOSE_MSG_ACCESS=14
  22. EXTCOMPOSE_MSG_CONTENT=15
  23. EXTCOMPOSE_MSG_ENCODED=16
  24. EXTCOMPOSE_MSG_NOT=17
  25. EXTCOMPOSE_MSG_BASE64=18
  26. EXTCOMPOSE_MSG_QP=19
  27. EXTCOMPOSE_MSG_UUENCODE=20
  28. EXTCOMPOSE_MSG_DATA=21
  29. EXTCOMPOSE_ERR_USAGE=22
  30. EXTCOMPOSE_ERR_CHOICE=23
  31. EXTCOMPOSE_ERR_EXIST=24
  32. #
  33. MS_GETFILENAME=2
  34. GETFILENAME_MSG_NAME=1
  35. GETFILENAME_ERR_NO_FILE=2
  36. #
  37. MS_METASEND=3
  38. METASEND_MSG_TO=1
  39. METASEND_MSG_SUBJECT=2
  40. METASEND_MSG_CC=3
  41. METASEND_MSG_CONTENT=4
  42. METASEND_MSG_FILE=5
  43. METASEND_MSG_ENC=6
  44. METASEND_MSG_NO=7
  45. METASEND_MSG_BASE64=8
  46. METASEND_MSG_QP=9
  47. METASEND_MSG_UUENCODE=10
  48. METASEND_ERR_S=11
  49. METASEND_ERR_C=12
  50. METASEND_ERR_SUB=13
  51. METASEND_ERR_T=14
  52. METASEND_ERR_E=15
  53. METASEND_ERR_F=16
  54. METASEND_ERR_M=17
  55. METASEND_ERR_OPTION=18
  56. METASEND_ERR_FILE=19
  57. METASEND_ERR_ANSWER=20
  58. METASEND_ERR_BATCH=21
  59. METASEND_ERR_DATAFILE=22
  60. METASEND_ERR_DELIVERY=23
  61. METASEND_ERR_DRAFT=24
  62. #
  63. MS_SHOWAUDIO=4
  64. SHOWAUDIO_MSG_CHOOSE=1
  65. SHOWAUDIO_MSG_SPEAKER=2
  66. SHOWAUDIO_MSG_TELEPHONE=3
  67. SHOWAUDIO_MSG_PREFER=4
  68. SHOWAUDIO_MSG_USE_PHONE=5
  69. SHOWAUDIO_MSG_FUTURE=6
  70. SHOWAUDIO_MSG_USE_SPEAKER=7
  71. SHOWAUDIO_MSG_SENDING=8
  72. SHOWAUDIO_MSG_AIFF=9
  73. SHOWAUDIO_MSG_NEXT=10
  74. SHOWAUDIO_MSG_DEV=11
  75. SHOWAUDIO_MSG_NUMBER=12
  76. SHOWAUDIO_MSG_CALLING=13
  77. SHOWAUDIO_MSG_DONE=14
  78. SHOWAUDIO_MSG_RSH=15
  79. SHOWAUDIO_MSG_CANT_PLAY=16
  80. #
  81. MS_SHOWEXTERNAL=5
  82. SHOWEXTERNAL_MSG_ANON=1
  83. SHOWEXTERNAL_MSG_FTP=2
  84. SHOWEXTERNAL_MSG_SRVR=3
  85. SHOWEXTERNAL_MSG_DATA=4
  86. SHOWEXTERNAL_MSG_SITE=5
  87. SHOWEXTERNAL_MSG_USER=6
  88. SHOWEXTERNAL_MSG_PASSWD=7
  89. SHOWEXTERNAL_MSG_BODY=8
  90. SHOWEXTERNAL_MSG_SU=9
  91. SHOWEXTERNAL_MSG_GETTING=10
  92. SHOWEXTERNAL_MSG_REQUESTED=11
  93. SHOWEXTERNAL_MSG_RM=12
  94. SHOWEXTERNAL_ERR_NAME=13
  95. SHOWEXTERNAL_ERR_USAGE=14
  96. SHOWEXTERNAL_ERR_FTP=15
  97. SHOWEXTERNAL_ERR_FOUND=16
  98. SHOWEXTERNAL_ERR_BODYFILE=17
  99. SHOWEXTERNAL_ERR_MAIL=18
  100. SHOWEXTERNAL_ERR_TYPE=19
  101. SHOWEXTERNAL_ERR_METAMAIL=20
  102. SHOWEXTERNAL_ERR_ENTER=21
  103. #
  104. MS_SHOWNONASCII=6
  105. SHOWNONASCII_MSG_DISPLAY=1
  106. SHOWNONASCII_MSG_XTERM=2
  107. #
  108. MS_SHOWPARTIAL=7
  109. SHOWPARTIAL_MSG_READ=1
  110. SHOWPARTIAL_MSG_WARN=2
  111. SHOWPARTIAL_MSG_SEV=3
  112. SHOWPARTIAL_MSG_TOTAL=4
  113. SHOWPARTIAL_MSG_FULL=5
  114. SHOWPARTIAL_ERR_USAGE=6
  115. SHOWPARTIAL_ERR_TREEROOT=7
  116. SHOWPARTIAL_ERR_ID=8
  117. SHOWPARTIAL_ERR_CP=9
  118. #
  119. MS_SHOWPICTURE=8
  120. SHOWPICTURE_MSG_DISPLAY=1
  121. SHOWPICTURE_MSG_NOTE=2
  122. # Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  123. #                                                                         
  124. #        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  125. #                   SANTA CRUZ OPERATION INC.                             
  126. #                                                                         
  127. #   The copyright notice above does not evidence any actual or intended   
  128. #   publication of such source code.                                      
  129.  
  130. #
  131. #    ident @(#) showpicture.sh 11.2 97/11/03 
  132. #
  133. #############################################################################
  134. #
  135. #    Copyright (c) 1997 The Santa Cruz Operation, Inc.. 
  136. #        All Rights Reserved. 
  137. #
  138. #    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF 
  139. #        THE SANTA CRUZ OPERATION INC.
  140. #    The copyright notice above does not evidence any
  141. #    actual or intended publication of such source code.
  142. #
  143. #############################################################################
  144. #
  145. # Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
  146. # Permission to use, copy, modify, and distribute this material 
  147. # for any purpose and without fee is hereby granted, provided 
  148. # that the above copyright notice and this permission notice 
  149. # appear in all copies, and that the name of Bellcore not be 
  150. # used in advertising or publicity pertaining to this 
  151. # material without the specific, prior written permission 
  152. # of an authorized representative of Bellcore.  BELLCORE 
  153. # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
  154. # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
  155. # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  156. #
  157. #############################################################################
  158. #
  159. # Conversion from C shell to Bourne shell by Z-Code Software Corp.
  160. # Conversion Copyright (c) 1992 Z-Code Software Corp.
  161. # Permission to use, copy, modify, and distribute this material
  162. # for any purpose and without fee is hereby granted, provided
  163. # that the above copyright notice and this permission notice
  164. # appear in all copies, and that the name of Z-Code Software not
  165. # be used in advertising or publicity pertaining to this
  166. # material without the specific, prior written permission
  167. # of an authorized representative of Z-Code.  Z-CODE SOFTWARE
  168. # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
  169. # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS",
  170. # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  171. #
  172.  
  173. echo_n()
  174. {
  175.     echo "$@\c"
  176. }
  177.  
  178. :
  179.  
  180. if [ -z "$METAMAIL_TMPDIR" ]
  181. then
  182.     METAMAIL_TMPDIR=/tmp
  183. fi
  184.  
  185. if test -z "${X_VIEWER:-}"
  186. then
  187.     X_VIEWER="xloadimage -view -quiet -geometry +1+1"
  188. # X_VIEWER="xv -geometry +1+1"
  189. fi
  190.  
  191. if test "$1" = "-viewer" -a ! -z "$2"
  192. then
  193.     X_VIEWER="$2"
  194.     shift
  195.     shift
  196. fi
  197.  
  198. if test -z "${DISPLAY:-}"
  199. then
  200.     echo ""
  201.     dspmsg $MF_METAMAIL -s $MS_SHOWPICTURE $SHOWPICTURE_MSG_DISPLAY \
  202.         "This message contains a picture, which can currently only be\nviewed when running X11.  If you read this message while running\nX11, you will be able to see the picture properly.\n"
  203.     exit 0
  204. fi
  205.  
  206. dspmsg $MF_METAMAIL -s $MS_SHOWPICTURE $SHOWPICTURE_MSG_NOTE \
  207.     "NOTE: TO MAKE THE PICTURE WINDOW GO AWAY, JUST TYPE 'q' IN IT.\n" \
  208.     "q"
  209. echo ""
  210.  
  211. if test -z "$1"
  212. then
  213.     $X_VIEWER stdin
  214. else
  215.     for i
  216.     do
  217.         dir=`dirname $i`
  218.         base=`basename $i`
  219.         if test ! "$base" = "$i"
  220.         then
  221.             cd $dir
  222.         fi
  223.         if ln $i $$.PRESS-q-TO-EXIT  > /dev/null 2>&1
  224.         then $X_VIEWER $$.PRESS-q-TO-EXIT
  225.             rm $$.PRESS-q-TO-EXIT 
  226.         else $X_VIEWER "$i"
  227.         fi
  228.     done
  229. fi
  230.