From 5bdb5d376373dab8bf624388cac520094be95b63 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 26 Oct 2012 09:01:52 +0000 Subject: [PATCH] merge: add embryo please check and report problems (not cosmetic ones) someone should update the efl.spec.in file, i don't know that stuff SVN revision: 78512 --- AUTHORS | 6 ++ COPYING | 2 + Makefile.am | 8 +- NEWS | 2 +- configure.ac | 79 ++++++++++++++++--- data/Makefile.am | 6 ++ .../include => data/embryo}/default.inc | 0 m4/efl_check_funcs.m4 | 47 +++++++++++ .../embryo/ChangeLog => old/ChangeLog.embryo | 0 legacy/embryo/NEWS => old/NEWS.embryo | 0 legacy/embryo/README => old/README.embryo | 0 {legacy/embryo => pc}/embryo.pc.in | 2 +- src/bin/Makefile.am | 2 +- src/bin/embryo/Makefile.am | 49 ++++++++++++ .../bin => src/bin/embryo}/embryo_cc_amx.h | 0 .../bin => src/bin/embryo}/embryo_cc_osdefs.h | 0 .../bin => src/bin/embryo}/embryo_cc_prefix.c | 0 .../bin => src/bin/embryo}/embryo_cc_prefix.h | 0 .../src/bin => src/bin/embryo}/embryo_cc_sc.h | 0 .../bin => src/bin/embryo}/embryo_cc_sc1.c | 8 +- .../bin => src/bin/embryo}/embryo_cc_sc2.c | 0 .../bin => src/bin/embryo}/embryo_cc_sc3.c | 32 ++++---- .../bin => src/bin/embryo}/embryo_cc_sc4.c | 4 +- .../bin => src/bin/embryo}/embryo_cc_sc5.c | 2 + .../bin => src/bin/embryo}/embryo_cc_sc5.scp | 0 .../bin => src/bin/embryo}/embryo_cc_sc6.c | 47 +++++------ .../bin => src/bin/embryo}/embryo_cc_sc7.c | 14 ++-- .../bin => src/bin/embryo}/embryo_cc_sc7.scp | 0 .../bin/embryo}/embryo_cc_scexpand.c | 0 .../bin => src/bin/embryo}/embryo_cc_sclist.c | 6 +- .../bin => src/bin/embryo}/embryo_cc_scvars.c | 0 src/lib/Makefile.am | 2 +- .../src/lib => src/lib/embryo}/Embryo.h | 0 src/lib/embryo/Makefile.am | 38 +++++++++ .../src/lib => src/lib/embryo}/embryo_amx.c | 6 +- .../src/lib => src/lib/embryo}/embryo_args.c | 4 +- .../src/lib => src/lib/embryo}/embryo_float.c | 46 +++++------ .../src/lib => src/lib/embryo}/embryo_main.c | 0 .../lib => src/lib/embryo}/embryo_private.h | 8 -- .../src/lib => src/lib/embryo}/embryo_rand.c | 6 +- .../src/lib => src/lib/embryo}/embryo_str.c | 0 .../src/lib => src/lib/embryo}/embryo_time.c | 8 +- 42 files changed, 326 insertions(+), 108 deletions(-) create mode 100644 data/Makefile.am rename {legacy/embryo/include => data/embryo}/default.inc (100%) rename legacy/embryo/ChangeLog => old/ChangeLog.embryo (100%) rename legacy/embryo/NEWS => old/NEWS.embryo (100%) rename legacy/embryo/README => old/README.embryo (100%) rename {legacy/embryo => pc}/embryo.pc.in (87%) create mode 100644 src/bin/embryo/Makefile.am rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_amx.h (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_osdefs.h (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_prefix.c (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_prefix.h (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc.h (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc1.c (99%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc2.c (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc3.c (98%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc4.c (99%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc5.c (99%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc5.scp (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc6.c (96%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc7.c (99%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sc7.scp (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_scexpand.c (100%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_sclist.c (99%) rename {legacy/embryo/src/bin => src/bin/embryo}/embryo_cc_scvars.c (100%) rename {legacy/embryo/src/lib => src/lib/embryo}/Embryo.h (100%) create mode 100644 src/lib/embryo/Makefile.am rename {legacy/embryo/src/lib => src/lib/embryo}/embryo_amx.c (99%) rename {legacy/embryo/src/lib => src/lib/embryo}/embryo_args.c (97%) rename {legacy/embryo/src/lib => src/lib/embryo}/embryo_float.c (89%) rename {legacy/embryo/src/lib => src/lib/embryo}/embryo_main.c (100%) rename {legacy/embryo/src/lib => src/lib/embryo}/embryo_private.h (98%) rename {legacy/embryo/src/lib => src/lib/embryo}/embryo_rand.c (76%) rename {legacy/embryo/src/lib => src/lib/embryo}/embryo_str.c (100%) rename {legacy/embryo/src/lib => src/lib/embryo}/embryo_time.c (92%) diff --git a/AUTHORS b/AUTHORS index cbe4f39e00..7b4bc356c5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -62,3 +62,9 @@ Mike Blumenkrantz Lionel Orry Jérôme Pinot Leandro Santiago + +Embryo +------ + +The Rasterman (Carsten Haitzler) +Jérôme Pinot diff --git a/COPYING b/COPYING index afd8438b6e..40367789be 100644 --- a/COPYING +++ b/COPYING @@ -4,3 +4,5 @@ name and the license file covering it. evil: licenses/COPYING.BSD eet: licenses/COPYING.BSD eina: licenses/COPYING.LGPL +eo: licenses/COPYING.BSD +embryo: licenses/COPYING.BSD diff --git a/Makefile.am b/Makefile.am index c6cbaeac5a..403cc9f9ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src doc +SUBDIRS = src data doc MAINTAINERCLEANFILES = \ Makefile.in \ @@ -48,7 +48,8 @@ spec/efl.spec \ pc/evil.pc \ pc/eina.pc \ pc/eet.pc \ -pc/eo.pc +pc/eo.pc \ +pc/embryo.pc pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = @@ -60,7 +61,8 @@ endif pkgconfig_DATA += \ pc/eina.pc \ pc/eo.pc \ -pc/eet.pc +pc/eet.pc \ +pc/embryo.pc .PHONY: doc benchmark examples install-examples diff --git a/NEWS b/NEWS index ff5e32f5d9..5e05538268 100644 --- a/NEWS +++ b/NEWS @@ -10,7 +10,7 @@ Additions: * Add eina_barrier thread API * Add eina_tmpstr_add() and eina_tmpstr_del() * Add eina_thread API - + Improvements: * Single EFL tree now covring all EFL library components. * Speedup Eina Rbtree Iterator by recycling memory instead of diff --git a/configure.ac b/configure.ac index a99357b351..bff70be5d7 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,7 @@ requirements_libs_eo="" requirements_libs_eet="" #requirements_libs_evas="" #requirements_libs_ecore="" -#requirements_libs_embryo="" +requirements_libs_embryo="" #requirements_libs_eio="" #requirements_libs_edje="" #requirements_libs_efreet="" @@ -73,7 +73,7 @@ requirements_libs_deps_eo="" requirements_libs_deps_eet="" #requirements_libs_deps_evas="" #requirements_libs_deps_ecore="" -#requirements_libs_deps_embryo="" +requirements_libs_deps_embryo="" #requirements_libs_deps_eio="" #requirements_libs_deps_edje="" #requirements_libs_deps_efreet="" @@ -88,7 +88,7 @@ requirements_pc_eo="" requirements_pc_eet="" #requirements_pc_evas="" #requirements_pc_ecore="" -#requirements_pc_embryo="" +requirements_pc_embryo="" #requirements_pc_eio="" #requirements_pc_edje="" #requirements_pc_efreet="" @@ -103,7 +103,7 @@ requirements_pc_deps_eo="" requirements_pc_deps_eet="" #requirements_pc_deps_evas="" #requirements_pc_deps_ecore="" -#requirements_pc_deps_embryo="" +requirements_pc_deps_embryo="" #requirements_pc_deps_eio="" #requirements_pc_deps_edje="" #requirements_pc_deps_efreet="" @@ -119,7 +119,7 @@ AC_SUBST([requirements_libs_eo]) AC_SUBST([requirements_libs_eet]) #AC_SUBST([requirements_libs_evas]) #AC_SUBST([requirements_libs_ecore]) -#AC_SUBST([requirements_libs_embryo]) +AC_SUBST([requirements_libs_embryo]) #AC_SUBST([requirements_libs_eio]) #AC_SUBST([requirements_libs_edje]) #AC_SUBST([requirements_libs_efreet]) @@ -134,7 +134,7 @@ AC_SUBST([requirements_pc_eo]) AC_SUBST([requirements_pc_eet]) #AC_SUBST([requirements_pc_evas]) #AC_SUBST([requirements_pc_ecore]) -#AC_SUBST([requirements_pc_embryo]) +AC_SUBST([requirements_pc_embryo]) #AC_SUBST([requirements_pc_eio]) #AC_SUBST([requirements_pc_edje]) #AC_SUBST([requirements_pc_efreet]) @@ -331,6 +331,9 @@ strlcpy \ AC_FUNC_ALLOCA +EFL_CHECK_FUNCS([EFL], [fnmatch gettimeofday]) + + ###################### EFL ###################### @@ -583,7 +586,7 @@ EFL_CHECK_LINKER_FLAGS([EINA], [-fno-strict-aliasing]) ### Checks for library functions -EFL_CHECK_FUNCS([EINA], [dirfd dlopen dladdr fnmatch iconv shm_open setxattr]) +EFL_CHECK_FUNCS([EINA], [dirfd dlopen dladdr iconv shm_open setxattr]) enable_log="no" if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then @@ -752,8 +755,6 @@ EET_LIBS="${EET_LIBS} ${requirements_libs_deps_eet}" ### Checks for compiler characteristics -EFL_CHECK_COMPILER_FLAGS([EET], [-Wshadow -Wpointer-arith]) - ### Checks for linker characteristics case "${host_os}" in @@ -815,8 +816,65 @@ AM_CONDITIONAL([EO_BUILD_EXAMPLE_EVAS], [test "x${have_elm}" = "xyes"]) #### End of Eo +#### Embryo + +AC_MSG_NOTICE([Embryo checks]) + +### Default values + +### Additional options to configure + +### Checks for programs + +### Checks for libraries + +## Compatibility layers + +# Evil library for compilation on Windows + +case "$host_os" in + mingw*) + requirements_pc_embryo="${requirements_pc_embryo} evil >= ${PACKAGE_VERSION}" + ;; +esac + +# Eina library + +requirements_pc_embryo="eina >= ${PACKAGE_VERSION} ${requirements_pc_embryo}" + +AC_ARG_VAR([EMBRYO_CFLAGS], [preprocessor flags for Embryo]) +AC_SUBST([EMBRYO_CFLAGS]) +AC_ARG_VAR([EMBRYO_LIBS], [linker flags for Embryo]) +AC_SUBST([EMBRYO_LIBS]) + +### Checks for header files + +### Checks for types + +### Checks for structures + +### Checks for compiler characteristics + +### Checks for linker characteristics + +### Checks for library functions + +if ! test "x${efl_func_fnmatch}" = "xyes" ; then + AC_MSG_ERROR([Cannot find fnmatch()]) +fi + +if ! test "x${efl_func_gettimeofday}" = "xyes" ; then + AC_MSG_ERROR([Cannot find gettimeofday()]) +fi + +### Check availability + +#### End of Embryo + + AC_CONFIG_FILES([ Makefile +data/Makefile doc/Makefile doc/Doxyfile src/Makefile @@ -826,6 +884,7 @@ src/benchmarks/eo/Makefile src/bin/Makefile src/bin/evil/Makefile src/bin/eet/Makefile +src/bin/embryo/Makefile src/examples/Makefile src/examples/eina/Makefile src/examples/eet/Makefile @@ -836,6 +895,7 @@ src/lib/eina/Makefile src/lib/eina/eina_config.h src/lib/eet/Makefile src/lib/eo/Makefile +src/lib/embryo/Makefile src/modules/Makefile src/modules/eina/Makefile src/modules/eina/mp/Makefile @@ -853,6 +913,7 @@ pc/evil.pc pc/eina.pc pc/eet.pc pc/eo.pc +pc/embryo.pc ]) AC_OUTPUT diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000000..8fdcec7de8 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,6 @@ +MAINTAINERCLEANFILES = Makefile.in + +filesdir = $(pkgdatadir)/include +files_DATA = embryo/default.inc + +EXTRA_DIST = $(files_DATA) diff --git a/legacy/embryo/include/default.inc b/data/embryo/default.inc similarity index 100% rename from legacy/embryo/include/default.inc rename to data/embryo/default.inc diff --git a/m4/efl_check_funcs.m4 b/m4/efl_check_funcs.m4 index 1611633a15..23712bcdd7 100644 --- a/m4/efl_check_funcs.m4 +++ b/m4/efl_check_funcs.m4 @@ -7,6 +7,7 @@ dnl dirfd dnl dladdr dnl dlopen dnl fnmatch +dnl gettimeofday dnl iconv dnl setxattr (an al.) dnl shm_open @@ -232,6 +233,52 @@ esac AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) ]) +dnl _EFL_CHECK_FUNC_GETTIMEOFDAY is for internal use +dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) + +AC_DEFUN([_EFL_CHECK_FUNC_GETTIMEOFDAY], +[ +case "$host_os" in + mingw*) + _efl_have_fct="yes" + ;; + *) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ +#include +#include + ]], + [[ +int res; +res = gettimeofday(NULL, NULL); + ]])], + [_efl_have_fct="yes"], + [_efl_have_fct="no"]) + + if test "x${_efl_have_fct}" = "xno" && test "x${enable_exotic}" = "xyes"; then + SAVE_LIBS="${LIBS}" + SAVE_CFLAGS="${CFLAGS}" + LIBS="${LIBS} ${EXOTIC_LIBS}" + CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ +#include + ]], + [[ +int res; +res = gettimeofday(NULL, NULL); + ]])], + [_efl_have_fct="yes"], + [_efl_have_fct="no"]) + LIBS="${SAVE_LIBS}" + CFLAGS="${SAVE_CFLAGS}" + fi + ;; +esac + +AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) +]) + dnl _EFL_CHECK_FUNC_ICONV_PRIV is for internal use dnl _EFL_CHECK_FUNC_ICONV_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) diff --git a/legacy/embryo/ChangeLog b/old/ChangeLog.embryo similarity index 100% rename from legacy/embryo/ChangeLog rename to old/ChangeLog.embryo diff --git a/legacy/embryo/NEWS b/old/NEWS.embryo similarity index 100% rename from legacy/embryo/NEWS rename to old/NEWS.embryo diff --git a/legacy/embryo/README b/old/README.embryo similarity index 100% rename from legacy/embryo/README rename to old/README.embryo diff --git a/legacy/embryo/embryo.pc.in b/pc/embryo.pc.in similarity index 87% rename from legacy/embryo/embryo.pc.in rename to pc/embryo.pc.in index bea0736579..8e5062ca9f 100644 --- a/legacy/embryo/embryo.pc.in +++ b/pc/embryo.pc.in @@ -8,8 +8,8 @@ embryoincludedir=@datadir@/include Name: embryo Description: A small virtual machine engine and bytecode compiler -@pkgconfig_requires_private@: @requirement_embryo@ Version: @VERSION@ +Requires.private: @requirements_pc_embryo@ Libs: -L${libdir} -lembryo Libs.private: @EFL_FNMATCH_LIBS@ -lm Cflags: -I${includedir}/embryo-@VMAJ@ diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 70889282e3..ca26cca78a 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -8,4 +8,4 @@ SUBDIRS += evil endif -SUBDIRS += eet +SUBDIRS += eet embryo diff --git a/src/bin/embryo/Makefile.am b/src/bin/embryo/Makefile.am new file mode 100644 index 0000000000..e31a5bee62 --- /dev/null +++ b/src/bin/embryo/Makefile.am @@ -0,0 +1,49 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_srcdir)/src/lib/embryo \ +-I$(top_builddir)/src/lib/eina \ +-I$(top_builddir)/src/lib/embryo \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EFL_CFLAGS@ + +if HAVE_WINDOWS +AM_CPPFLAGS += \ +-I$(top_srcdir)/src/lib/evil \ +-I$(top_builddir)/src/lib/evil +endif + +bin_PROGRAMS = embryo_cc + +embryo_cc_SOURCES = \ +embryo_cc_amx.h \ +embryo_cc_sc.h \ +embryo_cc_sc1.c \ +embryo_cc_sc2.c \ +embryo_cc_sc3.c \ +embryo_cc_sc4.c \ +embryo_cc_sc5.c \ +embryo_cc_sc6.c \ +embryo_cc_sc7.c \ +embryo_cc_scexpand.c \ +embryo_cc_sclist.c \ +embryo_cc_scvars.c \ +embryo_cc_prefix.c \ +embryo_cc_prefix.h + +embryo_cc_LDADD = \ +$(top_builddir)/src/lib/embryo/libembryo.la \ +$(top_builddir)/src/lib/eina/libeina.la \ +-lm + +if HAVE_WINDOWS +embryo_cc_LDADD += $(top_builddir)/src/lib/evil/libevil.la +endif + +EXTRA_DIST = \ +embryo_cc_sc5.scp \ +embryo_cc_sc7.scp diff --git a/legacy/embryo/src/bin/embryo_cc_amx.h b/src/bin/embryo/embryo_cc_amx.h similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_amx.h rename to src/bin/embryo/embryo_cc_amx.h diff --git a/legacy/embryo/src/bin/embryo_cc_osdefs.h b/src/bin/embryo/embryo_cc_osdefs.h similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_osdefs.h rename to src/bin/embryo/embryo_cc_osdefs.h diff --git a/legacy/embryo/src/bin/embryo_cc_prefix.c b/src/bin/embryo/embryo_cc_prefix.c similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_prefix.c rename to src/bin/embryo/embryo_cc_prefix.c diff --git a/legacy/embryo/src/bin/embryo_cc_prefix.h b/src/bin/embryo/embryo_cc_prefix.h similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_prefix.h rename to src/bin/embryo/embryo_cc_prefix.h diff --git a/legacy/embryo/src/bin/embryo_cc_sc.h b/src/bin/embryo/embryo_cc_sc.h similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_sc.h rename to src/bin/embryo/embryo_cc_sc.h diff --git a/legacy/embryo/src/bin/embryo_cc_sc1.c b/src/bin/embryo/embryo_cc_sc1.c similarity index 99% rename from legacy/embryo/src/bin/embryo_cc_sc1.c rename to src/bin/embryo/embryo_cc_sc1.c index 9ee3ad80fa..53baf36539 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc1.c +++ b/src/bin/embryo/embryo_cc_sc1.c @@ -40,7 +40,9 @@ #ifdef HAVE_EVIL # include -#endif /* HAVE_EVIL */ +#endif + +#include #include "embryo_cc_sc.h" #include "embryo_cc_prefix.h" @@ -117,7 +119,7 @@ static int *wqptr; /* pointer to next entry */ static char binfname[PATH_MAX]; /* binary file name */ int -main(int argc, char *argv[], char *env[] __UNUSED__) +main(int argc, char *argv[], char *env[] EINA_UNUSED) { e_prefix_determine(argv[0]); return sc_compile(argc, argv); @@ -573,7 +575,7 @@ initglobals(void) static void parseoptions(int argc, char **argv, char *iname, char *oname, - char *pname __UNUSED__, char *rname __UNUSED__) + char *pname EINA_UNUSED, char *rname EINA_UNUSED) { char str[PATH_MAX]; int i, stack_size; diff --git a/legacy/embryo/src/bin/embryo_cc_sc2.c b/src/bin/embryo/embryo_cc_sc2.c similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_sc2.c rename to src/bin/embryo/embryo_cc_sc2.c diff --git a/legacy/embryo/src/bin/embryo_cc_sc3.c b/src/bin/embryo/embryo_cc_sc3.c similarity index 98% rename from legacy/embryo/src/bin/embryo_cc_sc3.c rename to src/bin/embryo/embryo_cc_sc3.c index 1206857730..b1f8aa5480 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc3.c +++ b/src/bin/embryo/embryo_cc_sc3.c @@ -390,10 +390,10 @@ skim(int *opstr, void (*testfunc) (int), int dropval, int endval, int lvalue, hits, droplab, endlab, opidx; int allconst; cell constval; - int index; + int idx; cell cidx; - stgget(&index, &cidx); /* mark position in code generator */ + stgget(&idx, &cidx); /* mark position in code generator */ hits = FALSE; /* no logical operators "hit" yet */ allconst = TRUE; /* assume all values "const" */ constval = 0; @@ -440,7 +440,7 @@ skim(int *opstr, void (*testfunc) (int), int dropval, int endval, { lval->ident = iCONSTEXPR; lval->constval = constval; - stgdel(index, cidx); /* scratch generated code and calculate */ + stgdel(idx, cidx); /* scratch generated code and calculate */ } else { @@ -589,13 +589,13 @@ plnge_rel(int *opstr, int opoff, int (*hier) (value * lval), value * lval) static int plnge1(int (*hier) (value * lval), value * lval) { - int lvalue, index; + int lvalue, idx; cell cidx; - stgget(&index, &cidx); /* mark position in code generator */ + stgget(&idx, &cidx); /* mark position in code generator */ lvalue = (*hier) (lval); if (lval->ident == iCONSTEXPR) - stgdel(index, cidx); /* load constant later */ + stgdel(idx, cidx); /* load constant later */ return lvalue; } @@ -608,10 +608,10 @@ static void plnge2(void (*oper) (void), int (*hier) (value * lval), value * lval1, value * lval2) { - int index; + int idx; cell cidx; - stgget(&index, &cidx); /* mark position in code generator */ + stgget(&idx, &cidx); /* mark position in code generator */ if (lval1->ident == iCONSTEXPR) { /* constant on left side; it is not yet loaded */ if (plnge1(hier, lval2)) @@ -632,7 +632,7 @@ plnge2(void (*oper) (void), if (commutative(oper)) { /* test for commutative operators */ value lvaltmp = { NULL, 0, 0, 0, 0, NULL }; - stgdel(index, cidx); /* scratch push1() and constant fetch (then + stgdel(idx, cidx); /* scratch push1() and constant fetch (then * fetch the constant again */ const2(lval2->constval << dbltest(oper, lval1, lval2)); /* now, the primary register has the left operand and the secondary @@ -693,7 +693,7 @@ plnge2(void (*oper) (void), else if (lval1->ident == iCONSTEXPR && lval2->ident == iCONSTEXPR) { /* only constant expression if both constant */ - stgdel(index, cidx); /* scratch generated code and calculate */ + stgdel(idx, cidx); /* scratch generated code and calculate */ if (!matchtag(lval1->tag, lval2->tag, FALSE)) error(213); /* tagname mismatch */ lval1->constval = @@ -1483,7 +1483,7 @@ hier2(value * lval) static int hier1(value * lval1) { - int lvalue, index, tok, symtok; + int lvalue, idx, tok, symtok; cell val, cidx; value lval2 = { NULL, 0, 0, 0, 0, NULL }; char *st; @@ -1527,7 +1527,7 @@ hier1(value * lval1) needtoken(close); return FALSE; } /* if */ - stgget(&index, &cidx); /* mark position in code generator */ + stgget(&idx, &cidx); /* mark position in code generator */ push1(); /* save base address of the array */ if (hier14(&lval2)) /* create expression for the array index */ rvalue(&lval2); @@ -1538,7 +1538,7 @@ hier1(value * lval1) error(213); if (lval2.ident == iCONSTEXPR) { /* constant expression */ - stgdel(index, cidx); /* scratch generated code */ + stgdel(idx, cidx); /* scratch generated code */ if (lval1->arrayidx) { /* keep constant index, for checking */ assert(sym->dim.array.level >= 0 @@ -2365,7 +2365,7 @@ commutative(void (*oper) ()) static int constant(value * lval) { - int tok, index, constant; + int tok, idx, constant; cell val, item, cidx; char *st; symbol *sym; @@ -2413,9 +2413,9 @@ constant(value * lval) /* cannot call constexpr() here, because "staging" is already turned * on at this point */ assert(staging); - stgget(&index, &cidx); /* mark position in code generator */ + stgget(&idx, &cidx); /* mark position in code generator */ expression(&constant, &item, &tag, FALSE); - stgdel(index, cidx); /* scratch generated code */ + stgdel(idx, cidx); /* scratch generated code */ if (constant == 0) error(8); /* must be constant expression */ if (lasttag < 0) diff --git a/legacy/embryo/src/bin/embryo_cc_sc4.c b/src/bin/embryo/embryo_cc_sc4.c similarity index 99% rename from legacy/embryo/src/bin/embryo_cc_sc4.c rename to src/bin/embryo/embryo_cc_sc4.c index 258d714228..1d4a321bd0 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc4.c +++ b/src/bin/embryo/embryo_cc_sc4.c @@ -32,6 +32,8 @@ #include /* for PATH_MAX */ #include +#include + #include "embryo_cc_sc.h" /* When a subroutine returns to address 0, the AMX must halt. In earlier @@ -216,7 +218,7 @@ endexpr(int fullexpr) * Global references: funcstatus (referred to only) */ void -startfunc(char *fname __UNUSED__) +startfunc(char *fname EINA_UNUSED) { stgwrite("\tproc"); stgwrite("\n"); diff --git a/legacy/embryo/src/bin/embryo_cc_sc5.c b/src/bin/embryo/embryo_cc_sc5.c similarity index 99% rename from legacy/embryo/src/bin/embryo_cc_sc5.c rename to src/bin/embryo/embryo_cc_sc5.c index a8af498724..f284420bb3 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc5.c +++ b/src/bin/embryo/embryo_cc_sc5.c @@ -36,6 +36,8 @@ # include #endif +#include + #include "embryo_cc_sc.h" #include "embryo_cc_sc5.scp" diff --git a/legacy/embryo/src/bin/embryo_cc_sc5.scp b/src/bin/embryo/embryo_cc_sc5.scp similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_sc5.scp rename to src/bin/embryo/embryo_cc_sc5.scp diff --git a/legacy/embryo/src/bin/embryo_cc_sc6.c b/src/bin/embryo/embryo_cc_sc6.c similarity index 96% rename from legacy/embryo/src/bin/embryo_cc_sc6.c rename to src/bin/embryo/embryo_cc_sc6.c index 3525d27da5..20c4122faf 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc6.c +++ b/src/bin/embryo/embryo_cc_sc6.c @@ -31,6 +31,9 @@ #include /* for macro max() */ #include #include + +#include + #include "embryo_cc_sc.h" typedef cell(*OPCODE_PROC) (FILE * fbin, char *params, cell opcode); @@ -164,31 +167,31 @@ write_encoded(FILE * fbin, ucell * c, int num) ucell p = (ucell) * c; unsigned char t[5]; /* a 32-bit cell is encoded in max. 5 bytes (3 bytes for a 16-bit cell) */ unsigned char code; - int index; + int idx; - for (index = 0; index < 5; index++) + for (idx = 0; idx < 5; idx++) { - t[index] = (unsigned char)(p & 0x7f); /* store 7 bits */ + t[idx] = (unsigned char)(p & 0x7f); /* store 7 bits */ p >>= 7; } /* for */ /* skip leading zeros */ - while (index > 1 && t[index - 1] == 0 - && (t[index - 2] & 0x40) == 0) - index--; - /* skip leading -1s *//* ??? for BIT16, check for index==3 && t[index-1]==0x03 */ - if (index == 5 && t[index - 1] == 0x0f - && (t[index - 2] & 0x40) != 0) - index--; - while (index > 1 && t[index - 1] == 0x7f - && (t[index - 2] & 0x40) != 0) - index--; + while (idx > 1 && t[idx - 1] == 0 + && (t[idx - 2] & 0x40) == 0) + idx--; + /* skip leading -1s *//* ??? for BIT16, check for idx==3 && t[idx-1]==0x03 */ + if (idx == 5 && t[idx - 1] == 0x0f + && (t[idx - 2] & 0x40) != 0) + idx--; + while (idx > 1 && t[idx - 1] == 0x7f + && (t[idx - 2] & 0x40) != 0) + idx--; /* write high byte first, write continuation bits */ - assert(index > 0); - while (index-- > 0) + assert(idx > 0); + while (idx-- > 0) { code = - (unsigned char)((index == 0) ? t[index] - : (t[index] | 0x80)); + (unsigned char)((idx == 0) ? t[idx] + : (t[idx] | 0x80)); writeerror |= !sc_writebin(fbin, &code, 1); bytes_out++; } /* while */ @@ -211,7 +214,7 @@ write_encoded(FILE * fbin, ucell * c, int num) #endif static cell -noop(FILE * fbin __UNUSED__, char *params __UNUSED__, cell opcode __UNUSED__) +noop(FILE * fbin EINA_UNUSED, char *params EINA_UNUSED, cell opcode EINA_UNUSED) { return 0; } @@ -221,7 +224,7 @@ noop(FILE * fbin __UNUSED__, char *params __UNUSED__, cell opcode __UNUSED__) #endif static cell -parm0(FILE * fbin, char *params __UNUSED__, cell opcode) +parm0(FILE * fbin, char *params EINA_UNUSED, cell opcode) { if (fbin) write_encoded(fbin, (ucell *) & opcode, 1); @@ -261,7 +264,7 @@ parm2(FILE * fbin, char *params, cell opcode) #endif static cell -do_dump(FILE * fbin, char *params, cell opcode __UNUSED__) +do_dump(FILE * fbin, char *params, cell opcode EINA_UNUSED) { ucell p; int num = 0; @@ -427,7 +430,7 @@ do_switch(FILE * fbin, char *params, cell opcode) #endif static cell -do_case(FILE * fbin, char *params, cell opcode __UNUSED__) +do_case(FILE * fbin, char *params, cell opcode EINA_UNUSED) { int i; ucell p, v; @@ -451,7 +454,7 @@ do_case(FILE * fbin, char *params, cell opcode __UNUSED__) #endif static cell -curfile(FILE * fbin __UNUSED__, char *params, cell opcode __UNUSED__) +curfile(FILE * fbin EINA_UNUSED, char *params, cell opcode EINA_UNUSED) { fcurrent = (int)hex2long(params, NULL); return 0; diff --git a/legacy/embryo/src/bin/embryo_cc_sc7.c b/src/bin/embryo/embryo_cc_sc7.c similarity index 99% rename from legacy/embryo/src/bin/embryo_cc_sc7.c rename to src/bin/embryo/embryo_cc_sc7.c index b51f2ea9c4..f18302d229 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc7.c +++ b/src/bin/embryo/embryo_cc_sc7.c @@ -204,12 +204,12 @@ stgwrite(char *st) * staging (referred to only) */ void -stgout(int index) +stgout(int idx) { if (!staging) return; - stgstring(&stgbuf[index], &stgbuf[stgidx]); - stgidx = index; + stgstring(&stgbuf[idx], &stgbuf[stgidx]); + stgidx = idx; } typedef struct @@ -319,21 +319,21 @@ stgstring(char *start, char *end) * staging (referred to only) */ void -stgdel(int index, cell code_index) +stgdel(int idx, cell code_index) { if (staging) { - stgidx = index; + stgidx = idx; code_idx = code_index; } /* if */ } int -stgget(int *index, cell * code_index) +stgget(int *idx, cell * code_index) { if (staging) { - *index = stgidx; + *idx = stgidx; *code_index = code_idx; } /* if */ return staging; diff --git a/legacy/embryo/src/bin/embryo_cc_sc7.scp b/src/bin/embryo/embryo_cc_sc7.scp similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_sc7.scp rename to src/bin/embryo/embryo_cc_sc7.scp diff --git a/legacy/embryo/src/bin/embryo_cc_scexpand.c b/src/bin/embryo/embryo_cc_scexpand.c similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_scexpand.c rename to src/bin/embryo/embryo_cc_scexpand.c diff --git a/legacy/embryo/src/bin/embryo_cc_sclist.c b/src/bin/embryo/embryo_cc_sclist.c similarity index 99% rename from legacy/embryo/src/bin/embryo_cc_sclist.c rename to src/bin/embryo/embryo_cc_sclist.c index e908248066..68a4c30d58 100644 --- a/legacy/embryo/src/bin/embryo_cc_sclist.c +++ b/src/bin/embryo/embryo_cc_sclist.c @@ -185,12 +185,12 @@ insert_path(char *path) return cur; } -char * -get_path(int index) +char * +get_path(int idx) { stringlist *cur = includepaths.next; - while (cur && index-- > 0) + while (cur && idx-- > 0) cur = cur->next; if (cur) { diff --git a/legacy/embryo/src/bin/embryo_cc_scvars.c b/src/bin/embryo/embryo_cc_scvars.c similarity index 100% rename from legacy/embryo/src/bin/embryo_cc_scvars.c rename to src/bin/embryo/embryo_cc_scvars.c diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 755365ab10..3fe99e9629 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -8,4 +8,4 @@ SUBDIRS += evil endif -SUBDIRS += eina eo eet +SUBDIRS += eina eo eet embryo diff --git a/legacy/embryo/src/lib/Embryo.h b/src/lib/embryo/Embryo.h similarity index 100% rename from legacy/embryo/src/lib/Embryo.h rename to src/lib/embryo/Embryo.h diff --git a/src/lib/embryo/Makefile.am b/src/lib/embryo/Makefile.am new file mode 100644 index 0000000000..46fa323e8f --- /dev/null +++ b/src/lib/embryo/Makefile.am @@ -0,0 +1,38 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_builddir)/src/lib/eina \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +-DEFL_EMBRYO_BUILD \ +@EFL_CFLAGS@ + +if HAVE_WINDOWS +AM_CPPFLAGS += \ +-I$(top_srcdir)/src/lib/evil \ +-I$(top_builddir)/src/lib/evil +endif + +includes_HEADERS = Embryo.h +includesdir = $(includedir)/embryo-@VMAJ@ + +lib_LTLIBRARIES = libembryo.la + +libembryo_la_SOURCES = \ +embryo_amx.c \ +embryo_args.c \ +embryo_float.c \ +embryo_main.c \ +embryo_rand.c \ +embryo_str.c \ +embryo_time.c \ +embryo_private.h + +libembryo_la_LIBADD = $(top_builddir)/src/lib/eina/libeina.la -lm +if HAVE_WINDOWS +libembryo_la_LIBADD += $(top_builddir)/src/lib/evil/libevil.la +endif +libembryo_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@ diff --git a/legacy/embryo/src/lib/embryo_amx.c b/src/lib/embryo/embryo_amx.c similarity index 99% rename from legacy/embryo/src/lib/embryo_amx.c rename to src/lib/embryo/embryo_amx.c index 55423b443b..13ef31b006 100644 --- a/legacy/embryo/src/lib/embryo_amx.c +++ b/src/lib/embryo/embryo_amx.c @@ -33,6 +33,8 @@ # include #endif +#include + #include "Embryo.h" #include "embryo_private.h" @@ -450,7 +452,7 @@ embryo_program_vm_pop(Embryo_Program *ep) EAPI void embryo_swap_16(unsigned short *v #ifndef WORDS_BIGENDIAN - __UNUSED__ + EINA_UNUSED #endif ) { @@ -462,7 +464,7 @@ embryo_swap_16(unsigned short *v EAPI void embryo_swap_32(unsigned int *v #ifndef WORDS_BIGENDIAN - __UNUSED__ + EINA_UNUSED #endif ) { diff --git a/legacy/embryo/src/lib/embryo_args.c b/src/lib/embryo/embryo_args.c similarity index 97% rename from legacy/embryo/src/lib/embryo_args.c rename to src/lib/embryo/embryo_args.c index 0c0089ea7d..e9cef2bb25 100644 --- a/legacy/embryo/src/lib/embryo_args.c +++ b/src/lib/embryo/embryo_args.c @@ -19,6 +19,8 @@ extern "C" void *alloca (size_t); #endif +#include + #include "Embryo.h" #include "embryo_private.h" @@ -31,7 +33,7 @@ void *alloca (size_t); /* exported args api */ static Embryo_Cell -_embryo_args_numargs(Embryo_Program *ep, Embryo_Cell *params __UNUSED__) +_embryo_args_numargs(Embryo_Program *ep, Embryo_Cell *params EINA_UNUSED) { Embryo_Header *hdr; unsigned char *data; diff --git a/legacy/embryo/src/lib/embryo_float.c b/src/lib/embryo/embryo_float.c similarity index 89% rename from legacy/embryo/src/lib/embryo_float.c rename to src/lib/embryo/embryo_float.c index ffaa87dab6..d84d73d3eb 100644 --- a/legacy/embryo/src/lib/embryo_float.c +++ b/src/lib/embryo/embryo_float.c @@ -44,6 +44,8 @@ #include #include +#include + #include "Embryo.h" #include "embryo_private.h" @@ -72,7 +74,7 @@ _embryo_fp_degrees_to_radians(float angle, int radix) /* exported float api */ static Embryo_Cell -_embryo_fp(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = long value to convert to a float */ float f; @@ -101,7 +103,7 @@ _embryo_fp_str(Embryo_Program *ep, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_mul(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_mul(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 */ /* params[2] = float operand 2 */ @@ -113,7 +115,7 @@ _embryo_fp_mul(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_div(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_div(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float dividend (top) */ /* params[2] = float divisor (bottom) */ @@ -136,7 +138,7 @@ _embryo_fp_div(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_add(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_add(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 */ /* params[2] = float operand 2 */ @@ -148,7 +150,7 @@ _embryo_fp_add(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_sub(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_sub(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 */ /* params[2] = float operand 2 */ @@ -161,7 +163,7 @@ _embryo_fp_sub(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) /* Return fractional part of float */ static Embryo_Cell -_embryo_fp_fract(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_fract(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand */ float f; @@ -174,7 +176,7 @@ _embryo_fp_fract(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) /* Return integer part of float, rounded */ static Embryo_Cell -_embryo_fp_round(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_round(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand */ /* params[2] = Type of rounding (cell) */ @@ -202,7 +204,7 @@ _embryo_fp_round(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_cmp(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_cmp(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 */ /* params[2] = float operand 2 */ @@ -234,7 +236,7 @@ _embryo_fp_sqroot(Embryo_Program *ep, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_power(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_power(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 */ /* params[2] = float operand 2 */ @@ -274,7 +276,7 @@ _embryo_fp_log(Embryo_Program *ep, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_sin(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_sin(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 (angle) */ /* params[2] = float operand 2 (radix) */ @@ -288,7 +290,7 @@ _embryo_fp_sin(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_cos(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_cos(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 (angle) */ /* params[2] = float operand 2 (radix) */ @@ -302,7 +304,7 @@ _embryo_fp_cos(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_tan(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_tan(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 (angle) */ /* params[2] = float operand 2 (radix) */ @@ -316,7 +318,7 @@ _embryo_fp_tan(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_abs(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_abs(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand */ float f; @@ -328,7 +330,7 @@ _embryo_fp_abs(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_asin(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_asin(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 (angle) */ /* params[2] = float operand 2 (radix) */ @@ -342,7 +344,7 @@ _embryo_fp_asin(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_acos(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_acos(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 (angle) */ /* params[2] = float operand 2 (radix) */ @@ -356,7 +358,7 @@ _embryo_fp_acos(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_atan(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_atan(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 (angle) */ /* params[2] = float operand 2 (radix) */ @@ -370,7 +372,7 @@ _embryo_fp_atan(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_atan2(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_atan2(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand 1 (y) */ /* params[2] = float operand 2 (x) */ @@ -386,7 +388,7 @@ _embryo_fp_atan2(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_log1p(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_log1p(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand */ float f; @@ -398,7 +400,7 @@ _embryo_fp_log1p(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_cbrt(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_cbrt(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand */ float f; @@ -410,7 +412,7 @@ _embryo_fp_cbrt(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_exp(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_exp(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand */ float f; @@ -422,7 +424,7 @@ _embryo_fp_exp(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_exp2(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_exp2(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand */ float f; @@ -434,7 +436,7 @@ _embryo_fp_exp2(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) } static Embryo_Cell -_embryo_fp_hypot(Embryo_Program *ep __UNUSED__, Embryo_Cell *params) +_embryo_fp_hypot(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) { /* params[1] = float operand */ float f, ff; diff --git a/legacy/embryo/src/lib/embryo_main.c b/src/lib/embryo/embryo_main.c similarity index 100% rename from legacy/embryo/src/lib/embryo_main.c rename to src/lib/embryo/embryo_main.c diff --git a/legacy/embryo/src/lib/embryo_private.h b/src/lib/embryo/embryo_private.h similarity index 98% rename from legacy/embryo/src/lib/embryo_private.h rename to src/lib/embryo/embryo_private.h index a4205e1708..c65a1abfe5 100644 --- a/legacy/embryo/src/lib/embryo_private.h +++ b/src/lib/embryo/embryo_private.h @@ -1,14 +1,6 @@ #ifndef _EMBRYO_PRIVATE_H #define _EMBRYO_PRIVATE_H - -#ifdef __GNUC__ -# if __GNUC__ >= 4 -// BROKEN in gcc 4 on amd64 -//# pragma GCC visibility push(hidden) -# endif -#endif - typedef enum _Embryo_Opcode Embryo_Opcode; enum _Embryo_Opcode diff --git a/legacy/embryo/src/lib/embryo_rand.c b/src/lib/embryo/embryo_rand.c similarity index 76% rename from legacy/embryo/src/lib/embryo_rand.c rename to src/lib/embryo/embryo_rand.c index 627f7ed35c..0f13d87127 100644 --- a/legacy/embryo/src/lib/embryo_rand.c +++ b/src/lib/embryo/embryo_rand.c @@ -4,19 +4,21 @@ #include +#include + #include "Embryo.h" #include "embryo_private.h" /* exported random number api */ static Embryo_Cell -_embryo_rand_rand(Embryo_Program *ep __UNUSED__, Embryo_Cell *params __UNUSED__) +_embryo_rand_rand(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params EINA_UNUSED) { return (Embryo_Cell)(rand() & 0xffff); } static Embryo_Cell -_embryo_rand_randf(Embryo_Program *ep __UNUSED__, Embryo_Cell *params __UNUSED__) +_embryo_rand_randf(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params EINA_UNUSED) { double r; float f; diff --git a/legacy/embryo/src/lib/embryo_str.c b/src/lib/embryo/embryo_str.c similarity index 100% rename from legacy/embryo/src/lib/embryo_str.c rename to src/lib/embryo/embryo_str.c diff --git a/legacy/embryo/src/lib/embryo_time.c b/src/lib/embryo/embryo_time.c similarity index 92% rename from legacy/embryo/src/lib/embryo_time.c rename to src/lib/embryo/embryo_time.c index 90c14cfd89..8725377b0c 100644 --- a/legacy/embryo/src/lib/embryo_time.c +++ b/src/lib/embryo/embryo_time.c @@ -2,10 +2,6 @@ # include "config.h" #endif -#ifndef EFL_HAVE_GETTIMEOFDAY -# error "Your platform isn't supported yet" -#endif - #include #include @@ -21,13 +17,15 @@ # include #endif +#include + #include "Embryo.h" #include "embryo_private.h" /* exported time api */ static Embryo_Cell -_embryo_time_seconds(Embryo_Program *ep __UNUSED__, Embryo_Cell *params __UNUSED__) +_embryo_time_seconds(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params EINA_UNUSED) { struct timeval timev; double t;