eolian: don't emit an extra empty line in certain cases
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Fri, 5 Jun 2015 13:49:40 +0000 (14:49 +0100)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Fri, 5 Jun 2015 13:51:11 +0000 (14:51 +0100)
src/bin/eolian/docs_generator.c
src/tests/eolian/data/class_simple_ref_eo.h
src/tests/eolian/data/class_simple_ref_legacy.h

index 7047585..6272d46 100644 (file)
@@ -242,8 +242,11 @@ docs_generate_function(const Eolian_Function *fid, Eolian_Function_Type ftype, i
                    indent, curl, buf, wbuf);
 
    eina_strbuf_append_char(buf, '\n');
-   _indent_line(buf, indent);
-   eina_strbuf_append(buf, " *\n");
+   if (desc || par || rdoc || pdoc)
+     {
+        _indent_line(buf, indent);
+        eina_strbuf_append(buf, " *\n");
+     }
 
    if (desc)
      {
@@ -275,7 +278,7 @@ docs_generate_function(const Eolian_Function *fid, Eolian_Function_Type ftype, i
              _append_section(desc, indent, curl + 3, buf, wbuf);
              eina_strbuf_append_char(buf, '\n');
           }
-        if (par)
+        if (par || rdoc)
           {
              _indent_line(buf, indent);
              eina_strbuf_append(buf, " *\n");
@@ -334,13 +337,17 @@ docs_generate_function(const Eolian_Function *fid, Eolian_Function_Type ftype, i
                     force_out = EINA_TRUE;
                }
           }
+
+        if (!par && rdoc)
+          {
+             _indent_line(buf, indent);
+             eina_strbuf_append(buf, " *\n");
+          }
      }
    eina_iterator_free(itr);
 
    if (rdoc)
      {
-        _indent_line(buf, indent);
-        eina_strbuf_append(buf, " *\n");
         curl = _indent_line(buf, indent);
         eina_strbuf_append(buf, " * @return ");
         curl += sizeof(" * @return ") - 1;
index 4cf1c6d..b430036 100644 (file)
@@ -35,7 +35,6 @@ EOAPI Eina_Bool  evas_obj_simple_a_set(int value);
 /**
  * @brief Common desc for a
  *
- *
  * @return Value description
  */
 EOAPI int  evas_obj_simple_a_get(void);
index 22c5b6b..29889f8 100644 (file)
@@ -29,7 +29,6 @@ EAPI Eina_Bool evas_object_simple_a_set(Class_Simple *obj, int value);
 /**
  * @brief Common desc for a
  *
- *
  * @return Value description
  */
 EAPI int evas_object_simple_a_get(const Class_Simple *obj);