mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-22 07:30:43 +00:00
mapvar emit-lashed iterate
This commit is contained in:
parent
e8f3bc81b9
commit
72b1ccd75c
2 changed files with 9 additions and 4 deletions
|
|
@ -1110,9 +1110,12 @@ static void handle_emit_lashed_common(
|
|||
char* oosvar_flatten_separator)
|
||||
{
|
||||
int keys_all_non_null_or_error = TRUE;
|
||||
// xxx XXX next.
|
||||
sllmv_t** ppmvkeys = evaluate_lists(pstate->ppemit_keylist_evaluators, pstate->num_emit_lashed_items,
|
||||
pvars, &keys_all_non_null_or_error);
|
||||
|
||||
sllmv_t** ppmvkeys = mlr_malloc_or_die(pstate->num_emit_lashed_items * sizeof(sllmv_t*));
|
||||
for (int i = 0; i < pstate->num_emit_lashed_items; i++) {
|
||||
ppmvkeys[i] = evaluate_list(pstate->ppemit_keylist_evaluators[i], pvars, &keys_all_non_null_or_error);
|
||||
}
|
||||
|
||||
if (keys_all_non_null_or_error) {
|
||||
int names_all_non_null_or_error = TRUE;
|
||||
sllmv_t* pmvnames = evaluate_list(pstate->pemit_namelist_evaluators, pvars,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ sllmv_t* evaluate_list(sllv_t* pevaluators, variables_t* pvars, int* pall_non_nu
|
|||
return pmvs;
|
||||
}
|
||||
|
||||
sllmv_t** evaluate_lists(sllv_t** ppevaluators, int num_evaluators, variables_t* pvars, int* pall_non_null_or_error) {
|
||||
sllmv_t** evaluate_lists( // xxx rm
|
||||
sllv_t** ppevaluators, int num_evaluators, variables_t* pvars, int* pall_non_null_or_error)
|
||||
{
|
||||
sllmv_t** retval = mlr_malloc_or_die(num_evaluators * sizeof(sllmv_t*));
|
||||
for (int i = 0; i < num_evaluators; i++) {
|
||||
retval[i] = evaluate_list(ppevaluators[i], pvars, pall_non_null_or_error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue