Skip to content

Commit

Permalink
Fix typos (#3173)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBaulch authored Sep 13, 2024
1 parent 37f4cd2 commit 860af44
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Full commit log can be found at <https://github.com/jqlang/jq/compare/jq-1.6...j
- Fix `contains/1` to handle strings with NUL. @nicowilliams 61cd6db
- Fix `stderr/0` to output raw text without any decoration. @itchyny #2751
- Fix `nth/2` to emit empty on index out of range. @itchyny #2674
- Fix `implode` to not assert and instead replace invalid unicode codepoints. @wader #2646
- Fix `implode` to not assert and instead replace invalid Unicode codepoints. @wader #2646
- Fix `indices/1` and `rindex/1` in case of overlapping matches in strings. @emanuele6 #2718
- Fix `sub/3` to resolve issues involving global search-and-replace (gsub) operations. @pkoppstein #2641
- Fix `significand/0`, `gamma/0` and `drem/2` to be available on macOS. @itchyny #2756 #2775
Expand Down
2 changes: 1 addition & 1 deletion docs/content/manual/dev/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,7 @@ sections:
future to include the version strings for the build
tooling used.
Note that this can be overriden in the command-line
Note that this can be overridden in the command-line
with `--arg` and related options.
- title: "`$ENV`, `env`"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/manual/v1.7/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ sections:
future to include the version strings for the build
tooling used.
Note that this can be overriden in the command-line
Note that this can be overridden in the command-line
with `--arg` and related options.
- title: "`$ENV`, `env`"
Expand Down
6 changes: 3 additions & 3 deletions docs/content/tutorial/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ body:
"name": "Nico Williams"
}
{
"message": "Fix iterration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
"message": "Fix iteration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
"name": "Nico Williams"
}
{
Expand Down Expand Up @@ -249,7 +249,7 @@ body:
"name": "Nico Williams"
},
{
"message": "Fix iterration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
"message": "Fix iteration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
"name": "Nico Williams"
},
{
Expand Down Expand Up @@ -300,7 +300,7 @@ body:
]
},
{
"message": "Fix iterration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
"message": "Fix iteration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
"name": "Nico Williams",
"parents": [
"https://github.com/jqlang/jq/commit/174db0f93552bdb551ae1f3c5c64744df0ad8e2f"
Expand Down
2 changes: 1 addition & 1 deletion jq.1.prebuilt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/jv.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ enum {
#define JVP_FLAGS_NUMBER_LITERAL JVP_MAKE_FLAGS(JV_KIND_NUMBER, JVP_MAKE_PFLAGS(JVP_NUMBER_DECIMAL, 1))

// the decimal precision of binary double
#define DEC_NUBMER_DOUBLE_PRECISION (17)
#define DEC_NUMBER_DOUBLE_PRECISION (17)
#define DEC_NUMBER_STRING_GUARD (14)
#define DEC_NUBMER_DOUBLE_EXTRA_UNITS ((DEC_NUBMER_DOUBLE_PRECISION - DECNUMDIGITS + DECDPUN - 1)/DECDPUN)
#define DEC_NUMBER_DOUBLE_EXTRA_UNITS ((DEC_NUMBER_DOUBLE_PRECISION - DECNUMDIGITS + DECDPUN - 1)/DECDPUN)

#include "jv_thread.h"
#ifdef WIN32
Expand Down Expand Up @@ -542,7 +542,7 @@ typedef struct {

typedef struct {
decNumber number;
decNumberUnit units[DEC_NUBMER_DOUBLE_EXTRA_UNITS];
decNumberUnit units[DEC_NUMBER_DOUBLE_EXTRA_UNITS];
} decNumberDoublePrecision;


Expand Down Expand Up @@ -600,11 +600,11 @@ static double jvp_literal_number_to_double(jv j) {

// init as decimal64 but change digits to allow conversion to binary64 (double)
decContextDefault(&dblCtx, DEC_INIT_DECIMAL64);
dblCtx.digits = DEC_NUBMER_DOUBLE_PRECISION;
dblCtx.digits = DEC_NUMBER_DOUBLE_PRECISION;

decNumber *p_dec_number = jvp_dec_number_ptr(j);
decNumberDoublePrecision dec_double;
char literal[DEC_NUBMER_DOUBLE_PRECISION + DEC_NUMBER_STRING_GUARD + 1];
char literal[DEC_NUMBER_DOUBLE_PRECISION + DEC_NUMBER_STRING_GUARD + 1];

// reduce the number to the shortest possible form
// that fits into the 64 bit floating point representation
Expand Down

0 comments on commit 860af44

Please sign in to comment.