/* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that this notice is preserved and that due credit is given * to the University of California at Berkeley. The name of the University * may not be used to endorse or promote products derived from this * software without specific prior written permission. This software * is provided ``as is'' without express or implied warranty. * * @(#)value.h 3.6 (Berkeley) 02/21/88 */ struct value { char v_type; union { int V_num; char *V_str; } v_un; }; #define v_num v_un.V_num #define v_str v_un.V_str #define V_NUM 1 #define V_STR 2 #define V_ERR 3 #define val_free(v) ((v).v_type == V_STR ? str_free((v).v_str) : 0)