mutt stable branch with some hacks
1/*
2 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#include "attach.h"
20
21/* dynamic internal flags */
22#define MUTT_SHOWFLAT (1<<0)
23#define MUTT_SHOWCOLOR (1<<1)
24#define MUTT_HIDE (1<<2)
25#define MUTT_SEARCH (1<<3)
26#define MUTT_TYPES (1<<4)
27#define MUTT_SHOW (MUTT_SHOWCOLOR | MUTT_SHOWFLAT)
28
29/* exported flags for mutt_(do_)?pager */
30#define MUTT_PAGER_NSKIP (1<<5) /* preserve whitespace with smartwrap */
31#define MUTT_PAGER_MARKER (1<<6) /* use markers if option is set */
32#define MUTT_PAGER_RETWINCH (1<<7) /* need reformatting on SIGWINCH */
33#define MUTT_PAGER_MESSAGE (MUTT_SHOWCOLOR | MUTT_PAGER_MARKER)
34#define MUTT_PAGER_ATTACHMENT (1<<8)
35#define MUTT_PAGER_NOWRAP (1<<9) /* format for term width, ignore $wrap */
36
37#define MUTT_DISPLAYFLAGS (MUTT_SHOW | MUTT_PAGER_NSKIP | MUTT_PAGER_MARKER)
38
39typedef struct
40{
41 CONTEXT *ctx; /* current mailbox */
42 HEADER *hdr; /* current message */
43 BODY *bdy; /* current attachment */
44 FILE *fp; /* source stream */
45 ATTACHPTR **idx; /* attachment information */
46 short idxlen;
47} pager_t;
48
49int mutt_do_pager (const char *, const char *, int, pager_t *);
50int mutt_pager (const char *, const char *, int, pager_t *);