Commit | Line | Data |
---|---|---|
9cb8207d | 1 | /* |
60de5df9 EW |
2 | * @(#)value.h 3.5 %G% |
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. | |
9cb8207d EW |
9 | */ |
10 | ||
11 | struct value { | |
12 | char v_type; | |
9cb8207d EW |
13 | union { |
14 | int V_num; | |
15 | char *V_str; | |
9cb8207d EW |
16 | } v_un; |
17 | }; | |
18 | #define v_num v_un.V_num | |
19 | #define v_str v_un.V_str | |
9cb8207d EW |
20 | |
21 | #define V_NUM 1 | |
22 | #define V_STR 2 | |
fc23f79c | 23 | #define V_ERR 3 |
b5110448 EW |
24 | |
25 | #define val_free(v) ((v).v_type == V_STR ? str_free((v).v_str) : 0) |