Nicolas Williams
66fb962a66
Add $ARGS, --args and --jsonargs ( fix #1345 )
2017-02-25 19:13:28 -06:00
Nicolas Williams
e8abc0a2f6
jq_compile_args(): allow object args to be object
2017-02-25 19:13:28 -06:00
Nicolas Williams
7b1bd99de6
Add jv_object_has()
2017-02-25 19:13:28 -06:00
Nicolas Williams
8619c6e060
Make test/shtest test of constant folding robust
...
Rather than testing that a constant expression produces so many
instructions, test that a variety of of such expressions produce the
same number of instructions. This will make future changes in the
compiler less likely to break this test.
2017-02-25 19:13:28 -06:00
Nicolas Williams
2e1f2db8b5
Improve Appveyor build
...
Among other things, make TESTS=... breaks when using modules/oniguruma,
so set SUBDIRS= then.
2017-02-25 18:57:38 -06:00
Nicolas Williams
ba32b33796
Windows: configure fails to detect missing math
...
For some reason AC_CHECK_MATH_FUNC() on Windows is not detecting a
handful of math functions as not being supported. This commit is a bit
of a hack.
2017-02-25 18:51:09 -06:00
Nicolas Williams
6e77b017c5
Make comment consistent with code
2017-02-25 18:51:09 -06:00
Nicolas Williams
9801de6979
Windows: Also use -lshlwapi for jq(1)
2017-02-25 14:49:20 -06:00
Nicolas Williams
c695f2cd9c
When using builtin Oniguruma, set flags correctly
...
This should fix the Travis-CI build.
2017-02-25 14:11:42 -06:00
Nicolas Williams
27c29aeb7b
Document localtime and strflocaltime
2017-02-23 23:39:24 -06:00
Nicolas Williams
06f20603f6
Add localtime and strflocaltime ( fix #1349 )
2017-02-23 22:26:53 -06:00
Nicolas Williams
607a9e3912
Improve manual section on assignment forms
2017-02-23 22:17:54 -06:00
Nicolas Williams
d3b4ad04f5
Revert e7caf68 for Dockerfile
2017-02-23 22:01:43 -06:00
Nicolas Williams
e7caf68edd
Attempt to use builtin Oniguruma for CIs
2017-02-23 00:33:08 -06:00
Nicolas Williams
c6374b6a1f
Allow ./configure --with-oniguruma=builtin
...
This allows one to force the use of jq's builtin copy of Oniguruma
(builtin as a git submodule).
We still need to fix make dist to include that copy of Oniguruma.
2017-02-23 00:30:13 -06:00
Nicolas Williams
8cde328007
Allow var bindings in path expressions ( #1347 )
...
The expression in a variable binding is not and must not be seen as
being part of a path expression in which the variable binding appears.
2017-02-21 18:11:35 -06:00
Nicolas Williams
9b2179089b
Improve manual
2017-02-15 11:48:39 -06:00
Nicolas Williams
597c1f6667
Add more missing math functions
2017-02-04 00:11:46 -06:00
Nicolas Williams
125071cf00
Fix handling of unsupported math functions
2017-02-04 00:11:10 -06:00
Nicolas Williams
2fb099e4cf
Promote wiki more in README
2017-01-31 16:13:32 -06:00
Nicolas Williams
6f9646a44f
Improve docs somewhat, inspired by #1326
2017-01-30 14:11:05 -06:00
Nicolas Williams
bd7b48c1b9
Make |= delete LHS when RHS is empty ( Fix #1314 )
...
Now that #1313 is fixed, |= no longer outputs null when the RHS update
expression outputs empty.
When a user wants to keep the current value of the LHS they would have
the RHS update expression output `.`, so having `empty` achieve the same
thing would be redundant. The obvious thing to do is to delete the LHS
when the RHS update outputs `empty` (i.e., doesn't output any values).
It's reasonable to think that existing programs won't be broken by this
change, because reduce and |= not handling empty well is clearly a bug.
(Though it's possible that some programs were using empty to quickly
terminate reduce or |=, it's not likely. They should use label/break
instead.)
Prior to this change |= would use the _last_ value output by the RHS
update expression. With this change |= will use the _first_ value
instead. This change _is_ a minor backwards-incompatible change. It
may or may not be acceptable; we'll see. It is a useful change in that
it makes |= faster when the update expression produces multiple values.
2017-01-30 14:11:05 -06:00
Nicolas Williams
aac8132f47
recurse (i.e., ..) needs to find leaf nulls
2017-01-30 14:11:05 -06:00
Nicolas Williams
7bdf3a39ad
Add SQL-style operators ( #1322 )
2017-01-30 14:11:05 -06:00
Nicolas Williams
396543191c
Make first(g) more efficient: extract only 1 value
...
first(g) was extracting two values, which, if g is slow, made first(g)
slow. And if the second extraction were to throw an error, then
first(g) would throw that error, which is clearly not the right thing to
do. Besides that, first(g) was allocating garbage, which it no longer
does.
2017-01-30 14:11:05 -06:00
Nicolas Williams
e24af3c78e
reduce: handle empty updates ( fix #1313 )
2017-01-30 14:11:05 -06:00
Nicolas Williams
0b8218515e
Disable appveyor build for now
2016-03-21 18:59:52 -05:00
Nicolas Williams
1740fd036d
Travis-CI build for OSX ( fix #1083 )
2016-01-19 00:19:24 -06:00
Nicolas Williams
6c635998f8
Always test sort_by/group_by post-#1082
2016-01-18 12:17:58 -06:00
Nicolas Williams
d228490162
Add --enable-ubsan (undefined behavior sanitizer)
2016-01-17 13:06:27 -06:00
Nicolas Williams
b92a12cf6c
Run failing tests on Windows; ignore failures
2016-01-17 12:46:57 -06:00
Nicolas Williams
c514368f98
Make it possible to run tests with set -x
...
One can now run:
make TRACE_TESTS=1 check
to get detailed output
2016-01-17 12:45:01 -06:00
Nicolas Williams
062f86a625
Enable more tests on Windows; move sort_by tests
...
Use %%FAIL IGNORE MSG for error messages that differ on Windows, and
move the sort_by/group_by tests that fail qhen qsort() is not stable.
Now only tests/sorttest and tests/shtest are disabled on Windows.
2016-01-17 12:45:01 -06:00
Nicolas Williams
c3d13260a7
Tweak appveyor.yml; disable failing tests
2016-01-17 01:49:50 -06:00
Nicolas Williams
093d20c3b9
Fix cross-compilation build
2016-01-16 16:51:06 -06:00
Nicolas Williams
ec07936888
Fix Windows build ( fix #911 )
2016-01-16 16:51:01 -06:00
Nicolas Williams
8e4724e16c
fixup non-maintainer build
2016-01-15 16:06:18 -06:00
Nicolas Williams
3afdbb7b7d
Always build src/builtin.inc ( fix #1069 )
2016-01-15 11:59:14 -06:00
Nicolas Williams
f217fa26ae
MultiByteToWideChar() usage bug ( fix #1072 )
2016-01-15 11:58:41 -06:00
Nicolas Williams
8f6f28c8d3
Make it easier to use jq with shebangs ( fix #1044 )
...
Allow a continuation on a comment immediately after a shebang to make
this traditional hack possible:
#!/bin/sh
# this next line is ignored by jq \
exec jq -f "$0" "$@"
# jq code follows
But continue only on the first line following a shebang, and only if
it's a comment.
2015-12-14 22:08:17 -08:00
Nicolas Williams
856a4b2f3f
Add note about IEEE754 to help msg
2015-12-15 00:00:03 -06:00
Nicolas Williams
ec583deefa
Fix JV_OBJECT() and go up to 18
2015-12-01 23:27:19 -06:00
Nicolas Williams
5fe053671a
Assume . if either stdin/on isatty() ( fix #1028 )
...
And move the #define of isatty on Windows up.
2015-12-01 23:27:19 -06:00
Nicolas Williams
8f115e9eed
Add address sanitizer (ASAN) support ( fix #1002 )
2015-10-27 20:06:21 -05:00
Nicolas Williams
8eb1367ca4
Heap buffer overflow in tokenadd() ( fix #105 )
...
This was an off-by one: the NUL terminator byte was not allocated on
resize. This was triggered by JSON-encoded numbers longer than 256
bytes.
2015-10-24 17:27:56 -05:00
Nicolas Williams
aa279ae7ac
Fix builtin.o dependency ( #992 )
2015-10-22 22:33:47 -05:00
Nicolas Williams
4060535f9f
Fix linux32 jq-1.5 executable ( fix #935 )
2015-10-22 22:07:34 -05:00
Nicolas Williams
1847333342
Rename sig/v1.5/jq-linux32.asc (prep for #935 )
2015-10-22 22:06:27 -05:00
Nicolas Williams
87c278c8a5
Remove setup.sh ( fix #993 )
2015-10-22 21:53:53 -05:00
Nicolas Williams
49b8382c5f
Remove expired key from KEYS
2015-10-12 19:11:52 -05:00
Nicolas Williams
583ab589dc
Add KEYS file
2015-10-12 19:01:02 -05:00
Nicolas Williams
c4524da3e0
EOF after newline in string mishandled ( fix #951 )
2015-09-22 20:11:54 -07:00
Nicolas Williams
f57743eb37
Remove jq.1.default and related content
2015-08-23 23:08:11 -05:00
Nicolas Williams
b6e3657eda
Document getpath/setpath
2015-08-16 20:32:01 -05:00
Nicolas Williams
a5b2c55a70
Fix streaming docs errors ( fix #904 )
2015-08-13 23:38:14 -05:00
Nicolas Williams
b119853aef
Test main.c fix for #817
2015-08-13 09:08:37 -07:00
Nicolas Williams
5d08d54636
Make search path expansion portable ( fix #817 )
...
This is part 2 of the fix to #817 . Part 1 is the previous commit.
2015-08-13 09:08:37 -07:00
Nicolas Williams
10df52efed
Make all global module paths absolute ( fix #817 )
...
This is part 1 of the fix for #817 . The next commit is part 2.
2015-08-13 09:08:37 -07:00
Nicolas Williams
c426d494f0
Improve assignment docs (see #897 )
2015-08-11 18:05:22 -05:00
Nicolas Williams
9a3f802d20
Fix #896 , double-free in setpath
2015-08-11 17:46:15 -05:00
Nicolas Williams
b5edbf7ffa
OS X's mktemp -d requires template ( fix #876 )
2015-07-28 00:28:54 -05:00
Nicolas Williams
6b55baa00f
Add missing files ( fix #875 )
2015-07-28 00:09:46 -05:00
Nicolas Williams
7f251344b7
Fix make dist ( fix #870 )
2015-07-26 23:26:30 -05:00
Nicolas Williams
812703139c
Use =, not ==, for shell tests
2015-07-18 21:12:08 -05:00
Nicolas Williams
f183b57ed5
input_filename should never empty
2015-07-10 12:32:11 -05:00
Nicolas Williams
dc4dfdff17
Update AUTHORS
2015-07-10 12:28:21 -05:00
Nicolas Williams
f55034d314
Update NEWS
2015-07-10 11:26:29 -05:00
Nicolas Williams
930899e12d
Update ChangeLog
2015-07-10 11:12:24 -05:00
Nicolas Williams
579518c78d
Use include for import into namespace
2015-07-10 10:19:33 -05:00
Nicolas Williams
fa45a5121c
Simplify import docs
2015-07-10 10:11:30 -05:00
Nicolas Williams
862566a48f
Fix typo in docs
2015-07-10 10:10:28 -05:00
Nicolas Williams
05899f8b3e
Fix Windows build
2015-07-04 13:45:24 -05:00
Nicolas Williams
a2a6f2d896
Document math support
2015-07-03 21:19:01 -05:00
Nicolas Williams
1c350c67d7
Remove pow10 for now; CHECK_MATH_FUNC needs work
...
The CHECK_MATH_FUNC() m4 macro needs work. It should use
AC_RUN_IFELSE(), not just AC_LINK_IFELSE(), and it should #define
_GNU_SOURCE and/or other such feature macros in the prologue to get
non-standard math functions (alternatvely jq should only support
standard math functions).
2015-07-03 21:13:13 -05:00
Nicolas Williams
e5dafaea44
Document --run-tests
2015-06-28 13:57:02 -05:00
Nicolas Williams
fd4f4f2087
Make --run-tests' jv_test() quiet
2015-06-28 13:39:32 -05:00
Nicolas Williams
6c89186437
Make --run-tests less verbose by default
...
Adding --debug-trace or --debug-dump-disasm before --run-tests now makes
it verbose.
2015-06-27 23:31:44 -05:00
Nicolas Williams
32c4759e6b
Add more basic number tests
2015-06-27 23:15:16 -05:00
Nicolas Williams
6366cfd7a4
Add pow, better libm detection ( fix #443 )
2015-06-27 23:14:46 -05:00
Nicolas Williams
1defaa7b00
Fix braino in merging the previous commit
...
There's a mantest that shows how to use `env`. Well, we need to set the
env var as expected then, else it will fail.
2015-06-27 13:00:41 -05:00
Nicolas Williams
aaf305868c
Restore import into caller's namespace
2015-06-26 23:40:37 -05:00
Nicolas Williams
8cc31f0f49
Slight re-phrasing of module docs
2015-06-26 23:38:24 -05:00
Nicolas Williams
a011ac6392
Use set -u in tests/setup
2015-06-26 23:36:34 -05:00
Nicolas Williams
505e23124f
Fix #830
2015-06-26 21:24:01 -05:00
Nicolas Williams
e7f6d1e6d0
Update Adavanced section of manual
2015-06-26 21:19:29 -05:00
Nicolas Williams
a220482de6
Document {$var}
2015-06-26 21:18:58 -05:00
Nicolas Williams
e16bd17571
Add {$var} . as {$var} syntax ( fix #831 )
2015-06-26 20:45:14 -05:00
Nicolas Williams
25d47ca08e
Add streaming utilities ( fix #827 )
2015-06-26 20:45:06 -05:00
Nicolas Williams
5108a451ca
Alternative implementation of tovalues
2015-06-26 20:17:02 -05:00
Nicolas Williams
8aecf82bfe
WriteFile() on WIN32 when stdout isatty ( fix #824 )
...
Use WriteFile() and bypass stdio IFF stdout isatty and we're on Windows.
2015-06-22 20:47:47 -05:00
Nicolas Williams
10cbb9b580
Fix test failure introduced by previous commit
2015-06-22 18:32:28 -05:00
Nicolas Williams
7811ef1e17
Fix #811 : use CommandLineToArgvW() and _wfopen()
2015-06-19 18:54:44 -05:00
Nicolas Williams
292f2d3208
argv[] may not be UTF-8 ( fix #811 )
2015-06-18 21:31:22 -05:00
Nicolas Williams
0b42457929
Fix finites
2015-06-18 10:14:52 -05:00
Nicolas Williams
6083581fea
Fix #802
2015-06-18 00:03:46 -05:00
Nicolas Williams
164b877bfa
Add isnormal and related, rename *inf
2015-06-17 23:14:26 -05:00
Nicolas Williams
b9c2a326ba
Fix #814 : raise on div-0, add inf isinf nan isnan
2015-06-17 19:58:55 -05:00
Nicolas Williams
bdc1feb50e
Fix infinite loop on error in sequence parser
2015-06-17 19:58:49 -05:00
Nicolas Williams
4ef04e5b5c
Sequence parser: wait for RS on startup ( fix #687 )
...
Per-RFC7464.
2015-06-17 11:24:34 -05:00
Nicolas Williams
0f5345e515
Fix infinite loop on EOF bug
2015-06-17 11:23:58 -05:00