2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: shnodes.h /main/3 1995/11/01 16:43:01 rswiston $ */
24 /***************************************************************
26 * AT&T - PROPRIETARY *
28 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF *
29 * AT&T BELL LABORATORIES *
30 * AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN *
31 * ACCORDANCE WITH APPLICABLE AGREEMENTS *
33 * Copyright (c) 1995 AT&T Corp. *
34 * Unpublished & Not for Publication *
35 * All Rights Reserved *
37 * The copyright notice above does not evidence any *
38 * actual or intended publication of such source code *
40 * This software was created by the *
41 * Advanced Software Technology Department *
42 * AT&T Bell Laboratories *
44 * For further information contact *
45 * {research,attmail}!dgk *
47 ***************************************************************/
49 /* : : generated by proto : : */
52 #if !defined(__PROTO__)
53 #if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
54 #if defined(__cplusplus)
55 #define __MANGLE__ "C"
60 #define __PROTO__(x) x
62 #define __PARAM__(n,o) n
63 #if !defined(__STDC__) && !defined(__cplusplus)
64 #if !defined(c_plusplus)
75 #define __PROTO__(x) ()
76 #define __OTORP__(x) x
77 #define __PARAM__(n,o) o
85 #if defined(__cplusplus) || defined(c_plusplus)
86 #define __VARARG__ ...
90 #if defined(__STDARG__)
91 #define __VA_START__(p,a) va_start(p,a)
93 #define __VA_START__(p,a) va_start(p)
100 * Written by David Korn
108 /* command tree for tretyp */
109 #define FINT (02<<COMBITS) /* non-interruptable */
110 #define FAMP (04<<COMBITS) /* background */
111 #define FPIN (010<<COMBITS) /* input is a pipe */
112 #define FPOU (040<<COMBITS) /* output is a pipe */
113 #define FPCL (0100<<COMBITS) /* close the pipe */
114 #define FCOOP (0200<<COMBITS) /* cooperating process */
115 #define FPOSIX (02<<COMBITS) /* posix semantics function */
117 #define TNEGATE (01<<COMBITS) /* ! inside [[...]] */
118 #define TBINARY (02<<COMBITS) /* binary operator in [[...]] */
119 #define TUNARY (04<<COMBITS) /* unary operator in [[...]] */
120 #define TTEST (010<<COMBITS)
121 #define TPAREN (TBINARY|TUNARY)
122 #define TSHIFT (COMBITS+4)
130 #define TUN (TWH|COMSCAN)
137 #define TSELECT (TFOR|COMSCAN)
143 /* this node is a proforma for those that follow */
155 struct ionod *forkio;
156 union anynode *forktre;
164 union anynode *iftre;
165 union anynode *thtre;
166 union anynode *eltre;
172 union anynode *whtre;
173 union anynode *dotre;
174 struct arithnod *whinc;
180 union anynode *fortre;
182 struct comnod *forlst;
188 struct argnod *swarg;
189 struct regnod *swlst;
194 struct argnod *regptr;
195 union anynode *regcom;
196 struct regnod *regnxt;
203 union anynode *partre;
209 union anynode *lstlef;
210 union anynode *lstrit;
213 /* tst is same as lst, but with extra field for line number */
216 struct lstnod tstlst;
224 union anynode *functtre;
227 struct slnod *functstak;
228 struct comnod *functargs;
235 struct argnod *arexpr;
239 /* types of ionodes stored in iofile */
240 #define IOUFD 0x3f /* file descriptor number mask */
241 #define IOPUT 0x40 /* > redirection operator */
242 #define IOAPP 0x80 /* >> redirection operator */
243 #define IODOC 0x100 /* << redirection operator */
244 #define IOMOV 0x200 /* <& or >& operators */
245 #define IOCLOB 0x400 /* noclobber bit */
246 #define IORDW 0x800 /* <> redirection operator */
247 #define IORAW 0x1000 /* no expansion needed for filename */
248 #define IOSTRG 0x2000 /* here-document stored as incore string */
249 #define IOSTRIP 0x4000 /* strip leading tabs for here-document */
250 #define IOQUOTE 0x8000 /* here-document delimiter was quoted */
268 struct functnod funct;
272 extern __MANGLE__ void sh_freeup __PROTO__((void));
273 extern __MANGLE__ void sh_funstaks __PROTO__((struct slnod*,int));
274 extern __MANGLE__ int sh_exec __PROTO__((const union anynode*,int));
275 extern __MANGLE__ union anynode *sh_dolparen __PROTO__((void));
277 extern __MANGLE__ int kiaclose __PROTO__((void));
278 #endif /* SHOPT_KIA */
280 #endif /* _SHNODES_H */