3 * msh.h -- definitions for msh
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 */
22 #define NULLCMD ((struct Cmd *) 0)
24 #define MHNCHK 0x0001 /* did nontext check */
25 #define MHNYES 0x0002 /* .. and known to be non-text */
27 #define CUR (1 << (FFATTRSLOT + NUMATTRS - 1))
30 # define VIRTUAL SELECT_EMPTY
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)
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
53 extern char *fmsh; /* folder instead of file */
54 extern int modified; /* command modified folder */
55 extern struct msgs *mp; /* used a lot */
56 extern struct Msg *Msgs; /* Msgs[0] not used */
63 extern int interactive; /* running from a /dev/tty */
64 extern int redirected; /* re-directing output */
65 extern FILE *sp; /* original stdout */
66 extern char *cmd_name; /* command being run */
67 extern char myfilter[]; /* path to mhl.forward */
69 extern char *BBoard_ID; /* BBoard-ID constant */
74 extern SIGNAL_HANDLER istat; /* original SIGINT */
75 extern SIGNAL_HANDLER qstat; /* original SIGQUIT */
76 extern int interrupted; /* SIGINT detected */
77 extern int broken_pipe; /* SIGPIPE detected */
78 extern int told_to_quit; /* SIGQUIT detected */
81 extern int should_intr; /* signal handler should interrupt call */
82 extern jmp_buf sigenv; /* the environment pointer */
94 void display_info (int);
96 void forkcmd (char **s, char *);
97 void distcmd (char **);
98 void explcmd (char **);
99 int filehak (char **);
100 void filecmd (char **);
101 void foldcmd (char **);
102 void forwcmd (char **);
103 void helpcmd (char **);
104 void markcmd (char **);
105 void mhncmd (char **);
106 void showcmd (char **);
107 int pack (char *, int, int);
108 int packhak (char **);
109 void packcmd (char **);
110 void pickcmd (char **);
111 void replcmd (char **);
112 void rmmcmd (char **);
113 void scancmd (char **);
114 void sortcmd (char **);