summaryrefslogtreecommitdiff
path: root/src/bin/eolian/docs_generator.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-09-14 14:10:32 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-09-14 14:10:32 +0100
commita9968b975f7c8749e795ec2058685e687bec5715 (patch)
tree0486468cb63a22c66529ca879cc17a8fdcfe3cdf /src/bin/eolian/docs_generator.c
parent2381d8160ab9b92623cf175a4b13cc2f925cba3a (diff)
eolian/generator: generation of doxygen @note and @warning tags
@feature
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/docs_generator.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bin/eolian/docs_generator.c b/src/bin/eolian/docs_generator.c
index ec04bd0945..bf4eb678d8 100644
--- a/src/bin/eolian/docs_generator.c
+++ b/src/bin/eolian/docs_generator.c
@@ -122,11 +122,28 @@ static int
122_append_section(const char *desc, int ind, int curl, Eina_Strbuf *buf, 122_append_section(const char *desc, int ind, int curl, Eina_Strbuf *buf,
123 Eina_Strbuf *wbuf, Eina_Bool use_legacy) 123 Eina_Strbuf *wbuf, Eina_Bool use_legacy)
124{ 124{
125 Eina_Bool try_note = EINA_TRUE;
125 while (*desc) 126 while (*desc)
126 { 127 {
127 eina_strbuf_reset(wbuf); 128 eina_strbuf_reset(wbuf);
128 while (*desc && isspace(*desc) && (*desc != '\n')) 129 while (*desc && isspace(*desc) && (*desc != '\n'))
129 eina_strbuf_append_char(wbuf, *desc++); 130 eina_strbuf_append_char(wbuf, *desc++);
131 if (try_note)
132 {
133#define CHECK_NOTE(str) !strncmp(desc, str ": ", sizeof(str ": ") - 1)
134 if (CHECK_NOTE("Note"))
135 {
136 eina_strbuf_append(wbuf, "@note ");
137 desc += sizeof("Note:");
138 }
139 else if (CHECK_NOTE("Warning"))
140 {
141 eina_strbuf_append(wbuf, "@warning ");
142 desc += sizeof("Warning:");
143 }
144#undef CHECK_NOTE
145 try_note = EINA_FALSE;
146 }
130 if (*desc == '\\') 147 if (*desc == '\\')
131 { 148 {
132 desc++; 149 desc++;
@@ -182,6 +199,7 @@ _append_section(const char *desc, int ind, int curl, Eina_Strbuf *buf,
182 _indent_line(buf, ind); 199 _indent_line(buf, ind);
183 eina_strbuf_append(buf, " *\n"); 200 eina_strbuf_append(buf, " *\n");
184 desc++; 201 desc++;
202 try_note = EINA_TRUE;
185 } 203 }
186 curl = _indent_line(buf, ind) + 3; 204 curl = _indent_line(buf, ind) + 3;
187 eina_strbuf_append(buf, " * "); 205 eina_strbuf_append(buf, " * ");