Introduction
Introduction Statistics Contact Development Disclaimer Help
update/tweak comments about surrogate, shuffle one line - json2tsv - JSON to TS…
git clone git://git.codemadness.org/json2tsv
Log
Files
Refs
README
LICENSE
---
commit 4e539a2a08ad3348e8c4c2331b550e9ad24d69d9
parent d8a06e34247a2219a62cb7b0d82218b87d155259
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 15 Oct 2019 22:14:19 +0200
update/tweak comments about surrogate, shuffle one line
Diffstat:
M json2tsv.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/json2tsv.c b/json2tsv.c
@@ -87,7 +87,7 @@ capacity(char **value, size_t *sz, size_t cur, size_t inc)
size_t need, newsiz;
char *newp;
- /* check addition overflow */
+ /* check for addition overflow */
if (cur > SIZE_MAX - inc) {
errno = EOVERFLOW;
return -1;
@@ -180,10 +180,8 @@ escchr:
}
cp |= (hexdigit(c) << …
}
- /* See also:
- * RFC8259 - 7. Strings and
- * https://unicode.org/faq/utf…
- * 0xd800 - 0xdb7f - high surr…
+ /* RFC8259 - 7. Strings - surr…
+ * 0xd800 - 0xdb7f - high surr…
if (cp >= 0xd800 && cp <= 0xdb…
if ((c = GETNEXT()) !=…
v += codepoint…
@@ -200,10 +198,11 @@ escchr:
}
lo |= (hexdigi…
}
- /* 0xdc00 - 0xdfff - l…
+ /* 0xdc00 - 0xdfff - l…
if (lo >= 0xdc00 && lo…
cp = (hi << 10…
} else {
+ /* handle grac…
v += codepoint…
if (capacity(&…
goto e…
@@ -249,10 +248,10 @@ escchr:
depth++;
nodes[depth].index = 0;
+ nodes[depth].type = TYPE_PRIMITIVE;
if (capacity(&(nodes[depth].name), &(nodes[depth].name…
goto end;
nodes[depth].name[0] = '\0';
- nodes[depth].type = TYPE_PRIMITIVE;
break;
case ']':
case '}':
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.