]> thyrsus.com Git - microjson.git/commitdiff
Yet more documentation, including the build for the tutorial.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 23 Sep 2014 17:51:46 +0000 (13:51 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 23 Sep 2014 20:54:12 +0000 (16:54 -0400)
Makefile
NEWS
README
microjson.asc

index 57cf3c554255240133729ffea8474c8196fe420c..0960e299359f1402390fa5bba63f0f06abe9530e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,12 @@ mjson.o: mjson.c mjson.h
 test_microjson: test_microjson.o mjson.o
        $(CC) $(CFLAGS) -o test_microjson test_microjson.o mjson.o
 
+.SUFFIXES: .html .asc
+
+# Requires asciidoc and xsltproc/docbook stylesheets.
+.asc.html:
+       asciidoc $*.asc
+
 # Regression test
 check: test_microjson
        test_microjson
@@ -25,6 +31,7 @@ example3: example3.c mjson.c
 
 clean:
        rm -f microjson.o test_microjson.o test_microjson example[123]
+       rm -f microjson.html
 
 CSUPPRESSIONS = -U__UNUSED__
 cppcheck:
@@ -38,5 +45,5 @@ microjson-$(VERSION).tar.gz: $(ALL)
 
 dist: microjson-$(VERSION).tar.gz
 
-release: microjson-$(VERS).tar.gz mjson.html
+release: microjson-$(VERS).tar.gz microjson.html
        shipper version=$(VERS) | sh -e -x
diff --git a/NEWS b/NEWS
index 7f44619fb87e32925656031c8a7734fedaac2c26..2999b7abdff17c7bf627ea50245094330aa84d11 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
                        microjson project news
 
-Repository head: initial release.
+1.0: 2014-09-23
+   Initial release.
diff --git a/README b/README
index 611d093dd953ec49eadfb7442949746fe0b1e1be..a850fc25a1a5e1815dfc27b42b1124f45e658c00 100644 (file)
--- a/README
+++ b/README
@@ -8,10 +8,13 @@ constrained embedded environments.  It may also be of interest for
 code where malloc is verboten to reduce reliability and sexurity 
 vulnerabilities.
 
+There's no man page, but there's a tutorial with examples in
+microjson.asc.
+
 BSD license terms apply; see the file COPYING.
 
                                                Eric S. Raymond
-                                               Ocrober 2014
+                                               October 2014
 
 
 
index 0e302d3ee8c53c11865dffcb6385b8f0b2f107b8..7f54bfa536a35e73f91e8ca434311ab77c579db6 100644 (file)
@@ -345,26 +345,27 @@ but not signed integer vs. unsigned integer).  The parser will match
 the right spec against the actual data.  (There's an instance 
 of this in Example 3.)
 
-   The dialect this parses has some limitations.  First, it cannot
+The dialect this parses has some limitations.  First, it cannot
 recognize the JSON "null" value. Second, all elements of an array must
 be of the same type. Third, some types (t_time, t_character) may not
 be array elements (this restriction could be lifted, and might be 
 in a future release).
 
 There are separate entry points for beginning a parse of either JSON
-object or a JSON array. JSON "float" quantities are actually stored as
-doubles.
+object or a JSON array. 
+
+JSON "float" quantities are actually stored as doubles.
 
 This parser processes object arrays in one of two different ways,
 defending on whether the array subtype is declared as object or
 structobject.
 
-   Object arrays take one base address per object subfield, and are
+Object arrays take one base address per object subfield, and are
 mapped into parallel C arrays (one per subfield).  Strings are not
 supported in this kind of array, as they don't have a "natural" size
 to use as an offset multiplier.
 
-   Structobject arrays are a way to parse a list of objects to a set
+Structobject arrays are a way to parse a list of objects to a set
 of modifications to a corresponding array of C structs.  The trick is
 that the array object initialization has to specify both the C struct
 array's base address and the stride length (the size of the C struct).