summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-11 16:52:45 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-11 16:52:45 +0100
commitcd12f938aff217ab84780104334acea12a27a588 (patch)
tree68cb520b6ae11172f926985f3004c48f3928bb40 /src/bin
parent786f848f67d06bf9c92802c7d11b9253574bb7db (diff)
eolian: remove support for old doc style on types and vars
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian/types_generator.c37
1 files changed, 5 insertions, 32 deletions
diff --git a/src/bin/eolian/types_generator.c b/src/bin/eolian/types_generator.c
index d43f97b330..1876c4cde6 100644
--- a/src/bin/eolian/types_generator.c
+++ b/src/bin/eolian/types_generator.c
@@ -33,35 +33,12 @@ _concat_name(const Eolian_Type *tp)
33 return str; 33 return str;
34} 34}
35 35
36static void
37_desc_generate(const char *desc, Eina_Strbuf *buf)
38{
39 if (desc)
40 {
41 eina_strbuf_append(buf, "/**\n");
42 eina_strbuf_append(buf, desc);
43 eina_strbuf_replace_all(buf, "\n", "\n * ");
44 eina_strbuf_append(buf, "\n */\n");
45 eina_strbuf_replace_all(buf, " * \n", " *\n"); /* Remove trailing whitespaces */
46 }
47}
48
49static Eina_Strbuf * 36static Eina_Strbuf *
50_type_generate(const Eolian_Type *tp, Eina_Bool full) 37_type_generate(const Eolian_Type *tp, Eina_Bool full)
51{ 38{
52 const char *cdesc = eolian_type_description_get(tp); 39 Eina_Strbuf *buf = docs_generate_full(eolian_type_documentation_get(tp), 0);
53 Eina_Strbuf *buf; 40 if (!buf) buf = eina_strbuf_new();
54 if (cdesc) 41 else eina_strbuf_append_char(buf, '\n');
55 {
56 buf = eina_strbuf_new();
57 _desc_generate(cdesc, buf);
58 }
59 else
60 {
61 buf = docs_generate_full(eolian_type_documentation_get(tp), 0);
62 if (!buf) buf = eina_strbuf_new();
63 else eina_strbuf_append_char(buf, '\n');
64 }
65 Eolian_Type_Type tp_type = eolian_type_type_get(tp); 42 Eolian_Type_Type tp_type = eolian_type_type_get(tp);
66 switch(tp_type) 43 switch(tp_type)
67 { 44 {
@@ -95,11 +72,9 @@ _type_generate(const Eolian_Type *tp, Eina_Bool full)
95 eina_strbuf_append_printf(buf, " %s%s%s;", 72 eina_strbuf_append_printf(buf, " %s%s%s;",
96 c_type, strchr(c_type, '*')?"":" ", 73 c_type, strchr(c_type, '*')?"":" ",
97 eolian_type_struct_field_name_get(member)); 74 eolian_type_struct_field_name_get(member));
98 const char *fdesc = eolian_type_struct_field_description_get(member);
99 const Eolian_Documentation *fdoc 75 const Eolian_Documentation *fdoc
100 = eolian_type_struct_field_documentation_get(member); 76 = eolian_type_struct_field_documentation_get(member);
101 if (fdesc) eina_strbuf_append_printf(buf, " /** %s */", fdesc); 77 if (fdoc)
102 else if (fdoc)
103 { 78 {
104 const char *nl = strrchr(eina_strbuf_string_get(buf), '\n'); 79 const char *nl = strrchr(eina_strbuf_string_get(buf), '\n');
105 if (nl) 80 if (nl)
@@ -160,14 +135,12 @@ _type_generate(const Eolian_Type *tp, Eina_Bool full)
160 } 135 }
161 eina_stringshare_del(lit); 136 eina_stringshare_del(lit);
162 } 137 }
163 const char *fdesc = eolian_type_enum_field_description_get(member);
164 const Eolian_Documentation *fdoc 138 const Eolian_Documentation *fdoc
165 = eolian_type_enum_field_documentation_get(member); 139 = eolian_type_enum_field_documentation_get(member);
166 next = eina_iterator_next(members, (void**)&member); 140 next = eina_iterator_next(members, (void**)&member);
167 if (next) 141 if (next)
168 eina_strbuf_append(buf, ","); 142 eina_strbuf_append(buf, ",");
169 if (fdesc) eina_strbuf_append_printf(buf, " /** %s */", fdesc); 143 if (fdoc)
170 else if (fdoc)
171 { 144 {
172 const char *nl = strrchr(eina_strbuf_string_get(buf), '\n'); 145 const char *nl = strrchr(eina_strbuf_string_get(buf), '\n');
173 if (nl) 146 if (nl)