]> diplodocus.org Git - nmh/blob - uip/mhshowsbr.h
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / mhshowsbr.h
1 /* mhshowsbr.h -- display the contents of MIME messages.
2 *
3 * This code is Copyright (c) 2017, by the authors of nmh. See the
4 * COPYRIGHT file in the root directory of the nmh distribution for
5 * complete copyright information.
6 */
7
8
9 /*
10 * Display MIME message(s) on standard out.
11 *
12 * Arguments are:
13 *
14 * cts - NULL terminated array of CT structures for messages
15 * to display
16 * concat - If true, concatenate all MIME parts. If false, show each
17 * MIME part under a separate pager.
18 * textonly - If true, only display "text" MIME parts
19 * inlineonly - If true, only display MIME parts that are marked with
20 * a disposition of "inline" (includes parts that lack a
21 * Content-Disposition header).
22 */
23 void show_all_messages(CT *cts, int concat, int textonly, int inlineonly);
24
25 /*
26 * Display (or store) a single MIME part using the specified command
27 *
28 * Arguments are:
29 *
30 * ct - The Content structure of the MIME part we wish to display
31 * alternate - Set this to true if this is one part of a MIME
32 * multipart/alternative part. Will suppress some errors and
33 * will cause the function to return DONE instead of OK on
34 * success.
35 * cp - The command string to execute. Will be run through the
36 * parser for %-escapes as described in mhshow(1).
37 * cracked - If set, chdir() to this directory before executing the
38 * command in "cp". Only used by mhstore(1).
39 * fmt - A series of mh-format(5) instructions to execute if the
40 * command string indicates a marker is desired. Can be NULL.
41 *
42 * Returns NOTOK if we could not display the part, DONE if alternate was
43 * set and we could display the part, and OK if alternate was not set and
44 * we could display the part.
45 */
46 int show_content_aux(CT ct, int alternate, char *cp, char *cracked,
47 struct format *fmt);
48
49 int convert_charset(CT ct, char *dest_charset, int *message_mods);
50
51 extern char *progsw;
52 extern int nomore;
53 extern char *formsw;
54 extern char *folder;
55 extern char *markerform;
56 extern char *headerform;
57 extern int headersw;