Lines Matching defs:cx
129 validate_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc)
153 sfprintf(cx->buf, "%s%s", strchr(dss_lib_validate.description, '['), validate_usage);
154 s = sfstruse(cx->buf);
166 if (!(state->setf = cxcallout(cx, CX_SET, cx->state->type_void, cx->state->type_void, cx->disc)))
168 if (cx->disc->errorf)
169 (*cx->disc->errorf)(NiL, cx->disc, 3, "reair requires CX_SET callout");
203 if (!(variable = (Cxvariable_t*)(variable ? dtnext(cx->fields, variable) : dtfirst(cx->fields))))
206 else if (!(variable = cxvariable(cx, *argv, NiL, disc)))
258 if (!(state->getf = cxcallout(cx, CX_GET, cx->state->type_void, cx->state->type_void, cx->disc)))
260 if (cx->disc->errorf)
261 (*cx->disc->errorf)(NiL, cx->disc, 3, "validation requires CX_GET callout");
269 if (cx->disc->errorf)
270 (*cx->disc->errorf)(NiL, cx->disc, 3, "validation requires CX_GET callout");
282 validate_sel(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc)
296 if ((*state->getf)(cx, &x, &o, NiL, NiL, data, disc))
302 if (cxstr2num(cx, &field->variable->format, o.value.string.data, o.value.string.size, NiL))
305 (*disc->errorf)(NiL, disc, 1, "%s%s: %-.*s: unknown map name", cxlocation(cx, data), field->variable->name, o.value.string.size, o.value.string.data);
311 if (cxnum2str(cx, &field->variable->format, (Cxinteger_t)o.value.number, NiL))
314 (*disc->errorf)(NiL, disc, 1, "%s%s: %I*d: unknown map value", cxlocation(cx, data), field->variable->name, sizeof(Cxinteger_t), (Cxinteger_t)o.value.number);
328 (*disc->errorf)(NiL, disc, 1, "%s%s: %1.15Lg violates min constraint %1.15Lg", cxlocation(cx, data), field->variable->name, o.value.number, constraint->min->number);
334 (*disc->errorf)(NiL, disc, 1, "%s%s: %1.15Lg violates max constraint %1.15Lg", cxlocation(cx, data), field->variable->name, o.value.number, constraint->max->number);
374 if ((*state->setf)(cx, &x, &o, &o, NiL, data, disc))
390 validate_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc)
409 if (!cxcast(cx, &val, NiL, cx->state->type_string, NiL, NiL))