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