/* * SHELL.H * * (c)1986 Matthew Dillon 9 October 1986 * * * SHELL include file.. contains shell parameters and extern's * * Version 2.07M by Steve Drew 10-Sep-87 * * Version 3.02A by Carlo Borreo & Cesare Dieni 20-Dec-88 * */ #define RAW_CONSOLE 1 /* Set to 0 to compile out Cmd Line Editing */ #include #include #include #include #include #include #include #include "shellfunctions.h" #include #include #include typedef struct FileInfoBlock FIB; #define bmov movmem #define MAXAV 256 /* Max. # arguments */ #define MAXSRC 5 /* Max. # of source file levels */ #define MAXIF 10 /* Max. # of if levels */ #define MAXALIAS 20 /* Max. # of alias levels */ #define MAXMYFILES 9 /* Max. # of internal files */ #define LEVEL_SET 0 /* which variable list to use */ #define LEVEL_ALIAS 1 #define LEVEL_LABEL 2 /* EXECOM.C defines */ #define FL_DOLLAR 0x01 /* One of the following */ #define FL_BANG 0x02 #define FL_PERCENT 0x04 #define FL_QUOTE 0x08 #define FL_IDOLLAR 0x10 /* Any or all of the following may be set */ #define FL_EOC 0x20 #define FL_EOL 0x40 #define FL_OVERIDE 0x80 #define FL_WILD 0x100 #define FL_MASK (FL_DOLLAR|FL_BANG|FL_PERCENT|FL_QUOTE) #ifndef NULL #define NULL 0L #endif #define CHECKBREAK() dobreak() #ifndef AZTEC_C struct _dev { long fd; short mode; }; #endif struct HIST { struct HIST *next, *prev; /* doubly linked list */ char *line; /* line in history */ }; struct PERROR { int errnum; /* Format of global error lookup */ char *errstr; }; struct DPTR { /* Format of directory fetch pointer */ BPTR lock; /* lock on directory */ FIB *fib; /* mod'd fib for entry */ }; extern struct HIST *H_head, *H_tail; extern struct PERROR Perror[]; extern struct DPTR *dopen(); extern char *set_var(), *get_var(), *next_word(); extern char *get_history(), *compile_av(), *get_pwd(); extern char *malloc(), *strcpy(), *strcat(), *index(); extern char **expand(); extern char *av[]; extern char *Current; extern int H_len, H_tail_base, H_stack; extern int E_stack; extern int Src_stack, If_stack, forward_goto; extern int ac; extern int debug, Rval, Verbose, disable, Quit; extern int Lastresult; extern int Exec_abortline; extern int S_histlen; extern unsigned int options; extern long Cin, Cout, Cout_append; extern char *Cin_name, *Cout_name; extern char Cin_type, Cout_type; /* these variables are in transition */ extern char *Pipe1, *Pipe2; extern long Errno; extern long Src_base[MAXSRC]; extern long Src_pos[MAXSRC]; extern char If_base[MAXIF]; extern struct Process *Myprocess; extern struct CommandLineInterface *Mycli; extern long atol(), Atol(), myatol();