|
|
1.1 ! root 1: /* ! 2: * @(#)value.h 3.5 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 value { ! 12: char v_type; ! 13: union { ! 14: int V_num; ! 15: char *V_str; ! 16: } v_un; ! 17: }; ! 18: #define v_num v_un.V_num ! 19: #define v_str v_un.V_str ! 20: ! 21: #define V_NUM 1 ! 22: #define V_STR 2 ! 23: #define V_ERR 3 ! 24: ! 25: #define val_free(v) ((v).v_type == V_STR ? str_free((v).v_str) : 0)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.