Skip to content

Commit

Permalink
Fix format/display issue in jstrdecode -h
Browse files Browse the repository at this point in the history
  • Loading branch information
xexyl committed Nov 1, 2024
1 parent fbe7158 commit a4420fd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ subdirectories and the tools/directories under that (in other words under

Fixed comments in some tools.

Fix format/display issue in `jstrdecode -h`.


## Release 2.0.0 2024-10-31

Expand Down
14 changes: 12 additions & 2 deletions json_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ jdecencchk(int entertainment)
if (entertainment > 0) {

/*
* :-)
* :-) :-)
*/
decstr = "\\uD83C\\uDF0E\\u2604";
/*
Expand Down Expand Up @@ -558,7 +558,7 @@ jdecencchk(int entertainment)
}

/*
* :-)
* :-) :-) :-)
*/
decstr = "\\uD83D\\uDD25\\uD83C\\uDF0E\\uD83E\\uDD96\\uD83E\\uDD95\\u2604";
/*
Expand Down Expand Up @@ -616,6 +616,10 @@ jdecencchk(int entertainment)
* and now we entertain, at least for those with a dark sense of humour :-)
*/
if (entertainment > 1) {

/*
* :-) :-) :-) :-)
*/
decstr = "\\uD83D\\uDD25\\uD83E\\uDDD9";
/*
* test encoding the JSON decoded string
Expand Down Expand Up @@ -673,6 +677,9 @@ jdecencchk(int entertainment)
}

if (entertainment > 2) {
/*
* :-) :-) :-) :-) :-)
*/
decstr = "\\uD83E\\uDEC3\\uD83D\\uDD25\\uD83D\\uDC09";
/*
* test encoding the JSON decoded string
Expand Down Expand Up @@ -731,6 +738,9 @@ jdecencchk(int entertainment)
*/
if (entertainment > 2) {
dbg(DBG_VVHIGH, "entertainment level %u", entertainment);
/*
* :-) :-) :-) :-) :-) :-)
*/
decstr = "\\uD83E\\uDD30\\uD83D\\uDD25\\uD83D\\uDC09";
/*
* test encoding the JSON decoded string
Expand Down
2 changes: 1 addition & 1 deletion jstrdecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static const char * const usage_msg =
"\t-N\t\tignore all newline characters\n"
"\t-Q\t\tdo not decode double quotes that enclose the concatenation of args (def: do decode)\n"
"\t-e\t\tdo not output double quotes that enclose each arg (def: do not remove)\n"
"\t-E level\t\tentertainment mode\n"
"\t-E level\tentertainment mode\n"
"\n"
"\t[string ...]\tdecode the concatenation of string args (def: decode stdin)\n"
"\t\t\tNOTE: - means read from stdin\n"
Expand Down

0 comments on commit a4420fd

Please sign in to comment.