* Copyright (c) 1991 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
* @(#)var.h 5.1 (Berkeley) %G%
#define VEXPORT 01 /* variable is exported */
#define VREADONLY 02 /* variable cannot be modified */
#define VSTRFIXED 04 /* variable struct is staticly allocated */
#define VTEXTFIXED 010 /* text is staticly allocated */
#define VSTACK 020 /* text is allocated on the stack */
#define VUNSET 040 /* the variable is not set */
struct var
*next
; /* next entry in hash list */
int flags
; /* flags are defined above */
char *text
; /* name=value */
struct localvar
*next
; /* next local variable in list */
struct var
*vp
; /* the variable that was made local */
int flags
; /* saved flags */
char *text
; /* saved text */
struct localvar
*localvars
;
extern struct var vmpath
;
* The following macros access the values of the above variables.
* They have to skip over the name. They return the null string
#define ifsval() (vifs.text + 4)
#define mailval() (vmail.text + 5)
#define mpathval() (vmpath.text + 9)
#define pathval() (vpath.text + 5)
#define ps1val() (vps1.text + 4)
#define ps2val() (vps2.text + 4)
#define termval() (vterm.text + 5)
#define attyset() ((vatty.flags & VUNSET) == 0)
#define mpathset() ((vmpath.flags & VUNSET) == 0)
void setvar(char *, char *, int);
void setvareq(char *, int);
void listsetvar(struct strlist
*);
char *bltinlookup(char *, int);
int showvarscmd(int, char **);