Export input/0 directly from C, removing _input/0

The distinction between input/0 and _input/0 has been unnecessary since
a9c613..7dc34b, which moved end-of-input handling into C and replaced
the jq definition of input with `def input: _input;`
This commit is contained in:
Muh Muhten authored and Nico Williams committed 2019-02-06 12:06:03 -06:00
1 parent 21be3857b5
commit 2fd725209e
2 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -1663,7 +1663,7 @@ static const struct cfunction function_list[] = {
{(cfunction_ptr)f_get_jq_origin, "get_jq_origin", 1},
{(cfunction_ptr)f_match, "_match_impl", 4},
{(cfunction_ptr)f_modulemeta, "modulemeta", 1},
{(cfunction_ptr)f_input, "_input", 1},
{(cfunction_ptr)f_input, "input", 1},
{(cfunction_ptr)f_debug, "debug", 1},
{(cfunction_ptr)f_stderr, "stderr", 1},
{(cfunction_ptr)f_strptime, "strptime", 2},
+1 -2
View File
@@ -200,12 +200,11 @@ def transpose:
end;
def in(xs): . as $x | xs | has($x);
def inside(xs): . as $x | xs | contains($x);
def input: _input;
def repeat(exp):
def _repeat:
exp, _repeat;
_repeat;
def inputs: try repeat(_input) catch if .=="break" then empty else .|error end;
def inputs: try repeat(input) catch if .=="break" then empty else .|error end;
# like ruby's downcase - only characters A to Z are affected
def ascii_downcase:
explode | map( if 65 <= . and . <= 90 then . + 32 else . end) | implode;