pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc/jo Update textproc/jo to 1.1.
details: https://anonhg.NetBSD.org/pkgsrc/rev/3e0987edabfc
branches: trunk
changeset: 362599:3e0987edabfc
user: fhajny <fhajny%pkgsrc.org@localhost>
date: Fri May 19 11:38:36 2017 +0000
description:
Update textproc/jo to 1.1.
- NEW: type coercion (#55)
- FIX: quotes in quotes and double quotes at begin of string (#47)
- FIX: catch null value in assignmen (#46)
- NEW: support for key:=file.json for reading object values from a file (#43)
- NEW: PPA contributed by Ross Duggan in #32
- FIX: "null" is now handled like we handle "true" and "false"; disable with -B
- NEW: more tests in the test suite
diffstat:
textproc/jo/Makefile | 6 +-
textproc/jo/distinfo | 11 +--
textproc/jo/patches/patch-json.c | 100 ---------------------------------------
3 files changed, 9 insertions(+), 108 deletions(-)
diffs (139 lines):
diff -r db22eb72cecd -r 3e0987edabfc textproc/jo/Makefile
--- a/textproc/jo/Makefile Thu May 18 21:46:28 2017 +0000
+++ b/textproc/jo/Makefile Fri May 19 11:38:36 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.5 2017/01/27 11:33:11 fhajny Exp $
+# $NetBSD: Makefile,v 1.6 2017/05/19 11:38:36 fhajny Exp $
-DISTNAME= jo-1.0
+DISTNAME= jo-1.1
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_GITHUB:=jpmens/}
@@ -15,4 +15,6 @@
USE_LANGUAGES= c c99
+TEST_TARGET= check
+
.include "../../mk/bsd.pkg.mk"
diff -r db22eb72cecd -r 3e0987edabfc textproc/jo/distinfo
--- a/textproc/jo/distinfo Thu May 18 21:46:28 2017 +0000
+++ b/textproc/jo/distinfo Fri May 19 11:38:36 2017 +0000
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.2 2017/01/04 12:44:59 fhajny Exp $
+$NetBSD: distinfo,v 1.3 2017/05/19 11:38:36 fhajny Exp $
-SHA1 (jo-1.0.tar.gz) = 2d06cf35b1dc71e5fdbe420ac4057cf508313e08
-RMD160 (jo-1.0.tar.gz) = bff13c4e4689eb85a581e7383dc38d5cbd0052b5
-SHA512 (jo-1.0.tar.gz) = bab15de7a01e9a70f43b50d0bb5eff4724bf9d38b0b56a6fff5768756073a5956e3a5a08c7a4e4a2c88107950a4c1721a09b60868b10a441c1a4c6fec7748036
-Size (jo-1.0.tar.gz) = 112488 bytes
-SHA1 (patch-json.c) = 7ac3e1013c28c5b7b51c547e5417fdbfb13cd155
+SHA1 (jo-1.1.tar.gz) = 265230a08c761088d70c6ff16a226ba3bed9d6db
+RMD160 (jo-1.1.tar.gz) = b98c0234edd6c101b51aba2e78f6d73a0c748e2e
+SHA512 (jo-1.1.tar.gz) = 170b86f7eff6cf2a06bf60e98982cc1d4cae11802e6149bf5fca9d4d8910abd1e960619209f3330c140abbac69d76386eafdae627ed4fc5aa1f36c9ee57ffc5a
+Size (jo-1.1.tar.gz) = 137087 bytes
diff -r db22eb72cecd -r 3e0987edabfc textproc/jo/patches/patch-json.c
--- a/textproc/jo/patches/patch-json.c Thu May 18 21:46:28 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-$NetBSD: patch-json.c,v 1.1 2017/01/04 12:44:59 fhajny Exp $
-
-Backport a namespace conflict fix from trunk.
-
-https://github.com/jpmens/jo/commit/2bedfd486f8f4a79b1865e370e6c858eb04257f5
-
---- json.c.orig 2016-03-10 10:49:34.000000000 +0000
-+++ json.c
-@@ -131,7 +131,7 @@ static void sb_free(SB *sb)
- * Type for Unicode codepoints.
- * We need our own because wchar_t might be 16 bits.
- */
--typedef uint32_t uchar_t;
-+typedef uint32_t js_uchar_t;
-
- /*
- * Validate a single UTF-8 character starting at @s.
-@@ -228,7 +228,7 @@ static bool utf8_validate(const char *s)
- * This function assumes input is valid UTF-8,
- * and that there are enough characters in front of @s.
- */
--static int utf8_read_char(const char *s, uchar_t *out)
-+static int utf8_read_char(const char *s, js_uchar_t *out)
- {
- const unsigned char *c = (const unsigned char*) s;
-
-@@ -240,21 +240,21 @@ static int utf8_read_char(const char *s,
- return 1;
- } else if (c[0] <= 0xDF) {
- /* C2..DF (unless input is invalid) */
-- *out = ((uchar_t)c[0] & 0x1F) << 6 |
-- ((uchar_t)c[1] & 0x3F);
-+ *out = ((js_uchar_t)c[0] & 0x1F) << 6 |
-+ ((js_uchar_t)c[1] & 0x3F);
- return 2;
- } else if (c[0] <= 0xEF) {
- /* E0..EF */
-- *out = ((uchar_t)c[0] & 0xF) << 12 |
-- ((uchar_t)c[1] & 0x3F) << 6 |
-- ((uchar_t)c[2] & 0x3F);
-+ *out = ((js_uchar_t)c[0] & 0xF) << 12 |
-+ ((js_uchar_t)c[1] & 0x3F) << 6 |
-+ ((js_uchar_t)c[2] & 0x3F);
- return 3;
- } else {
- /* F0..F4 (unless input is invalid) */
-- *out = ((uchar_t)c[0] & 0x7) << 18 |
-- ((uchar_t)c[1] & 0x3F) << 12 |
-- ((uchar_t)c[2] & 0x3F) << 6 |
-- ((uchar_t)c[3] & 0x3F);
-+ *out = ((js_uchar_t)c[0] & 0x7) << 18 |
-+ ((js_uchar_t)c[1] & 0x3F) << 12 |
-+ ((js_uchar_t)c[2] & 0x3F) << 6 |
-+ ((js_uchar_t)c[3] & 0x3F);
- return 4;
- }
- }
-@@ -267,7 +267,7 @@ static int utf8_read_char(const char *s,
- *
- * This function will write up to 4 bytes to @out.
- */
--static int utf8_write_char(uchar_t unicode, char *out)
-+static int utf8_write_char(js_uchar_t unicode, char *out)
- {
- unsigned char *o = (unsigned char*) out;
-
-@@ -304,10 +304,10 @@ static int utf8_write_char(uchar_t unico
- * @uc should be 0xD800..0xDBFF, and @lc should be 0xDC00..0xDFFF.
- * If they aren't, this function returns false.
- */
--static bool from_surrogate_pair(uint16_t uc, uint16_t lc, uchar_t *unicode)
-+static bool from_surrogate_pair(uint16_t uc, uint16_t lc, js_uchar_t *unicode)
- {
- if (uc >= 0xD800 && uc <= 0xDBFF && lc >= 0xDC00 && lc <= 0xDFFF) {
-- *unicode = 0x10000 + ((((uchar_t)uc & 0x3FF) << 10) | (lc & 0x3FF));
-+ *unicode = 0x10000 + ((((js_uchar_t)uc & 0x3FF) << 10) | (lc & 0x3FF));
- return true;
- } else {
- return false;
-@@ -319,9 +319,9 @@ static bool from_surrogate_pair(uint16_t
- *
- * @unicode must be U+10000..U+10FFFF.
- */
--static void to_surrogate_pair(uchar_t unicode, uint16_t *uc, uint16_t *lc)
-+static void to_surrogate_pair(js_uchar_t unicode, uint16_t *uc, uint16_t *lc)
- {
-- uchar_t n;
-+ js_uchar_t n;
-
- assert(unicode >= 0x10000 && unicode <= 0x10FFFF);
-
-@@ -844,7 +844,7 @@ bool parse_string(const char **sp, char
- case 'u':
- {
- uint16_t uc, lc;
-- uchar_t unicode;
-+ js_uchar_t unicode;
-
- if (!parse_hex16(&s, &uc))
- goto failed;
Home |
Main Index |
Thread Index |
Old Index