blob: a29662386cc3b64670fb2bbf3848de9c0a4abe34 [file] [log] [blame]
James Kuszmaulb13e13f2023-11-22 20:44:04 -08001From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Ryan Blue <ryanzblue@gmail.com>
3Date: Thu, 8 Jun 2023 19:28:50 -0400
4Subject: [PATCH 4/4] Group doxygen into MPack module
5
6---
7 src/mpack/mpack-common.h | 3 ++-
8 src/mpack/mpack-expect.h | 3 ++-
9 src/mpack/mpack-node.h | 3 ++-
10 src/mpack/mpack-platform.h | 3 ++-
11 src/mpack/mpack-reader.h | 3 ++-
12 src/mpack/mpack-writer.h | 3 ++-
13 src/mpack/mpack.h | 6 ++++++
14 tools/amalgamate.sh | 5 +++++
15 8 files changed, 23 insertions(+), 6 deletions(-)
16
17diff --git a/src/mpack/mpack-common.h b/src/mpack/mpack-common.h
18index 1c6b8d472f9591575973db8f7573ce98c5a6169d..14f7dd05c0f9cdc3689bb357f8aac9c8d0671f45 100644
19--- a/src/mpack/mpack-common.h
20+++ b/src/mpack/mpack-common.h
21@@ -40,7 +40,8 @@ MPACK_EXTERN_C_BEGIN
22
23
24 /**
25- * @defgroup common Tags and Common Elements
26+ * @defgroup mpack_common Tags and Common Elements
27+ * @ingroup mpack
28 *
29 * Contains types, constants and functions shared by both the encoding
30 * and decoding portions of MPack.
31diff --git a/src/mpack/mpack-expect.h b/src/mpack/mpack-expect.h
32index 02a1abc0cbe0250636d4a82c21517fba36484608..e62536e46bcab4fdf6bca1d3ea74ee5d9e8e7bd8 100644
33--- a/src/mpack/mpack-expect.h
34+++ b/src/mpack/mpack-expect.h
35@@ -40,7 +40,8 @@ MPACK_EXTERN_C_BEGIN
36 #endif
37
38 /**
39- * @defgroup expect Expect API
40+ * @defgroup mpack_expect Expect API
41+ * @ingroup mpack
42 *
43 * The MPack Expect API allows you to easily read MessagePack data when you
44 * expect it to follow a predefined schema.
45diff --git a/src/mpack/mpack-node.h b/src/mpack/mpack-node.h
46index 52142c4f9965c690e4227a6f89354e1e65b9b6a4..4c1289c834398a20f0c25f86e17e57a31832d623 100644
47--- a/src/mpack/mpack-node.h
48+++ b/src/mpack/mpack-node.h
49@@ -36,7 +36,8 @@ MPACK_EXTERN_C_BEGIN
50 #if MPACK_NODE
51
52 /**
53- * @defgroup node Node API
54+ * @defgroup mpack_node Node API
55+ * @ingroup mpack
56 *
57 * The MPack Node API allows you to parse a chunk of MessagePack into a
58 * dynamically typed data structure, providing random access to the parsed
59diff --git a/src/mpack/mpack-platform.h b/src/mpack/mpack-platform.h
60index 27a2f9eeb10cc8c6aa274a5e1b0c96bead6a37fb..3a100564c11d12494cd0f607645c8cfa5dd86dec 100644
61--- a/src/mpack/mpack-platform.h
62+++ b/src/mpack/mpack-platform.h
63@@ -40,7 +40,8 @@
64
65
66 /**
67- * @defgroup config Configuration Options
68+ * @defgroup mpack_config Configuration Options
69+ * @ingroup mpack
70 *
71 * Defines the MPack configuration options.
72 *
73diff --git a/src/mpack/mpack-reader.h b/src/mpack/mpack-reader.h
74index 092e2ba2c36f8709b912d24b4d12974e81c82678..f981683512a60c0c2b5363b7f27cbd874c1b44f8 100644
75--- a/src/mpack/mpack-reader.h
76+++ b/src/mpack/mpack-reader.h
77@@ -44,7 +44,8 @@ struct mpack_track_t;
78 #define MPACK_READER_SMALL_FRACTION_DENOMINATOR 32
79
80 /**
81- * @defgroup reader Reader API
82+ * @defgroup mpack_reader Reader API
83+ * @ingroup mpack
84 *
85 * The MPack Reader API contains functions for imperatively reading dynamically
86 * typed data from a MessagePack stream.
87diff --git a/src/mpack/mpack-writer.h b/src/mpack/mpack-writer.h
88index abeee1a6eb960b0ce61203ae75eb7c7488186860..03fdb7592b0bcaeeeaaf2f8c64c0fb30ba5e1292 100644
89--- a/src/mpack/mpack-writer.h
90+++ b/src/mpack/mpack-writer.h
91@@ -40,7 +40,8 @@ struct mpack_track_t;
92 #endif
93
94 /**
95- * @defgroup writer Write API
96+ * @defgroup mpack_writer Write API
97+ * @ingroup mpack
98 *
99 * The MPack Write API encodes structured data of a fixed (hardcoded) schema to MessagePack.
100 *
101diff --git a/src/mpack/mpack.h b/src/mpack/mpack.h
102index 129a276115d85e09d717504df3736a7614fbd2ea..9739205efd0406a1bd05c728556c8f36368b1528 100644
103--- a/src/mpack/mpack.h
104+++ b/src/mpack/mpack.h
105@@ -29,6 +29,12 @@
106 #ifndef MPACK_H
107 #define MPACK_H 1
108
109+/**
110+ * @defgroup mpack MPack
111+ * MPack is a C implementation of an encoder and decoder for the MessagePack
112+ * serialization format.
113+ */
114+
115 #include "mpack-common.h"
116 #include "mpack-writer.h"
117 #include "mpack-reader.h"
118diff --git a/tools/amalgamate.sh b/tools/amalgamate.sh
119index 4dfe999ee49ee67fd394e948b0bb3133d6acdbdc..ebff08200198406940720efe093df909a31caf65 100755
120--- a/tools/amalgamate.sh
121+++ b/tools/amalgamate.sh
122@@ -66,6 +66,11 @@ echo -e "#define MPACK_AMALGAMATED 1\n" >> $HEADER
123 echo -e "#if defined(MPACK_HAS_CONFIG) && MPACK_HAS_CONFIG" >> $HEADER
124 echo -e "#include \"mpack-config.h\"" >> $HEADER
125 echo -e "#endif\n" >> $HEADER
126+echo -e "/**" >> $HEADER
127+echo -e " * @defgroup mpack MPack" >> $HEADER
128+echo -e " * MPack is a C implementation of an encoder and decoder for the MessagePack" >> $HEADER
129+echo -e " * serialization format." >> $HEADER
130+echo -e " */" >> $HEADER
131 for f in $HEADERS; do
132 echo -e "\n/* $f.h */" >> $HEADER
133 sed -e 's@^#include ".*@/* & */@' -e '0,/^ \*\/$/d' src/$f >> $HEADER