From b9d96a8cd3efb0ec8917521380b770fbf6555ce1 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Thu, 18 Feb 2016 23:44:25 -0500 Subject: [PATCH] neaten --- c/mapping/rval_evaluator.h | 30 +++++++++++++++++------------- c/mapping/rval_evaluators.c | 3 ++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/c/mapping/rval_evaluator.h b/c/mapping/rval_evaluator.h index b5b4e5bdb..6058b6258 100644 --- a/c/mapping/rval_evaluator.h +++ b/c/mapping/rval_evaluator.h @@ -1,15 +1,6 @@ -#ifndef RVAL_EVALUATOR_H -#define RVAL_EVALUATOR_H - -#include "lib/context.h" -#include "containers/lrec.h" -#include "containers/lhmsv.h" -#include "containers/mlhmmv.h" -#include "containers/mlrval.h" -#include "lib/string_array.h" - -struct _rval_evaluator_t; // forward reference for method declarations - +// ================================================================ +// These evaluate right-hand-side values (rvals) and return mlrvals (mv_t). +// // Record state is in three parts here: // // * The lrec is read for input fields; output fields are written to the typed-overlay map. It is up to the @@ -31,7 +22,20 @@ struct _rval_evaluator_t; // forward reference for method declarations // // o It is up to mapper_put to write "left"=>"abc" and "right"=>"def" into the lrec. // -// See also the comments above mapper_put.c for more information. +// See also the comments above mapper_put.c for more information about left-hand sides (lvals). +// ================================================================ + +#ifndef RVAL_EVALUATOR_H +#define RVAL_EVALUATOR_H + +#include "lib/context.h" +#include "containers/lrec.h" +#include "containers/lhmsv.h" +#include "containers/mlhmmv.h" +#include "containers/mlrval.h" +#include "lib/string_array.h" + +struct _rval_evaluator_t; // forward reference for method declarations typedef mv_t rval_evaluator_process_func_t( lrec_t* prec, lhmsv_t* ptyped_overlay, mlhmmv_t* poosvars, diff --git a/c/mapping/rval_evaluators.c b/c/mapping/rval_evaluators.c index 3dd03ff1b..531479aaa 100644 --- a/c/mapping/rval_evaluators.c +++ b/c/mapping/rval_evaluators.c @@ -12,6 +12,8 @@ // ================================================================ // NOTES: // +// * Code here evaluates right-hand-side values (rvals) and return mlrvals (mv_t). +// // * This is used by mlr filter and mlr put. // // * Unlike most files in Miller which are read top-down (with sufficient @@ -1932,7 +1934,6 @@ rval_evaluator_t* rval_evaluator_alloc_from_zary_func_name(char* function_name) } // ================================================================ - typedef enum _func_class_t { FUNC_CLASS_ARITHMETIC, FUNC_CLASS_MATH,