home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff331.lzh / Csh / src / globals.c < prev    next >
C/C++ Source or Header  |  1990-03-21  |  4KB  |  105 lines

  1.  
  2. /*
  3.  * GLOBALS.C
  4.  *
  5.  * (c)1986 Matthew Dillon     9 October 1986
  6.  *
  7.  * Version 2.07M by Steve Drew 10-Sep-87
  8.  *
  9.  *    Most global variables.
  10.  *
  11.  * Version 4.01A by Carlo Borreo & Cesare Dieni 17-Feb-90
  12.  *
  13.  */
  14.  
  15. char v_titlebar    []="_titlebar";    /* Window title                */
  16. char v_prompt    []="_prompt";    /* your prompt (ascii command)        */
  17. char v_hist    []="_history";    /* set history depth (value)        */
  18. char v_histnum    []="_histnum";    /* set history numbering var        */
  19. char v_debug    []="_debug";    /* set debug mode            */
  20. char v_verbose    []="_verbose";    /* set verbose for source files        */
  21. char v_stat    []="_maxerr";    /* worst return value to date        */
  22. char v_lasterr    []="_lasterr";    /* return value from last comm.        */
  23. char v_cwd    []="_cwd";    /* current directory            */
  24. char v_except    []="_except";    /* "nnn;command"            */
  25. char v_passed    []="_passed";    /* passed arguments to source file    */
  26. char v_path    []="_path";    /* search path for external commands    */
  27. char v_gotofwd    []="_gtf";    /* set name for fwd goto name        */
  28. char v_linenum    []="_linenum";    /* name for forline line #        */
  29.  
  30. struct HIST *H_head, *H_tail;    /* HISTORY lists */
  31.  
  32. struct PERROR Perror[]= {    /* error code->string */
  33.     103,    "Insufficient free storage",
  34.     105,    "Task table full",
  35.     120,    "Argument line invalid or too long",
  36.     121,    "File is not an object module",
  37.     122,    "Invalid resident library during load",
  38.     201,    "No default directory",
  39.     202,    "Object in use",
  40.     203,    "Object already exists",
  41.     204,    "Directory not found",
  42.     205,    "Object not found",
  43.     206,    "Bad stream name",
  44.     207,    "Object too large",
  45.     209,    "Action not known",
  46.     210,    "Invalid stream component name",
  47.     211,    "Invalid object lock",
  48.     212,    "Object not of required type",
  49.     213,    "Disk not validated",
  50.     214,    "Disk write protected",
  51.     215,    "Rename across devices",
  52.     216,    "Directory not empty",
  53.     217,    "Too many levels",
  54.     218,    "Device not mounted",
  55.     219,    "Seek error",
  56.     220,    "Comment too long",
  57.     221,    "Disk full",
  58.     222,    "File delete protected",
  59.     223,    "File write protected",
  60.     224,    "File read protected",
  61.     225,    "Not a DOS disk",
  62.     226,    "No disk",
  63.  
  64.  /* custom error messages */
  65.  
  66.     500,    "Bad arguments",
  67.     501,    "Label not found",
  68.     502,    "Must be within source file",
  69.     503,    "Syntax Error",
  70.     504,    "Redirection error",
  71.     505,    "Pipe error",
  72.     506,    "Too many arguments",
  73.     507,    "Destination not a directory",
  74.     508,    "Cannot mv a filesystem",
  75.     509,    "Error in command name",
  76.     510,    "Bad drive name",
  77.     511,    "Illegal number",
  78.     0,    NULL
  79. };
  80.  
  81. char *av[MAXAV];        /* Internal argument list        */
  82. long Src_base[MAXSRC];        /* file pointers for source files    */
  83. long Src_pos[MAXSRC];        /* seek position storage for same    */
  84. char If_base[MAXIF];        /* If/Else stack for conditionals    */
  85. int H_len, H_tail_base;        /* History associated stuff        */
  86. int H_stack;            /* AddHistory disable stack        */
  87. int E_stack;            /* Exception disable stack        */
  88. int Src_stack, If_stack;    /* Stack Indexes            */
  89. int forward_goto;        /* Flag for searching for foward lables    */
  90. int ac;                /* Internal argc            */
  91. int debug;            /* Debug mode                */
  92. int disable;            /* Disable com. execution (conditionals)*/
  93. int Verbose;            /* Verbose mode for source files    */
  94. int Lastresult;            /* Last return code            */
  95. int Exec_abortline;        /* flag to abort rest of line        */
  96. int Quit;            /* Quit flag                */
  97. long Cout, Cin;            /* Current input and output file handles*/
  98. long Cout_append;        /* append flag for Cout            */
  99. char *Cin_name, *Cout_name;    /* redirection input/output name or NULL*/
  100. char *Pipe1, *Pipe2;        /* the two pipe temp. files        */
  101. struct Process *Myprocess;
  102. struct CommandLineInterface *Mycli;
  103. int S_histlen = 20;        /* Max # history entries        */
  104. unsigned int options;
  105.