#include "main.h"
#include "types.h"
#include "headers.h"
+#include "sources.h"
int _eolian_gen_log_dom = -1;
}
}
+ eina_strbuf_free(buf);
return EINA_FALSE;
}
_write_source(const char *ofname, const char *ifname)
{
INF("generating source: %s", ofname);
- Eina_Strbuf *ebuf = eina_strbuf_new(),
- *lbuf = eina_strbuf_new();
+ Eina_Strbuf *buf = eina_strbuf_new();
- Eina_Bool ret = _write_file(ofname, ebuf, EINA_FALSE) &&
- _write_file(ofname, lbuf, EINA_TRUE);
- eina_strbuf_free(ebuf);
- eina_strbuf_free(lbuf);
- return ret;
+ const Eolian_Class *cl = eolian_class_get_by_file(ifname);
+ eo_gen_source_gen(cl, buf);
+ if (cl)
+ {
+ if (_write_file(ofname, buf, EINA_FALSE))
+ {
+ eina_strbuf_free(buf);
+ return EINA_TRUE;
+ }
+ }
+
+ eina_strbuf_free(buf);
+ return EINA_FALSE;
}
static Eina_Bool
--- /dev/null
+#ifndef EOLIAN_GEN_SOURCES_H
+#define EOLIAN_GEN_SOURCES_H
+
+#include "main.h"
+
+void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
+
+#endif