1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

447 Commits

Author SHA1 Message Date
32ea50d336 Make the testsuite run on machines without valgrind 2013-12-13 15:22:17 +00:00
5ac6a460fa Format more integers as integers, not scientific notation.
jq is now willing to put up to 15 zeros after an integer before
moving to scientific notation.
2013-12-13 15:22:17 +00:00
f147b7fae5 Merge pull request #239 from DRMacIver/overflows
Avoid undefined behaviour with large array indices
2013-12-12 16:38:14 -08:00
474386a1d9 Complete more-arity feature not complete
And test
2013-12-11 14:14:26 -06:00
7fd2c2d08b Merge pull request #235 from DRMacIver/prototypes
some functions were missing proper prototypes
2013-12-10 03:56:02 -08:00
5412f3f1c1 convert range bounds to integers in a way that avoids undefined behaviour 2013-12-10 09:20:13 +00:00
014b45b4a9 add checking of numeric indices to an array to see if they can reasonably be considered integers. Avoid undefined behaviour if out of bounds 2013-12-10 09:20:12 +00:00
30ea390b77 some functions were missing prototypes. Add them 2013-12-10 00:07:08 +00:00
00f244385b Merge pull request #232 from DRMacIver/teardown_on_error
consistent use of goto out in main
2013-12-08 16:41:16 -08:00
7b671b95d2 don't need to check for NULL there 2013-12-08 23:52:07 +00:00
1535f23455 Merge pull request #233 from DRMacIver/printf
Fix warnings about vprintf
2013-12-08 15:44:33 -08:00
4ba0c8baef Merge pull request #231 from DRMacIver/fix_mem_leak_in_compile
args to jq_compile_args were not getting freed when there were errors in the compile
2013-12-08 15:17:20 -08:00
a7dd3ab793 Clean up string/object interactions in jv. 2013-12-08 22:49:28 +00:00
f6f7d4d973 These vfprintfs are being used as if they were printfs. Fix that 2013-12-08 20:08:04 +00:00
f4ae5c883b consistent use of goto out in main 2013-12-08 19:22:18 +00:00
74a14f5de7 Refactor jv structure.
New structure layout is simpler and also faster.  In particular, it's
now small enough to be passed in registers on amd64.
2013-12-08 17:46:23 +00:00
fee21c959a Make testsuite not leak when compiled with -DNDEBUG. 2013-12-08 17:44:54 +00:00
4b48054f41 test for losing memory on compile errors 2013-12-08 16:19:12 +00:00
17a319d120 args to jq_compile_args were not getting freed when there were errors in the compile 2013-12-08 15:28:29 +00:00
3a1dab5396 Fix double-free typo in print_error() 2013-12-06 23:25:06 -06:00
dac081e183 Fix manual.yml 2013-12-06 11:58:55 -06:00
489fcdc089 Merge pull request #224 from nicowilliams/features
Features: more arity, string ops
2013-12-04 17:36:08 -08:00
3ba7c97b2a Add self to AUTHORS 2013-12-04 18:21:42 -06:00
54635000c5 Conditionally #define _GNU_SOURCE in compile.c 2013-12-04 18:21:42 -06:00
426edff09c Add tests for string index by string and builtins 2013-12-04 18:21:42 -06:00
b37ce20c2a Add index and rindex builtins 2013-12-04 18:21:42 -06:00
cac14a531d Add index strings by string; return string indexes
% jq '.[","]'
    "a,bc,def,ghij,klmno"
    [1,4,8,13]
    %
2013-12-04 18:21:42 -06:00
ae7a042876 Make length return abs value of numeric inputs 2013-12-04 18:21:42 -06:00
eb165459aa Add callback interface for errors
Printing to stderr is not the right answer for a library.
2013-12-04 18:21:41 -06:00
04bc2ef7cf Add jv_string_vfmt() 2013-12-04 18:21:41 -06:00
09104ce531 Document ltrimstr and rtrimstr 2013-12-04 18:21:41 -06:00
9fa2173825 Test ltrimstr and rtrimstr functions 2013-12-04 18:21:41 -06:00
346da34432 Add ltrimstr and rtrimstr functions 2013-12-04 18:21:41 -06:00
fa316ac430 Document -u / --unslurp option 2013-12-04 18:21:41 -06:00
77936a594d Add -I / --online-input for huge top-level arrays 2013-12-04 18:21:41 -06:00
4e07eac356 Document -e / --exit-status argument 2013-12-04 18:21:40 -06:00
d018e43ddc Add -e | --exit-status CLI option 2013-12-04 18:21:40 -06:00
8cee66e609 Document tojson and fromjson builtins 2013-12-04 18:21:40 -06:00
3c4248192d Test tojson and fromjson 2013-12-04 18:21:40 -06:00
255f8ef5be Add tojson and fromjson builtins 2013-12-04 18:21:40 -06:00
20b32db5af Document split function 2013-12-04 18:21:40 -06:00
b634722c8a Document string multiplication and division 2013-12-04 18:21:40 -06:00
c9e8581f45 Document string functions and slicing 2013-12-04 18:21:39 -06:00
da129f6664 Test string slicing 2013-12-04 18:21:39 -06:00
884e6c7d8b Add string slicing 2013-12-04 18:21:39 -06:00
5aadaa79eb Add tests for string division/splitting 2013-12-04 18:21:39 -06:00
cf562961b7 Add string division by string (split on separator) 2013-12-04 18:21:39 -06:00
63bed9bdf1 Test starts/endswith and string multiplication 2013-12-04 18:21:39 -06:00
5989dbdfcf Add string multiplication by number 2013-12-04 18:21:39 -06:00
db19a11399 Add startswith/endswith 2013-12-04 18:21:38 -06:00