Commit Graph
116 Commits
Author SHA1 Message Date
Nicolas Williams 583e4a2718 Add --config option printing ./configure options used 2023-08-19 17:40:08 -05:00
itchyny f86566b263 Rename jv_type_private.h to jv_private.h, move jvp_number_is_nan there 2023-08-13 14:16:02 +02:00
Mattias WadmanandNicolas Williams fdab39bc7b Build windows 64bit binary using UCRT64 (#2832)
* Build windows 64bit binary using UCRT64

Is the default and recommended msystem setting. Will produce
binaries that are compatible with windows 10 and later.

Also run tests for 32bit build.

Related to #2831

* Use jq -b in tests/shtest

* Add Windows strptime

* Make Windows-optional tests not run on Windows again

---------

Co-authored-by: Nicolas Williams <nico@cryptonector.com>
2023-08-12 20:18:45 +02:00
Nicolas Williams 27a4d5757e Require a main program (fix #2785) 2023-08-01 23:06:01 -05:00
Emanuele Torre 96263f2e4b Don't unnecessarily ignore missing-field-initializers warnings 2023-07-31 23:16:02 -05:00
Emanuele Torre 6716e23ae6 Declare cfunction.fptr as jv (*)() to avoid having to cast everywhere
You only need to specify the return type in a function pointer
declaration in C.

If you use () in the declaration, the function pointer can be called
with any arguments, and the type of the arguments is decided for each
function call based on the types of the arguments used for the call.
(To declare a function pointer for a function with no arguments, you use
`(void)'.)

Since all the cfunction structs have a  fptr  that points to a functions
that return jv, not void, we can we can just declare cfunction.fptr as
jv (*)()  and avoid having those annoying and technically not C-standard
compliant casts everywhere.
2023-07-31 15:28:01 -05:00
itchyny c8e28da129 Redesign website (#2628)
* Bump up Bootstrap to v5.3.1, Bootstrap Icon to v1.10.5.
* Use autoComplete.js to drop dependency on jQuery and typeahead.js.
* Support dark mode.
* New svg logo and icon with responsive color mode support.
* Normalize section ids to lower kebab-case for easiness of linking.
* Use relative paths for links for local development (--root /output).
* Various markup cleanups and accessibility improvements.
2023-07-31 09:52:52 +09:00
Nicolas Williams f733a1535e Use -Wno-cast-function-type to quiet many warnings 2023-07-30 04:25:54 +02:00
Mattias Wadman 54fef09ac3 Make maintainer-mode default to disabled
This makes the standard build instructions a bit easier,
just ./configure, and also requires less tools installed (bison).

Also i think few people probably want to generate the lexer and paser code.
2023-07-24 11:26:17 -05:00
itchyny 9044f540bb Validate manual schema 2023-07-22 19:00:16 -05:00
itchyny 9e4c71558a Split man.test to make tests pass without oniguruma (#2722) 2023-07-18 08:17:21 +09:00
itchyny 092fef740a Make sure distcheck passes and run dist job on Pull Request 2023-07-13 10:20:04 -05:00
itchyny 4c125c7ca6 Do not remove manpage prebuild file on build failure 2023-07-10 18:47:14 -05:00
Allan Clark d5dd41e2dc fix: tarball fails distcheck: add files missing from manifest (#2538) 2023-06-28 22:37:49 +09:00
itchyny 5dacc6b3a1 Fix bison warnings on incompatibilities with POSIX Yacc (#2634) 2023-06-28 17:56:53 +09:00
itchyny 44c89ad3da Ignore error of outdated manual test when docs disabled (fix #2310) (#2630) 2023-06-27 07:25:24 +09:00
Dan Church 38b42e537f Fix double-installed doc (#2482)
The README symlink was causing the file to be installed twice in
<DOCDIR>.
2023-06-16 23:11:01 +09:00
Dan Church 076d0a2826 Use autotools standard ${docdir} (#2468)
Specified with `--docdir=<path>`, the `$(docdir)` variable is already
available, and has the same default as what it was being set to.

By specifying it here, it overrides what the `--docdir` option
specifies.
2023-06-16 23:06:34 +09:00
Josh Soref 5cebe86a7b Fix misspellings (#2609) 2023-06-13 20:01:20 +09:00
Christopher Degawa ccc79e592c Makefile: prepend srcdir to jq.1.prebuilt to fix out of source compilation 2020-03-03 11:50:04 -05:00
William Langford 50a7022ea6 Rework pipenv requirement to be more relaxed
Keep a cached copy of the man tests that we can use when no manpage
changes are made. This allows automated systems that might not have
easy access to a pipenv to build and run tests.
2020-03-02 11:05:43 -05:00
Leonid S. Usov cf4b48c7ba Save literal value of the parsed number to preserve it for the output
Extend jv_number to use decNumber for storing number literals. Any math
operations on the numbers will truncate them to double precision.
Comparisons when both numbers are literal numbers will compare them
without truncation.

Delay conversion of numbers to doubles until a math operation is performed,
to preserve precision. A literal jv_number will only need conversion to
double once, and will reuse the resultant double on subsequent
conversions.

Outputting literal jv_numbers preserves the original precision.

Add strong pthread requirement to manage contexts/allocations for
converting numbers between their decNumber, string, and double formats.
2019-10-22 14:11:04 -04:00
Ricardo Constantino e944fe8436 Makefile.am: fix builtin.inc with out-of-root builds 2019-06-11 11:57:02 -05:00
Mattias Hansson 3c4fcb1594 Add pkg-config file for libjq
pkg-config is a common interface to resolve build details. It will
become easier to incorporate libjq in other projects by providing this
interface.
2019-03-29 08:16:36 -05:00
Nicolas Williams dffba62e13 Disable docs by default; don't mantest if no docs 2019-03-24 23:36:50 -05:00
Muh Muhten abed751e96 Bind libraries backward for consistent shadowing 2019-02-26 21:57:08 -06:00
Muh Muhten 141bb78e96 Fix regression on ~/.jq being a directory 2019-02-26 21:57:08 -06:00
William Langford 175dbc4e25 Remove ruby dependency from manpage build 2019-02-26 11:10:38 -06:00
William Langford c1f11855e3 Remove ruby dependency from website build 2019-02-26 11:10:38 -06:00
Jason Hood 88e1f59ec1 Allow globbing on Windows
The mingw-w64 runtime expands wildcards, which causes a discrepancy
between `main`'s `argv` (multiple file names) and Windows' `wargv` (a
single wildcard).  Use `wmain` to retrieve the wide character args.
2019-02-17 23:58:23 -06:00
Muh Muhten 012af2186b Fix build on BSD make
Replace uses of the nonstandard $^ variable by explicitly specifying the
source filenames. This is the only obvious thing preventing the build
from running correctly on non-GNU make.
2019-01-30 09:48:04 -06:00
Nicolas Williams 0bc77083ba Out-of-srcdir builds: AM_CPPFLAGS=-I${srcdir}/src 2018-12-26 12:53:48 -06:00
Ricardo Constantino 6893284ee5 Makefile.am: add no-undefined for win32
"Undefined symbols are not allowed in x86_64-w64-mingw32 shared libraries"

This was also applied in the official MINGW-packages repo:
Alexpux/MINGW-packages@b5566c58a
2018-12-26 02:45:54 +00:00
mail6543210 712330940b Ensure that ${builddir}/src exists 2018-12-18 14:15:04 -06:00
Nicolas Williams 89809a2d0f Fix make dist 2017-03-01 23:01:08 -06:00
Nicolas Williams 9801de6979 Windows: Also use -lshlwapi for jq(1) 2017-02-25 14:49:20 -06:00
Erik Brinkman 02bad4b298 Add local oniguruma submodule
Configure should still allow use of prebuilt onigurumas (whether
system-installed or in a special prefix).  If these are not found, and
configure was not called with `--without-oniguruma`, then use the vendored
oniguruma module.  If configure was called with `--without-oniguruma`, then we
do not build regex functionality into jq.
2017-02-18 21:34:26 -05:00
Shaun Guth e0b784ac6d Add @base64d for decoding base64 #47 2017-02-12 16:03:59 -05:00
William Langford e84d17196c Handle cut-off UTF-8 sequences when reading files
Read additional bytes from the file to complete the UTF-8 sequence so the bytes
in it don't get converted to U+FFFD replacement characters.
2017-01-27 21:04:26 -05:00
Nicolas Williams d228490162 Add --enable-ubsan (undefined behavior sanitizer) 2016-01-17 13:06:27 -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 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 8f115e9eed Add address sanitizer (ASAN) support (fix #1002) 2015-10-27 20:06:21 -05:00
Nicolas Williams aa279ae7ac Fix builtin.o dependency (#992) 2015-10-22 22:33:47 -05:00
David Tolnay 143e8dc5e4 Move jq-coded builtins to non-C file (fix #424) 2015-10-22 19:26:00 -07:00
Nicolas Williams f57743eb37 Remove jq.1.default and related content 2015-08-23 23:08:11 -05:00
David Tolnay 0c93eb3379 Move source files to src/ 2015-08-23 20:36:11 -07:00
David Tolnay 371e74a25f Remove obsolete comment in Makefile.am 2015-08-22 16:27:06 -07:00