Lines Matching refs:cx
145 getop(Cx_t* cx, Cxinstruction_t* pc, Cxoperand_t* r, Cxoperand_t* a, Cxoperand_t* b, void* data, Cxdisc_t* disc)
178 (*disc->errorf)(cx, disc, 2, "%s: unknown print variable", variable->name);
192 getvalue(Cx_t* cx, Cxinstruction_t* pc, Cxoperand_t* r, Cxoperand_t* a, Cxoperand_t* b, void* data, Cxdisc_t* disc)
231 sfstrseek(cx->buf, SEEK_SET, 0);
236 sfputc(cx->buf, sep);
244 if (cxcast(cx, &arg, 0, cx->state->type_string, NiL, group->variable->format.details))
248 sfprintf(cx->buf, "%s", s);
251 sfprintf(cx->buf, "%s", print->label);
252 r->value.string.size = sfstrtell(cx->buf);
253 r->value.string.data = sfstruse(cx->buf);
305 stats_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc)
327 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
335 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
338 if (!cxscope(state->print, cx, 0, 0, disc))
349 sfprintf(cx->buf, "%s%s", strchr(dss_lib_stats.description, '['), stats_usage);
350 s = sfstruse(cx->buf);
365 if (!(variable = cxvariable(cx, opt_info.arg, NiL, disc)))
370 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
385 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
396 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
409 (*disc->errorf)(cx, disc, ERROR_USAGE|4, "%s", opt_info.arg);
416 (*disc->errorf)(cx, disc, 2, "%s", opt_info.arg);
437 variable = (Cxvariable_t*)(variable ? dtnext(cx->fields, variable) : dtfirst(cx->fields));
444 else if (!(variable = cxvariable(cx, *argv, NiL, disc)))
449 (*disc->errorf)(cx, disc, 2, "%s: not a numeric field", variable->name);
455 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
472 (*disc->errorf)(cx, disc, 2, "no numeric fields");
480 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
492 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
501 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
506 i = dssprintf(DSS(cx), state->print, tmp, state->format, &record);
522 stats_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc)
541 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
545 if (cxcast(cx, key, group->variable, group->variable->type, data, NiL))
554 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
564 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space");
583 if (cxcast(cx, &val, field->variable, cx->state->type_number, data, NiL))
616 list(Cx_t* cx, register State_t* state, Sfio_t* op, const char* label, register Field_t* field, register Total_t* total, Cxoperand_t* key)
635 if (dssprintf(DSS(cx), state->print, op, state->format, &record) < 0)
677 if (cxcast(cx, &arg, 0, cx->state->type_string, NiL, group->variable->format.details))
693 stats_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc)
726 if (list(cx, state, expr->op, NiL, state->field, bucket->total, bucket->key))
728 if (state->total->count && list(cx, state, expr->op, "OVERFLOW", state->field, state->total, NiL))
731 else if (list(cx, state, expr->op, NiL, state->field, state->total, NiL))