home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * GLOBALS.C
- *
- * (c)1986 Matthew Dillon 9 October 1986
- *
- * Version 2.07M by Steve Drew 10-Sep-87
- *
- * Most global variables.
- *
- * Version 3.03A by Carlo Borreo & Cesare Dieni 12-May-89
- *
- */
-
- char *v_titlebar="_titlebar"; /* Window title */
- char *v_prompt ="_prompt"; /* your prompt (ascii command) */
- char *v_hist ="_history"; /* set history depth (value) */
- char *v_histnum ="_histnum"; /* set history numbering var */
- char *v_debug ="_debug"; /* set debug mode */
- char *v_verbose ="_verbose"; /* set verbose for source files */
- char *v_stat ="_maxerr"; /* worst return value to date */
- char *v_lasterr ="_lasterr"; /* return value from last comm. */
- char *v_cwd ="_cwd"; /* current directory */
- char *v_except ="_except"; /* "nnn;command" */
- char *v_passed ="_passed"; /* passed arguments to source file */
- char *v_path ="_path"; /* search path for external commands */
- char *v_gotofwd ="_gtf"; /* set name for fwd goto name */
-
- struct HIST *H_head, *H_tail; /* HISTORY lists */
-
- struct PERROR Perror[]= { /* error code->string */
- 103, "Insufficient free storage",
- 105, "Task table full",
- 120, "Argument line invalid or too long",
- 121, "File is not an object module",
- 122, "Invalid resident library during load",
- 201, "No default directory",
- 202, "Object in use",
- 203, "Object already exists",
- 204, "Directory not found",
- 205, "Object not found",
- 206, "Bad stream name",
- 207, "Object too large",
- 209, "Action not known",
- 210, "Invalid stream component name",
- 211, "Invalid object lock",
- 212, "Object not of required type",
- 213, "Disk not validated",
- 214, "Disk write protected",
- 215, "Rename across devices",
- 216, "Directory not empty",
- 217, "Too many levels",
- 218, "Device not mounted",
- 219, "Seek error",
- 220, "Comment too long",
- 221, "Disk full",
- 222, "File delete protected",
- 223, "File write protected",
- 224, "File read protected",
- 225, "Not a DOS disk",
- 226, "No disk",
-
- /* custom error messages */
-
- 500, "Bad arguments",
- 501, "Label not found",
- 502, "Must be within source file",
- 503, "Syntax Error",
- 504, "Redirection error",
- 505, "Pipe error",
- 506, "Too many arguments",
- 507, "Destination not a directory",
- 508, "Cannot mv a filesystem",
- 509, "Error in command name",
- 510, "Bad drive name",
- 511, "Illegal number",
- 0, NULL
- };
-
- char *av[MAXAV]; /* Internal argument list */
- long Src_base[MAXSRC]; /* file pointers for source files */
- long Src_pos[MAXSRC]; /* seek position storage for same */
- char If_base[MAXIF]; /* If/Else stack for conditionals */
- int H_len, H_tail_base; /* History associated stuff */
- int H_stack; /* AddHistory disable stack */
- int E_stack; /* Exception disable stack */
- int Src_stack, If_stack; /* Stack Indexes */
- int forward_goto; /* Flag for searching for foward lables */
- int ac; /* Internal argc */
- int debug; /* Debug mode */
- int disable; /* Disable com. execution (conditionals)*/
- int Verbose; /* Verbose mode for source files */
- int Lastresult; /* Last return code */
- int Exec_abortline; /* flag to abort rest of line */
- int Quit; /* Quit flag */
- long Cout, Cin; /* Current input and output file handles*/
- long Cout_append; /* append flag for Cout */
- char *Cin_name, *Cout_name; /* redirection input/output name or NULL*/
- char *Pipe1, *Pipe2; /* the two pipe temp. files */
- struct Process *Myprocess;
- struct CommandLineInterface *Mycli;
- int S_histlen = 20; /* Max # history entries */
- unsigned int options;
-