8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sh / defs.c
blob8a6b6afc6358316892d6a0d26156d220c8037f08
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 * UNIX shell
34 #include <setjmp.h>
35 #include "mode.h"
36 #include "name.h"
37 #include <sys/param.h>
38 #ifndef NOFILE
39 #define NOFILE 20
40 #endif
41 /* temp files and io */
43 int output = 2;
44 int ioset;
45 struct ionod *iotemp; /* files to be deleted sometime */
46 struct ionod *fiotemp; /* function files to be deleted sometime */
47 struct ionod *iopend; /* documents waiting to be read at NL */
48 struct fdsave fdmap[NOFILE];
50 /* substitution */
51 int dolc;
52 unsigned char **dolv;
53 struct dolnod *argfor;
54 struct argnod *gchain;
57 /* name tree and words */
58 int wdval;
59 int wdnum;
60 int fndef;
61 int nohash;
62 struct argnod *wdarg;
63 int wdset;
64 BOOL reserv;
66 /* special names */
67 unsigned char *pcsadr;
68 unsigned char *pidadr;
69 unsigned char *cmdadr;
71 /* transput */
72 int tmpout_offset;
73 unsigned int serial;
74 unsigned peekc;
75 unsigned peekn;
76 unsigned char *comdiv;
77 long flags;
78 int rwait; /* flags read waiting */
80 /* error exits from various parts of shell */
81 jmp_buf subshell;
82 jmp_buf errshell;
84 /* fault handling */
85 BOOL trapnote;
87 /* execflgs */
88 int exitval;
89 int retval;
90 BOOL execbrk;
91 int loopcnt;
92 int breakcnt;
93 int funcnt;
94 int eflag;
96 * The following flag is set if you try to exit with stopped jobs.
97 * On the second try the exit will succeed.
99 int tried_to_exit;
101 * The following flag is set to true if /usr/ucb is found in the path
102 * before /usr/bin. This value is checked when executing the echo and test
103 * built-in commands. If true, the command behaves as in BSD systems.
105 int ucb_builtins;
107 /* The following stuff is from stak.h */
109 unsigned char *stakbas;
110 unsigned char *staktop;
111 unsigned char *stakbot = 0;
112 struct blk *stakbsy;
113 unsigned char *brkend;