diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-12-04 04:19:17 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-12-04 14:01:15 +0100 |
commit | 874b35f8dc77d710a94c1750d31d2bf27097f9e2 (patch) | |
tree | 39b4b3c88f5b91d8f0c3751d82adf4d2bc06e906 /crawl-ref/source/json.h | |
parent | 8f5ef8ea80c80ccec145a0327ab186904e28b482 (diff) | |
download | crawl-ref-874b35f8dc77d710a94c1750d31d2bf27097f9e2.tar.gz crawl-ref-874b35f8dc77d710a94c1750d31d2bf27097f9e2.zip |
Indentation fixes.
Diffstat (limited to 'crawl-ref/source/json.h')
-rw-r--r-- | crawl-ref/source/json.h | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/crawl-ref/source/json.h b/crawl-ref/source/json.h index c258251317..c34d7c7d10 100644 --- a/crawl-ref/source/json.h +++ b/crawl-ref/source/json.h @@ -29,43 +29,46 @@ #include <stdbool.h> #include <stddef.h> -typedef enum { - JSON_NULL, - JSON_BOOL, - JSON_STRING, - JSON_NUMBER, - JSON_ARRAY, - JSON_OBJECT, +typedef enum +{ + JSON_NULL, + JSON_BOOL, + JSON_STRING, + JSON_NUMBER, + JSON_ARRAY, + JSON_OBJECT, } JsonTag; typedef struct JsonNode JsonNode; struct JsonNode { - /* only if parent is an object or array (NULL otherwise) */ - JsonNode *parent; - JsonNode *prev, *next; - - /* only if parent is an object (NULL otherwise) */ - char *key; /* Must be valid UTF-8. */ - - JsonTag tag; - union { - /* JSON_BOOL */ - bool bool_; - - /* JSON_STRING */ - char *string_; /* Must be valid UTF-8. */ - - /* JSON_NUMBER */ - double number_; - - /* JSON_ARRAY */ - /* JSON_OBJECT */ - struct { - JsonNode *head, *tail; - } children; - }; + /* only if parent is an object or array (NULL otherwise) */ + JsonNode *parent; + JsonNode *prev, *next; + + /* only if parent is an object (NULL otherwise) */ + char *key; /* Must be valid UTF-8. */ + + JsonTag tag; + union + { + /* JSON_BOOL */ + bool bool_; + + /* JSON_STRING */ + char *string_; /* Must be valid UTF-8. */ + + /* JSON_NUMBER */ + double number_; + + /* JSON_ARRAY */ + /* JSON_OBJECT */ + struct + { + JsonNode *head, *tail; + } children; + }; }; /*** Encoding, decoding, and validation ***/ |