]> granicus.if.org Git - jq/log
jq
11 years agoFix serious bug in handling of --argfile 157/head
Nicolas Williams [Tue, 18 Jun 2013 03:32:44 +0000 (22:32 -0500)]
Fix serious bug in handling of --argfile

11 years agoFix leaks in jv_load_file()
Nicolas Williams [Tue, 18 Jun 2013 03:32:54 +0000 (22:32 -0500)]
Fix leaks in jv_load_file()

11 years agoSimplify block functions for variables
Stephen Dolan [Tue, 18 Jun 2013 00:07:18 +0000 (01:07 +0100)]
Simplify block functions for variables

11 years agoSaner build instructions in README.md
Stephen Dolan [Mon, 17 Jun 2013 23:28:50 +0000 (00:28 +0100)]
Saner build instructions in README.md

Closes #144

11 years agoRemove some initialise-to-zero code.
Stephen Dolan [Mon, 17 Jun 2013 23:17:20 +0000 (00:17 +0100)]
Remove some initialise-to-zero code.

This lets valgrind find more bugs - if a field isn't given a
well-defined value valgrind will now find it instead of seeing it
set to zero with memset.

11 years agoMerge branch 'stack-refactor-merge'
Stephen Dolan [Mon, 17 Jun 2013 23:13:44 +0000 (00:13 +0100)]
Merge branch 'stack-refactor-merge'

11 years agoMerge branch 'stack-refactor'
Stephen Dolan [Mon, 17 Jun 2013 23:06:00 +0000 (00:06 +0100)]
Merge branch 'stack-refactor'

Conflicts:
execute.c

11 years agoMerge pull request #154 from nicowilliams/no-fopen-re
Stephen Dolan [Mon, 17 Jun 2013 22:34:01 +0000 (15:34 -0700)]
Merge pull request #154 from nicowilliams/no-fopen-re

Remove accidentally introduced use of fopen "e"

11 years agoRemove accidentally introduced use of fopen "e" 154/head
Nicolas Williams [Mon, 17 Jun 2013 22:27:25 +0000 (17:27 -0500)]
Remove accidentally introduced use of fopen "e"

11 years agoMerge pull request #114 from nicowilliams/nomem_handler
Stephen Dolan [Sun, 16 Jun 2013 13:20:27 +0000 (06:20 -0700)]
Merge pull request #114 from nicowilliams/nomem_handler

Add jv_nomem_handler()

11 years agoRemove last remnant of main.h 114/head
Nicolas Williams [Sun, 16 Jun 2013 13:06:52 +0000 (08:06 -0500)]
Remove last remnant of main.h

11 years agoAllow --run-tests to take a file argument
Nicolas Williams [Sat, 15 Jun 2013 06:55:47 +0000 (01:55 -0500)]
Allow --run-tests to take a file argument

11 years agoFixup API to get closer to a libjq
Nicolas Williams [Thu, 6 Jun 2013 22:26:15 +0000 (17:26 -0500)]
Fixup API to get closer to a libjq

11 years agoMerge pull request #150 from nicowilliams/jv_load_file
Stephen Dolan [Sat, 15 Jun 2013 12:29:17 +0000 (05:29 -0700)]
Merge pull request #150 from nicowilliams/jv_load_file

Move slurp_file() into library as jv_load_file()

11 years agoMove slurp_file() into library as jv_load_file() 150/head
Nicolas Williams [Sat, 15 Jun 2013 05:08:59 +0000 (00:08 -0500)]
Move slurp_file() into library as jv_load_file()

Needed as part of creating a libjq.

11 years agoClean up lots of stack and frame logic.
Stephen Dolan [Fri, 14 Jun 2013 21:08:18 +0000 (22:08 +0100)]
Clean up lots of stack and frame logic.

Move frame defs to execute.c

11 years agoSimplify frame logic.
Stephen Dolan [Fri, 14 Jun 2013 00:20:24 +0000 (01:20 +0100)]
Simplify frame logic.

11 years agoUnify all stacks. Passes tests, but needs cleanup.
Stephen Dolan [Thu, 13 Jun 2013 20:50:32 +0000 (21:50 +0100)]
Unify all stacks. Passes tests, but needs cleanup.

11 years agoSupport ."foo" syntax for accessing fields. See #141.
Stephen Dolan [Tue, 11 Jun 2013 21:26:39 +0000 (22:26 +0100)]
Support ."foo" syntax for accessing fields. See #141.

11 years agoUnify frame and data stacks
Stephen Dolan [Mon, 10 Jun 2013 00:17:58 +0000 (01:17 +0100)]
Unify frame and data stacks

11 years agoSpeed up cached configure (./configure -C)
Stephen Dolan [Wed, 5 Jun 2013 15:40:01 +0000 (16:40 +0100)]
Speed up cached configure (./configure -C)

11 years agoClean up flex lines in build
Stephen Dolan [Wed, 5 Jun 2013 12:43:23 +0000 (13:43 +0100)]
Clean up flex lines in build

11 years agoLex and parse .foo better.
Stephen Dolan [Wed, 5 Jun 2013 12:41:11 +0000 (13:41 +0100)]
Lex and parse .foo better.

'.as' is now valid, '. foo' is now invalid. See #141.

11 years agoMerge pull request #142 from lanthaler/master
Stephen Dolan [Tue, 4 Jun 2013 11:13:24 +0000 (04:13 -0700)]
Merge pull request #142 from lanthaler/master

Update README.md

11 years agoUpdate README.md 142/head
Markus Lanthaler [Tue, 4 Jun 2013 11:04:42 +0000 (13:04 +0200)]
Update README.md

Update the link to the documentation. All GitHub pages are now using the github.io domain.

11 years agoMake jq --version print to stdout, not stderr
Stephen Dolan [Mon, 3 Jun 2013 22:22:59 +0000 (23:22 +0100)]
Make jq --version print to stdout, not stderr

11 years agoBetter error handling for .foo case in parser. See #141.
Stephen Dolan [Mon, 3 Jun 2013 22:08:17 +0000 (23:08 +0100)]
Better error handling for .foo case in parser. See #141.

11 years agoLet the parser rather than the lexer handle invalid characters.
Stephen Dolan [Mon, 3 Jun 2013 22:07:13 +0000 (23:07 +0100)]
Let the parser rather than the lexer handle invalid characters.

11 years agoAdd command-line option to sort object keys.
Stephen Dolan [Wed, 29 May 2013 10:43:55 +0000 (11:43 +0100)]
Add command-line option to sort object keys.

Closes #79.

11 years agoClean up Makefile.am (distcheck, rebuild version.h less often)
Stephen Dolan [Sat, 25 May 2013 22:46:20 +0000 (23:46 +0100)]
Clean up Makefile.am (distcheck, rebuild version.h less often)

11 years agoMerge pull request #139 from 13ren/stopwarning
Stephen Dolan [Sat, 1 Jun 2013 14:30:15 +0000 (07:30 -0700)]
Merge pull request #139 from 13ren/stopwarning

Stop warning on fgets, jq_test.c:42

11 years agoStop warning on fgets, simple version 139/head
Brendan Macmillan [Sat, 1 Jun 2013 01:00:26 +0000 (11:00 +1000)]
Stop warning on fgets, simple version

11 years agoStop warning on fgets, complex version
Brendan Macmillan [Fri, 31 May 2013 04:21:55 +0000 (14:21 +1000)]
Stop warning on fgets, complex version

11 years agoSquash a warning on some GCC versions
Stephen Dolan [Fri, 31 May 2013 11:15:58 +0000 (12:15 +0100)]
Squash a warning on some GCC versions

11 years agoSupport for printing object keys in sorted order.
Stephen Dolan [Wed, 29 May 2013 10:43:23 +0000 (11:43 +0100)]
Support for printing object keys in sorted order.

No command-line option to enable this yet. See #79.

11 years agoMerge pull request #135 from 13ren/locfile_bugfix
Stephen Dolan [Wed, 29 May 2013 10:38:15 +0000 (03:38 -0700)]
Merge pull request #135 from 13ren/locfile_bugfix

Locfile bugfix

11 years agoMerge pull request #130 from 13ren/libload_2
Stephen Dolan [Wed, 29 May 2013 10:37:36 +0000 (03:37 -0700)]
Merge pull request #130 from 13ren/libload_2

libload_2 (update to pull request #126, for issue  #112)

11 years agoBugfix multiline off-by-one (locfile.c) 135/head
Brendan Macmillan [Tue, 28 May 2013 04:11:24 +0000 (14:11 +1000)]
Bugfix multiline off-by-one (locfile.c)

11 years agolocfile.h -> locfile.h + locfile.c
Brendan Macmillan [Sun, 26 May 2013 02:42:04 +0000 (12:42 +1000)]
locfile.h -> locfile.h + locfile.c

clean up includes of a few files

11 years agoHack bugfix for multiline off-by-one (locfile.c)
Brendan Macmillan [Mon, 27 May 2013 00:00:01 +0000 (10:00 +1000)]
Hack bugfix for multiline off-by-one (locfile.c)

11 years agoLoad library from ~/.jq 130/head
Brendan Macmillan [Thu, 16 May 2013 17:03:42 +0000 (03:03 +1000)]
Load library from ~/.jq

11 years agoMake jq --version report an actual git revision.
Stephen Dolan [Fri, 24 May 2013 22:34:34 +0000 (23:34 +0100)]
Make jq --version report an actual git revision.

Closes #129.

11 years agoMerge pull request #133 from nicowilliams/option_argfile-rebase0
Stephen Dolan [Fri, 24 May 2013 11:13:45 +0000 (04:13 -0700)]
Merge pull request #133 from nicowilliams/option_argfile-rebase0

Add --argfile variant of --arg (issue #117)

11 years agoAdd --argfile variant of --arg (issue #117) 133/head
Nicolas Williams [Mon, 6 May 2013 22:25:19 +0000 (17:25 -0500)]
Add --argfile variant of --arg (issue #117)

This is useful when one has a database (in JSON form) to query using jq
input data.

    % echo '{"a":1, "c":5}' > db.json
    % echo '"c"'|./jq --argfile f /tmp/a '$f[.]'
    5
    % echo '"a"'|./jq --argfile f /tmp/a '$f[.]'
    1
    % echo '"b"'|./jq --argfile f /tmp/a '$f[.]'
    null
    %

11 years ago'make clean' won't delete jq.1 if it can't be rebuilt.
Stephen Dolan [Thu, 23 May 2013 18:20:19 +0000 (19:20 +0100)]
'make clean' won't delete jq.1 if it can't be rebuilt.

See #131

11 years agojq 1.3 release 126/head jq-1.3
Stephen Dolan [Sun, 19 May 2013 09:48:25 +0000 (10:48 +0100)]
jq 1.3 release

11 years agoEACH need not make a backtrack point on the last iteration
Stephen Dolan [Fri, 17 May 2013 21:49:08 +0000 (22:49 +0100)]
EACH need not make a backtrack point on the last iteration

11 years agoMake array construction use LOADVN (slightly faster)
Stephen Dolan [Thu, 16 May 2013 14:09:59 +0000 (15:09 +0100)]
Make array construction use LOADVN (slightly faster)

11 years agoRemove the insane "fold" operation, replace with saner "reduce".
Stephen Dolan [Thu, 16 May 2013 14:07:53 +0000 (15:07 +0100)]
Remove the insane "fold" operation, replace with saner "reduce".

11 years agoAdd LOADVN opcode.
Stephen Dolan [Thu, 16 May 2013 13:32:18 +0000 (14:32 +0100)]
Add LOADVN opcode.

Does a variable load, but sets the variable to be null afterwards.

11 years agoReverse function. Closes #94.
Stephen Dolan [Thu, 16 May 2013 13:25:28 +0000 (14:25 +0100)]
Reverse function. Closes #94.

11 years agoBetter debug info for struct bytecode.
Stephen Dolan [Wed, 15 May 2013 23:51:17 +0000 (00:51 +0100)]
Better debug info for struct bytecode.

--debug-dump-disasm produces more comprehensible output now.

11 years agoOnly generate code for those builtin functions actually used.
Stephen Dolan [Wed, 15 May 2013 00:37:15 +0000 (01:37 +0100)]
Only generate code for those builtin functions actually used.

Makes output of --debug-dump-disasm much simpler.

11 years agoRemove the YIELD opcode (use RET instead)
Stephen Dolan [Wed, 15 May 2013 00:23:06 +0000 (01:23 +0100)]
Remove the YIELD opcode (use RET instead)

11 years ago'length' function now measures string length in codepoints, not bytes.
Stephen Dolan [Tue, 14 May 2013 23:37:38 +0000 (00:37 +0100)]
'length' function now measures string length in codepoints, not bytes.

11 years agoBugfix for array slices.
Stephen Dolan [Tue, 14 May 2013 23:22:44 +0000 (00:22 +0100)]
Bugfix for array slices.

11 years agoAdd the range function
Stephen Dolan [Tue, 14 May 2013 15:09:10 +0000 (16:09 +0100)]
Add the range function

11 years agoFix some documentation bugs
Stephen Dolan [Mon, 13 May 2013 19:26:44 +0000 (20:26 +0100)]
Fix some documentation bugs

11 years agoArray slicing. Closes #2.
Stephen Dolan [Mon, 13 May 2013 19:16:19 +0000 (20:16 +0100)]
Array slicing. Closes #2.

11 years agoDelete unnecessary _POSIX_SOURCE. Closes #89
Stephen Dolan [Mon, 13 May 2013 15:41:11 +0000 (16:41 +0100)]
Delete unnecessary _POSIX_SOURCE. Closes #89

11 years agoAdd to_entries, from_entries and with_entries functions.
Stephen Dolan [Mon, 13 May 2013 15:15:49 +0000 (16:15 +0100)]
Add to_entries, from_entries and with_entries functions.

Closes #97.

11 years agoFix the //= operator.
Stephen Dolan [Mon, 13 May 2013 15:04:30 +0000 (16:04 +0100)]
Fix the //= operator.

Closes #62.

11 years agoBetter error handling for INSERT opcode
Stephen Dolan [Mon, 13 May 2013 14:42:57 +0000 (15:42 +0100)]
Better error handling for INSERT opcode

jq 'null | {(.a): 1}' no longer crashes.

11 years agoRemove the is_backtrack_frame special case hack.
Stephen Dolan [Mon, 13 May 2013 14:37:57 +0000 (15:37 +0100)]
Remove the is_backtrack_frame special case hack.

11 years agoRefactor path logic.
Stephen Dolan [Mon, 13 May 2013 14:00:05 +0000 (15:00 +0100)]
Refactor path logic.

11 years agoFix a bug triggered by jv_array_slice.
Stephen Dolan [Mon, 13 May 2013 13:10:39 +0000 (14:10 +0100)]
Fix a bug triggered by jv_array_slice.

11 years agoFix bug with path handling (used in assignments).
Stephen Dolan [Sat, 11 May 2013 17:10:21 +0000 (18:10 +0100)]
Fix bug with path handling (used in assignments).

Closes #67

11 years agoMerge branch 'autotools'
Stephen Dolan [Sat, 11 May 2013 14:21:23 +0000 (15:21 +0100)]
Merge branch 'autotools'

11 years agoDelete some Autotools junk and update README. autotools
Stephen Dolan [Sat, 11 May 2013 14:15:56 +0000 (15:15 +0100)]
Delete some Autotools junk and update README.

Autotools autogenerated files that change frequently have been
removed, those that don't are still checked in.

11 years agoRake task to build website including source dist and binaries.
Stephen Dolan [Sat, 11 May 2013 13:57:58 +0000 (14:57 +0100)]
Rake task to build website including source dist and binaries.

11 years agoRake task to build source distribution for website
Stephen Dolan [Sat, 11 May 2013 13:48:39 +0000 (14:48 +0100)]
Rake task to build source distribution for website

11 years agoAdd the docs to the distributed tarballs
Stephen Dolan [Thu, 9 May 2013 19:53:51 +0000 (20:53 +0100)]
Add the docs to the distributed tarballs

11 years agoFix manpage build.
Stephen Dolan [Thu, 9 May 2013 19:43:26 +0000 (20:43 +0100)]
Fix manpage build.

11 years agoAdd some build instructions for how to install doc dependencies.
Stephen Dolan [Thu, 9 May 2013 19:27:12 +0000 (20:27 +0100)]
Add some build instructions for how to install doc dependencies.

jq can now build without Ruby, but you won't get a nice manpage.

11 years agoDon't build the manpage unless there's a working Ruby setup.
Stephen Dolan [Thu, 9 May 2013 14:22:38 +0000 (15:22 +0100)]
Don't build the manpage unless there's a working Ruby setup.

11 years agosupport for out-of-tree tests
Stephen Dolan [Thu, 9 May 2013 12:40:00 +0000 (13:40 +0100)]
support for out-of-tree tests

11 years agoFail properly when attempting to build manpage without rake
Stephen Dolan [Thu, 9 May 2013 12:10:09 +0000 (13:10 +0100)]
Fail properly when attempting to build manpage without rake

11 years agoAutotools hackery so that "make dist" builds lexer and parser.
Stephen Dolan [Thu, 9 May 2013 10:31:17 +0000 (11:31 +0100)]
Autotools hackery so that "make dist" builds lexer and parser.

11 years agoAdd a redundant intialisation to squash a gcc warning.
Stephen Dolan [Thu, 9 May 2013 10:30:49 +0000 (11:30 +0100)]
Add a redundant intialisation to squash a gcc warning.

11 years agoMake manpage building more robust.
Stephen Dolan [Thu, 9 May 2013 01:38:57 +0000 (02:38 +0100)]
Make manpage building more robust.

11 years agoAdd a "binaries" target to the website Rakefile.
Stephen Dolan [Thu, 9 May 2013 01:18:28 +0000 (02:18 +0100)]
Add a "binaries" target to the website Rakefile.

11 years agoMinor docs fix to get rid of Bonsai warnings.
Stephen Dolan [Thu, 9 May 2013 01:01:01 +0000 (02:01 +0100)]
Minor docs fix to get rid of Bonsai warnings.

11 years agoScript for cross-compiling jq binaries for other platforms.
Stephen Dolan [Thu, 9 May 2013 00:50:20 +0000 (01:50 +0100)]
Script for cross-compiling jq binaries for other platforms.

11 years agoUse the version number from configure.ac in the website.
Stephen Dolan [Wed, 8 May 2013 18:57:29 +0000 (19:57 +0100)]
Use the version number from configure.ac in the website.

11 years agoAdd the parser to BUILT_SOURCES
Stephen Dolan [Wed, 8 May 2013 18:57:05 +0000 (19:57 +0100)]
Add the parser to BUILT_SOURCES

11 years agoConfigure whether colour is displayed by default directly in source
Stephen Dolan [Wed, 8 May 2013 18:36:52 +0000 (19:36 +0100)]
Configure whether colour is displayed by default directly in source

11 years agoCheck in a pile of Autotools junk, including the configure script.
Stephen Dolan [Wed, 8 May 2013 17:55:10 +0000 (18:55 +0100)]
Check in a pile of Autotools junk, including the configure script.

11 years agoMerge pull request #115 from nicowilliams/complex
Stephen Dolan [Wed, 8 May 2013 14:07:31 +0000 (07:07 -0700)]
Merge pull request #115 from nicowilliams/complex

Rename complex to nontrivial for safety (#113)

11 years agoClean up autotools config.
Stephen Dolan [Wed, 8 May 2013 01:30:08 +0000 (02:30 +0100)]
Clean up autotools config.

Remove some of @stagrlee's hard work since jq's testsuite is
less silly than when he wrote the autotools config.

11 years agoCheck in jv_utf8_tables.gen.h, it is unlikely to change.
Stephen Dolan [Wed, 8 May 2013 00:02:18 +0000 (01:02 +0100)]
Check in jv_utf8_tables.gen.h, it is unlikely to change.

11 years agoMerge remote-tracking branch 'stagrlee/master' into autotools
Stephen Dolan [Tue, 7 May 2013 23:52:24 +0000 (00:52 +0100)]
Merge remote-tracking branch 'stagrlee/master' into autotools

Conflicts:
Makefile
jq_test.c

11 years agoRename complex to nontrivial for safety (#113) 115/head
Nicolas Williams [Mon, 6 May 2013 04:28:11 +0000 (23:28 -0500)]
Rename complex to nontrivial for safety (#113)

11 years agoMerge pull request #119 from 13ren/master
Stephen Dolan [Tue, 7 May 2013 10:57:47 +0000 (03:57 -0700)]
Merge pull request #119 from 13ren/master

tiny typo fix in manual

11 years agoFix #111: exit(1) when inputs are not valid JSON
Nicolas Williams [Sat, 4 May 2013 22:03:01 +0000 (17:03 -0500)]
Fix #111: exit(1) when inputs are not valid JSON

11 years agoAdd trailing slashes to various internal doc links.
Stephen Dolan [Mon, 6 May 2013 14:03:14 +0000 (15:03 +0100)]
Add trailing slashes to various internal doc links.

Fixes #110

11 years agoAdd a --arg option to allow variables to be passed from the cmdline.
Stephen Dolan [Mon, 6 May 2013 13:21:00 +0000 (14:21 +0100)]
Add a --arg option to allow variables to be passed from the cmdline.

Closes #107

11 years agoAdd the "has" function. Closes #74.
Stephen Dolan [Mon, 6 May 2013 12:46:16 +0000 (13:46 +0100)]
Add the "has" function. Closes #74.

11 years agoMerge pull request #77 from jkleint/patch-1
Stephen Dolan [Mon, 6 May 2013 01:39:59 +0000 (18:39 -0700)]
Merge pull request #77 from jkleint/patch-1

Clarify description of `as`

11 years agoDocument behaviour of .[] on objects.
Stephen Dolan [Mon, 6 May 2013 01:37:34 +0000 (02:37 +0100)]
Document behaviour of .[] on objects.

Closes #57.

11 years agoAdd documentation for "type".
Stephen Dolan [Mon, 6 May 2013 01:34:02 +0000 (02:34 +0100)]
Add documentation for "type".

Closes #75.