Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Significant changes in the JSON parser repo


## Release 2.5.1 2025-10-31

Change `string_to_intmax()` and `string_to_uintmax()`
to use `warn(3)` so that the `test_ioccc/txzchk_test.sh`
from [the other repo](https://github.com/ioccc-src/mkiocccentry)
won't trigger a test error due to system implementation
differences with various `errno` values.

Updated `JPARSE_REPO_VERSION` to "2.5.1 2025-10-31".
Updated `JPARSE_UTILS_VERSION` to "2.1.6 2025-10-31".


## Release 2.5.0 2025-10-02

Added `#include` of `pr.h` and `dyn_array.h` in `jparse.h`.
Expand Down
8 changes: 4 additions & 4 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ string_to_intmax(char const *str, intmax_t *ret)
/*
* perform the conversion
*/
errno = 0; /* pre-clear errno for warnp() */
errno = 0; /* pre-clear errno */
num = strtoimax(str, &endptr, 10);
saved_errno = errno;
if (endptr == str) {
Expand All @@ -186,7 +186,7 @@ string_to_intmax(char const *str, intmax_t *ret)
return false;
} else if (saved_errno != 0) {
errno = saved_errno;
warnp(__func__, "error converting string \"%s\" to intmax_t", str);
warn(__func__, "error converting string \"%s\" to intmax_t", str);
return false;
} else if (num <= INTMAX_MIN || num >= INTMAX_MAX) {
warn(__func__, "number %s out of range for intmax_t (must be > %jd && < %jd)", str, INTMAX_MIN, INTMAX_MAX);
Expand Down Expand Up @@ -237,7 +237,7 @@ string_to_uintmax(char const *str, uintmax_t *ret)
/*
* perform the conversion
*/
errno = 0; /* pre-clear errno for warnp() */
errno = 0; /* pre-clear errno */
num = strtoumax(str, &endptr, 10);
saved_errno = errno;
if (endptr == str) {
Expand All @@ -248,7 +248,7 @@ string_to_uintmax(char const *str, uintmax_t *ret)
return false;
} else if (saved_errno != 0) {
errno = saved_errno;
warnp(__func__, "error converting string \"%s\" to uintmax_t", str);
warn(__func__, "error converting string \"%s\" to uintmax_t", str);
return false;
} else if (num <= 0 || num >= UINTMAX_MAX) {
warn(__func__, "number %s out of range for uintmax_t (must be >= %d && < %ju)", str, 0, UINTMAX_MAX);
Expand Down
4 changes: 2 additions & 2 deletions version.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
*
* NOTE: this should match the latest Release string in CHANGES.md
*/
#define JPARSE_REPO_VERSION "2.5.0 2025-10-02" /* format: major.minor YYYY-MM-DD */
#define JPARSE_REPO_VERSION "2.5.1 2025-10-31" /* format: major.minor YYYY-MM-DD */

/*
* official jparse version
Expand All @@ -70,7 +70,7 @@
/*
* official utility functions (util.c) version
*/
#define JPARSE_UTILS_VERSION "2.1.5 2025-10-02" /* format: major.minor YYYY-MM-DD */
#define JPARSE_UTILS_VERSION "2.1.6 2025-10-31" /* format: major.minor YYYY-MM-DD */


#endif /* INCLUDE_JPARSE_VERSION_H */