Lionel Orry <lionel.orry@gmail.com>
Jérôme Pinot <ngc891@gmail.com>
Leandro Santiago <leandrosansilva@gmail.com>
+
+Embryo
+------
+
+The Rasterman (Carsten Haitzler) <raster@rasterman.com>
+Jérôme Pinot <ngc891@gmail.com>
evil: licenses/COPYING.BSD
eet: licenses/COPYING.BSD
eina: licenses/COPYING.LGPL
+eo: licenses/COPYING.BSD
+embryo: licenses/COPYING.BSD
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src doc
+SUBDIRS = src data doc
MAINTAINERCLEANFILES = \
Makefile.in \
pc/evil.pc \
pc/eina.pc \
pc/eet.pc \
-pc/eo.pc
+pc/eo.pc \
+pc/embryo.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
pkgconfig_DATA += \
pc/eina.pc \
pc/eo.pc \
-pc/eet.pc
+pc/eet.pc \
+pc/embryo.pc
.PHONY: doc benchmark examples install-examples
* 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
requirements_libs_eet=""
#requirements_libs_evas=""
#requirements_libs_ecore=""
-#requirements_libs_embryo=""
+requirements_libs_embryo=""
#requirements_libs_eio=""
#requirements_libs_edje=""
#requirements_libs_efreet=""
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=""
requirements_pc_eet=""
#requirements_pc_evas=""
#requirements_pc_ecore=""
-#requirements_pc_embryo=""
+requirements_pc_embryo=""
#requirements_pc_eio=""
#requirements_pc_edje=""
#requirements_pc_efreet=""
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=""
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])
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])
AC_FUNC_ALLOCA
+EFL_CHECK_FUNCS([EFL], [fnmatch gettimeofday])
+
+
###################### EFL ######################
### 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
### Checks for compiler characteristics
-EFL_CHECK_COMPILER_FLAGS([EET], [-Wshadow -Wpointer-arith])
-
### Checks for linker characteristics
case "${host_os}" in
#### 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
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
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
pc/eina.pc
pc/eet.pc
pc/eo.pc
+pc/embryo.pc
])
AC_OUTPUT
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+
+filesdir = $(pkgdatadir)/include
+files_DATA = embryo/default.inc
+
+EXTRA_DIST = $(files_DATA)
dnl dladdr
dnl dlopen
dnl fnmatch
+dnl gettimeofday
dnl iconv
dnl setxattr (an al.)
dnl shm_open
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 <stdlib.h>
+#include <sys/time.h>
+ ]],
+ [[
+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 <Exotic.h>
+ ]],
+ [[
+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)
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@
endif
-SUBDIRS += eet
+SUBDIRS += eet embryo
--- /dev/null
+
+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
#ifdef HAVE_EVIL
# include <Evil.h>
-#endif /* HAVE_EVIL */
+#endif
+
+#include <Eina.h>
#include "embryo_cc_sc.h"
#include "embryo_cc_prefix.h"
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);
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;
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;
{
lval->ident = iCONSTEXPR;
lval->constval = constval;
- stgdel(index, cidx); /* scratch generated code and calculate */
+ stgdel(idx, cidx); /* scratch generated code and calculate */
}
else
{
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;
}
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))
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
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 =
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;
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);
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
static int
constant(value * lval)
{
- int tok, index, constant;
+ int tok, idx, constant;
cell val, item, cidx;
char *st;
symbol *sym;
/* 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)
#include <limits.h> /* for PATH_MAX */
#include <string.h>
+#include <Eina.h>
+
#include "embryo_cc_sc.h"
/* When a subroutine returns to address 0, the AMX must halt. In earlier
* Global references: funcstatus (referred to only)
*/
void
-startfunc(char *fname __UNUSED__)
+startfunc(char *fname EINA_UNUSED)
{
stgwrite("\tproc");
stgwrite("\n");
# include <unistd.h>
#endif
+#include <Eina.h>
+
#include "embryo_cc_sc.h"
#include "embryo_cc_sc5.scp"
#include <stdlib.h> /* for macro max() */
#include <string.h>
#include <ctype.h>
+
+#include <Eina.h>
+
#include "embryo_cc_sc.h"
typedef cell(*OPCODE_PROC) (FILE * fbin, char *params, cell opcode);
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 */
#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;
}
#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);
#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;
#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;
#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;
* 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
* 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;
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)
{
endif
-SUBDIRS += eina eo eet
+SUBDIRS += eina eo eet embryo
--- /dev/null
+
+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@
# include <Exotic.h>
#endif
+#include <Eina.h>
+
#include "Embryo.h"
#include "embryo_private.h"
EAPI void
embryo_swap_16(unsigned short *v
#ifndef WORDS_BIGENDIAN
- __UNUSED__
+ EINA_UNUSED
#endif
)
{
EAPI void
embryo_swap_32(unsigned int *v
#ifndef WORDS_BIGENDIAN
- __UNUSED__
+ EINA_UNUSED
#endif
)
{
void *alloca (size_t);
#endif
+#include <Eina.h>
+
#include "Embryo.h"
#include "embryo_private.h"
/* 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;
#include <stdlib.h>
#include <math.h>
+#include <Eina.h>
+
#include "Embryo.h"
#include "embryo_private.h"
/* 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;
}
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 */
}
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) */
}
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 */
}
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 */
/* 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;
/* 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) */
}
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 */
}
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 */
}
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) */
}
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) */
}
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) */
}
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;
}
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) */
}
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) */
}
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) */
}
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) */
}
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;
}
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;
}
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;
}
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;
}
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;
#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
#include <stdlib.h>
+#include <Eina.h>
+
#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;
# include "config.h"
#endif
-#ifndef EFL_HAVE_GETTIMEOFDAY
-# error "Your platform isn't supported yet"
-#endif
-
#include <sys/time.h>
#include <time.h>
# include <Exotic.h>
#endif
+#include <Eina.h>
+
#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;