source: trunk/third/nmh/h/msh.h @ 12455

Revision 12455, 2.7 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1
2/*
3 * msh.h -- definitions for msh
4 *
5 * $Id: msh.h,v 1.1.1.1 1999-02-07 18:14:06 danw Exp $
6 */
7
8/* flags for stream */
9#define STDIO   0               /* regular stdoutput */
10#define CRTIO   1               /* create  re-direct */
11#define APPIO   2               /* append  re-direct */
12#define PIPIO   3               /* pipe    re-direct */
13
14struct Cmd {
15    char line[BUFSIZ];
16    char *args[MAXARGS];
17    char *redirect;
18    int direction;
19    FILE *stream;
20};
21
22#define NULLCMD ((struct Cmd *) 0)
23
24#define MHNCHK 0x0001   /* did nontext check           */
25#define MHNYES 0x0002   /* .. and known to be non-text */
26
27#define CUR (1 << (FFATTRSLOT + NUMATTRS - 1))
28
29#ifdef BPOP
30# define VIRTUAL SELECT_EMPTY
31
32# define is_virtual(mp,msgnum)    ((mp)->msgstats[msgnum] & VIRTUAL)
33# define unset_virtual(mp,msgnum) ((mp)->msgstats[msgnum] &= ~VIRTUAL)
34# define set_virtual(mp,msgnum)   ((mp)->msgstats[msgnum] |= VIRTUAL)
35#endif
36
37struct Msg {
38    struct drop m_drop;
39    char *m_scanl;
40    struct tws m_tb;
41    short m_flags;
42    seqset_t m_stats;
43};
44
45#define m_bboard_id  m_drop.d_id
46#define m_top        m_drop.d_size
47#define m_start      m_drop.d_start
48#define m_stop       m_drop.d_stop
49
50/*
51 * FOLDER
52 */
53extern char *fmsh;              /* folder instead of file  */
54extern int modified;            /* command modified folder */
55extern struct msgs *mp;         /* used a lot              */
56extern struct Msg *Msgs;        /* Msgs[0] not used        */
57
58FILE *msh_ready ();
59
60/*
61 * COMMAND
62 */
63extern int interactive;         /* running from a /dev/tty */
64extern int redirected;          /* re-directing output     */
65extern FILE *sp;                /* original stdout         */
66extern char *cmd_name;          /* command being run       */
67extern char myfilter[];         /* path to mhl.forward     */
68
69extern char *BBoard_ID;         /* BBoard-ID constant */
70
71/*
72 * SIGNALS
73 */
74extern SIGNAL_HANDLER istat;    /* original SIGINT  */
75extern SIGNAL_HANDLER qstat;    /* original SIGQUIT */
76extern int interrupted;         /* SIGINT detected  */
77extern int broken_pipe;         /* SIGPIPE detected */
78extern int told_to_quit;        /* SIGQUIT detected */
79
80#ifdef BSD42
81extern int should_intr;         /* signal handler should interrupt call */
82extern jmp_buf sigenv;          /* the environment pointer */
83#endif
84
85/*
86 * prototypes
87 */
88int readid (int);
89int expand (char *);
90void m_reset (void);
91void fsetup (char *);
92void setup (char *);
93void readids (int);
94void display_info (int);
95
96void forkcmd (char **s, char *);
97void distcmd (char **);
98void explcmd (char **);
99int filehak (char **);
100void filecmd (char **);
101void foldcmd (char **);
102void forwcmd (char **);
103void helpcmd (char **);
104void markcmd (char **);
105void mhncmd (char **);
106void showcmd (char **);
107int pack (char *, int, int);
108int packhak (char **);
109void packcmd (char **);
110void pickcmd (char **);
111void replcmd (char **);
112void rmmcmd (char **);
113void scancmd (char **);
114void sortcmd (char **);
Note: See TracBrowser for help on using the repository browser.