summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-04-18 18:10:45 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-04-18 18:10:45 +0200
commit7807f7750f2d6c1c22d55211fad5d464b45426f3 (patch)
tree2e19647cb4a547e387923263699f402edcaebf7e /src/bin/eolian
parente81ecf09cdf37c96530d49490377f84410b619be (diff)
eolian_gen: remove support for legacy header file generation
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/docs.c48
-rw-r--r--src/bin/eolian/docs.h3
-rw-r--r--src/bin/eolian/headers.c6
-rw-r--r--src/bin/eolian/headers.h2
-rw-r--r--src/bin/eolian/main.c53
-rw-r--r--src/bin/eolian/types.c18
-rw-r--r--src/bin/eolian/types.h2
7 files changed, 56 insertions, 76 deletions
diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 39fa89a..9893005 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -19,8 +19,7 @@ _indent_line(Eina_Strbuf *buf, int ind)
19 : DOC_LINE_LIMIT) 19 : DOC_LINE_LIMIT)
20 20
21static void 21static void
22_generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf, 22_generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf)
23 Eina_Bool use_legacy)
24{ 23{
25 const Eolian_Object *decl = eolian_state_object_by_name_get(state, refn); 24 const Eolian_Object *decl = eolian_state_object_by_name_get(state, refn);
26 if (decl) 25 if (decl)
@@ -54,7 +53,7 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
54 eina_stringshare_del(bname); 53 eina_stringshare_del(bname);
55 goto noref; 54 goto noref;
56 } 55 }
57 _generate_ref(state, bname, wbuf, use_legacy); 56 _generate_ref(state, bname, wbuf);
58 eina_strbuf_append(wbuf, sfx); 57 eina_strbuf_append(wbuf, sfx);
59 eina_stringshare_del(bname); 58 eina_stringshare_del(bname);
60 return; 59 return;
@@ -122,7 +121,7 @@ noref:
122 121
123static int 122static int
124_append_section(const Eolian_State *state, const char *desc, int ind, int curl, 123_append_section(const Eolian_State *state, const char *desc, int ind, int curl,
125 Eina_Strbuf *buf, Eina_Strbuf *wbuf, Eina_Bool use_legacy) 124 Eina_Strbuf *buf, Eina_Strbuf *wbuf)
126{ 125{
127 Eina_Bool try_note = EINA_TRUE; 126 Eina_Bool try_note = EINA_TRUE;
128 while (*desc) 127 while (*desc)
@@ -173,7 +172,7 @@ _append_section(const Eolian_State *state, const char *desc, int ind, int curl,
173 ++desc; 172 ++desc;
174 if (*(desc - 1) == '.') --desc; 173 if (*(desc - 1) == '.') --desc;
175 Eina_Stringshare *refn = eina_stringshare_add_length(ref, desc - ref); 174 Eina_Stringshare *refn = eina_stringshare_add_length(ref, desc - ref);
176 _generate_ref(state, refn, wbuf, use_legacy); 175 _generate_ref(state, refn, wbuf);
177 eina_stringshare_del(refn); 176 eina_stringshare_del(refn);
178 } 177 }
179 else 178 else
@@ -278,8 +277,7 @@ _append_group(Eina_Strbuf *buf, char *sgrp, int indent)
278 277
279static void 278static void
280_gen_doc_brief(const Eolian_State *state, const char *summary, const char *since, 279_gen_doc_brief(const Eolian_State *state, const char *summary, const char *since,
281 const char *group, const char *el, int indent, Eina_Strbuf *buf, 280 const char *group, const char *el, int indent, Eina_Strbuf *buf)
282 Eina_Bool use_legacy)
283{ 281{
284 int curl = 4 + indent; 282 int curl = 4 + indent;
285 Eina_Strbuf *wbuf = eina_strbuf_new(); 283 Eina_Strbuf *wbuf = eina_strbuf_new();
@@ -287,7 +285,7 @@ _gen_doc_brief(const Eolian_State *state, const char *summary, const char *since
287 eina_strbuf_append(buf, "/**< "); 285 eina_strbuf_append(buf, "/**< ");
288 else 286 else
289 eina_strbuf_append(buf, "/** "); 287 eina_strbuf_append(buf, "/** ");
290 curl = _append_section(state, summary, indent, curl, buf, wbuf, use_legacy); 288 curl = _append_section(state, summary, indent, curl, buf, wbuf);
291 eina_strbuf_free(wbuf); 289 eina_strbuf_free(wbuf);
292 curl = _append_extra(el, indent, curl, EINA_FALSE, buf); 290 curl = _append_extra(el, indent, curl, EINA_FALSE, buf);
293 curl = _append_since(since, indent, curl, buf); 291 curl = _append_since(since, indent, curl, buf);
@@ -310,8 +308,7 @@ _gen_doc_brief(const Eolian_State *state, const char *summary, const char *since
310static void 308static void
311_gen_doc_full(const Eolian_State *state, const char *summary, 309_gen_doc_full(const Eolian_State *state, const char *summary,
312 const char *description, const char *since, 310 const char *description, const char *since,
313 const char *group, const char *el, int indent, Eina_Strbuf *buf, 311 const char *group, const char *el, int indent, Eina_Strbuf *buf)
314 Eina_Bool use_legacy)
315{ 312{
316 int curl = 0; 313 int curl = 0;
317 Eina_Strbuf *wbuf = eina_strbuf_new(); 314 Eina_Strbuf *wbuf = eina_strbuf_new();
@@ -322,13 +319,13 @@ _gen_doc_full(const Eolian_State *state, const char *summary,
322 curl += _indent_line(buf, indent); 319 curl += _indent_line(buf, indent);
323 eina_strbuf_append(buf, " * @brief "); 320 eina_strbuf_append(buf, " * @brief ");
324 curl += sizeof(" * @brief ") - 1; 321 curl += sizeof(" * @brief ") - 1;
325 _append_section(state, summary, indent, curl, buf, wbuf, use_legacy); 322 _append_section(state, summary, indent, curl, buf, wbuf);
326 eina_strbuf_append_char(buf, '\n'); 323 eina_strbuf_append_char(buf, '\n');
327 _indent_line(buf, indent); 324 _indent_line(buf, indent);
328 eina_strbuf_append(buf, " *\n"); 325 eina_strbuf_append(buf, " *\n");
329 curl = _indent_line(buf, indent); 326 curl = _indent_line(buf, indent);
330 eina_strbuf_append(buf, " * "); 327 eina_strbuf_append(buf, " * ");
331 _append_section(state, description, indent, curl + 3, buf, wbuf, use_legacy); 328 _append_section(state, description, indent, curl + 3, buf, wbuf);
332 curl = _append_extra(el, indent, curl, EINA_TRUE, buf); 329 curl = _append_extra(el, indent, curl, EINA_TRUE, buf);
333 curl = _append_since(since, indent, curl, buf); 330 curl = _append_since(since, indent, curl, buf);
334 eina_strbuf_append_char(buf, '\n'); 331 eina_strbuf_append_char(buf, '\n');
@@ -346,8 +343,7 @@ _gen_doc_full(const Eolian_State *state, const char *summary,
346 343
347static Eina_Strbuf * 344static Eina_Strbuf *
348_gen_doc_buf(const Eolian_State *state, const Eolian_Documentation *doc, 345_gen_doc_buf(const Eolian_State *state, const Eolian_Documentation *doc,
349 const char *group, const char *el, int indent, 346 const char *group, const char *el, int indent)
350 Eina_Bool use_legacy)
351{ 347{
352 if (!doc) return NULL; 348 if (!doc) return NULL;
353 349
@@ -357,17 +353,17 @@ _gen_doc_buf(const Eolian_State *state, const Eolian_Documentation *doc,
357 353
358 Eina_Strbuf *buf = eina_strbuf_new(); 354 Eina_Strbuf *buf = eina_strbuf_new();
359 if (!desc) 355 if (!desc)
360 _gen_doc_brief(state, sum, since, group, el, indent, buf, use_legacy); 356 _gen_doc_brief(state, sum, since, group, el, indent, buf);
361 else 357 else
362 _gen_doc_full(state, sum, desc, since, group, el, indent, buf, use_legacy); 358 _gen_doc_full(state, sum, desc, since, group, el, indent, buf);
363 return buf; 359 return buf;
364} 360}
365 361
366Eina_Strbuf * 362Eina_Strbuf *
367eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc, 363eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc,
368 const char *group, int indent, Eina_Bool use_legacy) 364 const char *group, int indent)
369{ 365{
370 return _gen_doc_buf(state, doc, group, NULL, indent, use_legacy); 366 return _gen_doc_buf(state, doc, group, NULL, indent);
371} 367}
372 368
373Eina_Strbuf * 369Eina_Strbuf *
@@ -403,7 +399,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const Eolian_Event *ev,
403 return bufs; 399 return bufs;
404 } 400 }
405 401
406 return _gen_doc_buf(state, doc, group, p, 0, EINA_FALSE); 402 return _gen_doc_buf(state, doc, group, p, 0);
407} 403}
408 404
409Eina_Strbuf * 405Eina_Strbuf *
@@ -517,7 +513,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
517 if (!desc && !par && !vpar && !rdoc && (ftype == EOLIAN_METHOD || !pdoc)) 513 if (!desc && !par && !vpar && !rdoc && (ftype == EOLIAN_METHOD || !pdoc))
518 { 514 {
519 _gen_doc_brief(state, sum ? sum : "No description supplied.", since, group, 515 _gen_doc_brief(state, sum ? sum : "No description supplied.", since, group,
520 NULL, indent, buf, EINA_FALSE); 516 NULL, indent, buf);
521 return buf; 517 return buf;
522 } 518 }
523 519
@@ -528,7 +524,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
528 eina_strbuf_append(buf, " * @brief "); 524 eina_strbuf_append(buf, " * @brief ");
529 curl += sizeof(" * @brief ") - 1; 525 curl += sizeof(" * @brief ") - 1;
530 _append_section(state, sum ? sum : "No description supplied.", 526 _append_section(state, sum ? sum : "No description supplied.",
531 indent, curl, buf, wbuf, EINA_FALSE); 527 indent, curl, buf, wbuf);
532 528
533 eina_strbuf_append_char(buf, '\n'); 529 eina_strbuf_append_char(buf, '\n');
534 if (desc || since || par || rdoc || pdoc) 530 if (desc || since || par || rdoc || pdoc)
@@ -541,7 +537,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
541 { 537 {
542 curl = _indent_line(buf, indent); 538 curl = _indent_line(buf, indent);
543 eina_strbuf_append(buf, " * "); 539 eina_strbuf_append(buf, " * ");
544 _append_section(state, desc, indent, curl + 3, buf, wbuf, EINA_FALSE); 540 _append_section(state, desc, indent, curl + 3, buf, wbuf);
545 eina_strbuf_append_char(buf, '\n'); 541 eina_strbuf_append_char(buf, '\n');
546 if (par || rdoc || pdoc || since) 542 if (par || rdoc || pdoc || since)
547 { 543 {
@@ -556,7 +552,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
556 curl = _indent_line(buf, indent); 552 curl = _indent_line(buf, indent);
557 eina_strbuf_append(buf, " * "); 553 eina_strbuf_append(buf, " * ");
558 _append_section(state, eolian_documentation_summary_get(pdoc), indent, 554 _append_section(state, eolian_documentation_summary_get(pdoc), indent,
559 curl + 3, buf, wbuf, EINA_FALSE); 555 curl + 3, buf, wbuf);
560 eina_strbuf_append_char(buf, '\n'); 556 eina_strbuf_append_char(buf, '\n');
561 if (pdesc) 557 if (pdesc)
562 { 558 {
@@ -564,7 +560,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
564 eina_strbuf_append(buf, " *\n"); 560 eina_strbuf_append(buf, " *\n");
565 curl = _indent_line(buf, indent); 561 curl = _indent_line(buf, indent);
566 eina_strbuf_append(buf, " * "); 562 eina_strbuf_append(buf, " * ");
567 _append_section(state, pdesc, indent, curl + 3, buf, wbuf, EINA_FALSE); 563 _append_section(state, pdesc, indent, curl + 3, buf, wbuf);
568 eina_strbuf_append_char(buf, '\n'); 564 eina_strbuf_append_char(buf, '\n');
569 } 565 }
570 if (par || rdoc || since) 566 if (par || rdoc || since)
@@ -619,7 +615,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
619 eina_strbuf_append_char(buf, ' '); 615 eina_strbuf_append_char(buf, ' ');
620 curl += 1; 616 curl += 1;
621 _append_section(state, eolian_documentation_summary_get(adoc), 617 _append_section(state, eolian_documentation_summary_get(adoc),
622 indent, curl, buf, wbuf, EINA_FALSE); 618 indent, curl, buf, wbuf);
623 } 619 }
624 620
625 eina_strbuf_append_char(buf, '\n'); 621 eina_strbuf_append_char(buf, '\n');
@@ -652,7 +648,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
652 eina_strbuf_append(buf, " * @return "); 648 eina_strbuf_append(buf, " * @return ");
653 curl += sizeof(" * @return ") - 1; 649 curl += sizeof(" * @return ") - 1;
654 _append_section(state, eolian_documentation_summary_get(rdoc), indent, 650 _append_section(state, eolian_documentation_summary_get(rdoc), indent,
655 curl, buf, wbuf, EINA_FALSE); 651 curl, buf, wbuf);
656 eina_strbuf_append_char(buf, '\n'); 652 eina_strbuf_append_char(buf, '\n');
657 if (since) 653 if (since)
658 { 654 {
diff --git a/src/bin/eolian/docs.h b/src/bin/eolian/docs.h
index 91866ec..3438f5d 100644
--- a/src/bin/eolian/docs.h
+++ b/src/bin/eolian/docs.h
@@ -9,12 +9,11 @@
9 * @param[in] doc the documentation 9 * @param[in] doc the documentation
10 * @param[in] group the group to use (can be NULL) 10 * @param[in] group the group to use (can be NULL)
11 * @param[in] indent by how many spaces to indent the comment from second line 11 * @param[in] indent by how many spaces to indent the comment from second line
12 * @param[in] use_legacy whether to use legacy names
13 * 12 *
14 * @return A documentation comment 13 * @return A documentation comment
15 * 14 *
16 */ 15 */
17Eina_Strbuf *eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc, const char *group, int indent, Eina_Bool use_legacy); 16Eina_Strbuf *eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc, const char *group, int indent);
18 17
19/* 18/*
20 * @brief Generate function documentation 19 * @brief Generate function documentation
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index cc3b0ee..d35c604 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -176,9 +176,9 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
176 176
177void 177void
178eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, 178eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
179 Eina_Strbuf *buf, Eina_Bool legacy) 179 Eina_Strbuf *buf)
180{ 180{
181 if (!cl || legacy) 181 if (!cl)
182 return; 182 return;
183 183
184 Eina_Iterator *itr; 184 Eina_Iterator *itr;
@@ -196,7 +196,7 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
196 if (doc) 196 if (doc)
197 { 197 {
198 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc, 198 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
199 eolian_class_name_get(cl), 0, EINA_FALSE); 199 eolian_class_name_get(cl), 0);
200 if (cdoc) 200 if (cdoc)
201 { 201 {
202 eina_strbuf_append(buf, eina_strbuf_string_get(cdoc)); 202 eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
diff --git a/src/bin/eolian/headers.h b/src/bin/eolian/headers.h
index 94fd89b..9e45fb9 100644
--- a/src/bin/eolian/headers.h
+++ b/src/bin/eolian/headers.h
@@ -4,6 +4,6 @@
4#include "main.h" 4#include "main.h"
5 5
6void eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype); 6void eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype);
7void eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy); 7void eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, Eina_Strbuf *buf);
8 8
9#endif 9#endif
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 06f32fd..691881f 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -11,17 +11,16 @@ int _eolian_gen_log_dom = -1;
11enum 11enum
12{ 12{
13 GEN_H = 1 << 0, 13 GEN_H = 1 << 0,
14 GEN_H_LEGACY = 1 << 1, 14 GEN_H_STUB = 1 << 1,
15 GEN_H_STUB = 1 << 2, 15 GEN_C = 1 << 2,
16 GEN_C = 1 << 3, 16 GEN_C_IMPL = 1 << 3,
17 GEN_C_IMPL = 1 << 4, 17 GEN_D = 1 << 4,
18 GEN_D = 1 << 5, 18 GEN_D_FULL = 1 << 5
19 GEN_D_FULL = 1 << 6
20}; 19};
21 20
22static const char *_dexts[7] = 21static const char *_dexts[6] =
23{ 22{
24 ".h", ".legacy.h", ".stub.h", ".c", ".c", ".d", ".d" 23 ".h", ".stub.h", ".c", ".c", ".d", ".d"
25}; 24};
26 25
27static int 26static int
@@ -48,7 +47,6 @@ _print_usage(const char *progn, FILE *outf)
48 "\n" 47 "\n"
49 "Available types:\n" 48 "Available types:\n"
50 " h: C header file (.eo.h/.eot.h)\n" 49 " h: C header file (.eo.h/.eot.h)\n"
51 " l: Legacy C header file (.eo.legacy.h/.eot.legacy.h)\n"
52 " s: Stub C header file (.eo.stub.h/.eot.stub.h)\n" 50 " s: Stub C header file (.eo.stub.h/.eot.stub.h)\n"
53 " c: C source file (.eo.c)\n" 51 " c: C source file (.eo.c)\n"
54 " i: Implementation file (.c, merged with existing)\n" 52 " i: Implementation file (.c, merged with existing)\n"
@@ -86,10 +84,6 @@ _try_set_out(char t, char **outs, const char *val, int *what)
86 pos = _get_bit_pos(GEN_H); 84 pos = _get_bit_pos(GEN_H);
87 *what |= GEN_H; 85 *what |= GEN_H;
88 break; 86 break;
89 case 'l':
90 pos = _get_bit_pos(GEN_H_LEGACY);
91 *what |= GEN_H_LEGACY;
92 break;
93 case 's': 87 case 's':
94 pos = _get_bit_pos(GEN_H_STUB); 88 pos = _get_bit_pos(GEN_H_STUB);
95 *what |= GEN_H_STUB; 89 *what |= GEN_H_STUB;
@@ -331,13 +325,13 @@ void eo_gen_class_names_get(const Eolian_Class *cl, char **cname,
331 325
332static Eina_Bool 326static Eina_Bool
333_write_header(const Eolian_State *eos, const Eolian_State *state, const char *ofname, 327_write_header(const Eolian_State *eos, const Eolian_State *state, const char *ofname,
334 const char *ifname, Eina_Bool legacy) 328 const char *ifname)
335{ 329{
336 INF("generating header: %s (legacy: %d)", ofname, legacy); 330 INF("generating header: %s", ofname);
337 Eina_Strbuf *buf = eina_strbuf_new(); 331 Eina_Strbuf *buf = eina_strbuf_new();
338 332
339 eo_gen_types_header_gen(state, eolian_state_objects_by_file_get(eos, ifname), 333 eo_gen_types_header_gen(state, eolian_state_objects_by_file_get(eos, ifname),
340 buf, EINA_TRUE, legacy); 334 buf, EINA_TRUE);
341 buf = _include_guard(ifname, "TYPES", buf); 335 buf = _include_guard(ifname, "TYPES", buf);
342 336
343 Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname); 337 Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname);
@@ -349,16 +343,13 @@ _write_header(const Eolian_State *eos, const Eolian_State *state, const char *of
349 eina_strbuf_free(cltd); 343 eina_strbuf_free(cltd);
350 } 344 }
351 345
352 const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname); 346 eo_gen_header_gen(state, eolian_state_class_by_file_get(eos, ifname), buf);
353 eo_gen_header_gen(state, cl, buf, legacy); 347
354 if (cl || !legacy) 348 buf = _include_guard(_get_filename(ofname), NULL, buf);
349 if (_write_file(ofname, buf))
355 { 350 {
356 buf = _include_guard(_get_filename(ofname), NULL, buf); 351 eina_strbuf_free(buf);
357 if (_write_file(ofname, buf)) 352 return EINA_TRUE;
358 {
359 eina_strbuf_free(buf);
360 return EINA_TRUE;
361 }
362 } 353 }
363 354
364 eina_strbuf_free(buf); 355 eina_strbuf_free(buf);
@@ -373,7 +364,7 @@ _write_stub_header(const Eolian_State *eos, const Eolian_State *state, const cha
373 Eina_Strbuf *buf = eina_strbuf_new(); 364 Eina_Strbuf *buf = eina_strbuf_new();
374 365
375 eo_gen_types_header_gen(state, eolian_state_objects_by_file_get(eos, ifname), 366 eo_gen_types_header_gen(state, eolian_state_objects_by_file_get(eos, ifname),
376 buf, EINA_FALSE, EINA_FALSE); 367 buf, EINA_FALSE);
377 368
378 Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname); 369 Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname);
379 if (cltd) 370 if (cltd)
@@ -476,7 +467,6 @@ _write_deps(const Eolian_State *eos, const char *ofname, const char *ifname,
476 eina_strbuf_append_char(dbuf, '\n'); 467 eina_strbuf_append_char(dbuf, '\n');
477 468
478 _append_dep_line(buf, dbuf, outs, gen_what, GEN_H); 469 _append_dep_line(buf, dbuf, outs, gen_what, GEN_H);
479 _append_dep_line(buf, dbuf, outs, gen_what, GEN_H_LEGACY);
480 _append_dep_line(buf, dbuf, outs, gen_what, GEN_H_STUB); 470 _append_dep_line(buf, dbuf, outs, gen_what, GEN_H_STUB);
481 471
482 if (gen_what & GEN_D_FULL) 472 if (gen_what & GEN_D_FULL)
@@ -498,7 +488,7 @@ main(int argc, char **argv)
498 int pret = 1; 488 int pret = 1;
499 489
500 char *outs[sizeof(_dexts) / sizeof(void *)] = { 490 char *outs[sizeof(_dexts) / sizeof(void *)] = {
501 NULL, NULL, NULL, NULL, NULL, NULL, NULL 491 NULL, NULL, NULL, NULL, NULL, NULL
502 }; 492 };
503 char *basen = NULL; 493 char *basen = NULL;
504 Eina_List *includes = NULL; 494 Eina_List *includes = NULL;
@@ -540,9 +530,6 @@ main(int argc, char **argv)
540 case 'h': 530 case 'h':
541 gen_what |= GEN_H; 531 gen_what |= GEN_H;
542 break; 532 break;
543 case 'l':
544 gen_what |= GEN_H_LEGACY;
545 break;
546 case 's': 533 case 's':
547 gen_what |= GEN_H_STUB; 534 gen_what |= GEN_H_STUB;
548 break; 535 break;
@@ -646,9 +633,7 @@ main(int argc, char **argv)
646 633
647 Eina_Bool succ = EINA_TRUE; 634 Eina_Bool succ = EINA_TRUE;
648 if (gen_what & GEN_H) 635 if (gen_what & GEN_H)
649 succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H)], eobn, EINA_FALSE); 636 succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H)], eobn);
650 if (succ && (gen_what & GEN_H_LEGACY))
651 succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H_LEGACY)], eobn, EINA_TRUE);
652 if (succ && (gen_what & GEN_H_STUB)) 637 if (succ && (gen_what & GEN_H_STUB))
653 succ = _write_stub_header(eos, eos, outs[_get_bit_pos(GEN_H_STUB)], eobn); 638 succ = _write_stub_header(eos, eos, outs[_get_bit_pos(GEN_H_STUB)], eobn);
654 if (succ && (gen_what & GEN_C)) 639 if (succ && (gen_what & GEN_C))
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index c2a2ea6..85e443e 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -4,13 +4,13 @@
4 4
5static Eina_Strbuf * 5static Eina_Strbuf *
6_type_generate(const Eolian_State *state, const Eolian_Typedecl *tp, 6_type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
7 Eina_Bool full, Eina_Bool legacy) 7 Eina_Bool full)
8{ 8{
9 char *grp = strdup(eolian_typedecl_name_get(tp)); 9 char *grp = strdup(eolian_typedecl_name_get(tp));
10 char *p = strrchr(grp, '.'); 10 char *p = strrchr(grp, '.');
11 if (p) *p = '\0'; 11 if (p) *p = '\0';
12 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_typedecl_documentation_get(tp), 12 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_typedecl_documentation_get(tp),
13 grp, 0, legacy); 13 grp, 0);
14 free(grp); 14 free(grp);
15 if (!buf) buf = eina_strbuf_new(); 15 if (!buf) buf = eina_strbuf_new();
16 else eina_strbuf_append_char(buf, '\n'); 16 else eina_strbuf_append_char(buf, '\n');
@@ -54,7 +54,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
54 if (nl) 54 if (nl)
55 { 55 {
56 Eina_Strbuf *fbuf = eo_gen_docs_full_gen(state, fdoc, NULL, 56 Eina_Strbuf *fbuf = eo_gen_docs_full_gen(state, fdoc, NULL,
57 strlen(nl), legacy); 57 strlen(nl));
58 if (fbuf) 58 if (fbuf)
59 eina_strbuf_append_printf(buf, " %s", 59 eina_strbuf_append_printf(buf, " %s",
60 eina_strbuf_string_get(fbuf)); 60 eina_strbuf_string_get(fbuf));
@@ -108,7 +108,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
108 if (nl) 108 if (nl)
109 { 109 {
110 Eina_Strbuf *fbuf = eo_gen_docs_full_gen(state, fdoc, NULL, 110 Eina_Strbuf *fbuf = eo_gen_docs_full_gen(state, fdoc, NULL,
111 strlen(nl), legacy); 111 strlen(nl));
112 if (fbuf) 112 if (fbuf)
113 eina_strbuf_append_printf(buf, " %s", 113 eina_strbuf_append_printf(buf, " %s",
114 eina_strbuf_string_get(fbuf)); 114 eina_strbuf_string_get(fbuf));
@@ -166,13 +166,13 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
166} 166}
167 167
168static Eina_Strbuf * 168static Eina_Strbuf *
169_var_generate(const Eolian_State *state, const Eolian_Variable *vr, Eina_Bool legacy) 169_var_generate(const Eolian_State *state, const Eolian_Variable *vr)
170{ 170{
171 char *fn = strdup(eolian_variable_name_get(vr)); 171 char *fn = strdup(eolian_variable_name_get(vr));
172 char *p = strrchr(fn, '.'); 172 char *p = strrchr(fn, '.');
173 if (p) *p = '\0'; 173 if (p) *p = '\0';
174 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_variable_documentation_get(vr), 174 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_variable_documentation_get(vr),
175 fn, 0, legacy); 175 fn, 0);
176 if (p) 176 if (p)
177 { 177 {
178 *p = '_'; 178 *p = '_';
@@ -216,7 +216,7 @@ _var_generate(const Eolian_State *state, const Eolian_Variable *vr, Eina_Bool le
216 216
217void eo_gen_types_header_gen(const Eolian_State *state, 217void eo_gen_types_header_gen(const Eolian_State *state,
218 Eina_Iterator *itr, Eina_Strbuf *buf, 218 Eina_Iterator *itr, Eina_Strbuf *buf,
219 Eina_Bool full, Eina_Bool legacy) 219 Eina_Bool full)
220{ 220{
221 const Eolian_Object *decl; 221 const Eolian_Object *decl;
222 EINA_ITERATOR_FOREACH(itr, decl) 222 EINA_ITERATOR_FOREACH(itr, decl)
@@ -229,7 +229,7 @@ void eo_gen_types_header_gen(const Eolian_State *state,
229 if (!vr || eolian_variable_is_extern(vr)) 229 if (!vr || eolian_variable_is_extern(vr))
230 continue; 230 continue;
231 231
232 Eina_Strbuf *vbuf = _var_generate(state, vr, legacy); 232 Eina_Strbuf *vbuf = _var_generate(state, vr);
233 if (vbuf) 233 if (vbuf)
234 { 234 {
235 eina_strbuf_append(buf, eina_strbuf_string_get(vbuf)); 235 eina_strbuf_append(buf, eina_strbuf_string_get(vbuf));
@@ -259,7 +259,7 @@ void eo_gen_types_header_gen(const Eolian_State *state,
259 continue; 259 continue;
260 } 260 }
261 261
262 Eina_Strbuf *tbuf = _type_generate(state, tp, full, legacy); 262 Eina_Strbuf *tbuf = _type_generate(state, tp, full);
263 if (tbuf) 263 if (tbuf)
264 { 264 {
265 eina_strbuf_append(buf, eina_strbuf_string_get(tbuf)); 265 eina_strbuf_append(buf, eina_strbuf_string_get(tbuf));
diff --git a/src/bin/eolian/types.h b/src/bin/eolian/types.h
index 2659b59..5abd030 100644
--- a/src/bin/eolian/types.h
+++ b/src/bin/eolian/types.h
@@ -1,7 +1,7 @@
1#ifndef EOLIAN_GEN_TYPES_H 1#ifndef EOLIAN_GEN_TYPES_H
2#define EOLIAN_GEN_TYPES_H 2#define EOLIAN_GEN_TYPES_H
3 3
4void eo_gen_types_header_gen(const Eolian_State *state, Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Bool full, Eina_Bool legacy); 4void eo_gen_types_header_gen(const Eolian_State *state, Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Bool full);
5void eo_gen_types_source_gen(Eina_Iterator *itr, Eina_Strbuf *buf); 5void eo_gen_types_source_gen(Eina_Iterator *itr, Eina_Strbuf *buf);
6Eina_Strbuf *eo_gen_class_typedef_gen(const Eolian_State *eos, const char *eof); 6Eina_Strbuf *eo_gen_class_typedef_gen(const Eolian_State *eos, const char *eof);
7 7