#pragma prototyped
#ifndef ARG_RAW
#include <stak.h>
struct ionod
{
unsigned iofile;
char *ioname;
struct ionod *ionxt;
struct ionod *iolst;
char *iodelim;
off_t iooffset;
long iosize;
char *iovname;
};
struct comnod
{
int comtyp;
struct ionod *comio;
struct argnod *comarg;
struct argnod *comset;
void *comnamp;
void *comnamq;
void *comstate;
int comline;
};
#define COMBITS 4
#define COMMSK ((1<<COMBITS)-1)
#define COMSCAN (01<<COMBITS)
#define COMFIXED (02<<COMBITS)
struct slnod
{
struct slnod *slnext;
struct slnod *slchild;
Stak_t *slptr;
};
struct dolnod
{
short dolrefcnt;
short dolmax;
short dolnum;
short dolbot;
struct dolnod *dolnxt;
char *dolval[1];
};
struct argnod
{
union
{
struct argnod *ap;
char *cp;
} argnxt;
union
{
struct argnod *ap;
char *cp;
int len;
} argchn;
unsigned char argflag;
char argval[4];
};
#define ARGVAL offsetof(struct argnod,argval[0])
#define sh_argstr(ap) ((ap)->argflag&ARG_RAW?sh_fmtq((ap)->argval):(ap)->argval)
#define ARG_SPARE 1
#define ARG_RAW 0x1
#define ARG_MAKE 0x2
#define ARG_COMSUB 0x2
#define ARG_MAC 0x4
#define ARG_EXP 0x8
#define ARG_ASSIGN 0x10
#define ARG_QUOTED 0x20
#define ARG_MESSAGE 0x40
#define ARG_APPEND 0x80
#define ARG_ARITH 0x100
#define ARG_OPTIMIZE 0x200
#define ARG_NOGLOB 0x400
#define ARG_LET 0x800
#define ARG_ARRAYOK 0x1000
extern char **sh_argbuild(int*,const struct comnod*,int);
extern struct dolnod *sh_argcreate(char*[]);
extern char *sh_argdolminus(void);
extern struct dolnod *sh_argfree(struct dolnod*,int);
extern struct dolnod *sh_argnew(char*[],struct dolnod**);
extern int sh_argopts(int,char*[]);
extern void sh_argreset(struct dolnod*,struct dolnod*);
extern void sh_argset(char*[]);
extern struct dolnod *sh_arguse(void);
extern const char e_heading[];
extern const char e_off[];
extern const char e_on[];
extern const char e_sptbnl[];
extern const char e_subst[];
extern const char e_option[];
extern const char e_exec[];
extern const char e_devfdNN[];
extern const char e_devfdstd[];
#endif