summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/lynx/samples/mailcap
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/lynx/samples/mailcap')
-rw-r--r--gnu/usr.bin/lynx/samples/mailcap99
1 files changed, 99 insertions, 0 deletions
diff --git a/gnu/usr.bin/lynx/samples/mailcap b/gnu/usr.bin/lynx/samples/mailcap
new file mode 100644
index 00000000000..9dd36ccf8ac
--- /dev/null
+++ b/gnu/usr.bin/lynx/samples/mailcap
@@ -0,0 +1,99 @@
+# Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
+#
+# Permission to use, copy, modify, and distribute this material
+# for any purpose and without fee is hereby granted, provided
+# that the above copyright notice and this permission notice
+# appear in all copies, and that the name of Bellcore not be
+# used in advertising or publicity pertaining to this
+# material without the specific, prior written permission
+# of an authorized representative of Bellcore. BELLCORE
+# MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
+# OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS",
+# WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+#
+# Prototype Mailcap file
+# Note that support for text & multipart are "built in" to metamail,
+# as are rudimentary support for message, and application.
+# However, any of these may be overridden in mailcap.
+#
+# Note that users may override or extend this with a .mailcap
+# file in their own directory. However, there is NO NEED
+# for them to copy entries from this file, as metamail will
+# pick up entries from both the system and personal mailcap files.
+#
+
+# NOTE: This file has been heavily modified for use as an example
+# configuration file for Lynx
+
+# In the samples given test=test -n "$DISPLAY" is used to
+# determine if the current session is X capible by checking
+# for the existance of a DISPLAY environment variable.
+# Lynx actually uses a getenv() call for DISPLAY (DECW$DISPLAY
+# on VMS) when it encounters test=test -n "$DISPLAY" or
+# test=test -z "$DISPLAY" in a viewer assignment, instead of
+# spawning to execute "test" via a system() call, i.e., those
+# two strings, respectively, are handled equivalently to the
+# :XWINDOWS and :NON_XWINDOWS flags for VIEWER: assignments
+# in lynx.cfg. Any system without the DISPLAY (or DECW$DISPLAY)
+# environment variable will be assumed to be Non-X.
+
+# You can append a ';' followed by "q=#.#", e.g., ; q=0.002
+# to set the quality parameter for the Content-Type, which can be
+# included in the Accept: header Lynx sends to http servers (the
+# default quality value is 1.0, and Lynx appends the parameter
+# to the Content-Type only if the value is less than 1.0).
+
+# You can append a ';' followed by "mxb=#", e.g., ; mxb=1000000
+# to set the maxbytes parameter for the Content-Type, which can be
+# included in the Accept: header Lynx sends to http servers (the
+# default maxbytes value is 0, meaning no maximum, and Lynx appends
+# the parameter to the Content-Type only if the value exceeds 0).
+
+# The following line is for sites where xv understands jpeg but xloadimage
+# is preferred.
+#
+# the test line specifies that this viewer should only be used if
+# the display variable is set.
+image/jpeg; xv %s; test=test -n "$DISPLAY"
+
+# The following sends all other image subtypes to xloadimage
+#image/*; xloadimage %s; ; test=test -n "$DISPLAY"
+
+# The following sends all other image subtypes to xv
+image/*; xv %s; ; test=test -n "$DISPLAY"
+
+
+# If you have an interactive Postscript interpreter, you should think carefully
+# before replacing lpr with it in the following line, because PostScript
+# can be an enormous security hole. It is RELATIVELY harmless
+# when sent to the printer...
+
+# This one is for NON-X
+#application/postscript; lpr %s \; echo SENT FILE TO PRINTER; ;test=test -z "$DISPLAY"
+
+# This one is for X. It's already the default via src/HTInit.c.
+#application/postscript; ghostview %s; ; test=test -n "$DISPLAY"
+
+# The following should be commented out if you do NOT have safe-tcl
+# and should be uncommented if you DO have safe-tcl
+#application/safe-tcl; swish -safe -messaging -f %s
+
+# A common problem with the mailcap mechanism is getting differential
+# behavior from different programs. This problem is compounded by the fact
+# that some programs, notably Mosaic, do not implement the "test" clause in
+# mailcap files. If you are using Lynx and X Mosaic together you should
+# place all X-centric entries before non-X entries. X Mosaic will use
+# whichever entry is defined first so further entries will be ignored.
+#
+# Lynx exports the environment variable LYNX_VERSION, so it can be tested
+# by scripts to determine if Lynx is running or not. However, the string
+# test=test -n "$LYNX_VERSION"
+# is handled simply as a flag which yields success when Lynx encounters it
+# in the mailcap file (i.e., Lynx does not bother to execute "test" via a
+# system() call to find out if it's running, because it obviously is).
+# Inclusion of the string for that test can be used to prevent other
+# software which reads the mailcap file from acting on assignments intended
+# only for Lynx. The string
+# test=test -z "$LYNX_VERSION"
+# similarly is treated by Lynx simply as a flag which yields failure.
+