+ struct value rv;
+
+ if (type)
+ return type->init(type);
+ rv.type = type;
+ return rv;
+ }
+
+ static struct value dup_value(struct value v)
+ {
+ if (v.type)
+ return v.type->dup(v);
+ return v;
+ }
+
+ static int value_cmp(struct value left, struct value right)
+ {
+ if (left.type && left.type->cmp_order)
+ return left.type->cmp_order(left, right);
+ if (left.type && left.type->cmp_eq)
+ return left.type->cmp_eq(left, right);
+ return -1;
+ }
+
+ static void print_value(struct value v)
+ {
+ if (v.type && v.type->print)
+ v.type->print(v);
+ else
+ printf("*Unknown*");
+ }
+
+ static struct value parse_value(struct type *type, char *arg)
+ {
+ struct value rv;
+
+ if (type && type->parse)
+ return type->parse(type, arg);
+ rv.type = NULL;
+ return rv;