Module Name:    othersrc
Committed By:   agc
Date:           Mon Feb 24 21:05:18 UTC 2014

Modified Files:
        othersrc/external/bsd/transit/bin: Makefile
        othersrc/external/bsd/transit/dist: main.c transit.c transit.h

Log Message:
Update transit to version 20140223

+ properly escape valid JSON strings when converting


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/transit/bin/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/transit/dist/main.c \
    othersrc/external/bsd/transit/dist/transit.c \
    othersrc/external/bsd/transit/dist/transit.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/transit/bin/Makefile
diff -u othersrc/external/bsd/transit/bin/Makefile:1.1.1.1 othersrc/external/bsd/transit/bin/Makefile:1.2
--- othersrc/external/bsd/transit/bin/Makefile:1.1.1.1	Mon Feb 24 05:59:13 2014
+++ othersrc/external/bsd/transit/bin/Makefile	Mon Feb 24 21:05:18 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2014/02/24 05:59:13 agc Exp $
+# $NetBSD: Makefile,v 1.2 2014/02/24 21:05:18 agc Exp $
 
 .include <bsd.own.mk>
 
@@ -83,3 +83,8 @@ t: ${PROG}
 	env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d 12.enc > 12.out
 	diff 12.expected 12.out
 	rm -f 12.enc 12.out
+	@echo "13. json structured data"
+	env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -j '{"field1":["potatoes\"\"","tomatoes","anykindoftoes",[1,2,3,4,"sublist",{"field1.1":11,"field1.2":"twotwo"}]],"field2":["quayle","bush","shrub","reagan",[3,"nothing"],[4,4,4,4,4,5,6]]}' > 13.enc
+	env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d 13.enc > 13.out
+	diff 13.expected 13.out
+	rm -f 13.enc 13.out

Index: othersrc/external/bsd/transit/dist/main.c
diff -u othersrc/external/bsd/transit/dist/main.c:1.1.1.1 othersrc/external/bsd/transit/dist/main.c:1.2
--- othersrc/external/bsd/transit/dist/main.c:1.1.1.1	Mon Feb 24 05:59:13 2014
+++ othersrc/external/bsd/transit/dist/main.c	Mon Feb 24 21:05:18 2014
@@ -35,7 +35,7 @@
 
 #define PROGRAM_NAME	"transit"
 #define PROGRAM_AUTHOR	"[email protected]"
-#define PROGRAM_VERSION	"20140222"
+#define PROGRAM_VERSION	"20140223"
 
 
 static char *
Index: othersrc/external/bsd/transit/dist/transit.c
diff -u othersrc/external/bsd/transit/dist/transit.c:1.1.1.1 othersrc/external/bsd/transit/dist/transit.c:1.2
--- othersrc/external/bsd/transit/dist/transit.c:1.1.1.1	Mon Feb 24 05:59:13 2014
+++ othersrc/external/bsd/transit/dist/transit.c	Mon Feb 24 21:05:18 2014
@@ -284,6 +284,9 @@ transit_read_json(transit_t *t, const ch
 			return (int)(cp - json);
 		case '"':
 			for (i = 1, cp = __UNCONST(&json[i]) ; json[i] != '"' ; i++) {
+				if (json[i] == '\\') {
+					i += 1;
+				}
 			}
 			transit_encode_string(t, &json[1], (size_t)(&json[i] - cp));
 			return i + 1;
Index: othersrc/external/bsd/transit/dist/transit.h
diff -u othersrc/external/bsd/transit/dist/transit.h:1.1.1.1 othersrc/external/bsd/transit/dist/transit.h:1.2
--- othersrc/external/bsd/transit/dist/transit.h:1.1.1.1	Mon Feb 24 05:59:13 2014
+++ othersrc/external/bsd/transit/dist/transit.h	Mon Feb 24 21:05:18 2014
@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef TRANSIT_H_
-#define TRANSIT_H_	20140222
+#define TRANSIT_H_	20140223
 
 #include <sys/types.h>
 

Reply via email to