diff options
author | David Robillard <d@drobilla.net> | 2022-10-23 21:48:51 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-10-23 21:48:51 -0400 |
commit | 4786554c2072f6736a464101da43cc90e21f2326 (patch) | |
tree | 5090e3f0a691500354d20f39e3c641f85de164ff | |
parent | 5947cac55a98140859b7a5e7de357a1d45bccd43 (diff) | |
download | serd-4786554c2072f6736a464101da43cc90e21f2326.tar.gz serd-4786554c2072f6736a464101da43cc90e21f2326.tar.bz2 serd-4786554c2072f6736a464101da43cc90e21f2326.zip |
Add trailing commas to enum declarations
This has been supported since C99 and C++11, and makes for less noisy diffs and
fewer conflicts when things are added.
-rw-r--r-- | include/serd/serd.h | 10 | ||||
-rw-r--r-- | src/writer.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index 0e1913f8..43c5f7d7 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -78,13 +78,13 @@ typedef enum { SERD_TURTLE = 1, ///< Terse triples http://www.w3.org/TR/turtle SERD_NTRIPLES = 2, ///< Line-based triples http://www.w3.org/TR/n-triples/ SERD_NQUADS = 3, ///< Line-based quads http://www.w3.org/TR/n-quads/ - SERD_TRIG = 4 ///< Terse quads http://www.w3.org/TR/trig/ + SERD_TRIG = 4, ///< Terse quads http://www.w3.org/TR/trig/ } SerdSyntax; /// Flags indicating certain string properties relevant to serialisation typedef enum { SERD_HAS_NEWLINE = 1U << 0U, ///< Contains line breaks ('\\n' or '\\r') - SERD_HAS_QUOTE = 1U << 1U ///< Contains quotes ('"') + SERD_HAS_QUOTE = 1U << 1U, ///< Contains quotes ('"') } SerdNodeFlag; /// Bitwise OR of SerdNodeFlag values @@ -122,7 +122,7 @@ typedef enum { SERD_ERR_NOT_FOUND, ///< Not found SERD_ERR_ID_CLASH, ///< Encountered clashing blank node IDs SERD_ERR_BAD_CURIE, ///< Invalid CURIE (e.g. prefix does not exist) - SERD_ERR_INTERNAL ///< Unexpected internal error (should not happen) + SERD_ERR_INTERNAL, ///< Unexpected internal error (should not happen) } SerdStatus; /// Return a string describing a status code @@ -371,7 +371,7 @@ typedef enum { is meaningful only within this serialisation. @see [RDF 1.1 Turtle](http://www.w3.org/TR/turtle/#grammar-production-BLANK_NODE_LABEL) */ - SERD_BLANK = 4 + SERD_BLANK = 4, } SerdType; /// A syntactic RDF node @@ -550,7 +550,7 @@ typedef enum { SERD_ANON_CONT = 1U << 5U, ///< Continuation of anonymous node SERD_LIST_S_BEGIN = 1U << 6U, ///< Start of list subject SERD_LIST_O_BEGIN = 1U << 7U, ///< Start of list object - SERD_LIST_CONT = 1U << 8U ///< Continuation of list + SERD_LIST_CONT = 1U << 8U, ///< Continuation of list } SerdStatementFlag; /// Bitwise OR of SerdStatementFlag values diff --git a/src/writer.c b/src/writer.c index e78e100b..26ed01c0 100644 --- a/src/writer.c +++ b/src/writer.c @@ -22,7 +22,7 @@ typedef enum { FIELD_SUBJECT, FIELD_PREDICATE, FIELD_OBJECT, - FIELD_GRAPH + FIELD_GRAPH, } Field; typedef struct { @@ -50,7 +50,7 @@ typedef enum { SEP_GRAPH_BEGIN, ///< Start of graph ('{') SEP_GRAPH_END, ///< End of graph ('}') SEP_URI_BEGIN, ///< URI start quote ('<') - SEP_URI_END ///< URI end quote ('>') + SEP_URI_END, ///< URI end quote ('>') } Sep; typedef struct { |