eolian: properly add < in struct/enum field docs
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Fri, 9 Sep 2016 11:04:04 +0000 (13:04 +0200)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Fri, 9 Sep 2016 11:04:04 +0000 (13:04 +0200)
Fixes T4443.

src/bin/eolian/docs_generator.c
src/tests/eolian/data/docs_ref.h
src/tests/eolian/data/docs_ref_legacy.h

index d44695b..0ee01a6 100644 (file)
@@ -281,7 +281,10 @@ _gen_doc_brief(const char *summary, const char *since, const char *group,
 {
    int curl = 4 + indent;
    Eina_Strbuf *wbuf = eina_strbuf_new();
-   eina_strbuf_append(buf, "/** ");
+   if (indent)
+     eina_strbuf_append(buf, "/**< ");
+   else
+     eina_strbuf_append(buf, "/** ");
    curl = _append_section(summary, indent, curl, buf, wbuf, use_legacy);
    eina_strbuf_free(wbuf);
    curl = _append_extra(el, indent, curl, EINA_FALSE, buf);
@@ -309,7 +312,10 @@ _gen_doc_full(const char *summary, const char *description, const char *since,
 {
    int curl = 0;
    Eina_Strbuf *wbuf = eina_strbuf_new();
-   eina_strbuf_append(buf, "/**\n");
+   if (indent)
+     eina_strbuf_append(buf, "/**<\n");
+   else
+     eina_strbuf_append(buf, "/**\n");
    curl += _indent_line(buf, indent);
    eina_strbuf_append(buf, " * @brief ");
    curl += sizeof(" * @brief ") - 1;
index f1e3b66..66c1434 100644 (file)
@@ -29,9 +29,9 @@ typedef Eo Docs;
  */
 typedef struct _Foo
 {
-  int field1; /** Field documentation. */
+  int field1; /**< Field documentation. */
   float field2;
-  short field3; /** Another field documentation. */
+  short field3; /**< Another field documentation. */
 } Foo;
 
 /** Docs for enum Bar.
@@ -41,8 +41,8 @@ typedef struct _Foo
 typedef enum
 {
   BAR_BLAH = 0,
-  BAR_FOO = 1, /** Docs for foo. */
-  BAR_BAR = 2 /** Docs for bar. */
+  BAR_FOO = 1, /**< Docs for foo. */
+  BAR_BAR = 2 /**< Docs for bar. */
 } Bar;
 
 /**
index 33314da..bff5313 100644 (file)
@@ -29,9 +29,9 @@ typedef Eo Docs;
  */
 typedef struct _Foo
 {
-  int field1; /** Field documentation. */
+  int field1; /**< Field documentation. */
   float field2;
-  short field3; /** Another field documentation. */
+  short field3; /**< Another field documentation. */
 } Foo;
 
 /** Docs for enum Bar.
@@ -41,8 +41,8 @@ typedef struct _Foo
 typedef enum
 {
   BAR_BLAH = 0,
-  BAR_FOO = 1, /** Docs for foo. */
-  BAR_BAR = 2 /** Docs for bar. */
+  BAR_FOO = 1, /**< Docs for foo. */
+  BAR_BAR = 2 /**< Docs for bar. */
 } Bar;
 
 /**