1 /* 2 3 * Copyright (c) 1984, 1985, 1986 AT&T 4 * All Rights Reserved 5 6 * THIS IS UNPUBLISHED PROPRIETARY SOURCE 7 * CODE OF AT&T. 8 * The copyright notice above does not 9 * evidence any actual or intended 10 * publication of such source code. 11 12 */ 13 /* @(#)defs.c 1.1 */ 14 /* 15 * Ksh - AT&T Bell Laboratories 16 * Written by David Korn 17 * This file defines all the read/write shell global variables 18 */ 19 20 #include "defs.h" 21 #include "sym.h" 22 #include "io.h" 23 #include "history.h" 24 #include "brkincr.h" 25 #include "flags.h" 26 #include "name.h" 27 #include "jobs.h" 28 #include "edit.h" 29 #include "timeout.h" 30 31 32 struct Amemory *alias; 33 struct State st; 34 BLKPTR blokp; 35 BLKPTR bloktop; 36 NAMPTR bltin_nodes; 37 char *brkbegin; 38 STKPTR brkend; 39 char *comdiv; 40 #ifdef VSH 41 struct edit editb; 42 #else 43 # ifdef ESH 44 struct edit editb; 45 # endif /* ESH */ 46 #endif /* VSH */ 47 jmp_buf errshell; 48 int exitval; 49 struct fixcmd *fc_fix; 50 jmp_buf *freturn; 51 ARGPTR gchain; 52 #ifdef JOBS 53 struct jobs jobstat; 54 #endif /* JOBS */ 55 char *lastarg; 56 int lastbase = 10; 57 long mailchk = 600; 58 long timeout = TIMEOUT; 59 struct Amemory *namep; 60 int oldexit; 61 FILE *output; 62 int parent; 63 char pcsadr[12]; 64 char pidadr[12]; 65 long ppid; 66 struct Amemory *prnames; 67 int savexit; 68 STKPTR stakbas; 69 BLKPTR stakbsy; 70 STKPTR stakbot; 71 STKPTR staktop; 72 FILEBLK stdfile; 73 jmp_buf subshell; 74 char *sysmsg[MAXTRAP]; 75 char tmpout[] = "/tmp/shxxxxxx.aaa"; 76 int topfd; 77 char *trapcom[MAXTRAP+1]; 78 BOOL trapnote; 79 BOOL login_sh; 80 int userid; 81 int subflag; 82 int wdnum; 83 ARGPTR wdarg; 84 int wdval; 85 86 #ifdef NOBUF 87 unsigned char _sibuf[BUFSIZ]; 88 unsigned char _sobuf[BUFSIZ]; 89 #endif /* NOBUF */ 90