|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T v
Length: 1456 (0x5b0) Types: TextFile Names: »variables.h«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦ca1f037a2⟧ »./bash-1.04.tar.Z« └─⟦46465a4db⟧ └─⟦this⟧ »bash-1.04/variables.h«
/* variables.h -- data structures for shell variables. */ /* What a shell variable looks like. */ typedef struct variable { struct variable *next; /* Next variable in the list. */ char *name; /* Symbol that the user types. */ char *value; /* Value that is returned. */ int attributes; /* export, readonly, function, invisible... */ int context; /* Which context this variable belongs to. */ struct variable *prev_context; /* Value from previous context or NULL. */ } SHELL_VAR; /* The various attributes that a given variable can have. We only reserve one byte of the INT. */ #define att_exported 0x01 /* %00000001 (export to environment) */ #define att_readonly 0x02 /* %00000010 (cannot change) */ #define att_invisible 0x04 /* %00000100 (cannot see) */ #define att_function 0x08 /* %00001000 (value is a function) */ #define att_nounset 0x10 /* %00010000 (cannot unset) */ #define exported_p(var) ((((var)->attributes) & (att_exported))) #define readonly_p(var) ((((var)->attributes) & (att_readonly))) #define invisible_p(var) ((((var)->attributes) & (att_invisible))) #define function_p(var) ((((var)->attributes) & (att_function))) /* Stuff for hacking variables. */ extern SHELL_VAR *variable_list, *bind_variable (), *find_variable (); extern SHELL_VAR *bind_function (), *copy_variable (); extern char *get_string_value (), *dollar_vars[]; extern char **export_env; extern int variable_context;