MCPcopy Create free account
hub / github.com/F-Stack/f-stack / csv_data

Function csv_data

tools/libxo/encoder/csv/enc_csv.c:722–741  ·  view source on GitHub ↗

* Handler for incoming data values. We just record each leaf name and * value. The values are emittd when the instance is closed. */

Source from the content-addressed store, hash-verified

720 * value. The values are emittd when the instance is closed.
721 */
722static int
723csv_data (xo_handle_t *xop UNUSED, csv_private_t *csv UNUSED,
724 const char *name, const char *value,
725 xo_xof_flags_t flags)
726{
727 csv_dbg(xop, csv, "data: [%s]=[%s] %llx\n", name, value, (unsigned long long) flags);
728
729 if (!(csv->c_flags & CF_RECORD_DATA))
730 return 0;
731
732 /* Find the leaf number */
733 int fnum = csv_leaf_num(xop, csv, name, flags);
734 if (fnum < 0)
735 return 0; /* Don't bother recording */
736
737 leaf_t *lp = &csv->c_leaf[fnum];
738 csv_leaf_set(xop, csv, lp, value);
739
740 return 0;
741}
742
743/*
744 * The callback from libxo, passing us operations/events as they

Callers 1

csv_handlerFunction · 0.85

Calls 3

csv_dbgFunction · 0.85
csv_leaf_numFunction · 0.85
csv_leaf_setFunction · 0.85

Tested by

no test coverage detected