mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-21 10:29:02 +00:00
sec2gmtdate function
This commit is contained in:
parent
67a73bad74
commit
ae409bb289
8 changed files with 172 additions and 63 deletions
|
|
@ -52,6 +52,7 @@ static mapper_setup_t* mapper_lookup_table[] = {
|
|||
&mapper_sample_setup,
|
||||
&mapper_shuffle_setup,
|
||||
&mapper_sec2gmt_setup,
|
||||
&mapper_sec2gmtdate_setup,
|
||||
&mapper_sort_setup,
|
||||
&mapper_stats1_setup,
|
||||
&mapper_stats2_setup,
|
||||
|
|
|
|||
|
|
@ -576,6 +576,9 @@ mv_t time_string_from_seconds(mv_t* psec, char* format) {
|
|||
mv_t s_n_sec2gmt_func(mv_t* pval1) {
|
||||
return time_string_from_seconds(pval1, ISO8601_TIME_FORMAT);
|
||||
}
|
||||
mv_t s_n_sec2gmtdate_func(mv_t* pval1) {
|
||||
return time_string_from_seconds(pval1, ISO8601_DATE_FORMAT);
|
||||
}
|
||||
|
||||
mv_t s_ns_strftime_func(mv_t* pval1, mv_t* pval2) {
|
||||
mv_t rv = time_string_from_seconds(pval1, pval2->u.strv);
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@
|
|||
#define MV_SB_ALLOC_LENGTH 32
|
||||
|
||||
#define ISO8601_TIME_FORMAT "%Y-%m-%dT%H:%M:%SZ"
|
||||
#define ISO8601_DATE_FORMAT "%Y-%m-%d"
|
||||
|
||||
typedef struct _mv_t {
|
||||
union {
|
||||
|
|
@ -431,6 +432,7 @@ mv_t gsub_precomp_func(mv_t* pval1, regex_t* pregex, string_builder_t* psb, mv_t
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
mv_t s_n_sec2gmt_func(mv_t* pval1);
|
||||
mv_t s_n_sec2gmtdate_func(mv_t* pval1);
|
||||
mv_t i_s_gmt2sec_func(mv_t* pval1);
|
||||
mv_t s_ns_strftime_func(mv_t* pval1, mv_t* pval2);
|
||||
mv_t i_ss_strptime_func(mv_t* pval1, mv_t* pval2);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ libmapping_la_SOURCES= \
|
|||
mapper_reshape.c \
|
||||
mapper_sample.c \
|
||||
mapper_sec2gmt.c \
|
||||
mapper_sec2gmtdate.c \
|
||||
mapper_shuffle.c \
|
||||
mapper_sort.c \
|
||||
mapper_stats1.c \
|
||||
|
|
|
|||
95
c/mapping/mapper_sec2gmtdate.c
Normal file
95
c/mapping/mapper_sec2gmtdate.c
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
#include "lib/mlrutil.h"
|
||||
#include "containers/lrec.h"
|
||||
#include "containers/mlrval.h"
|
||||
#include "containers/slls.h"
|
||||
#include "containers/mixutil.h"
|
||||
#include "mapping/mappers.h"
|
||||
|
||||
typedef struct _mapper_sec2gmtdate_state_t {
|
||||
slls_t* pfield_names;
|
||||
} mapper_sec2gmtdate_state_t;
|
||||
|
||||
static void mapper_sec2gmtdate_usage(FILE* o, char* argv0, char* verb);
|
||||
static mapper_t* mapper_sec2gmtdate_parse_cli(int* pargi, int argc, char** argv);
|
||||
static mapper_t* mapper_sec2gmtdate_alloc(slls_t* pfield_names);
|
||||
static void mapper_sec2gmtdate_free(mapper_t* pmapper);
|
||||
static sllv_t* mapper_sec2gmtdate_process(lrec_t* pinrec, context_t* pctx, void* pvstate);
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
mapper_setup_t mapper_sec2gmtdate_setup = {
|
||||
.verb = "sec2gmtdate",
|
||||
.pusage_func = mapper_sec2gmtdate_usage,
|
||||
.pparse_func = mapper_sec2gmtdate_parse_cli,
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
static void mapper_sec2gmtdate_usage(FILE* o, char* argv0, char* verb) {
|
||||
fprintf(o, "Usage: %s %s {comma-separated list of field names}\n", argv0, verb);
|
||||
fprintf(o, "Replaces a numeric field representing seconds since the epoch with the\n");
|
||||
fprintf(o, "corresponding GMT year-month-day timestamp. This is nothing more than\n");
|
||||
fprintf(o, "a keystroke-saver for the sec2gmtdate function:\n");
|
||||
fprintf(o, " %s %s time1,time2\n", argv0, verb);
|
||||
fprintf(o, "is the same as\n");
|
||||
fprintf(o, " %s put '$time1=sec2gmtdate($time1);$time2=sec2gmtdate($time2)'\n", argv0);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
static mapper_t* mapper_sec2gmtdate_parse_cli(int* pargi, int argc, char** argv) {
|
||||
if ((argc - *pargi) < 2) {
|
||||
mapper_sec2gmtdate_usage(stderr, argv[0], argv[*pargi]);
|
||||
return NULL;
|
||||
}
|
||||
// verb:
|
||||
(*pargi)++;
|
||||
// field names:
|
||||
char* field_names_string = argv[(*pargi)++];
|
||||
slls_t* pfield_names = slls_from_line(field_names_string, ',', FALSE);
|
||||
|
||||
return mapper_sec2gmtdate_alloc(pfield_names);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
static mapper_t* mapper_sec2gmtdate_alloc(slls_t* pfield_names)
|
||||
{
|
||||
mapper_t* pmapper = mlr_malloc_or_die(sizeof(mapper_t));
|
||||
|
||||
mapper_sec2gmtdate_state_t* pstate = mlr_malloc_or_die(sizeof(mapper_sec2gmtdate_state_t));
|
||||
pstate->pfield_names = pfield_names;
|
||||
pmapper->pprocess_func = mapper_sec2gmtdate_process;
|
||||
pmapper->pvstate = (void*)pstate;
|
||||
pmapper->pfree_func = mapper_sec2gmtdate_free;
|
||||
|
||||
return pmapper;
|
||||
}
|
||||
|
||||
static void mapper_sec2gmtdate_free(mapper_t* pmapper) {
|
||||
mapper_sec2gmtdate_state_t* pstate = pmapper->pvstate;
|
||||
slls_free(pstate->pfield_names);
|
||||
free(pstate);
|
||||
free(pmapper);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
static sllv_t* mapper_sec2gmtdate_process(lrec_t* pinrec, context_t* pctx, void* pvstate) {
|
||||
if (pinrec == NULL) // end of stream
|
||||
return sllv_single(NULL);
|
||||
|
||||
mapper_sec2gmtdate_state_t* pstate = (mapper_sec2gmtdate_state_t*)pvstate;
|
||||
|
||||
for (sllse_t* pe = pstate->pfield_names->phead; pe != NULL; pe = pe->pnext) {
|
||||
char* name = pe->value;
|
||||
char* sval = lrec_get(pinrec, name);
|
||||
if (sval == NULL)
|
||||
continue;
|
||||
|
||||
if (*sval == 0) {
|
||||
lrec_put(pinrec, name, "", NO_FREE);
|
||||
} else {
|
||||
mv_t mval = mv_scan_number_or_die(sval);
|
||||
mv_t stamp = time_string_from_seconds(&mval, ISO8601_DATE_FORMAT);
|
||||
|
||||
lrec_put(pinrec, name, stamp.u.strv, FREE_ENTRY_VALUE);
|
||||
}
|
||||
}
|
||||
return sllv_single(pinrec);
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@ extern mapper_setup_t mapper_repeat_setup;
|
|||
extern mapper_setup_t mapper_reshape_setup;
|
||||
extern mapper_setup_t mapper_sample_setup;
|
||||
extern mapper_setup_t mapper_sec2gmt_setup;
|
||||
extern mapper_setup_t mapper_sec2gmtdate_setup;
|
||||
extern mapper_setup_t mapper_shuffle_setup;
|
||||
extern mapper_setup_t mapper_sort_setup;
|
||||
extern mapper_setup_t mapper_stats1_setup;
|
||||
|
|
|
|||
|
|
@ -153,6 +153,9 @@ function_lookup_t FUNCTION_LOOKUP_TABLE[] = {
|
|||
{FUNC_CLASS_TIME, "sec2gmt", 1,
|
||||
"Formats seconds since epoch (integer part)\n"
|
||||
"as GMT timestamp, e.g. sec2gmt(1440768801.7) = \"2015-08-28T13:33:21Z\"."},
|
||||
{FUNC_CLASS_TIME, "sec2gmtdate", 1,
|
||||
"Formats seconds since epoch (integer part)\n"
|
||||
"as GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) = \"2015-08-28\"."},
|
||||
{FUNC_CLASS_TIME, "sec2hms", 1,
|
||||
"Formats integer seconds as in\n"
|
||||
"sec2hms(5000) = \"01:23:20\""},
|
||||
|
|
@ -311,69 +314,70 @@ rval_evaluator_t* rval_evaluator_alloc_from_zary_func_name(char* function_name)
|
|||
|
||||
// ================================================================
|
||||
rval_evaluator_t* rval_evaluator_alloc_from_unary_func_name(char* fnnm, rval_evaluator_t* parg1) {
|
||||
if (streq(fnnm, "!")) { return rval_evaluator_alloc_from_b_b_func(b_b_not_func, parg1);
|
||||
} else if (streq(fnnm, "+")) { return rval_evaluator_alloc_from_x_x_func(x_x_upos_func, parg1);
|
||||
} else if (streq(fnnm, "-")) { return rval_evaluator_alloc_from_x_x_func(x_x_uneg_func, parg1);
|
||||
} else if (streq(fnnm, "abs")) { return rval_evaluator_alloc_from_x_x_func(x_x_abs_func, parg1);
|
||||
} else if (streq(fnnm, "acos")) { return rval_evaluator_alloc_from_f_f_func(f_f_acos_func, parg1);
|
||||
} else if (streq(fnnm, "acosh")) { return rval_evaluator_alloc_from_f_f_func(f_f_acosh_func, parg1);
|
||||
} else if (streq(fnnm, "asin")) { return rval_evaluator_alloc_from_f_f_func(f_f_asin_func, parg1);
|
||||
} else if (streq(fnnm, "asinh")) { return rval_evaluator_alloc_from_f_f_func(f_f_asinh_func, parg1);
|
||||
} else if (streq(fnnm, "atan")) { return rval_evaluator_alloc_from_f_f_func(f_f_atan_func, parg1);
|
||||
} else if (streq(fnnm, "atanh")) { return rval_evaluator_alloc_from_f_f_func(f_f_atanh_func, parg1);
|
||||
} else if (streq(fnnm, "boolean")) { return rval_evaluator_alloc_from_x_x_func(b_x_boolean_func, parg1);
|
||||
} else if (streq(fnnm, "boolean")) { return rval_evaluator_alloc_from_x_x_func(b_x_boolean_func, parg1);
|
||||
} else if (streq(fnnm, "cbrt")) { return rval_evaluator_alloc_from_f_f_func(f_f_cbrt_func, parg1);
|
||||
} else if (streq(fnnm, "ceil")) { return rval_evaluator_alloc_from_x_x_func(x_x_ceil_func, parg1);
|
||||
} else if (streq(fnnm, "cos")) { return rval_evaluator_alloc_from_f_f_func(f_f_cos_func, parg1);
|
||||
} else if (streq(fnnm, "cosh")) { return rval_evaluator_alloc_from_f_f_func(f_f_cosh_func, parg1);
|
||||
} else if (streq(fnnm, "dhms2fsec")) { return rval_evaluator_alloc_from_f_s_func(f_s_dhms2fsec_func, parg1);
|
||||
} else if (streq(fnnm, "dhms2sec")) { return rval_evaluator_alloc_from_f_s_func(i_s_dhms2sec_func, parg1);
|
||||
} else if (streq(fnnm, "erf")) { return rval_evaluator_alloc_from_f_f_func(f_f_erf_func, parg1);
|
||||
} else if (streq(fnnm, "erfc")) { return rval_evaluator_alloc_from_f_f_func(f_f_erfc_func, parg1);
|
||||
} else if (streq(fnnm, "exp")) { return rval_evaluator_alloc_from_f_f_func(f_f_exp_func, parg1);
|
||||
} else if (streq(fnnm, "expm1")) { return rval_evaluator_alloc_from_f_f_func(f_f_expm1_func, parg1);
|
||||
} else if (streq(fnnm, "float")) { return rval_evaluator_alloc_from_x_x_func(f_x_float_func, parg1);
|
||||
} else if (streq(fnnm, "floor")) { return rval_evaluator_alloc_from_x_x_func(x_x_floor_func, parg1);
|
||||
} else if (streq(fnnm, "fsec2dhms")) { return rval_evaluator_alloc_from_s_f_func(s_f_fsec2dhms_func, parg1);
|
||||
} else if (streq(fnnm, "fsec2hms")) { return rval_evaluator_alloc_from_s_f_func(s_f_fsec2hms_func, parg1);
|
||||
} else if (streq(fnnm, "gmt2sec")) { return rval_evaluator_alloc_from_i_s_func(i_s_gmt2sec_func, parg1);
|
||||
} else if (streq(fnnm, "hexfmt")) { return rval_evaluator_alloc_from_x_x_func(s_x_hexfmt_func, parg1);
|
||||
} else if (streq(fnnm, "hms2fsec")) { return rval_evaluator_alloc_from_f_s_func(f_s_hms2fsec_func, parg1);
|
||||
} else if (streq(fnnm, "hms2sec")) { return rval_evaluator_alloc_from_f_s_func(i_s_hms2sec_func, parg1);
|
||||
} else if (streq(fnnm, "int")) { return rval_evaluator_alloc_from_x_x_func(i_x_int_func, parg1);
|
||||
} else if (streq(fnnm, "invqnorm")) { return rval_evaluator_alloc_from_f_f_func(f_f_invqnorm_func, parg1);
|
||||
} else if (streq(fnnm, "isabsent")) { return rval_evaluator_alloc_from_x_x_func(b_x_isabsent_func, parg1);
|
||||
} else if (streq(fnnm, "isempty")) { return rval_evaluator_alloc_from_x_x_func(b_x_isempty_func, parg1);
|
||||
} else if (streq(fnnm, "isnotempty")) { return rval_evaluator_alloc_from_x_x_func(b_x_isnotempty_func, parg1);
|
||||
} else if (streq(fnnm, "isnotnull")) { return rval_evaluator_alloc_from_x_x_func(b_x_isnotnull_func, parg1);
|
||||
} else if (streq(fnnm, "isnull")) { return rval_evaluator_alloc_from_x_x_func(b_x_isnull_func, parg1);
|
||||
} else if (streq(fnnm, "ispresent")) { return rval_evaluator_alloc_from_x_x_func(b_x_ispresent_func, parg1);
|
||||
} else if (streq(fnnm, "isnumeric")) { return rval_evaluator_alloc_from_x_x_func(b_x_isnumeric_func, parg1);
|
||||
} else if (streq(fnnm, "isint")) { return rval_evaluator_alloc_from_x_x_func(b_x_isint_func, parg1);
|
||||
} else if (streq(fnnm, "isfloat")) { return rval_evaluator_alloc_from_x_x_func(b_x_isfloat_func, parg1);
|
||||
} else if (streq(fnnm, "isbool")) { return rval_evaluator_alloc_from_x_x_func(b_x_isbool_func, parg1);
|
||||
} else if (streq(fnnm, "isstring")) { return rval_evaluator_alloc_from_x_x_func(b_x_isstring_func, parg1);
|
||||
} else if (streq(fnnm, "log")) { return rval_evaluator_alloc_from_f_f_func(f_f_log_func, parg1);
|
||||
} else if (streq(fnnm, "log10")) { return rval_evaluator_alloc_from_f_f_func(f_f_log10_func, parg1);
|
||||
} else if (streq(fnnm, "log1p")) { return rval_evaluator_alloc_from_f_f_func(f_f_log1p_func, parg1);
|
||||
} else if (streq(fnnm, "qnorm")) { return rval_evaluator_alloc_from_f_f_func(f_f_qnorm_func, parg1);
|
||||
} else if (streq(fnnm, "round")) { return rval_evaluator_alloc_from_x_x_func(x_x_round_func, parg1);
|
||||
} else if (streq(fnnm, "sec2dhms")) { return rval_evaluator_alloc_from_s_i_func(s_i_sec2dhms_func, parg1);
|
||||
} else if (streq(fnnm, "sec2gmt")) { return rval_evaluator_alloc_from_x_n_func(s_n_sec2gmt_func, parg1);
|
||||
} else if (streq(fnnm, "sec2hms")) { return rval_evaluator_alloc_from_s_i_func(s_i_sec2hms_func, parg1);
|
||||
} else if (streq(fnnm, "sgn")) { return rval_evaluator_alloc_from_x_x_func(x_x_sgn_func, parg1);
|
||||
} else if (streq(fnnm, "sin")) { return rval_evaluator_alloc_from_f_f_func(f_f_sin_func, parg1);
|
||||
} else if (streq(fnnm, "sinh")) { return rval_evaluator_alloc_from_f_f_func(f_f_sinh_func, parg1);
|
||||
} else if (streq(fnnm, "sqrt")) { return rval_evaluator_alloc_from_f_f_func(f_f_sqrt_func, parg1);
|
||||
} else if (streq(fnnm, "string")) { return rval_evaluator_alloc_from_x_x_func(s_x_string_func, parg1);
|
||||
} else if (streq(fnnm, "strlen")) { return rval_evaluator_alloc_from_i_s_func(i_s_strlen_func, parg1);
|
||||
} else if (streq(fnnm, "tan")) { return rval_evaluator_alloc_from_f_f_func(f_f_tan_func, parg1);
|
||||
} else if (streq(fnnm, "tanh")) { return rval_evaluator_alloc_from_f_f_func(f_f_tanh_func, parg1);
|
||||
} else if (streq(fnnm, "tolower")) { return rval_evaluator_alloc_from_s_s_func(s_s_tolower_func, parg1);
|
||||
} else if (streq(fnnm, "toupper")) { return rval_evaluator_alloc_from_s_s_func(s_s_toupper_func, parg1);
|
||||
} else if (streq(fnnm, "typeof")) { return rval_evaluator_alloc_from_x_x_func(s_x_typeof_func, parg1);
|
||||
} else if (streq(fnnm, "~")) { return rval_evaluator_alloc_from_i_i_func(i_i_bitwise_not_func, parg1);
|
||||
if (streq(fnnm, "!")) { return rval_evaluator_alloc_from_b_b_func(b_b_not_func, parg1);
|
||||
} else if (streq(fnnm, "+")) { return rval_evaluator_alloc_from_x_x_func(x_x_upos_func, parg1);
|
||||
} else if (streq(fnnm, "-")) { return rval_evaluator_alloc_from_x_x_func(x_x_uneg_func, parg1);
|
||||
} else if (streq(fnnm, "abs")) { return rval_evaluator_alloc_from_x_x_func(x_x_abs_func, parg1);
|
||||
} else if (streq(fnnm, "acos")) { return rval_evaluator_alloc_from_f_f_func(f_f_acos_func, parg1);
|
||||
} else if (streq(fnnm, "acosh")) { return rval_evaluator_alloc_from_f_f_func(f_f_acosh_func, parg1);
|
||||
} else if (streq(fnnm, "asin")) { return rval_evaluator_alloc_from_f_f_func(f_f_asin_func, parg1);
|
||||
} else if (streq(fnnm, "asinh")) { return rval_evaluator_alloc_from_f_f_func(f_f_asinh_func, parg1);
|
||||
} else if (streq(fnnm, "atan")) { return rval_evaluator_alloc_from_f_f_func(f_f_atan_func, parg1);
|
||||
} else if (streq(fnnm, "atanh")) { return rval_evaluator_alloc_from_f_f_func(f_f_atanh_func, parg1);
|
||||
} else if (streq(fnnm, "boolean")) { return rval_evaluator_alloc_from_x_x_func(b_x_boolean_func, parg1);
|
||||
} else if (streq(fnnm, "boolean")) { return rval_evaluator_alloc_from_x_x_func(b_x_boolean_func, parg1);
|
||||
} else if (streq(fnnm, "cbrt")) { return rval_evaluator_alloc_from_f_f_func(f_f_cbrt_func, parg1);
|
||||
} else if (streq(fnnm, "ceil")) { return rval_evaluator_alloc_from_x_x_func(x_x_ceil_func, parg1);
|
||||
} else if (streq(fnnm, "cos")) { return rval_evaluator_alloc_from_f_f_func(f_f_cos_func, parg1);
|
||||
} else if (streq(fnnm, "cosh")) { return rval_evaluator_alloc_from_f_f_func(f_f_cosh_func, parg1);
|
||||
} else if (streq(fnnm, "dhms2fsec")) { return rval_evaluator_alloc_from_f_s_func(f_s_dhms2fsec_func, parg1);
|
||||
} else if (streq(fnnm, "dhms2sec")) { return rval_evaluator_alloc_from_f_s_func(i_s_dhms2sec_func, parg1);
|
||||
} else if (streq(fnnm, "erf")) { return rval_evaluator_alloc_from_f_f_func(f_f_erf_func, parg1);
|
||||
} else if (streq(fnnm, "erfc")) { return rval_evaluator_alloc_from_f_f_func(f_f_erfc_func, parg1);
|
||||
} else if (streq(fnnm, "exp")) { return rval_evaluator_alloc_from_f_f_func(f_f_exp_func, parg1);
|
||||
} else if (streq(fnnm, "expm1")) { return rval_evaluator_alloc_from_f_f_func(f_f_expm1_func, parg1);
|
||||
} else if (streq(fnnm, "float")) { return rval_evaluator_alloc_from_x_x_func(f_x_float_func, parg1);
|
||||
} else if (streq(fnnm, "floor")) { return rval_evaluator_alloc_from_x_x_func(x_x_floor_func, parg1);
|
||||
} else if (streq(fnnm, "fsec2dhms")) { return rval_evaluator_alloc_from_s_f_func(s_f_fsec2dhms_func, parg1);
|
||||
} else if (streq(fnnm, "fsec2hms")) { return rval_evaluator_alloc_from_s_f_func(s_f_fsec2hms_func, parg1);
|
||||
} else if (streq(fnnm, "gmt2sec")) { return rval_evaluator_alloc_from_i_s_func(i_s_gmt2sec_func, parg1);
|
||||
} else if (streq(fnnm, "hexfmt")) { return rval_evaluator_alloc_from_x_x_func(s_x_hexfmt_func, parg1);
|
||||
} else if (streq(fnnm, "hms2fsec")) { return rval_evaluator_alloc_from_f_s_func(f_s_hms2fsec_func, parg1);
|
||||
} else if (streq(fnnm, "hms2sec")) { return rval_evaluator_alloc_from_f_s_func(i_s_hms2sec_func, parg1);
|
||||
} else if (streq(fnnm, "int")) { return rval_evaluator_alloc_from_x_x_func(i_x_int_func, parg1);
|
||||
} else if (streq(fnnm, "invqnorm")) { return rval_evaluator_alloc_from_f_f_func(f_f_invqnorm_func, parg1);
|
||||
} else if (streq(fnnm, "isabsent")) { return rval_evaluator_alloc_from_x_x_func(b_x_isabsent_func, parg1);
|
||||
} else if (streq(fnnm, "isempty")) { return rval_evaluator_alloc_from_x_x_func(b_x_isempty_func, parg1);
|
||||
} else if (streq(fnnm, "isnotempty")) { return rval_evaluator_alloc_from_x_x_func(b_x_isnotempty_func, parg1);
|
||||
} else if (streq(fnnm, "isnotnull")) { return rval_evaluator_alloc_from_x_x_func(b_x_isnotnull_func, parg1);
|
||||
} else if (streq(fnnm, "isnull")) { return rval_evaluator_alloc_from_x_x_func(b_x_isnull_func, parg1);
|
||||
} else if (streq(fnnm, "ispresent")) { return rval_evaluator_alloc_from_x_x_func(b_x_ispresent_func, parg1);
|
||||
} else if (streq(fnnm, "isnumeric")) { return rval_evaluator_alloc_from_x_x_func(b_x_isnumeric_func, parg1);
|
||||
} else if (streq(fnnm, "isint")) { return rval_evaluator_alloc_from_x_x_func(b_x_isint_func, parg1);
|
||||
} else if (streq(fnnm, "isfloat")) { return rval_evaluator_alloc_from_x_x_func(b_x_isfloat_func, parg1);
|
||||
} else if (streq(fnnm, "isbool")) { return rval_evaluator_alloc_from_x_x_func(b_x_isbool_func, parg1);
|
||||
} else if (streq(fnnm, "isstring")) { return rval_evaluator_alloc_from_x_x_func(b_x_isstring_func, parg1);
|
||||
} else if (streq(fnnm, "log")) { return rval_evaluator_alloc_from_f_f_func(f_f_log_func, parg1);
|
||||
} else if (streq(fnnm, "log10")) { return rval_evaluator_alloc_from_f_f_func(f_f_log10_func, parg1);
|
||||
} else if (streq(fnnm, "log1p")) { return rval_evaluator_alloc_from_f_f_func(f_f_log1p_func, parg1);
|
||||
} else if (streq(fnnm, "qnorm")) { return rval_evaluator_alloc_from_f_f_func(f_f_qnorm_func, parg1);
|
||||
} else if (streq(fnnm, "round")) { return rval_evaluator_alloc_from_x_x_func(x_x_round_func, parg1);
|
||||
} else if (streq(fnnm, "sec2dhms")) { return rval_evaluator_alloc_from_s_i_func(s_i_sec2dhms_func, parg1);
|
||||
} else if (streq(fnnm, "sec2gmt")) { return rval_evaluator_alloc_from_x_n_func(s_n_sec2gmt_func, parg1);
|
||||
} else if (streq(fnnm, "sec2gmtdate")) { return rval_evaluator_alloc_from_x_n_func(s_n_sec2gmtdate_func, parg1);
|
||||
} else if (streq(fnnm, "sec2hms")) { return rval_evaluator_alloc_from_s_i_func(s_i_sec2hms_func, parg1);
|
||||
} else if (streq(fnnm, "sgn")) { return rval_evaluator_alloc_from_x_x_func(x_x_sgn_func, parg1);
|
||||
} else if (streq(fnnm, "sin")) { return rval_evaluator_alloc_from_f_f_func(f_f_sin_func, parg1);
|
||||
} else if (streq(fnnm, "sinh")) { return rval_evaluator_alloc_from_f_f_func(f_f_sinh_func, parg1);
|
||||
} else if (streq(fnnm, "sqrt")) { return rval_evaluator_alloc_from_f_f_func(f_f_sqrt_func, parg1);
|
||||
} else if (streq(fnnm, "string")) { return rval_evaluator_alloc_from_x_x_func(s_x_string_func, parg1);
|
||||
} else if (streq(fnnm, "strlen")) { return rval_evaluator_alloc_from_i_s_func(i_s_strlen_func, parg1);
|
||||
} else if (streq(fnnm, "tan")) { return rval_evaluator_alloc_from_f_f_func(f_f_tan_func, parg1);
|
||||
} else if (streq(fnnm, "tanh")) { return rval_evaluator_alloc_from_f_f_func(f_f_tanh_func, parg1);
|
||||
} else if (streq(fnnm, "tolower")) { return rval_evaluator_alloc_from_s_s_func(s_s_tolower_func, parg1);
|
||||
} else if (streq(fnnm, "toupper")) { return rval_evaluator_alloc_from_s_s_func(s_s_toupper_func, parg1);
|
||||
} else if (streq(fnnm, "typeof")) { return rval_evaluator_alloc_from_x_x_func(s_x_typeof_func, parg1);
|
||||
} else if (streq(fnnm, "~")) { return rval_evaluator_alloc_from_i_i_func(i_i_bitwise_not_func, parg1);
|
||||
|
||||
} else return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ TOP OF LIST:
|
|||
|
||||
! go through lmag article & clarify all unclears
|
||||
|
||||
! shorthand for sec2gmtdate
|
||||
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
CONCRETE FOR TEE:
|
||||
* --oflags overlays, w/ substruct data & federated substruct fcns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue