]> granicus.if.org Git - jq/log
jq
9 years agoHandle NUL in escaped-string output 758/head
Assaf Gordon [Mon, 20 Apr 2015 20:51:48 +0000 (16:51 -0400)]
Handle NUL in escaped-string output

When escaping string (e.g. for `@tsv` or `@csv` outputs),
escape NULs as '\0'.

Existing behaviour, unchanged by this patch:

    $ echo '"a\u0000b"' | ./jq '.'
    "a\u0000b"
    $ echo '"a\u0000b"' | ./jq -r '.' | od -a
    0000000   a nul   b  nl
    0000004

When using `@tsv`, escape NUL to `\0`:

    $ echo '"a\u0000b"' | ./jq -r '[.]|@tsv'
    a\0b
    $ echo '"a\u0000b"' | ./jq '[.]|@tsv'
    "a\\0b"

9 years agomanual.yml: Clarify how to specify keys with ":" and special chars.
tal@whatexit.org [Fri, 3 Apr 2015 13:53:51 +0000 (13:53 +0000)]
manual.yml: Clarify how to specify keys with ":" and special chars.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
9 years agodocs: expand @tsv section - add escape sequences. 751/head
Assaf Gordon [Thu, 16 Apr 2015 03:24:24 +0000 (23:24 -0400)]
docs: expand @tsv section - add escape sequences.

9 years ago@tsv: escape \r, \n, \\
Assaf Gordon [Wed, 15 Apr 2015 19:55:27 +0000 (15:55 -0400)]
@tsv: escape \r, \n, \\

When using '@tsv' output format with '-r' option,
escape \r, \n and \\ in addition to \t.

Example:
    $ printf '{"id":"hello\\ttab\\nworld","x":43 }' | jq .
    {
      "id": "hello\ttab\nworld",
      "x": 43
    }

Before: newlines are not escaped, generating invalid TSV output:

    $ printf '{"id":"hello\\ttab\\nworld","x":43 }' \
        | ./jq-old -r '[.id,.x] | @tsv'
    hello\ttab
    world 43

After: newlines are properly escaped:

    $ printf '{"id":"hello\\ttab\\nworld","x":43 }' \
        | ./jq-new -r '[.id, .x] | @tsv'
    hello\ttab\nworld 43

Before: backslashes themselves are not escaped, so there's no way to
distinguish between escaped characters and 'real' backslashes
(in the example below, there is should not be newline, despite the
output containing "\n".

    $ printf '{"x":"hello\\ttab\\\\new world"}' \
        | ./jq-old -r '[.x]|@tsv'
    hello\ttab\new world

After: backslashes are escaped:

    $ printf '{"x":"hello\\ttab\\\\new world"}' \
        | ./jq-new -r '[.x]|@tsv'
    hello\ttab\\new world

9 years agoTest fix for mktime
Nicolas Williams [Tue, 31 Mar 2015 15:03:35 +0000 (10:03 -0500)]
Test fix for mktime

9 years agoAdd `$__loc__` (fix #740)
Nicolas Williams [Mon, 30 Mar 2015 20:55:54 +0000 (15:55 -0500)]
Add `$__loc__` (fix #740)

9 years agoInclude filename and lineno in error messages
Nicolas Williams [Mon, 30 Mar 2015 00:12:23 +0000 (19:12 -0500)]
Include filename and lineno in error messages

9 years agoTweak fix for #719
Nicolas Williams [Tue, 24 Mar 2015 20:05:06 +0000 (15:05 -0500)]
Tweak fix for #719

9 years agodetect and report output writing errors
Assaf Gordon [Fri, 6 Mar 2015 18:54:53 +0000 (13:54 -0500)]
detect and report output writing errors

Detect output errors when the program exits.

Currently:
    $ echo '{}' | jq . > /dev/full && echo ok
    ok

with the patch:
    $ echo '{}' | jq . > /dev/full && echo ok
    Error: writing output failed: No space left on device

also apply to hardware/network/other I/O errors.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
9 years agoAdds Dockerfile
Santiago Lapresta [Wed, 18 Mar 2015 00:12:08 +0000 (01:12 +0100)]
Adds Dockerfile

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
9 years agopartial handling of input errors
Assaf Gordon [Tue, 10 Mar 2015 21:02:02 +0000 (17:02 -0400)]
partial handling of input errors

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
9 years agoalways propagate input errors to exit code
Assaf Gordon [Tue, 10 Mar 2015 03:43:31 +0000 (23:43 -0400)]
always propagate input errors to exit code

Improve robustness in automated system when using exit code in shell scripts,
by exiting with code 2 if there was any input error (even overriding other
possible error exit codes).
Exit code 2 is already used to indicate system errors.

Without the patch:
   $ jq . no-such-file ; echo $?
   jq: no-such-file: No such file or directory
   0

With the patch:
   $ jq . no-such-file ; echo $?
   jq: no-such-file: No such file or directory
   2

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
9 years agoBetter argfile fix (#705, fix #736)
Nicolas Williams [Tue, 24 Mar 2015 19:53:35 +0000 (14:53 -0500)]
Better argfile fix (#705, fix #736)

9 years agoDrop name-less label/break for now
Nicolas Williams [Mon, 23 Mar 2015 19:57:35 +0000 (14:57 -0500)]
Drop name-less label/break for now

See #734 and #658.

9 years agoFix #735
William Langford [Tue, 24 Mar 2015 02:11:55 +0000 (22:11 -0400)]
Fix #735

9 years agoAdd more date builtins
Nicolas Williams [Sun, 8 Mar 2015 23:56:51 +0000 (18:56 -0500)]
Add more date builtins

9 years agoMerge pull request #720 from agordon/exit-code-5-exceptions
Nico Williams [Sun, 8 Mar 2015 22:09:07 +0000 (17:09 -0500)]
Merge pull request #720 from agordon/exit-code-5-exceptions

exit with non-zero code on runtime exceptions

9 years agoAutomake: jq depends on version.h (fix #721)
Nicolas Williams [Sun, 8 Mar 2015 21:52:08 +0000 (16:52 -0500)]
Automake: jq depends on version.h (fix #721)

9 years agoexit with non-zero code on runtime exceptions 720/head
Assaf Gordon [Fri, 6 Mar 2015 23:42:16 +0000 (18:42 -0500)]
exit with non-zero code on runtime exceptions

With this change, runtime exceptions are propagated to non-zero exit
code of 'jq', allow better scripting and automation. The new exit code
value is 5.

This allows using the shell's and/or operations ('&&' and '||') to
detect input runtime exceptions.

Before:
runtime exceptions are printed to STDERR, but not reported as non-zero exit-code:
    $ echo '"hello"' | jq '.|tonumber' ; echo $?
    jq: error: Invalid numeric literal at EOF at line 1, column 5 (while parsing 'hello')
    0

After:
    $ echo '"hello"' | ./jq '.|tonumber' ;  echo $?
    jq: error: Invalid numeric literal at EOF at line 1, column 5 (while parsing 'hello')
    5

Note that there's a subtle interplay when using "-e" option.
The value of the non-zero exit code changes from 4 to 5, but it still
indicates a 'failure' or non-true value.

Before:
    $ echo '"hello"' | jq -e '.|tonumber' ;  echo $?
    jq: error: Invalid numeric literal at EOF at line 1, column 5 (while parsing 'hello')
    4

After:
    $ echo '"hello"' | ./jq -e '.|tonumber' ;  echo $?
    jq: error: Invalid numeric literal at EOF at line 1, column 5 (while parsing 'hello')
    5

9 years agoFix #718
Nicolas Williams [Fri, 6 Mar 2015 06:18:45 +0000 (00:18 -0600)]
Fix #718

9 years agoAdd date builtins (fix #364)
Nicolas Williams [Fri, 6 Mar 2015 06:14:15 +0000 (00:14 -0600)]
Add date builtins (fix #364)

Windows support for strptime() is missing.  We can add a copy of one
from a BSD later.

9 years agoRemove -i option (#704)
Nicolas Williams [Fri, 6 Mar 2015 03:52:02 +0000 (21:52 -0600)]
Remove -i option (#704)

In-place editing should be implemented with builtins for file I/O.

9 years agoFix #705 (--argfile weirdness)
Nicolas Williams [Thu, 19 Feb 2015 00:38:11 +0000 (18:38 -0600)]
Fix #705 (--argfile weirdness)

9 years agoTest in-place functionality; fix #704
Nicolas Williams [Thu, 19 Feb 2015 00:01:12 +0000 (18:01 -0600)]
Test in-place functionality; fix #704

9 years agoFix #702
Nicolas Williams [Wed, 18 Feb 2015 16:21:09 +0000 (10:21 -0600)]
Fix #702

9 years agoMerge pull request #701 from sseemayer/master
Nico Williams [Wed, 18 Feb 2015 16:00:23 +0000 (10:00 -0600)]
Merge pull request #701 from sseemayer/master

Correct automake and autoconf version requirements

9 years agoCorrect automake and autoconf version requirements 701/head
Stefan Seemayer [Wed, 18 Feb 2015 12:15:44 +0000 (13:15 +0100)]
Correct automake and autoconf version requirements

9 years agoMention --disable-maintainer-mode in bison error
Nicolas Williams [Tue, 17 Feb 2015 16:59:27 +0000 (10:59 -0600)]
Mention --disable-maintainer-mode in bison error

9 years agoMerge pull request #699 from hroptatyr/oniguruma-detection
Nico Williams [Mon, 16 Feb 2015 16:54:33 +0000 (10:54 -0600)]
Merge pull request #699 from hroptatyr/oniguruma-detection

Fix oniguruma detection logic

9 years agoFix oniguruma detection logic 699/head
Sebastian Freundt [Mon, 16 Feb 2015 09:00:58 +0000 (09:00 +0000)]
Fix oniguruma detection logic

At the moment, a failed oniguruma header check would leave
HAVE_ONIGURUMA set to 1 still, resulting in a compiler error
in builtin.c.

9 years agoREADME tweaks
Nicolas Williams [Mon, 16 Feb 2015 00:08:09 +0000 (18:08 -0600)]
README tweaks

9 years agoAdd --disable-maintainer-mode; make bison optional
Nicolas Williams [Sun, 15 Feb 2015 23:57:53 +0000 (17:57 -0600)]
Add --disable-maintainer-mode; make bison optional

Also flex is now optional.

The outputs of flex and bison are now committed.  By default they get
built, but users who want to build from git can now

    ./configure --disable-maintainer-mode

to turn off the dependency on bison and flex.

Maintainers must, of course, commit the bison and/or flex outputs when
they make changes to parser.y and/or lexer.l, respectively.

9 years agoMake Oniguruma/regexp optional
Nicolas Williams [Sat, 14 Feb 2015 19:31:34 +0000 (13:31 -0600)]
Make Oniguruma/regexp optional

Tests won't pass if built without Oniguruma.  We don't have a way to
make a test optional yet.  That will come later.  For now the ability to
reduce build-time dependencies could really help some users.

9 years agoReduce number of msg callback typedefs
Nicolas Williams [Fri, 13 Feb 2015 21:28:30 +0000 (15:28 -0600)]
Reduce number of msg callback typedefs

9 years agoRefactor moar: move parts of main.c into libjq
Nicolas Williams [Mon, 2 Feb 2015 00:35:42 +0000 (18:35 -0600)]
Refactor moar: move parts of main.c into libjq

This adds utility functions for reading and parsing files that should be
easy to use by other apps, together with jq_start()/jq_next().

9 years agoRefactor handling of inputs in main() (fix #667)
Nicolas Williams [Sat, 27 Dec 2014 23:58:47 +0000 (17:58 -0600)]
Refactor handling of inputs in main() (fix #667)

Much of this could be in libjq.  Eventually all of the work of reading
from files and looping over `jq_next()` should move into libjq, with
`main()` mostly doing all the command-line option processing.

9 years agoMerge pull request #692 from kim-toms/enhance-from_entries
Nico Williams [Tue, 10 Feb 2015 16:49:35 +0000 (10:49 -0600)]
Merge pull request #692 from kim-toms/enhance-from_entries

Enhance from_entries to better deal with Amazon AWS Tags

9 years agoEnhance from_entries to better deal with Amazon AWS Tags 692/head
Kim Toms [Tue, 10 Feb 2015 13:33:56 +0000 (08:33 -0500)]
Enhance from_entries to better deal with Amazon AWS Tags

9 years agoFix sequence warnings (fix #686)
Nicolas Williams [Fri, 30 Jan 2015 23:21:50 +0000 (17:21 -0600)]
Fix sequence warnings (fix #686)

9 years agoUsage message for -h should go to stdout
Nicolas Williams [Tue, 27 Jan 2015 00:51:15 +0000 (18:51 -0600)]
Usage message for -h should go to stdout

9 years agoMerge pull request #678 from isomorphisms/patch-1
William Langford [Tue, 27 Jan 2015 19:15:07 +0000 (14:15 -0500)]
Merge pull request #678 from isomorphisms/patch-1

readability

9 years agoreadability 678/head
i [Tue, 27 Jan 2015 18:32:15 +0000 (13:32 -0500)]
readability

Easier to read dashes than hyphens imho.

9 years agoFix --raw-input
Nicolas Williams [Tue, 20 Jan 2015 06:22:24 +0000 (00:22 -0600)]
Fix --raw-input

9 years agoMerge pull request #669 from joelpurra/join-empty-array-668
Nico Williams [Wed, 14 Jan 2015 21:50:15 +0000 (15:50 -0600)]
Merge pull request #669 from joelpurra/join-empty-array-668

Empty arrays join/1 to an empty string, fixes #668 bug introduced by 9760245

9 years agoEmpty arrays join/1 to an empty string, fixes #668 bug introduced by 9760245 669/head
Joel Purra [Wed, 14 Jan 2015 11:24:27 +0000 (12:24 +0100)]
Empty arrays join/1 to an empty string, fixes #668 bug introduced by 9760245

9 years agoAdd `debug` and `stderr` builtins
Nicolas Williams [Sat, 27 Dec 2014 23:15:56 +0000 (17:15 -0600)]
Add `debug` and `stderr` builtins

And refactor setup of jv dump flags.

9 years agojoin/1: respect empty strings (fix #668)
Nicolas Williams [Wed, 14 Jan 2015 00:57:35 +0000 (18:57 -0600)]
join/1: respect empty strings (fix #668)

9 years agoSplit on empty sep: fix #552 moar
Nicolas Williams [Wed, 14 Jan 2015 00:56:53 +0000 (18:56 -0600)]
Split on empty sep: fix #552 moar

9 years agoFix docs for `split/0`
Nicolas Williams [Mon, 12 Jan 2015 16:47:43 +0000 (10:47 -0600)]
Fix docs for `split/0`

9 years agoFix #552
Nicolas Williams [Mon, 12 Jan 2015 16:44:44 +0000 (10:44 -0600)]
Fix #552

9 years agoFix --run-tests arg handling
Nicolas Williams [Mon, 12 Jan 2015 16:43:06 +0000 (10:43 -0600)]
Fix --run-tests arg handling

9 years agoLook for jq/main.jq for imports
Nicolas Williams [Sat, 3 Jan 2015 01:16:43 +0000 (19:16 -0600)]
Look for jq/main.jq for imports

9 years agoAdd comments to tests/run
Nicolas Williams [Sat, 3 Jan 2015 01:15:57 +0000 (19:15 -0600)]
Add comments to tests/run

9 years agoFix tests/run in from-tar-ball case
Nicolas Williams [Sat, 3 Jan 2015 01:15:11 +0000 (19:15 -0600)]
Fix tests/run in from-tar-ball case

Drop useless use of scripts/version

9 years agoAdd static build instructions (fix #294)
Nicolas Williams [Thu, 1 Jan 2015 22:26:55 +0000 (16:26 -0600)]
Add static build instructions (fix #294)

9 years agoFix warning in util.c jq-1.5rc1
Nicolas Williams [Thu, 1 Jan 2015 21:15:10 +0000 (15:15 -0600)]
Fix warning in util.c

9 years agoInclude missing EXTRA_DIST items; fix #661
Nicolas Williams [Thu, 1 Jan 2015 21:14:49 +0000 (15:14 -0600)]
Include missing EXTRA_DIST items; fix #661

9 years agoAdd mkstemp() for mingw build
Nicolas Williams [Thu, 1 Jan 2015 09:14:55 +0000 (03:14 -0600)]
Add mkstemp() for mingw build

9 years agoFix memleak introduced run-tests enhancement
Nicolas Williams [Thu, 1 Jan 2015 08:12:08 +0000 (02:12 -0600)]
Fix memleak introduced run-tests enhancement

9 years agoAdd more missing test files
Nicolas Williams [Thu, 1 Jan 2015 07:49:40 +0000 (01:49 -0600)]
Add more missing test files

9 years agoAdd missing test file
Nicolas Williams [Thu, 1 Jan 2015 07:39:50 +0000 (01:39 -0600)]
Add missing test file

9 years agoMove some module tests into all.test
Nicolas Williams [Thu, 1 Jan 2015 01:21:45 +0000 (19:21 -0600)]
Move some module tests into all.test

9 years agoFurther module system revamp (fix #659)
Nicolas Williams [Tue, 30 Dec 2014 19:13:30 +0000 (13:13 -0600)]
Further module system revamp (fix #659)

To import a module now use:

    # Import module.jq file:
    import "relative/path/to/module" as foo;

    # Use the module's defs as foo::<def-name>

To import a JSON file:

    # Read file.json:
    import "relative/path/to/file" as $foo;
    #
    # Use as $foo::foo

Using `-L` now drops the builtin library path and appends the requested
path to the empty array (or the result of an earlier `-L`).

Support for the `$JQ_LIBRARY_PATH` environment variable has been
removed.

9 years agoAdd `label $name | EXP`; fix `break`
Nicolas Williams [Sun, 28 Dec 2014 06:32:06 +0000 (00:32 -0600)]
Add `label $name | EXP`; fix `break`

This is to fix the problem where `break` is dynamic, not lexical.

With this it should be possible to do this sort of thing:

    label $break | inputs | if ... then $break|error else . end

This is a backwards-incompatible change for master, but the previous
`break` hadn't shipped yet.

Still needed:

 - testing

9 years agoRemove string indexing by string (fix #454)
Nicolas Williams [Tue, 30 Dec 2014 17:17:58 +0000 (11:17 -0600)]
Remove string indexing by string (fix #454)

This turns out to have been a bad idea:

    "foo"|.["o"]

it interacts badly with `path()`.

See #454 for the gory details.

9 years agoFix parser leak (fuzzing)
Nicolas Williams [Tue, 30 Dec 2014 17:28:15 +0000 (11:28 -0600)]
Fix parser leak (fuzzing)

9 years agoFix lineno counting in jq_test.c
Nicolas Williams [Tue, 30 Dec 2014 17:27:56 +0000 (11:27 -0600)]
Fix lineno counting in jq_test.c

9 years agoAdd support for testing erroneous programs
Nicolas Williams [Tue, 30 Dec 2014 07:04:12 +0000 (01:04 -0600)]
Add support for testing erroneous programs

This will allow moving tests of some tests from tests/run to
tests/all.test.  It will also be useful for more extensive testing of
language features where we want nice error messages, or errors at all,
to be produced, particularly language features where the errors arise at
compile-, codegen-, or link-time rather than parse-time.

This does not check for run-time errors though -- those we can already
check for with try/catch.

    $ jq --run-tests
    %%FAIL
    break
    jq: error: break used outside labeled control structure
    ^D
    1 of 1 tests passed (0 malformed)
    $

9 years agoMake --run-tests more informative
Nicolas Williams [Tue, 30 Dec 2014 16:44:36 +0000 (10:44 -0600)]
Make --run-tests more informative

Print the line number and program text on the same output line where a
failure is reported, for all failures that were already reported on
lines starting with '***'.  This makes poring over test logs with
failures much easier.

9 years agoAllow resetting of jq err callback
Nicolas Williams [Tue, 30 Dec 2014 07:02:56 +0000 (01:02 -0600)]
Allow resetting of jq err callback

This will be useful for the upcoming test-erroneous-programs improvement
to --run-tests, so we can switch between the default error reporting
method (print to stderr) to a method internal to --run-tests, and back.

The idea is that when testing programs that are expected to compile (and
link), it'd be nice if errors continue going to stderr, while when
testing programs that must fail to compile (or link), the error has to
be captured so it can be compared to the error expected by the test.

9 years agoFix streaming bug (fuzzing)
Nicolas Williams [Tue, 30 Dec 2014 07:33:45 +0000 (01:33 -0600)]
Fix streaming bug (fuzzing)

10 years agotranspose/0 for possibly jagged matrices
pkoppstein [Mon, 6 Oct 2014 23:31:08 +0000 (19:31 -0400)]
transpose/0 for possibly jagged matrices

10 years agobsearch(x) (binary search): builtin.c (tested), with documentation and test case...
pkoppstein [Tue, 7 Oct 2014 13:43:11 +0000 (09:43 -0400)]
bsearch(x) (binary search): builtin.c (tested), with documentation and test case. Always yields an integer (even if input is unsorted); returns (-1 - ix) if x is not in input array.

10 years agoascii_upcase/0 and ascii_downcase/0
pkoppstein [Tue, 7 Oct 2014 02:51:13 +0000 (22:51 -0400)]
ascii_upcase/0 and ascii_downcase/0

10 years agoAdd `debug` builtin
Nicolas Williams [Sat, 27 Dec 2014 23:15:56 +0000 (17:15 -0600)]
Add `debug` builtin

And refactor setup of jv dump flags.

10 years agoDon't force C API users to set input cb
Nicolas Williams [Sat, 27 Dec 2014 22:51:39 +0000 (16:51 -0600)]
Don't force C API users to set input cb

10 years agoMake jq --run-tests show test line numbers
Nicolas Williams [Sat, 27 Dec 2014 05:39:05 +0000 (23:39 -0600)]
Make jq --run-tests show test line numbers

10 years agoFix uninitialized struct field
Nicolas Williams [Sun, 28 Dec 2014 00:09:28 +0000 (18:09 -0600)]
Fix uninitialized struct field

10 years agoStreaming parser torture tests
Nicolas Williams [Sat, 27 Dec 2014 03:28:31 +0000 (21:28 -0600)]
Streaming parser torture tests

10 years agoFuzz JSON parser
Nicolas Williams [Sat, 27 Dec 2014 01:31:47 +0000 (19:31 -0600)]
Fuzz JSON parser

10 years agoBetter quoting in tests/run
Nicolas Williams [Sat, 27 Dec 2014 01:31:17 +0000 (19:31 -0600)]
Better quoting in tests/run

10 years agoAdd Streaming parser (--stream)
Nicolas Williams [Tue, 23 Dec 2014 05:06:27 +0000 (23:06 -0600)]
Add Streaming parser (--stream)

Streaming means that outputs are produced as soon as possible.  With the
`foreach` syntax one can write programs which reduce portions of the
streaming parse of a large input (reduce into proper JSON values, for
example), and discard the rest, processing incrementally.

This:

    $ jq -c --stream .

should produce the same output as this:

    $ jq -c '. as $dot | path(..) as $p | $dot | getpath($p) | [$p,.]'

The output of `jq --stream .` should be a sequence of`[[<path>],<leaf>]`
and `[[<path>]]` values.  The latter indicate that the array/object at
that path ended.

Scalars and empty arrays and objects are leaf values for this purpose.

For example, a truncated input produces a path as soon as possible, then
later the error:

    $ printf '[0,\n'|./jq -c --stream .
    [[0],0]
    parse error: Unfinished JSON term at EOF at line 3, column 0
    $

10 years agoAllow C-coded functions to `empty`
Nicolas Williams [Fri, 26 Dec 2014 20:37:38 +0000 (14:37 -0600)]
Allow C-coded functions to `empty`

Just return a jv_invalid() without a message.

10 years agoAdd BLOCK_8() macro
Nicolas Williams [Fri, 26 Dec 2014 09:31:54 +0000 (03:31 -0600)]
Add BLOCK_8() macro

10 years agoFix `foreach` non-progation of errors
Nicolas Williams [Fri, 26 Dec 2014 09:31:01 +0000 (03:31 -0600)]
Fix `foreach` non-progation of errors

Errors were being re-propagated as "break".

Also add `error/0` builtin, which made this fix easier.

10 years agoAllow zero-length buffers in jv_parser_set_buf()
Nicolas Williams [Sat, 27 Dec 2014 00:29:56 +0000 (18:29 -0600)]
Allow zero-length buffers in jv_parser_set_buf()

If the caller is at EOF and has no more bytes to feed the parser, how is
the parser to be told about the EOF condition?  A small fix to allow
zero-length buffers in jv_parser_set_buf() fixes this problem (it also
makes it easier to deal with async I/O: feed the parser whatever is
available, including nothing).

10 years agoFix in and inside
Nicolas Williams [Sat, 27 Dec 2014 04:49:32 +0000 (22:49 -0600)]
Fix in and inside

10 years agoMerge pull request #624 from Janrain-Colin/patch-1
Nico Williams [Sat, 27 Dec 2014 04:14:17 +0000 (22:14 -0600)]
Merge pull request #624 from Janrain-Colin/patch-1

Doc correction

10 years agoMerge pull request #366 from slapresta/inversed-contains
Nico Williams [Sat, 27 Dec 2014 04:00:41 +0000 (22:00 -0600)]
Merge pull request #366 from slapresta/inversed-contains

Added `in` command

10 years agoMerge pull request #628 from slapresta/map-on-objects
Nico Williams [Sat, 27 Dec 2014 03:50:11 +0000 (21:50 -0600)]
Merge pull request #628 from slapresta/map-on-objects

Modify map\1 so that it works on objects

10 years agoFix infinite loop in read_more() (fix #656)
Nicolas Williams [Wed, 24 Dec 2014 22:48:39 +0000 (16:48 -0600)]
Fix infinite loop in read_more() (fix #656)

10 years agoFix EOF handling; fix #656
Nicolas Williams [Wed, 24 Dec 2014 22:07:36 +0000 (16:07 -0600)]
Fix EOF handling; fix #656

10 years agoMerge pull request #651 from eiiches/fix-examples
Nico Williams [Wed, 24 Dec 2014 17:29:29 +0000 (11:29 -0600)]
Merge pull request #651 from eiiches/fix-examples

Fix several errors in the manual

10 years agoAdd @tsv; fix #645
Nicolas Williams [Wed, 24 Dec 2014 17:18:53 +0000 (11:18 -0600)]
Add @tsv; fix #645

10 years agoMerge pull request #653 from msabramo/patch-1
Nico Williams [Wed, 24 Dec 2014 17:20:47 +0000 (11:20 -0600)]
Merge pull request #653 from msabramo/patch-1

.travis.yml: Set sudo false; use containers

10 years agoModule search revamp for pkg managers
Nicolas Williams [Mon, 24 Nov 2014 23:58:34 +0000 (17:58 -0600)]
Module search revamp for pkg managers

The search path listed in an import directive can now be an array.  The
top-level search path is appended.  Null and empty strings in the path
terminate any search.  The "." in "." and "./*" is replaced with the
directory containing the file doing the import (for command-line
programs this is the current directory, though that may be a bad idea).

No version numbers or anything of the sort are gratuitously added to the
search paths.

All this makes external package managers possible by allowing
dependencies to be installed local to dependents.

10 years agoFix bug caused by 8ca07a0
Nicolas Williams [Wed, 24 Dec 2014 08:24:53 +0000 (02:24 -0600)]
Fix bug caused by 8ca07a0

10 years agoFix #348: reject unescaped control chars
Nicolas Williams [Wed, 24 Dec 2014 06:01:43 +0000 (00:01 -0600)]
Fix #348: reject unescaped control chars

10 years agoMerge pull request #601 from slapresta/redefine-any-all
Nico Williams [Wed, 24 Dec 2014 05:37:25 +0000 (23:37 -0600)]
Merge pull request #601 from slapresta/redefine-any-all

Define {any,all}/0,1 in terms of {any,all}/2

10 years agoUse __attribute__ __printf__ with GCC
Nicolas Williams [Wed, 24 Dec 2014 03:52:03 +0000 (21:52 -0600)]
Use __attribute__ __printf__ with GCC