mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-23 16:08:43 +00:00
push
This commit is contained in:
parent
d38c2212e1
commit
6709d60f52
1 changed files with 7 additions and 4 deletions
|
|
@ -37,6 +37,7 @@ typedef struct _mapper_stats2_state_t {
|
|||
|
||||
lhmslv_t* groups;
|
||||
int do_verbose;
|
||||
int do_iterative_stats;
|
||||
} mapper_stats2_state_t;
|
||||
|
||||
typedef stats2_t* stats2_alloc_func_t(char* value_field_name_1, char* value_field_name_2, char* stats2_name, int do_verbose);
|
||||
|
|
@ -45,7 +46,7 @@ typedef stats2_t* stats2_alloc_func_t(char* value_field_name_1, char* value_fiel
|
|||
static void mapper_stats2_usage(FILE* o, char* argv0, char* verb);
|
||||
static mapper_t* mapper_stats2_parse_cli(int* pargi, int argc, char** argv);
|
||||
static mapper_t* mapper_stats2_alloc(slls_t* paccumulator_names, slls_t* pvalue_field_name_pairs,
|
||||
slls_t* pgroup_by_field_names, int do_verbose);
|
||||
slls_t* pgroup_by_field_names, int do_verbose, int do_iterative_stats);
|
||||
static void mapper_stats2_free(void* pvstate);
|
||||
static sllv_t* mapper_stats2_process(lrec_t* pinrec, context_t* pctx, void* pvstate);
|
||||
static void mapper_stats2_ingest(lrec_t* pinrec, context_t* pctx, mapper_stats2_state_t* pstate);
|
||||
|
|
@ -103,7 +104,8 @@ static mapper_t* mapper_stats2_parse_cli(int* pargi, int argc, char** argv) {
|
|||
slls_t* paccumulator_names = NULL;
|
||||
slls_t* pvalue_field_names = NULL;
|
||||
slls_t* pgroup_by_field_names = slls_alloc();
|
||||
int do_verbose = FALSE;
|
||||
int do_verbose = FALSE;
|
||||
int do_iterative_stats = FALSE;
|
||||
|
||||
char* verb = argv[(*pargi)++];
|
||||
|
||||
|
|
@ -127,7 +129,8 @@ static mapper_t* mapper_stats2_parse_cli(int* pargi, int argc, char** argv) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
return mapper_stats2_alloc(paccumulator_names, pvalue_field_names, pgroup_by_field_names, do_verbose);
|
||||
return mapper_stats2_alloc(paccumulator_names, pvalue_field_names, pgroup_by_field_names,
|
||||
do_verbose, do_iterative_stats);
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
|
|
@ -272,7 +275,7 @@ static sllv_t* mapper_stats2_emit(mapper_stats2_state_t* pstate) {
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
static mapper_t* mapper_stats2_alloc(slls_t* paccumulator_names, slls_t* pvalue_field_name_pairs,
|
||||
slls_t* pgroup_by_field_names, int do_verbose)
|
||||
slls_t* pgroup_by_field_names, int do_verbose, int do_iterative_stats)
|
||||
{
|
||||
mapper_t* pmapper = mlr_malloc_or_die(sizeof(mapper_t));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue