|
|
1.1 ! root 1: /* ! 2: * @(#)var.h 3.7 4/24/85 ! 3: */ ! 4: ! 5: /* ! 6: * Copyright (c) 1983 Regents of the University of California, ! 7: * All rights reserved. Redistribution permitted subject to ! 8: * the terms of the Berkeley Software License Agreement. ! 9: */ ! 10: ! 11: struct var { ! 12: struct var *r_left; ! 13: struct var *r_right; ! 14: char *r_name; ! 15: struct value r_val; ! 16: }; ! 17: ! 18: struct var *var_set1(); ! 19: struct var *var_setstr1(); ! 20: struct var *var_setnum1(); ! 21: struct var **var_lookup1(); ! 22: ! 23: #define var_set(n, v) var_set1(&var_head, n, v) ! 24: #define var_setstr(n, s) var_setstr1(&var_head, n, s) ! 25: #define var_setnum(n, i) var_setnum1(&var_head, n, i) ! 26: #define var_unset(n) var_unset1(&var_head, n) ! 27: #define var_lookup(n) (*var_lookup1(&var_head, n)) ! 28: #define var_walk(f, a) var_walk1(var_head, f, a) ! 29: ! 30: struct var *var_head; /* secret, shhh */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.