value value_cons_now_arg(int argc, value argv[]) { if (missing_arguments(argc, argv, "cons!()")) return value_init_error(); value_cons_now(argv[0], &argv[1]); return value_init_nil(); }
static PLI_INT32 ivl_method_next_prev_compiletf(ICARUS_VPI_CONST PLI_BYTE8*data) { vpiHandle sys = vpi_handle(vpiSysTfCall, 0); vpiHandle argv = vpi_iterate(vpiArgument, sys); vpiHandle arg_enum, arg_item, arg_extra; if (argv == 0) { missing_arguments(sys); return 0; } arg_enum = vpi_scan(argv); if (arg_enum == 0) { missing_arguments(sys); return 0; } arg_item = vpi_scan(argv); if (arg_item == 0) { missing_arguments(sys); return 0; } /* Make sure there are no excess arguments */ arg_extra = vpi_scan(argv); if (arg_extra != 0) { missing_arguments(sys); vpi_free_object(argv); return 0; } /* The first argument must be an enum typespec */ if (vpi_get(vpiType, arg_enum) != vpiEnumTypespec) { missing_arguments(sys); return 0; } /* The return value and input value must be the same size */ if (vpi_get(vpiSize,sys) != vpi_get(vpiSize,arg_item)) { missing_arguments(sys); return 0; } return 0; }
value value_take_arg(int argc, value argv[]) { return missing_arguments(argc, argv, "take()") ? value_init_error() : value_take(argv[0], argv[1]); }
value value_head_arg(int argc, value argv[]) { return missing_arguments(argc, argv, "head()") ? value_init_error() : value_head(argv[0]); }
value value_drop_arg(int argc, value argv[]) { return missing_arguments(argc, argv, "drop()") ? value_init_error() : value_drop(argv[0], argv[1]); }
value value_cons_arg(int argc, value argv[]) { return missing_arguments(argc, argv, "cons()") ? value_init_error() : value_cons(argv[0], argv[1]); }