home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / samples / mailcap < prev    next >
Encoding:
Text File  |  1995-06-28  |  4.1 KB  |  87 lines

  1. # Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
  2. # Permission to use, copy, modify, and distribute this material 
  3. # for any purpose and without fee is hereby granted, provided 
  4. # that the above copyright notice and this permission notice 
  5. # appear in all copies, and that the name of Bellcore not be 
  6. # used in advertising or publicity pertaining to this 
  7. # material without the specific, prior written permission 
  8. # of an authorized representative of Bellcore.  BELLCORE 
  9. # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
  10. # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
  11. # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  12. #
  13. # Prototype Mailcap file
  14. # Note that support for text & multipart are "built in" to metamail,
  15. # as are rudimentary support for message, and application.
  16. # However, any of these may be overridden in mailcap.
  17. #
  18. # Note that users may override or extend this with a .mailcap
  19. # file in their own directory.  However, there is NO NEED
  20. # for them to copy entries from this file, as metamail will
  21. # pick up entries from both the system and personal mailcap files.
  22. #
  23.  
  24. # NOTE:  This file has been heavily modified for use as an example
  25. #        configuration file for Lynx
  26.  
  27. # In the samples given   test=test -n "$DISPLAY"   is used to
  28. # determine if the current session is X capible by checking
  29. # for the existance of a DISPLAY environment variable.
  30. # Lynx actually uses a getenv() call for DISPLAY (DECW$DISPLAY
  31. # on VMS) when it encounters   test=test -n "$DISPLAY"  or
  32. # test=test -z "$DISPAY"  in a viewer assignment, instead of
  33. # spawning to execute "test" via a system() call, i.e., those
  34. # two strings, respectively, are handled equivalently to the
  35. # :XWINDOWS and :NON_XWINDOWS flags for VIEWER: assignments
  36. # in lynx.cfg.  Any system without the DISPLAY (or DECW$DISPLAY)
  37. # environment variable will be assumed to be Non-X.
  38.  
  39. # The following line is for sites where xv understands jpeg but xloadimage 
  40. # is preferred.
  41. #
  42. # the test line specifies that this viewer should only be used if
  43. # the display variable is set.
  44. image/jpeg; xv %s;  test=test -n "$DISPLAY"
  45.  
  46. # The following sends all other image subtypes to xloadimage
  47. #image/*; xloadimage %s; ;  test=test -n "$DISPLAY"
  48.  
  49. # The following sends all other image subtypes to xv
  50. image/*; xv %s; ;  test=test -n "$DISPLAY"
  51.  
  52.  
  53. # If you have an interactive Postscript interpreter, you should think carefully 
  54. # before replacing lpr with it in the following line, because PostScript
  55. # can be an enormous security hole.  It is RELATIVELY harmless
  56. # when sent to the printer...
  57.  
  58. # This one is for NON-X
  59. #application/postscript ; lpr %s \; echo SENT FILE TO PRINTER; ;test=test -z "$DISPLAY"
  60.  
  61. # This one is for X.  It's already the default via src/HTInit.c.
  62. #application/postscript ; ghostview %s; ;  test=test -n "$DISPLAY"
  63.  
  64. # The following should be commented out if you do NOT have safe-tcl
  65. # and should be uncommented if you DO have safe-tcl
  66. #application/safe-tcl; swish -safe -messaging -f %s
  67.  
  68. # A common problem with the mailcap mechanism is getting differential 
  69. # behavior from different programs.  This problem is compounded by the fact 
  70. # that some programs, notably Mosaic, do not implement the "test" clause in 
  71. # mailcap files.  If you are using Lynx and X Mosaic together you should
  72. # place all X-centric entries before non-X entries.  X Mosaic will use
  73. # whichever entry is defined first so further entries will be ignored.
  74. #
  75. # On Unix, Lynx exports the environment variable LYNX_VERSION, so it can
  76. # be tested by scripts to determine if Lynx is running or not.  However,
  77. # for both Unix and VMS, the string  test=test -n "$LYNX_VERSION"   is
  78. # handled simply as a flag which yields success when Lynx encounters it
  79. # in the mailcap file (i.e., Lynx does not bother to execute "test" via
  80. # a system() call to find out if it's running, because it obviously is).
  81. # Inclusion of the string for that test can be used to prevent other
  82. # software which reads the mailcap file from acting on assignments
  83. # intended only for Lynx.  The string  test=test -z "$LYNX_VERSION"
  84. # similarly is treated by Lynx simply as a flag which yields failure.
  85.  
  86.