3 * msh.h -- definitions for msh
7 #define STDIO 0 /* regular stdoutput */
8 #define CRTIO 1 /* create re-direct */
9 #define APPIO 2 /* append re-direct */
10 #define PIPIO 3 /* pipe re-direct */
20 #define NULLCMD ((struct Cmd *) 0)
22 #define MHNCHK 0x0001 /* did nontext check */
23 #define MHNYES 0x0002 /* .. and known to be non-text */
25 #define CUR (1 << (FFATTRSLOT + NUMATTRS - 1))
28 # define VIRTUAL SELECT_EMPTY
30 # define is_virtual(mp,msgnum) ((mp)->msgstats[msgnum] & VIRTUAL)
31 # define unset_virtual(mp,msgnum) ((mp)->msgstats[msgnum] &= ~VIRTUAL)
32 # define set_virtual(mp,msgnum) ((mp)->msgstats[msgnum] |= VIRTUAL)
43 #define m_bboard_id m_drop.d_id
44 #define m_top m_drop.d_size
45 #define m_start m_drop.d_start
46 #define m_stop m_drop.d_stop
51 extern char *fmsh; /* folder instead of file */
52 extern int modified; /* command modified folder */
53 extern struct msgs *mp; /* used a lot */
54 extern struct Msg *Msgs; /* Msgs[0] not used */
61 extern int interactive; /* running from a /dev/tty */
62 extern int redirected; /* re-directing output */
63 extern FILE *sp; /* original stdout */
64 extern char *cmd_name; /* command being run */
65 extern char myfilter[]; /* path to mhl.forward */
67 extern char *BBoard_ID; /* BBoard-ID constant */
72 extern SIGNAL_HANDLER istat; /* original SIGINT */
73 extern SIGNAL_HANDLER qstat; /* original SIGQUIT */
74 extern int interrupted; /* SIGINT detected */
75 extern int broken_pipe; /* SIGPIPE detected */
76 extern int told_to_quit; /* SIGQUIT detected */
87 void display_info (int);
89 void forkcmd (char **s, char *);
90 void distcmd (char **);
91 void explcmd (char **);
92 int filehak (char **);
93 void filecmd (char **);
94 void foldcmd (char **);
95 void forwcmd (char **);
96 void helpcmd (char **);
97 void markcmd (char **);
98 void mhncmd (char **);
99 void showcmd (char **);
100 int pack (char *, int, int);
101 int packhak (char **);
102 void packcmd (char **);
103 void pickcmd (char **);
104 void replcmd (char **);
105 void rmmcmd (char **);
106 void scancmd (char **);
107 void sortcmd (char **);