home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
back2roots/padua
/
padua.7z
/
padua
/
shell
/
csh531s.lha
/
globals.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-06
|
5KB
|
140 lines
/*
* GLOBALS.C
*
* (c)1986 Matthew Dillon 9 October 1986
*
* Most global variables.
*
* Version 2.07M by Steve Drew 10-Sep-87
* Version 4.01A by Carlo Borreo & Cesare Dieni 17-Feb-90
* Version 5.00L by Urban Mueller 17-Feb-91
* Version 5.20L by Andreas M. Kirchwitz (Fri, 13 Mar 1992)
*
*/
#include "shell.h"
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_every []="_every"; /* executed before prompt */
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 */
char v_linenum []="_linenum"; /* name for forline line # */
char v_lcd []="_lcd"; /* last current directory */
char v_rxpath []="_rxpath"; /* path for .rexx commands */
char v_hilite []="_hilite"; /* hilighting escape sequence */
char v_scroll []="_scroll"; /* scroll jump in fast mode */
char v_minrows []="_minrows"; /* minimum # of rows for fast scroll */
char v_result []="_result"; /* result from rxsend */
char v_qcd []="_qcd"; /* file name for csh-qcd */
char v_noreq []="_noreq"; /* turn off system requesters */
char v_value []="_value"; /* return value of a function */
char v_nobreak []="_nobreak"; /* disabling of ^C */
char v_bground []="_bground"; /* started in background */
char v_pipe []="_pipe"; /* path for pipes */
char v_datefmt []="_datefmt"; /* format of dates */
char v_ioerr []="_ioerr"; /* last secondary result */
char v_abbrev []="_abbrev"; /* disable command abbreviations */
char v_rback []="_rback"; /* command to be used for '&' */
char v_insert []="_insert"; /* insert mode */
char v_failat []="_failat"; /* batch file fail level */
char v_clipri []="_clipri"; /* command line priority */
char v_dirformat[]="_dirformat";/* format string for "dir" command */
char v_nomatch []="_nomatch"; /* don't abort if pattern doesn't match */
HIST *H_head, *H_tail; /* HISTORY lists */
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 in drive",
/* 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",
512, "Out of memory",
513, "User interrupt",
0, NULL
};
char **av; /* Internal argument list */
FILE *Src_base[MAXSRC]; /* file pointers for source files */
long Src_pos[MAXSRC]; /* seek position storage for same */
short Src_if[MAXSRC]; /* the if level at batch file start */
short Src_abort[MAXSRC]; /* abort this batch file */
char If_base[MAXIF]; /* If/Else stack for conditionals */
int H_len, H_tail_base; /* History associated stuff */
int H_stack, H_num; /* 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 max_ac=256; /* Maximum # of args (increasable) */
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 */
char stdin_redir; /* stdin is redirected */
char stdout_redir; /* stdout is redirected */
char *MyMem;
struct Process *Myprocess;
struct CommandLineInterface *Mycli;
struct DosPacket *Mypacket;
int S_histlen = 20; /* Max # history entries */
unsigned int options;
char Buf[280], confirmed, asked;
CLASS *CRoot, *LastCRoot;
long IoError;