+Mon Mar 13 18:26:03 2000 Dan Harkless <dan-nmh@dilvish.speed.net>
+
+ * Applied Sullivan N. Beck <sbeck@cise.ufl.edu>'s mhshow-suffix patch:
+
+ With the patch below, you can add lines like:
+
+ mhshow-suffix-application/msword: .doc
+ mhshow-suffix-application/PostScript: .ps
+
+ to the mhn.defaults file to append the given suffix to a
+ scratch file. This allows applications which require a
+ certain suffix to run properly.
+
+ * Removed -force_html from lynx entry in mhn.defaults.sh (I
+ believe older versions of lynx lack that option) and added
+ "mhshow-suffix-text/html: .html".
+
Mon Mar 06 12:20:20 2000 Dan Harkless <dan-nmh@dilvish.speed.net>
* Applied Neil W Rickert <rickert+nmh@cs.niu.edu>'s msh.c patch:
- I finally tracked down the problem in msh that was causing errors
- whenever I tried to examine a 'mmdf' style mailbox.
+ I finally tracked down the problem in msh that was causing
+ errors whenever I tried to examine a 'mmdf' style mailbox.
- It turns out that not enough memory was being allocated with
- calloc(), causing memory pointers to be overwritten and corrupted.
+ It turns out that not enough memory was being allocated with
+ calloc(), causing memory pointers to be overwritten and
+ corrupted.
Fri Mar 03 16:07:33 2000 Dan Harkless <dan-nmh@dilvish.speed.net>
echo "mhshow-show-application/x-ivs: %p$PGM -o '%F'" >> $TMP
fi
+echo "mhshow-suffix-text/html: .html" >> $TMP
+
# I'd like to check if netscape is available and use it preferentially to lynx,
# but only once I've added a new %-escape that makes more permanent temp files,
# so netscape -remote can be used (without -remote you get a complaint dialog
# that another netscape is already running and certain things can't be done).
PGM="`$SEARCHPROG $SEARCHPATH lynx`"
if [ ! -z "$PGM" ]; then
- echo "mhshow-show-text/html: %p$PGM -force_html '%F'" >> $TMP
+ echo "mhshow-show-text/html: %p$PGM '%F'" >> $TMP
fi
PGM="`$SEARCHPROG $SEARCHPATH richtext`"
fi
fi
+# staroffice to read .doc files
+PGM="`$SEARCHPROG $SEARCHPATH soffice`"
+if [ ! -z "$PGM" ]; then
+ echo "mhshow-show-application/msword: %psoffice '%F'" >> $TMP
+ echo "mhshow-suffix-application/msword: .doc" >> $TMP
+fi
+
PGM="`$SEARCHPROG $SEARCHPATH xterm`"
if [ ! -z "$PGM" ]; then
echo "mhshow-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e '%s'" >> $TMP
PGM="`$SEARCHPROG $SEARCHPATH gs`"
if [ ! -z "$PGM" ]; then
echo "mhshow-show-application/PostScript: %p$PGM -- '%F'" >> $TMP
+ echo "mhshow-suffix-application/PostScript: .ps" >> $TMP
fi
fi
switch. If the format file \fImhl.null\fR is specified, then the display
of the message headers is suppressed.
+Next, the contents are extracted from the message and are stored in
+a temporary file. Usually, the name of the temporary file the
+word "mhn" followed by a string of characters. Occasionally,
+the method used to display a content (described next), requires that
+the file end in a specific suffix. For example, the \fIsoffice\fR
+command (part of the StarOffice package) can be used to display
+MicroSoft Word content, but it uses the suffix to determine how to display
+the file. If no suffix is present, the file is not correctly loaded.
+Similarily, older versions of the \fIgs\fR command append a ".ps" suffix to
+the filename if one was missing. As a result, these cannot be used to read
+the default temporary file.
+
+To get around this, your profile can contain lines of the form:
+.sp
+.in +.5i
+mhn-suffix-<type>/<subtype>: <suffix>
+.in -.5i
+.sp
+or
+.sp
+.in +.5i
+mhn-suffix-<type>: <suffix>
+.in -.5i
+.sp
+to specify a suffix which can be automatically added to the temporary
+file created for a specific content type. For example, the following
+lines might appear in your profile:
+.sp
+.nf
+.in +.5i
+mhn-suffix-text: .txt
+mhn-suffix-application/msword: .doc
+mhn-suffix-application/PostScript: .ps
+.in -.5i
+.fi
+.sp
+to automatically append a suffix to the temporary files.
+
The method used to display the different contents in the messages bodies
will be determined by a \*(lqdisplay string\*(rq. To find the display
string, \fImhn\fR will first search your profile for an entry of the form:
switch. If the format file \fImhl.null\fR is specified, then the display
of the message headers is suppressed.
+Next, the contents are extracted from the message and are stored in
+a temporary file. Usually, the name of the temporary file the
+word "mhshow" followed by a string of characters. Occasionally,
+the method used to display a content (described next), requires that
+the file end in a specific suffix. For example, the \fIsoffice\fR
+command (part of the StarOffice package) can be used to display
+MicroSoft Word content, but it uses the suffix to determine how to display
+the file. If no suffix is present, the file is not correctly loaded.
+Similarily, older versions of the \fIgs\fR command append a ".ps" suffix to
+the filename if one was missing. As a result, these cannot be used to read
+the default temporary file.
+
+To get around this, your profile can contain lines of the form:
+.sp
+.in +.5i
+mhshow-suffix-<type>/<subtype>: <suffix>
+.in -.5i
+.sp
+or
+.sp
+.in +.5i
+mhshow-suffix-<type>: <suffix>
+.in -.5i
+.sp
+to specify a suffix which can be automatically added to the temporary
+file created for a specific content type. For example, the following
+lines might appear in your profile:
+.sp
+.nf
+.in +.5i
+mhshow-suffix-text: .txt
+mhshow-suffix-application/msword: .doc
+mhshow-suffix-application/PostScript: .ps
+.in -.5i
+.fi
+.sp
+to automatically append a suffix to the temporary files.
+
The method used to display the different contents in the messages bodies
will be determined by a \*(lqdisplay string\*(rq. To find the display
string, \fImhshow\fR will first search your profile for an entry of the
unsigned long bits;
unsigned char value, *b, *b1, *b2, *b3;
char *cp, *ep, buffer[BUFSIZ];
+ /* sbeck -- handle prefixes */
+ CI ci;
CE ce;
MD5_CTX mdContext;
ce->ce_unlink = 0;
}
+ /* sbeck@cise.ufl.edu -- handle suffixes */
+ ci = &ct->c_ctinfo;
+ snprintf (buffer, sizeof(buffer), "%s-suffix-%s/%s",
+ invo_name, ci->ci_type, ci->ci_subtype);
+ cp = context_find (buffer);
+ if (cp == NULL || *cp == '\0') {
+ snprintf (buffer, sizeof(buffer), "%s-suffix-%s", invo_name,
+ ci->ci_type);
+ cp = context_find (buffer);
+ }
+ if (cp != NULL && *cp != '\0')
+ ce->ce_file = add (cp, ce->ce_file);
+
if ((ce->ce_fp = fopen (ce->ce_file, "w+")) == NULL) {
content_error (ce->ce_file, ct, "unable to fopen for reading/writing");
return NOTOK;
char buffer[BUFSIZ];
unsigned char mask;
CE ce;
+ /* sbeck -- handle prefixes */
+ CI ci;
MD5_CTX mdContext;
ce = ct->c_cefile;
ce->ce_unlink = 0;
}
+ /* sbeck@cise.ufl.edu -- handle suffixes */
+ ci = &ct->c_ctinfo;
+ snprintf (buffer, sizeof(buffer), "%s-suffix-%s/%s",
+ invo_name, ci->ci_type, ci->ci_subtype);
+ cp = context_find (buffer);
+ if (cp == NULL || *cp == '\0') {
+ snprintf (buffer, sizeof(buffer), "%s-suffix-%s", invo_name,
+ ci->ci_type);
+ cp = context_find (buffer);
+ }
+ if (cp != NULL && *cp != '\0')
+ ce->ce_file = add (cp, ce->ce_file);
+
+ if ((ce->ce_fp = fopen (ce->ce_file, "w+")) == NULL) {
+ content_error (ce->ce_file, ct, "unable to fopen for reading/writing");
+ return NOTOK;
+ }
+
if ((ce->ce_fp = fopen (ce->ce_file, "w+")) == NULL) {
content_error (ce->ce_file, ct, "unable to fopen for reading/writing");
return NOTOK;
{
int cc, fd, len;
char buffer[BUFSIZ];
+ /* sbeck -- handle prefixes */
+ char *cp;
+ CI ci;
CE ce;
ce = ct->c_cefile;
ce->ce_unlink = 0;
}
+ /* sbeck@cise.ufl.edu -- handle suffixes */
+ ci = &ct->c_ctinfo;
+ snprintf (buffer, sizeof(buffer), "%s-suffix-%s/%s",
+ invo_name, ci->ci_type, ci->ci_subtype);
+ cp = context_find (buffer);
+ if (cp == NULL || *cp == '\0') {
+ snprintf (buffer, sizeof(buffer), "%s-suffix-%s", invo_name,
+ ci->ci_type);
+ cp = context_find (buffer);
+ }
+ if (cp != NULL && *cp != '\0')
+ ce->ce_file = add (cp, ce->ce_file);
+
if ((ce->ce_fp = fopen (ce->ce_file, "w+")) == NULL) {
content_error (ce->ce_file, ct, "unable to fopen for reading/writing");
return NOTOK;