/*********************************************************************** * * * This software is part of the ast package * * Copyright (c) 1982-2007 AT&T Intellectual Property * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Intellectual Property * * * * A copy of the License is available at * * http://www.opensource.org/licenses/cpl1.0.txt * * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * * * * Information and Software Systems Research * * AT&T Research * * Florham Park NJ * * * * David Korn * * * ***********************************************************************/ #pragma prototyped #ifndef _SHNODES_H #define _SHNODES_H 1 /* * UNIX shell * Written by David Korn * */ #include #include "argnod.h" /* command tree for tretyp */ #define FINT (02< redirection operator */ #define IOAPP 0x80 /* >> redirection operator */ #define IODOC 0x100 /* << redirection operator */ #define IOMOV 0x200 /* <& or >& operators */ #define IOCLOB 0x400 /* noclobber bit */ #define IORDW 0x800 /* <> redirection operator */ #define IORAW 0x1000 /* no expansion needed for filename */ #define IOSTRG 0x2000 /* here-document stored as incore string */ #define IOSTRIP 0x4000 /* strip leading tabs for here-document */ #define IOQUOTE 0x8000 /* here-document delimiter was quoted */ #define IOVNM 0x10000 /* iovname field is non-zero */ #define IOLSEEK 0x20000 /* seek operators <# or ># */ #define IOARITH 0x40000 /* arithmetic seek <# ((expr)) */ #define IOCOPY IOCLOB /* copy skipped lines onto standard output */ union Shnode_u { struct argnod arg; struct ionod io; struct whnod wh; struct swnod sw; struct ifnod if_; struct dolnod dol; struct comnod com; struct trenod tre; struct forknod fork; struct fornod for_; struct regnod reg; struct parnod par; struct lstnod lst; struct tstnod tst; struct functnod funct; struct arithnod ar; }; extern void sh_freeup(void); extern void sh_funstaks(struct slnod*,int); extern Sfio_t *sh_subshell(Shnode_t*, int, int); #if defined(__EXPORT__) && defined(_BLD_DLL) && defined(_BLD_shell) __EXPORT__ #endif extern int sh_tdump(Sfio_t*, const Shnode_t*); extern Shnode_t *sh_dolparen(void); extern Shnode_t *sh_trestore(Sfio_t*); #if SHOPT_KIA extern int kiaclose(void); extern unsigned long kiaentity(const char*,int,int,int,int,unsigned long,int,int,const char*); #endif /* SHOPT_KIA */ #endif /* _SHNODES_H */