115572Sedward /* 2*62471Sbostic * Copyright (c) 1983, 1993 3*62471Sbostic * The Regents of the University of California. All rights reserved. 433514Sbostic * 542954Sbostic * This code is derived from software contributed to Berkeley by 642954Sbostic * Edward Wang at The University of California, Berkeley. 742954Sbostic * 842835Sbostic * %sccs.include.redist.c% 933514Sbostic * 10*62471Sbostic * @(#)var.h 8.1 (Berkeley) 06/06/93 1115572Sedward */ 1215572Sedward 1315572Sedward struct var { 1415572Sedward struct var *r_left; 1515572Sedward struct var *r_right; 1615572Sedward char *r_name; 1715572Sedward struct value r_val; 1815572Sedward }; 1915572Sedward 2016449Sedward struct var *var_set1(); 2116449Sedward struct var *var_setstr1(); 2216449Sedward struct var *var_setnum1(); 2315842Sedward struct var **var_lookup1(); 2415572Sedward 2516449Sedward #define var_set(n, v) var_set1(&var_head, n, v) 2616449Sedward #define var_setstr(n, s) var_setstr1(&var_head, n, s) 2716449Sedward #define var_setnum(n, i) var_setnum1(&var_head, n, i) 2816449Sedward #define var_unset(n) var_unset1(&var_head, n) 2916449Sedward #define var_lookup(n) (*var_lookup1(&var_head, n)) 3016449Sedward #define var_walk(f, a) var_walk1(var_head, f, a) 3115669Sedward 3215572Sedward struct var *var_head; /* secret, shhh */ 33