This commit is contained in:
John Kerl 2015-05-27 17:43:33 -04:00
parent c576970e6d
commit 85f2e9e60e
4 changed files with 9 additions and 5 deletions

View file

@ -518,6 +518,7 @@ lrec_evaluator_t* lrec_evaluator_alloc_from_unary_func_name(char* function_name,
} else if (streq(function_name, "toupper")) { return lrec_evaluator_alloc_from_s_s_func(s_s_toupper_func, parg1);
} else if (streq(function_name, "sec2gmt")) { return lrec_evaluator_alloc_from_s_f_func(s_f_sec2gmt_func, parg1);
} else if (streq(function_name, "gmt2sec")) { return lrec_evaluator_alloc_from_f_s_func(f_s_gmt2sec_func, parg1);
} else if (streq(function_name, "strlen")) { return lrec_evaluator_alloc_from_s_f_func(f_s_strlen_func, parg1);
} else return NULL; // xxx handle me better
}

View file

@ -214,6 +214,12 @@ mlr_val_t f_s_gmt2sec_func(mlr_val_t* pval1) {
return rv;
}
// ----------------------------------------------------------------
mlr_val_t f_s_strlen_func(mlr_val_t* pval1) {
mlr_val_t rv = {.type = MT_DOUBLE, .u.double_val = strlen(pval1->u.string_val)};
return rv;
}
// ----------------------------------------------------------------
// xxx cmt us!!!!

View file

@ -180,6 +180,7 @@ mlr_val_t s_sss_sub_func(mlr_val_t* pval1, mlr_val_t* pval2, mlr_val_t* pval3);
// ----------------------------------------------------------------
mlr_val_t s_f_sec2gmt_func(mlr_val_t* pval1);
mlr_val_t f_s_gmt2sec_func(mlr_val_t* pval1);
mlr_val_t f_s_strlen_func(mlr_val_t* pval1);
// ----------------------------------------------------------------
mlr_val_t eq_op_func(mlr_val_t* pval1, mlr_val_t* pval2);

View file

@ -35,15 +35,10 @@ FEATURES/+
-> move datadirs too ..... unify c & doc data dirs to parent?
-> remove/coalesce/gzip the large data files
* readme @ each level incl. sof et al. @ base
-> & perfopt: lrec_t not hashmap per se; stdio backings with minimal copying; mmap entirely; ... ?
! mlr sort CLI opt for choice of heap/merge/quick -- ?
* mod op (either c-like, or sane) and put into wikidoc if so.
? rip through filenames @ start & abend unless -f each: fail fast.
================================================================
NEATEN
@ -123,6 +118,7 @@ UT/REG
* tac/X/tac for all X
* multi-csv I/O: include --icsv --odkvp and --idkvp --ocsv, as well as --csv cases
* het-xtab out
* modulus
================================================================
INTERNAL DOCS (e.g. README)