/ast/src/lib/libdss/ |
H A D | dss-compress.h | 50 compress_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 93 sfprintf(cx->buf, "%s", meth); 95 sfprintf(cx->buf, " %s", meth); 96 if (!(meth = sfstruse(cx->buf)))
|
H A D | dss-count.h | 38 count_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 71 count_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
|
H A D | dss-null.h | 35 null_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
|
H A D | dss-print.h | 57 print_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 89 if (!(expr->data = (char*)DSS(cx)->meth->print)) 92 (*disc->errorf)(NiL, disc, 2, "%s: no default method print format", DSS(cx)->meth->name); 102 return cx->referencef ? dssprintf(DSS(cx), cx, 0, (char*)expr->data, NiL) : 0; 106 print_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 108 return dssprintf(DSS(cx), cx, expr->op, (char*)expr->data, data); 112 print_ref(Cx_t* cx, Cxexpr_ argument [all...] |
H A D | dss-return.h | 41 return_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 74 return_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
|
H A D | dss-scan.h | 38 scan_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 40 Dss_t* dss = DSS(cx);
|
H A D | dss-write.h | 39 write_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 71 if (!(format = dssformat(expr->data, disc, DSS(cx)->meth))) 80 if (!(expr->data = dssfopen(DSS(cx), expr->file, expr->op, DSS_FILE_WRITE, format))) 86 write_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 92 write_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 98 write_ref(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 100 DSS(cx)->flags |= DSS_WRITE;
|
H A D | cxattr.c | 73 cxattr(Cx_t* cx, register const char* s, char** p, Cxformat_t* f, Cxdisc_t* disc) argument 187 if (!cx || !isalpha(*s)) 189 type = (!cx || (s == b)) ? (Cxtype_t*)0 : cxtype(cx, "number", disc); 209 if (type = cxtype(cx, e, disc)) 212 type = cxtype(cx, "number", disc);
|
H A D | cxeval.c | 36 cxbeg(Cx_t* cx, register Cxexpr_t* expr, const char* method) argument 52 if (expr->pass && cxbeg(cx, expr->pass, method)) 54 if (expr->fail && cxbeg(cx, expr->fail, method)) 58 if (cxbeg(cx, expr->group, method)) 63 if (cx->disc->errorf) 64 (*cx->disc->errorf)(cx, cx->disc, 2, "%s: %s: method %s expected", expr->query->name, method, expr->query->method); 76 cx->state->header = (Cxheader_t*)expr->query; 77 cx 96 cxend(Cx_t* cx, register Cxexpr_t* expr) argument 127 execute(Cx_t* cx, Cxexpr_t* expr, register Cxinstruction_t* pc, void* data, Cxoperand_t* rv, Cxdisc_t* disc) argument 180 eval(Cx_t* cx, register Cxexpr_t* expr, void* data, Cxoperand_t* rv) argument 214 cxeval(Cx_t* cx, register Cxexpr_t* expr, void* data, Cxoperand_t* rv) argument [all...] |
H A D | cxmap.c | 167 num2str(Cx_t* cx, Cxmap_t* map, Sfio_t* sp, Cxunsigned_t num, int del) argument 210 r += num2str(cx, item->map, sp, n, del); 229 else if (s = (*edit->num2strf)(cx, n, cx->disc)) 245 cxnum2str(Cx_t* cx, Cxformat_t* format, Cxunsigned_t num, char** p) argument 254 if (!num2str(cx, format->map, cx->tp, num, del)) 258 sfprintf(cx->tp, "|%I*u", sizeof(num), num); 259 if (!(s = sfstruse(cx->tp))) 271 str2num(Cx_t* cx, Cxmap_ argument 297 cxstr2num(Cx_t* cx, Cxformat_t* format, const char* str, size_t siz, Cxunsigned_t* p) argument 337 cxsub(Cx_t* cx, Cxedit_t* edit, Cxoperand_t* r) argument 362 cxsuball(Cx_t* cx, Cxpart_t* part, Cxoperand_t* r) argument [all...] |
H A D | dssprintf.c | 56 Cx_t* cx; member in struct:Fmt_s 94 if (ap->expr && cxeval(fp->cx, ap->expr, fp->data, &ret) < 0 || cxcast(fp->cx, &ret, ap->variable, ap->cast, fp->data, ap->details)) 149 cxsub(fp->cx, ap->edit, &ret); 164 dssprintf(Dss_t* dss, Cx_t* cx, Sfio_t* sp, const char* format, Dssrecord_t* record) argument 181 if (!cx) 182 cx = dss->cx; 334 if (!d && cx->table->opcode[*(unsigned char*)(s - 1)]) 349 if (!(pop = cxpush(cx, Ni [all...] |
H A D | cxlib.h | 93 #include "cx.h" 126 Cx_t* cx; member in struct:Cxcompile_s
|
/ast/src/cmd/dsslib/html/ |
H A D | html.c | 31 html_ref_F(Cx_t* cx, Cxvariable_t* var, Cxoperand_t* ret, Cxoperand_t* arg, int n, void* data, Cxdisc_t* disc) argument 42 if (!(t = vmnewof(cx->em, 0, char, arg->value.string.size, 1)))
|
/ast/src/cmd/dsslib/lookup/ |
H A D | lookup.c | 52 lookup_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 68 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space"); 75 sfprintf(cx->buf, "%s%s", strchr(dss_lib_lookup.description, '['), lookup_usage); 76 s = sfstruse(cx->buf); 84 (*disc->errorf)(cx, disc, ERROR_USAGE|4, "%s", opt_info.arg); 91 (*disc->errorf)(cx, disc, 2, "%s", opt_info.arg); 104 (*disc->errorf)(cx, disc, 2, "file and variable arguments expected"); 107 if (!(state->variable = cxvariable(cx, argv[1], NiL, disc))) 110 (*disc->errorf)(cx, disc, 2, "%s: variable not defined", argv[1]); 120 (*disc->errorf)(cx, dis 135 lookup_sel(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 146 lookup_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument [all...] |
/ast/src/cmd/dsslib/tests/ |
H A D | test.c | 40 even_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 47 if (!(state = vmnewof(cx->vm, 0, State_t, 1, 0))) 54 sfprintf(cx->buf, "%s%s", strchr(dss_lib_test.description, '['), even_usage); 55 s = sfstruse(cx->buf); 82 even_sel(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 96 even_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 103 even_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 120 odd_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 127 if (!(state = vmnewof(cx->vm, 0, State_t, 1, 0))) 134 sfprintf(cx 162 odd_sel(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 176 odd_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 183 odd_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument [all...] |
/ast/src/cmd/dsslib/netflow/ |
H A D | netflow.c | 157 op_get(Cx_t* cx, Cxinstruction_t* pc, Cxoperand_t* r, Cxoperand_t* a, Cxoperand_t* b, void* data, Cxdisc_t* disc) argument 615 (*disc->errorf)(cx, disc, ERROR_PANIC, "%s: variable index %d not implemented", vp->name, vp->index); 642 if (cxaddcallout(meth->cx, &local_callouts[i], disc)) 645 if (cxaddvariable(meth->cx, &fields[i], disc)) 649 if (dssoptlib(meth->cx->buf, &dss_lib_netflow, NiL, disc)) 651 s = sfstruse(meth->cx->buf); 791 !(flow->type_ipv4addr = cxtype(dss->cx, "ipv4addr_t", disc)) || 792 !(flow->type_ipv4prefix = cxtype(dss->cx, "ipv4prefix_t", disc)) || 793 !(flow->type_ipv6addr = cxtype(dss->cx, "ipv6addr_t", disc)) || 794 !(flow->type_ipv6prefix = cxtype(dss->cx, "ipv6prefix_ [all...] |
/ast/src/cmd/dsslib/ip_t/ |
H A D | itlie.h | 23 * include this file to instantiate tuple cx externalf/internalf 44 ITLEXTERNAL(Cx_t* cx, Cxtype_t* type, int dots, int tuple, int group, const char* details, Cxformat_t** formats, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 79 sp = cx->buf; 110 if (def && formats && formats[k] && formats[k]->map && !cxnum2str(cx, formats[k], (Cxinteger_t)ap[i], &s)) 186 ITLINTERNAL(Cx_t* cx, Cxvalue_t* value, int dots, int tuple, int group, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 199 sp = cx->buf;
|
/ast/src/cmd/dsslib/merge/ |
H A D | merge.c | 61 Cx_t* cx; member in struct:State_s 120 if ((*state->getf)(state->cx, &x, file->data + k, NiL, NiL, file->record, state->cx->disc)) 128 merge_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 134 Dss_t* dss = DSS(cx); 159 sfprintf(cx->buf, "%s%s", strchr(dss_lib_merge.description, '['), merge_usage); 160 u = sfstruse(cx->buf); 167 if (!(variable = cxvariable(cx, opt_info.arg, NiL, disc))) 212 if (cx->disc->errorf) 213 (*cx [all...] |
/ast/src/cmd/dsslib/sort/ |
H A D | sort.c | 56 Cx_t* cx; member in struct:State_s 85 if (cxcast(state->cx, &r, (Cxvariable_t*)field->user, state->cx->state->type_string, state->data, NiL)) 124 if (state->cx->disc->errorf) 125 (*state->cx->disc->errorf)(state->cx, disc, ERROR_SYSTEM|2, "uniq record process error"); 137 sort_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 156 (*disc->errorf)(cx, disc, ERROR_SYSTEM|2, "out of space"); 171 if (!(state->file = dssfopen(DSS(cx), "-", state->sortstack, DSS_FILE_WRITE, 0))) 173 sfprintf(cx 312 sort_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 334 sort_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument [all...] |
/ast/src/cmd/dsslib/text/ |
H A D | text.c | 432 op_get(Cx_t* cx, Cxinstruction_t* pc, Cxoperand_t* r, Cxoperand_t* a, Cxoperand_t* b, void* data, Cxdisc_t* disc) argument 463 if (dssoptlib(ometh->cx->buf, &dss_lib_text, usage, disc)) 465 s = sfstruse(ometh->cx->buf); 553 if (dtmatch(meth->cx->variables, f)) 612 if (cxaddvariable(meth->cx, var, disc)) 635 if (cxaddcallout(meth->cx, &local_callouts[c], disc))
|
/ast/src/cmd/dsslib/validate/ |
H A D | validate.c | 129 validate_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 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 282 validate_sel(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 390 validate_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument [all...] |
/ast/src/cmd/dsslib/bgp/ |
H A D | bgp.c | 140 op_get(Cx_t* cx, Cxinstruction_t* pc, Cxoperand_t* r, Cxoperand_t* a, Cxoperand_t* b, void* data, Cxdisc_t* disc) argument 522 bgp_get(Cx_t* cx, Cxinstruction_t* pc, Cxoperand_t* r, Cxoperand_t* a, Cxoperand_t* b, void* data, Cxdisc_t* disc) argument 530 i = op_get(cx, pc, r, a, b, data, disc); 564 cxaddvariable(meth->cx, NiL, disc); 566 if (cxaddtype(meth->cx, &types[i], disc)) 569 if (cxaddcallout(meth->cx, &local_callouts[i], disc)) 572 if (cxaddvariable(meth->cx, &fields[i], disc)) 579 if (dssoptlib(meth->cx->buf, &dss_lib_bgp, usage, disc)) 581 s = sfstruse(meth->cx->buf); 627 !(bgp->type_as16path = cxtype(dss->cx, "as16path_ [all...] |
/ast/src/cmd/dsslib/fix/ |
H A D | fix.c | 81 fix_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 100 if (dssoptlib(cx->buf, &dss_lib_fix, usage, disc)) 102 s = sfstruse(cx->buf); 140 for (variable = (Cxvariable_t*)dtfirst(cx->fields); variable; variable = (Cxvariable_t*)dtnext(cx->fields, variable)) 185 fix_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 193 if (cxcast(cx, &arg, field->variable, field->variable->type, data, NiL)) 215 fix_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument 274 sfprintf(expr->op, " <NAME>%s</>\n", DSS(cx)->meth->name); 275 s = (char*)DSS(cx) [all...] |
/ast/src/cmd/dsslib/num_t/ |
H A D | num_t.c | 121 bcd_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 203 bcd_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 249 be_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 296 be_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 389 hash_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 428 hash_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 504 heka_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 550 heka_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 766 ibm_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 953 ibm_internal(Cx_t* cx, Cxtype_ argument 989 le_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 1036 le_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 1089 sf_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 1117 sf_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument [all...] |
/ast/src/cmd/dsslib/time_t/ |
H A D | time_t.c | 45 time_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 60 time_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 65 buf = (const char*)cxcvt(cx, buf, size); 159 precise_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 177 precise_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 185 buf = (const char*)cxcvt(cx, buf, size); 201 elapsed_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 215 elapsed_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 226 tm_hour_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 254 tm_hour_internal(Cx_t* cx, Cxtype_ argument 267 tm_mon_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 297 tm_mon_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 318 tm_wday_external(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxvalue_t* value, char* buf, size_t size, Cxdisc_t* disc) argument 348 tm_wday_internal(Cx_t* cx, Cxtype_t* type, const char* details, Cxformat_t* format, Cxoperand_t* ret, const char* buf, size_t size, Vmalloc_t* vm, Cxdisc_t* disc) argument 416 tm_get(Cx_t* cx, Cxinstruction_t* pc, Cxoperand_t* r, Cxoperand_t* a, Cxoperand_t* b, void* data, Cxdisc_t* disc) argument 479 tm_set(Cx_t* cx, Cxinstruction_t* pc, Cxoperand_t* r, Cxoperand_t* a, Cxoperand_t* b, void* data, Cxdisc_t* disc) argument [all...] |