*ooops* spurious static ... readd dump_int
[apps/madmutt.git] / pager.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4  *
5  * This file is part of mutt-ng, see http://www.muttng.org/.
6  * It's licensed under the GNU General Public License,
7  * please see the file GPL in the top level source directory.
8  */
9 #ifndef _MUTT_PAGER_H
10 #define _MUTT_PAGER_H
11
12 #include "attach.h"
13
14 /* dynamic internal flags */
15 #define M_SHOWFLAT      (1<<0)
16 #define M_SHOWCOLOR     (1<<1)
17 #define M_HIDE          (1<<2)
18 #define M_SEARCH        (1<<3)
19 #define M_TYPES         (1<<4)
20 #define M_SHOW          (M_SHOWCOLOR | M_SHOWFLAT)
21
22 /* exported flags for mutt_(do_)?pager */
23 #define M_PAGER_NSKIP           (1<<5)  /* preserve whitespace with smartwrap */
24 #define M_PAGER_MARKER          (1<<6)  /* use markers if option is set */
25 #define M_PAGER_RETWINCH        (1<<7)  /* need reformatting on SIGWINCH */
26 #define M_PAGER_MESSAGE         (M_SHOWCOLOR | M_PAGER_MARKER)
27 #define M_PAGER_ATTACHMENT      (1<<8)
28
29 #define M_DISPLAYFLAGS  (M_SHOW | M_PAGER_NSKIP | M_PAGER_MARKER)
30
31 typedef struct {
32   CONTEXT *ctx;                 /* current mailbox */
33   HEADER *hdr;                  /* current message */
34   BODY *bdy;                    /* current attachment */
35   FILE *fp;                     /* source stream */
36   ATTACHPTR **idx;              /* attachment information */
37   short idxlen;
38 } pager_t;
39
40 int mutt_pager(const char *, const char *, int, pager_t *);
41
42 #endif /* !_MUTT_PAGER_H */