aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-23 23:30:42 +1000
committerDavid Walter Seikel2012-01-23 23:30:42 +1000
commit825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch)
tree75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/eina
parentAdd ability to disable the test harness, or the Lua compile test. (diff)
downloadSledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/eina')
-rw-r--r--libraries/eina/AUTHORS1
-rw-r--r--libraries/eina/ChangeLog51
-rw-r--r--libraries/eina/Makefile.am10
-rw-r--r--libraries/eina/Makefile.in14
-rw-r--r--libraries/eina/NEWS17
-rw-r--r--libraries/eina/README2
-rw-r--r--libraries/eina/aclocal.m462
-rwxr-xr-xlibraries/eina/config.guess149
-rw-r--r--libraries/eina/config.h.in27
-rwxr-xr-xlibraries/eina/config.sub47
-rwxr-xr-xlibraries/eina/configure1837
-rw-r--r--libraries/eina/configure.ac184
-rw-r--r--libraries/eina/doc/Doxyfile.in1531
-rw-r--r--libraries/eina/doc/Makefile.am1
-rw-r--r--libraries/eina/doc/Makefile.in5
-rw-r--r--libraries/eina/eina.pc4
-rw-r--r--libraries/eina/eina.spec2
-rwxr-xr-xlibraries/eina/ltmain.sh4
-rw-r--r--libraries/eina/m4/libtool.m4144
-rw-r--r--libraries/eina/m4/ltoptions.m42
-rw-r--r--libraries/eina/sha1-for-source.txt1
-rw-r--r--libraries/eina/src/Makefile.in4
-rw-r--r--libraries/eina/src/examples/Makefile.am10
-rw-r--r--libraries/eina/src/examples/Makefile.in68
-rw-r--r--libraries/eina/src/examples/eina_array_01.c4
-rw-r--r--libraries/eina/src/include/Eina.h9
-rw-r--r--libraries/eina/src/include/Makefile.am6
-rw-r--r--libraries/eina/src/include/Makefile.in52
-rw-r--r--libraries/eina/src/include/eina_array.h17
-rw-r--r--libraries/eina/src/include/eina_benchmark.h8
-rw-r--r--libraries/eina/src/include/eina_binbuf.h18
-rw-r--r--libraries/eina/src/include/eina_clist.h160
-rw-r--r--libraries/eina/src/include/eina_config.h10
-rw-r--r--libraries/eina/src/include/eina_config.h.in10
-rw-r--r--libraries/eina/src/include/eina_file.h40
-rw-r--r--libraries/eina/src/include/eina_hash.h4
-rw-r--r--libraries/eina/src/include/eina_inarray.h572
-rw-r--r--libraries/eina/src/include/eina_inline_array.x20
-rw-r--r--libraries/eina/src/include/eina_inline_clist.x135
-rw-r--r--libraries/eina/src/include/eina_inline_hash.x2
-rw-r--r--libraries/eina/src/include/eina_inline_lock_posix.x51
-rw-r--r--libraries/eina/src/include/eina_inline_lock_void.x62
-rw-r--r--libraries/eina/src/include/eina_inline_lock_win32.x46
-rw-r--r--libraries/eina/src/include/eina_inline_lock_wince.x34
-rw-r--r--libraries/eina/src/include/eina_inline_log.x4
-rw-r--r--libraries/eina/src/include/eina_inline_mempool.x49
-rw-r--r--libraries/eina/src/include/eina_inline_value.x1705
-rw-r--r--libraries/eina/src/include/eina_inlist.h101
-rw-r--r--libraries/eina/src/include/eina_iterator.h8
-rw-r--r--libraries/eina/src/include/eina_list.h26
-rw-r--r--libraries/eina/src/include/eina_lock.h4
-rw-r--r--libraries/eina/src/include/eina_log.h51
-rw-r--r--libraries/eina/src/include/eina_magic.h8
-rw-r--r--libraries/eina/src/include/eina_main.h5
-rw-r--r--libraries/eina/src/include/eina_module.h47
-rw-r--r--libraries/eina/src/include/eina_simple_xml_parser.h62
-rw-r--r--libraries/eina/src/include/eina_str.h16
-rw-r--r--libraries/eina/src/include/eina_strbuf.h18
-rw-r--r--libraries/eina/src/include/eina_stringshare.h1
-rw-r--r--libraries/eina/src/include/eina_types.h4
-rw-r--r--libraries/eina/src/include/eina_unicode.h23
-rw-r--r--libraries/eina/src/include/eina_ustrbuf.h20
-rw-r--r--libraries/eina/src/include/eina_value.h3114
-rw-r--r--libraries/eina/src/include/eina_xattr.h53
-rw-r--r--libraries/eina/src/lib/Makefile.am10
-rw-r--r--libraries/eina/src/lib/Makefile.in68
-rw-r--r--libraries/eina/src/lib/eina_array.c4
-rw-r--r--libraries/eina/src/lib/eina_binbuf_template_c.x9
-rw-r--r--libraries/eina/src/lib/eina_cpu.c4
-rw-r--r--libraries/eina/src/lib/eina_file.c128
-rw-r--r--libraries/eina/src/lib/eina_hash.c6
-rw-r--r--libraries/eina/src/lib/eina_inarray.c777
-rw-r--r--libraries/eina/src/lib/eina_log.c145
-rw-r--r--libraries/eina/src/lib/eina_magic.c11
-rw-r--r--libraries/eina/src/lib/eina_main.c16
-rw-r--r--libraries/eina/src/lib/eina_mmap.c5
-rw-r--r--libraries/eina/src/lib/eina_module.c1
-rw-r--r--libraries/eina/src/lib/eina_prefix.c37
-rw-r--r--libraries/eina/src/lib/eina_private.h6
-rw-r--r--libraries/eina/src/lib/eina_rbtree.c10
-rw-r--r--libraries/eina/src/lib/eina_simple_xml_parser.c19
-rw-r--r--libraries/eina/src/lib/eina_strbuf.c6
-rw-r--r--libraries/eina/src/lib/eina_value.c4977
-rw-r--r--libraries/eina/src/lib/eina_xattr.c191
-rw-r--r--libraries/eina/src/modules/Makefile.in4
-rw-r--r--libraries/eina/src/modules/mp/Makefile.in4
-rw-r--r--libraries/eina/src/modules/mp/buddy/Makefile.in4
-rw-r--r--libraries/eina/src/modules/mp/buddy/eina_buddy.c20
-rw-r--r--libraries/eina/src/modules/mp/chained_pool/Makefile.in4
-rw-r--r--libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c31
-rw-r--r--libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in4
-rw-r--r--libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in4
-rw-r--r--libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in4
-rw-r--r--libraries/eina/src/modules/mp/one_big/Makefile.in4
-rw-r--r--libraries/eina/src/modules/mp/pass_through/Makefile.in4
-rw-r--r--libraries/eina/src/tests/Makefile.am9
-rw-r--r--libraries/eina/src/tests/Makefile.in77
-rw-r--r--libraries/eina/src/tests/cxx_compile_test.cxx34
-rw-r--r--libraries/eina/src/tests/eina_bench.c3
-rw-r--r--libraries/eina/src/tests/eina_bench_hash.c2
-rw-r--r--libraries/eina/src/tests/eina_bench_quad.c2
-rw-r--r--libraries/eina/src/tests/eina_bench_stringshare.c8
-rw-r--r--libraries/eina/src/tests/eina_suite.c2
-rw-r--r--libraries/eina/src/tests/eina_suite.h2
-rw-r--r--libraries/eina/src/tests/eina_test_array.c6
-rw-r--r--libraries/eina/src/tests/eina_test_binbuf.c36
-rw-r--r--libraries/eina/src/tests/eina_test_file.c4
-rw-r--r--libraries/eina/src/tests/eina_test_inarray.c401
-rw-r--r--libraries/eina/src/tests/eina_test_value.c1799
-rw-r--r--libraries/eina/src/tests/evas_list.c2
-rw-r--r--libraries/eina/src/tests/evas_mempool.c2
111 files changed, 17413 insertions, 2249 deletions
diff --git a/libraries/eina/AUTHORS b/libraries/eina/AUTHORS
index 1483270..c146e20 100644
--- a/libraries/eina/AUTHORS
+++ b/libraries/eina/AUTHORS
@@ -20,3 +20,4 @@ Myungjae Lee <mjae.lee@samsung.com>
20Youness Alaoui <kakaroto@kakaroto.homelinux.net> 20Youness Alaoui <kakaroto@kakaroto.homelinux.net>
21billiob (Boris Faure) <billiob@gmail.com> 21billiob (Boris Faure) <billiob@gmail.com>
22Sung W. Park <sungwoo@gmail.com> 22Sung W. Park <sungwoo@gmail.com>
23Guillaume Friloux <guillaume.friloux@asp64.com>
diff --git a/libraries/eina/ChangeLog b/libraries/eina/ChangeLog
index 0d1ccdf..dfecb61 100644
--- a/libraries/eina/ChangeLog
+++ b/libraries/eina/ChangeLog
@@ -147,3 +147,54 @@
147 147
148 * Add new hash function eina_hash_murmur3 that should be better at 148 * Add new hash function eina_hash_murmur3 that should be better at
149 hashing strings. 149 hashing strings.
150
1512011-12-02 Carsten Haitzler (The Rasterman)
152
153 1.1.0 release
154
1552011-12-02 Mike Blumenkrantz (discomfitor/zmike)
156
157 * Add eina_mempool_calloc for returning zeroed memory
158
1592011-12-07 Mike Blumenkrantz (discomfitor/zmike)
160
161 * eina_log*level_check() functions now return the correct value
162
1632011-12-08 Tom Hacohen
164
165 * Binbuf + Strbuf + Ustrbuf: Added eina_*buf_manage_new_length.
166 Same as eina_(u)strbuf_manage_new except that it accepts a length
167 parameter.
168
1692011-12-20 Cedric Bail
170
171 * Fix bug on eina_shutdown when using eina_error.
172
1732011-12-28 Cedric Bail
174
175 * Fix NONNULL argument for eina_hash_find.
176
1772011-12-30 Vincent Torri
178
179 * Add Eina_Semaphore abstraction API.
180
1812011-12-30 Cedric Bail
182
183 * Let eina_hash_free behave like free.
184
1852012-01-03 Cedric Bail
186
187 * Add eina_xattr_fd_ls, eina_xattr_value_fd_ls and eina_xattr_value_ls.
188 * Detect fault during access to Eina_File mmap memory, use eina_file_map_faulted
189 to learn if it happens.
190 * Add eina_file_xattr_get and eina_file_xattr_value_get.
191
1922012-01-09 Gustavo Barbieri
193
194 * Deprecated eina_array_count_get(), use eina_array_count() instead.
195 * Add eina_inarray data type.
196 * Add eina_value data type (generic value storage).
197
1982012-01-19 Shinwoo Kim
199
200 * Fix compilation of eina_semaphore_lock() (Windows port)
diff --git a/libraries/eina/Makefile.am b/libraries/eina/Makefile.am
index a818b10..7778fd8 100644
--- a/libraries/eina/Makefile.am
+++ b/libraries/eina/Makefile.am
@@ -57,7 +57,7 @@ m4/efl_path_max.m4
57 57
58doc: 58doc:
59 @echo "entering doc/" 59 @echo "entering doc/"
60 @cd doc && make doc 60 @cd doc && $(MAKE) doc
61 61
62# Unit tests 62# Unit tests
63 63
@@ -91,9 +91,9 @@ lcov-report:
91 @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info 91 @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info
92 92
93coverage: 93coverage:
94 @make lcov-reset 94 @$(MAKE) lcov-reset
95 @make check 95 @$(MAKE) check
96 @make lcov-report 96 @$(MAKE) lcov-report
97else 97else
98lcov-reset: 98lcov-reset:
99 @echo "reconfigure with --enable-coverage" 99 @echo "reconfigure with --enable-coverage"
@@ -108,7 +108,7 @@ endif
108if EFL_ENABLE_BENCHMARK 108if EFL_ENABLE_BENCHMARK
109 109
110benchmark: 110benchmark:
111 @cd src && make benchmark 111 @cd src && $(MAKE) benchmark
112 @mkdir result || true 112 @mkdir result || true
113 @cd result && ../src/tests/eina_bench `date +%F_%s` 113 @cd result && ../src/tests/eina_bench `date +%F_%s`
114 114
diff --git a/libraries/eina/Makefile.in b/libraries/eina/Makefile.in
index 8152d7f..423f4da 100644
--- a/libraries/eina/Makefile.in
+++ b/libraries/eina/Makefile.in
@@ -188,7 +188,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
188EGREP = @EGREP@ 188EGREP = @EGREP@
189EINA_CFLAGS = @EINA_CFLAGS@ 189EINA_CFLAGS = @EINA_CFLAGS@
190EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 190EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
191EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
191EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 192EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
193EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
192EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 194EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
193EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 195EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
194EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 196EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -240,8 +242,6 @@ PACKAGE_URL = @PACKAGE_URL@
240PACKAGE_VERSION = @PACKAGE_VERSION@ 242PACKAGE_VERSION = @PACKAGE_VERSION@
241PATH_SEPARATOR = @PATH_SEPARATOR@ 243PATH_SEPARATOR = @PATH_SEPARATOR@
242PKG_CONFIG = @PKG_CONFIG@ 244PKG_CONFIG = @PKG_CONFIG@
243PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
244PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
245RANLIB = @RANLIB@ 245RANLIB = @RANLIB@
246SED = @SED@ 246SED = @SED@
247SET_MAKE = @SET_MAKE@ 247SET_MAKE = @SET_MAKE@
@@ -895,7 +895,7 @@ uninstall-am: uninstall-pkgconfigDATA
895 895
896doc: 896doc:
897 @echo "entering doc/" 897 @echo "entering doc/"
898 @cd doc && make doc 898 @cd doc && $(MAKE) doc
899 899
900# Unit tests 900# Unit tests
901 901
@@ -922,9 +922,9 @@ doc:
922@EFL_ENABLE_COVERAGE_TRUE@ @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info 922@EFL_ENABLE_COVERAGE_TRUE@ @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info
923 923
924@EFL_ENABLE_COVERAGE_TRUE@coverage: 924@EFL_ENABLE_COVERAGE_TRUE@coverage:
925@EFL_ENABLE_COVERAGE_TRUE@ @make lcov-reset 925@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) lcov-reset
926@EFL_ENABLE_COVERAGE_TRUE@ @make check 926@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) check
927@EFL_ENABLE_COVERAGE_TRUE@ @make lcov-report 927@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) lcov-report
928@EFL_ENABLE_COVERAGE_FALSE@lcov-reset: 928@EFL_ENABLE_COVERAGE_FALSE@lcov-reset:
929@EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-coverage" 929@EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-coverage"
930 930
@@ -935,7 +935,7 @@ doc:
935@EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-tests --enable-coverage" 935@EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-tests --enable-coverage"
936 936
937@EFL_ENABLE_BENCHMARK_TRUE@benchmark: 937@EFL_ENABLE_BENCHMARK_TRUE@benchmark:
938@EFL_ENABLE_BENCHMARK_TRUE@ @cd src && make benchmark 938@EFL_ENABLE_BENCHMARK_TRUE@ @cd src && $(MAKE) benchmark
939@EFL_ENABLE_BENCHMARK_TRUE@ @mkdir result || true 939@EFL_ENABLE_BENCHMARK_TRUE@ @mkdir result || true
940@EFL_ENABLE_BENCHMARK_TRUE@ @cd result && ../src/tests/eina_bench `date +%F_%s` 940@EFL_ENABLE_BENCHMARK_TRUE@ @cd result && ../src/tests/eina_bench `date +%F_%s`
941 941
diff --git a/libraries/eina/NEWS b/libraries/eina/NEWS
index 6f9a0ef..8669aa7 100644
--- a/libraries/eina/NEWS
+++ b/libraries/eina/NEWS
@@ -1,3 +1,20 @@
1Eina 1.2.0
2
3Changes since Eina 1.1.0:
4-------------------------
5
6Additions:
7
8 * eina_mempool_calloc
9 * Eina_Semaphore abstraction API
10 * eina_xattr_fd_ls
11 * Eina_Xattr iterator : eina_xattr_value_fd_ls and eina_xattr_value_ls API
12 * eina_file_map_faulted API
13 * Xattr iterator for Eina_File : eina_file_xattr_get and eina_file_xattr_value_get API
14 * Deprecated eina_array_count_get(), use eina_array_count() instead.
15 * Added eina_inarray data type
16 * Added eina_value data type (generic value storage)
17
1Eina 1.1.0 18Eina 1.1.0
2 19
3Changes since Eina 1.0.0: 20Changes since Eina 1.0.0:
diff --git a/libraries/eina/README b/libraries/eina/README
index 69ec205..6ff84c8 100644
--- a/libraries/eina/README
+++ b/libraries/eina/README
@@ -17,7 +17,7 @@ Eina is a library providing data structure utilities for EFL that are meant
17to be lean, efficient and tailored to EFL's needs. This saves each 17to be lean, efficient and tailored to EFL's needs. This saves each
18library implementing its own custom datatype handling and duplicating 18library implementing its own custom datatype handling and duplicating
19the code. Some of the datatypes handles are: 19the code. Some of the datatypes handles are:
20 Arrays (variable sized) 20 Arrays (variable sized, including inline members)
21 Hash tables 21 Hash tables
22 Inlined linked lists 22 Inlined linked lists
23 Linked lists 23 Linked lists
diff --git a/libraries/eina/aclocal.m4 b/libraries/eina/aclocal.m4
index 45a06ce..f26e3d1 100644
--- a/libraries/eina/aclocal.m4
+++ b/libraries/eina/aclocal.m4
@@ -13,14 +13,13 @@
13 13
14m4_ifndef([AC_AUTOCONF_VERSION], 14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, 16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17[m4_warning([this file was generated for autoconf 2.67. 17[m4_warning([this file was generated for autoconf 2.65.
18You have another version of autoconf. It may work, but is not guaranteed to. 18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely. 19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])]) 20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21 21
22# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 22# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23# serial 1 (pkg-config-0.24)
24# 23#
25# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 24# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26# 25#
@@ -48,10 +47,7 @@ To do so, use the procedure documented by the package, typically `autoreconf'.])
48AC_DEFUN([PKG_PROG_PKG_CONFIG], 47AC_DEFUN([PKG_PROG_PKG_CONFIG],
49[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 48[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
50m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 49m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
51AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 50AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
52AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
53AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
54
55if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 51if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
56 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 52 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
57fi 53fi
@@ -64,6 +60,7 @@ if test -n "$PKG_CONFIG"; then
64 AC_MSG_RESULT([no]) 60 AC_MSG_RESULT([no])
65 PKG_CONFIG="" 61 PKG_CONFIG=""
66 fi 62 fi
63
67fi[]dnl 64fi[]dnl
68])# PKG_PROG_PKG_CONFIG 65])# PKG_PROG_PKG_CONFIG
69 66
@@ -72,31 +69,34 @@ fi[]dnl
72# Check to see whether a particular set of modules exists. Similar 69# Check to see whether a particular set of modules exists. Similar
73# to PKG_CHECK_MODULES(), but does not set variables or print errors. 70# to PKG_CHECK_MODULES(), but does not set variables or print errors.
74# 71#
75# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 72#
76# only at the first occurence in configure.ac, so if the first place 73# Similar to PKG_CHECK_MODULES, make sure that the first instance of
77# it's called might be skipped (such as if it is within an "if", you 74# this or PKG_CHECK_MODULES is called, or make sure to call
78# have to call PKG_CHECK_EXISTS manually 75# PKG_CHECK_EXISTS manually
79# -------------------------------------------------------------- 76# --------------------------------------------------------------
80AC_DEFUN([PKG_CHECK_EXISTS], 77AC_DEFUN([PKG_CHECK_EXISTS],
81[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 78[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
82if test -n "$PKG_CONFIG" && \ 79if test -n "$PKG_CONFIG" && \
83 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 80 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
84 m4_default([$2], [:]) 81 m4_ifval([$2], [$2], [:])
85m4_ifvaln([$3], [else 82m4_ifvaln([$3], [else
86 $3])dnl 83 $3])dnl
87fi]) 84fi])
88 85
86
89# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 87# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
90# --------------------------------------------- 88# ---------------------------------------------
91m4_define([_PKG_CONFIG], 89m4_define([_PKG_CONFIG],
92[if test -n "$$1"; then 90[if test -n "$PKG_CONFIG"; then
93 pkg_cv_[]$1="$$1" 91 if test -n "$$1"; then
94 elif test -n "$PKG_CONFIG"; then 92 pkg_cv_[]$1="$$1"
95 PKG_CHECK_EXISTS([$3], 93 else
96 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 94 PKG_CHECK_EXISTS([$3],
97 [pkg_failed=yes]) 95 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
98 else 96 [pkg_failed=yes])
99 pkg_failed=untried 97 fi
98else
99 pkg_failed=untried
100fi[]dnl 100fi[]dnl
101])# _PKG_CONFIG 101])# _PKG_CONFIG
102 102
@@ -138,17 +138,16 @@ and $1[]_LIBS to avoid the need to call pkg-config.
138See the pkg-config man page for more details.]) 138See the pkg-config man page for more details.])
139 139
140if test $pkg_failed = yes; then 140if test $pkg_failed = yes; then
141 AC_MSG_RESULT([no])
142 _PKG_SHORT_ERRORS_SUPPORTED 141 _PKG_SHORT_ERRORS_SUPPORTED
143 if test $_pkg_short_errors_supported = yes; then 142 if test $_pkg_short_errors_supported = yes; then
144 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 143 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
145 else 144 else
146 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 145 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
147 fi 146 fi
148 # Put the nasty error message in config.log where it belongs 147 # Put the nasty error message in config.log where it belongs
149 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 148 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
150 149
151 m4_default([$4], [AC_MSG_ERROR( 150 ifelse([$4], , [AC_MSG_ERROR(dnl
152[Package requirements ($2) were not met: 151[Package requirements ($2) were not met:
153 152
154$$1_PKG_ERRORS 153$$1_PKG_ERRORS
@@ -156,24 +155,25 @@ $$1_PKG_ERRORS
156Consider adjusting the PKG_CONFIG_PATH environment variable if you 155Consider adjusting the PKG_CONFIG_PATH environment variable if you
157installed software in a non-standard prefix. 156installed software in a non-standard prefix.
158 157
159_PKG_TEXT])[]dnl 158_PKG_TEXT
160 ]) 159])],
160 [AC_MSG_RESULT([no])
161 $4])
161elif test $pkg_failed = untried; then 162elif test $pkg_failed = untried; then
162 AC_MSG_RESULT([no]) 163 ifelse([$4], , [AC_MSG_FAILURE(dnl
163 m4_default([$4], [AC_MSG_FAILURE(
164[The pkg-config script could not be found or is too old. Make sure it 164[The pkg-config script could not be found or is too old. Make sure it
165is in your PATH or set the PKG_CONFIG environment variable to the full 165is in your PATH or set the PKG_CONFIG environment variable to the full
166path to pkg-config. 166path to pkg-config.
167 167
168_PKG_TEXT 168_PKG_TEXT
169 169
170To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 170To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
171 ]) 171 [$4])
172else 172else
173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
175 AC_MSG_RESULT([yes]) 175 AC_MSG_RESULT([yes])
176 $3 176 ifelse([$3], , :, [$3])
177fi[]dnl 177fi[]dnl
178])# PKG_CHECK_MODULES 178])# PKG_CHECK_MODULES
179 179
diff --git a/libraries/eina/config.guess b/libraries/eina/config.guess
index c2246a4..e3a2116 100755
--- a/libraries/eina/config.guess
+++ b/libraries/eina/config.guess
@@ -1,10 +1,10 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5# Free Software Foundation, Inc. 5# Free Software Foundation, Inc.
6 6
7timestamp='2009-12-30' 7timestamp='2009-06-10'
8 8
9# This file is free software; you can redistribute it and/or modify it 9# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by 10# under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-12-30'
27# the same distribution terms that you use for the rest of that program. 27# the same distribution terms that you use for the rest of that program.
28 28
29 29
30# Originally written by Per Bothner. Please send patches (context 30# Originally written by Per Bothner <per@bothner.com>.
31# diff format) to <config-patches@gnu.org> and include a ChangeLog 31# Please send patches to <config-patches@gnu.org>. Submit a context
32# entry. 32# diff and a properly formatted ChangeLog entry.
33# 33#
34# This script attempts to guess a canonical system name similar to 34# This script attempts to guess a canonical system name similar to
35# config.sub. If it succeeds, it prints the system name on stdout, and 35# config.sub. If it succeeds, it prints the system name on stdout, and
36# exits with 0. Otherwise, it exits with 1. 36# exits with 0. Otherwise, it exits with 1.
37# 37#
38# You can get the latest version of this script from: 38# The plan is that this can be called by configure scripts if you
39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 39# don't specify an explicit build system type.
40 40
41me=`echo "$0" | sed -e 's,.*/,,'` 41me=`echo "$0" | sed -e 's,.*/,,'`
42 42
@@ -56,9 +56,8 @@ version="\
56GNU config.guess ($timestamp) 56GNU config.guess ($timestamp)
57 57
58Originally written by Per Bothner. 58Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 602002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
61Software Foundation, Inc.
62 61
63This is free software; see the source for copying conditions. There is NO 62This is free software; see the source for copying conditions. There is NO
64warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 63warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -334,9 +333,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 333 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336 exit ;; 335 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
339 exit ;;
340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 336 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
341 eval $set_cc_for_build 337 eval $set_cc_for_build
342 SUN_ARCH="i386" 338 SUN_ARCH="i386"
@@ -811,12 +807,12 @@ EOF
811 i*:PW*:*) 807 i*:PW*:*)
812 echo ${UNAME_MACHINE}-pc-pw32 808 echo ${UNAME_MACHINE}-pc-pw32
813 exit ;; 809 exit ;;
814 *:Interix*:*) 810 *:Interix*:[3456]*)
815 case ${UNAME_MACHINE} in 811 case ${UNAME_MACHINE} in
816 x86) 812 x86)
817 echo i586-pc-interix${UNAME_RELEASE} 813 echo i586-pc-interix${UNAME_RELEASE}
818 exit ;; 814 exit ;;
819 authenticamd | genuineintel | EM64T) 815 EM64T | authenticamd | genuineintel)
820 echo x86_64-unknown-interix${UNAME_RELEASE} 816 echo x86_64-unknown-interix${UNAME_RELEASE}
821 exit ;; 817 exit ;;
822 IA64) 818 IA64)
@@ -858,20 +854,6 @@ EOF
858 i*86:Minix:*:*) 854 i*86:Minix:*:*)
859 echo ${UNAME_MACHINE}-pc-minix 855 echo ${UNAME_MACHINE}-pc-minix
860 exit ;; 856 exit ;;
861 alpha:Linux:*:*)
862 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
863 EV5) UNAME_MACHINE=alphaev5 ;;
864 EV56) UNAME_MACHINE=alphaev56 ;;
865 PCA56) UNAME_MACHINE=alphapca56 ;;
866 PCA57) UNAME_MACHINE=alphapca56 ;;
867 EV6) UNAME_MACHINE=alphaev6 ;;
868 EV67) UNAME_MACHINE=alphaev67 ;;
869 EV68*) UNAME_MACHINE=alphaev68 ;;
870 esac
871 objdump --private-headers /bin/sh | grep -q ld.so.1
872 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
873 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
874 exit ;;
875 arm*:Linux:*:*) 857 arm*:Linux:*:*)
876 eval $set_cc_for_build 858 eval $set_cc_for_build
877 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 859 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -894,17 +876,6 @@ EOF
894 frv:Linux:*:*) 876 frv:Linux:*:*)
895 echo frv-unknown-linux-gnu 877 echo frv-unknown-linux-gnu
896 exit ;; 878 exit ;;
897 i*86:Linux:*:*)
898 LIBC=gnu
899 eval $set_cc_for_build
900 sed 's/^ //' << EOF >$dummy.c
901 #ifdef __dietlibc__
902 LIBC=dietlibc
903 #endif
904EOF
905 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
907 exit ;;
908 ia64:Linux:*:*) 879 ia64:Linux:*:*)
909 echo ${UNAME_MACHINE}-unknown-linux-gnu 880 echo ${UNAME_MACHINE}-unknown-linux-gnu
910 exit ;; 881 exit ;;
@@ -930,18 +901,39 @@ EOF
930 #endif 901 #endif
931 #endif 902 #endif
932EOF 903EOF
933 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 904 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
905 /^CPU/{
906 s: ::g
907 p
908 }'`"
934 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 909 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
935 ;; 910 ;;
936 or32:Linux:*:*) 911 or32:Linux:*:*)
937 echo or32-unknown-linux-gnu 912 echo or32-unknown-linux-gnu
938 exit ;; 913 exit ;;
914 ppc:Linux:*:*)
915 echo powerpc-unknown-linux-gnu
916 exit ;;
917 ppc64:Linux:*:*)
918 echo powerpc64-unknown-linux-gnu
919 exit ;;
920 alpha:Linux:*:*)
921 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
922 EV5) UNAME_MACHINE=alphaev5 ;;
923 EV56) UNAME_MACHINE=alphaev56 ;;
924 PCA56) UNAME_MACHINE=alphapca56 ;;
925 PCA57) UNAME_MACHINE=alphapca56 ;;
926 EV6) UNAME_MACHINE=alphaev6 ;;
927 EV67) UNAME_MACHINE=alphaev67 ;;
928 EV68*) UNAME_MACHINE=alphaev68 ;;
929 esac
930 objdump --private-headers /bin/sh | grep -q ld.so.1
931 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
932 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
933 exit ;;
939 padre:Linux:*:*) 934 padre:Linux:*:*)
940 echo sparc-unknown-linux-gnu 935 echo sparc-unknown-linux-gnu
941 exit ;; 936 exit ;;
942 parisc64:Linux:*:* | hppa64:Linux:*:*)
943 echo hppa64-unknown-linux-gnu
944 exit ;;
945 parisc:Linux:*:* | hppa:Linux:*:*) 937 parisc:Linux:*:* | hppa:Linux:*:*)
946 # Look for CPU level 938 # Look for CPU level
947 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 939 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -950,11 +942,8 @@ EOF
950 *) echo hppa-unknown-linux-gnu ;; 942 *) echo hppa-unknown-linux-gnu ;;
951 esac 943 esac
952 exit ;; 944 exit ;;
953 ppc64:Linux:*:*) 945 parisc64:Linux:*:* | hppa64:Linux:*:*)
954 echo powerpc64-unknown-linux-gnu 946 echo hppa64-unknown-linux-gnu
955 exit ;;
956 ppc:Linux:*:*)
957 echo powerpc-unknown-linux-gnu
958 exit ;; 947 exit ;;
959 s390:Linux:*:* | s390x:Linux:*:*) 948 s390:Linux:*:* | s390x:Linux:*:*)
960 echo ${UNAME_MACHINE}-ibm-linux 949 echo ${UNAME_MACHINE}-ibm-linux
@@ -977,6 +966,58 @@ EOF
977 xtensa*:Linux:*:*) 966 xtensa*:Linux:*:*)
978 echo ${UNAME_MACHINE}-unknown-linux-gnu 967 echo ${UNAME_MACHINE}-unknown-linux-gnu
979 exit ;; 968 exit ;;
969 i*86:Linux:*:*)
970 # The BFD linker knows what the default object file format is, so
971 # first see if it will tell us. cd to the root directory to prevent
972 # problems with other programs or directories called `ld' in the path.
973 # Set LC_ALL=C to ensure ld outputs messages in English.
974 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
975 | sed -ne '/supported targets:/!d
976 s/[ ][ ]*/ /g
977 s/.*supported targets: *//
978 s/ .*//
979 p'`
980 case "$ld_supported_targets" in
981 elf32-i386)
982 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
983 ;;
984 esac
985 # Determine whether the default compiler is a.out or elf
986 eval $set_cc_for_build
987 sed 's/^ //' << EOF >$dummy.c
988 #include <features.h>
989 #ifdef __ELF__
990 # ifdef __GLIBC__
991 # if __GLIBC__ >= 2
992 LIBC=gnu
993 # else
994 LIBC=gnulibc1
995 # endif
996 # else
997 LIBC=gnulibc1
998 # endif
999 #else
1000 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1001 LIBC=gnu
1002 #else
1003 LIBC=gnuaout
1004 #endif
1005 #endif
1006 #ifdef __dietlibc__
1007 LIBC=dietlibc
1008 #endif
1009EOF
1010 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1011 /^LIBC/{
1012 s: ::g
1013 p
1014 }'`"
1015 test x"${LIBC}" != x && {
1016 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1017 exit
1018 }
1019 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1020 ;;
980 i*86:DYNIX/ptx:4*:*) 1021 i*86:DYNIX/ptx:4*:*)
981 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1022 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
982 # earlier versions are messed up and put the nodename in both 1023 # earlier versions are messed up and put the nodename in both
@@ -1206,16 +1247,6 @@ EOF
1206 *:Darwin:*:*) 1247 *:Darwin:*:*)
1207 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1248 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1208 case $UNAME_PROCESSOR in 1249 case $UNAME_PROCESSOR in
1209 i386)
1210 eval $set_cc_for_build
1211 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1212 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1213 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1214 grep IS_64BIT_ARCH >/dev/null
1215 then
1216 UNAME_PROCESSOR="x86_64"
1217 fi
1218 fi ;;
1219 unknown) UNAME_PROCESSOR=powerpc ;; 1250 unknown) UNAME_PROCESSOR=powerpc ;;
1220 esac 1251 esac
1221 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1252 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
diff --git a/libraries/eina/config.h.in b/libraries/eina/config.h.in
index d6370dc..9bd97a1 100644
--- a/libraries/eina/config.h.in
+++ b/libraries/eina/config.h.in
@@ -70,6 +70,9 @@
70/* Set to 1 if ${enable_pass_through} is built */ 70/* Set to 1 if ${enable_pass_through} is built */
71#undef EINA_BUILD_PASS_THROUGH 71#undef EINA_BUILD_PASS_THROUGH
72 72
73/* Turn on debugging overhead in mempool */
74#undef EINA_DEBUG_MALLOC
75
73/* if set, logging is limited to this amount. */ 76/* if set, logging is limited to this amount. */
74#undef EINA_LOG_LEVEL_MAXIMUM 77#undef EINA_LOG_LEVEL_MAXIMUM
75 78
@@ -107,11 +110,10 @@
107 */ 110 */
108#undef HAVE_ALLOCA_H 111#undef HAVE_ALLOCA_H
109 112
110/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. 113/* Define to 1 if you have a valid <dirent.h> header file. */
111 */
112#undef HAVE_DIRENT_H 114#undef HAVE_DIRENT_H
113 115
114/* Define to 1 if you have the `dirfd' function. */ 116/* Define to 1 if you have the `dirfd' function or macro. */
115#undef HAVE_DIRFD 117#undef HAVE_DIRFD
116 118
117/* Define to 1 if you have the `dladdr' function. */ 119/* Define to 1 if you have the `dladdr' function. */
@@ -150,6 +152,12 @@
150/* Define to 1 if you have the <libgen.h> header file. */ 152/* Define to 1 if you have the <libgen.h> header file. */
151#undef HAVE_LIBGEN_H 153#undef HAVE_LIBGEN_H
152 154
155/* Define to 1 if we log support is on */
156#undef HAVE_LOG
157
158/* We will be able to know the exact amount of wasted memory */
159#undef HAVE_MALLOC_USABLE_SIZE
160
153/* Have mcheck.h */ 161/* Have mcheck.h */
154#undef HAVE_MCHECK 162#undef HAVE_MCHECK
155 163
@@ -162,9 +170,6 @@
162/* Have mtrace */ 170/* Have mtrace */
163#undef HAVE_MTRACE 171#undef HAVE_MTRACE
164 172
165/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
166#undef HAVE_NDIR_H
167
168/* Define to 1 if you have the `openat' function. */ 173/* Define to 1 if you have the `openat' function. */
169#undef HAVE_OPENAT 174#undef HAVE_OPENAT
170 175
@@ -192,13 +197,11 @@
192/* Define to 1 if you have the `strlcpy' function. */ 197/* Define to 1 if you have the `strlcpy' function. */
193#undef HAVE_STRLCPY 198#undef HAVE_STRLCPY
194 199
195/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. 200/* Define to 1 if the system has the type `struct dirent'. */
196 */ 201#undef HAVE_STRUCT_DIRENT
197#undef HAVE_SYS_DIR_H
198 202
199/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. 203/* Define to 1 if you have the <sys/mman.h> header file. */
200 */ 204#undef HAVE_SYS_MMAN_H
201#undef HAVE_SYS_NDIR_H
202 205
203/* Define to 1 if you have the <sys/stat.h> header file. */ 206/* Define to 1 if you have the <sys/stat.h> header file. */
204#undef HAVE_SYS_STAT_H 207#undef HAVE_SYS_STAT_H
diff --git a/libraries/eina/config.sub b/libraries/eina/config.sub
index c2d1257..eb0389a 100755
--- a/libraries/eina/config.sub
+++ b/libraries/eina/config.sub
@@ -1,10 +1,10 @@
1#! /bin/sh 1#! /bin/sh
2# Configuration validation subroutine script. 2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5# Free Software Foundation, Inc. 5# Free Software Foundation, Inc.
6 6
7timestamp='2010-01-22' 7timestamp='2009-06-11'
8 8
9# This file is (in principle) common to ALL GNU software. 9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software 10# The presence of a machine in this file suggests that SOME GNU software
@@ -32,16 +32,13 @@ timestamp='2010-01-22'
32 32
33 33
34# Please send patches to <config-patches@gnu.org>. Submit a context 34# Please send patches to <config-patches@gnu.org>. Submit a context
35# diff and a properly formatted GNU ChangeLog entry. 35# diff and a properly formatted ChangeLog entry.
36# 36#
37# Configuration subroutine to validate and canonicalize a configuration type. 37# Configuration subroutine to validate and canonicalize a configuration type.
38# Supply the specified configuration type as an argument. 38# Supply the specified configuration type as an argument.
39# If it is invalid, we print an error message on stderr and exit with code 1. 39# If it is invalid, we print an error message on stderr and exit with code 1.
40# Otherwise, we print the canonical config type on stdout and succeed. 40# Otherwise, we print the canonical config type on stdout and succeed.
41 41
42# You can get the latest version of this script from:
43# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
44
45# This file is supposed to be the same for all GNU packages 42# This file is supposed to be the same for all GNU packages
46# and recognize all the CPU types, system types and aliases 43# and recognize all the CPU types, system types and aliases
47# that are meaningful with *any* GNU software. 44# that are meaningful with *any* GNU software.
@@ -75,9 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
75version="\ 72version="\
76GNU config.sub ($timestamp) 73GNU config.sub ($timestamp)
77 74
78Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 75Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
792001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 762002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
80Software Foundation, Inc.
81 77
82This is free software; see the source for copying conditions. There is NO 78This is free software; see the source for copying conditions. There is NO
83warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 79warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -153,7 +149,7 @@ case $os in
153 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 149 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
154 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 150 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
155 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 151 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
156 -apple | -axis | -knuth | -cray | -microblaze) 152 -apple | -axis | -knuth | -cray)
157 os= 153 os=
158 basic_machine=$1 154 basic_machine=$1
159 ;; 155 ;;
@@ -288,7 +284,6 @@ case $basic_machine in
288 | pdp10 | pdp11 | pj | pjl \ 284 | pdp10 | pdp11 | pj | pjl \
289 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 285 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
290 | pyramid \ 286 | pyramid \
291 | rx \
292 | score \ 287 | score \
293 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 288 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
294 | sh64 | sh64le \ 289 | sh64 | sh64le \
@@ -296,14 +291,13 @@ case $basic_machine in
296 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 291 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
297 | spu | strongarm \ 292 | spu | strongarm \
298 | tahoe | thumb | tic4x | tic80 | tron \ 293 | tahoe | thumb | tic4x | tic80 | tron \
299 | ubicom32 \
300 | v850 | v850e \ 294 | v850 | v850e \
301 | we32k \ 295 | we32k \
302 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 296 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
303 | z8k | z80) 297 | z8k | z80)
304 basic_machine=$basic_machine-unknown 298 basic_machine=$basic_machine-unknown
305 ;; 299 ;;
306 m6811 | m68hc11 | m6812 | m68hc12 | picochip) 300 m6811 | m68hc11 | m6812 | m68hc12)
307 # Motorola 68HC11/12. 301 # Motorola 68HC11/12.
308 basic_machine=$basic_machine-unknown 302 basic_machine=$basic_machine-unknown
309 os=-none 303 os=-none
@@ -346,7 +340,7 @@ case $basic_machine in
346 | lm32-* \ 340 | lm32-* \
347 | m32c-* | m32r-* | m32rle-* \ 341 | m32c-* | m32r-* | m32rle-* \
348 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 342 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
349 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ 343 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
350 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 344 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
351 | mips16-* \ 345 | mips16-* \
352 | mips64-* | mips64el-* \ 346 | mips64-* | mips64el-* \
@@ -374,17 +368,15 @@ case $basic_machine in
374 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 368 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
375 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 369 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
376 | pyramid-* \ 370 | pyramid-* \
377 | romp-* | rs6000-* | rx-* \ 371 | romp-* | rs6000-* \
378 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 372 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
379 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 373 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
380 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 374 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
381 | sparclite-* \ 375 | sparclite-* \
382 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 376 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
383 | tahoe-* | thumb-* \ 377 | tahoe-* | thumb-* \
384 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 378 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
385 | tile-* | tilegx-* \
386 | tron-* \ 379 | tron-* \
387 | ubicom32-* \
388 | v850-* | v850e-* | vax-* \ 380 | v850-* | v850e-* | vax-* \
389 | we32k-* \ 381 | we32k-* \
390 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 382 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -734,9 +726,6 @@ case $basic_machine in
734 basic_machine=ns32k-utek 726 basic_machine=ns32k-utek
735 os=-sysv 727 os=-sysv
736 ;; 728 ;;
737 microblaze)
738 basic_machine=microblaze-xilinx
739 ;;
740 mingw32) 729 mingw32)
741 basic_machine=i386-pc 730 basic_machine=i386-pc
742 os=-mingw32 731 os=-mingw32
@@ -1087,11 +1076,6 @@ case $basic_machine in
1087 basic_machine=tic6x-unknown 1076 basic_machine=tic6x-unknown
1088 os=-coff 1077 os=-coff
1089 ;; 1078 ;;
1090 # This must be matched before tile*.
1091 tilegx*)
1092 basic_machine=tilegx-unknown
1093 os=-linux-gnu
1094 ;;
1095 tile*) 1079 tile*)
1096 basic_machine=tile-unknown 1080 basic_machine=tile-unknown
1097 os=-linux-gnu 1081 os=-linux-gnu
@@ -1263,9 +1247,6 @@ case $os in
1263 # First match some system type aliases 1247 # First match some system type aliases
1264 # that might get confused with valid system types. 1248 # that might get confused with valid system types.
1265 # -solaris* is a basic system type, with this one exception. 1249 # -solaris* is a basic system type, with this one exception.
1266 -auroraux)
1267 os=-auroraux
1268 ;;
1269 -solaris1 | -solaris1.*) 1250 -solaris1 | -solaris1.*)
1270 os=`echo $os | sed -e 's|solaris1|sunos4|'` 1251 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1271 ;; 1252 ;;
@@ -1287,8 +1268,8 @@ case $os in
1287 # -sysv* is not here because it comes later, after sysvr4. 1268 # -sysv* is not here because it comes later, after sysvr4.
1288 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1269 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1289 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1270 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1290 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1271 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1291 | -sym* | -kopensolaris* \ 1272 | -kopensolaris* \
1292 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1273 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1293 | -aos* | -aros* \ 1274 | -aos* | -aros* \
1294 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1275 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1309,7 +1290,7 @@ case $os in
1309 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1290 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1310 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1291 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1311 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1292 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1312 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 1293 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1313 # Remember, each alternative MUST END IN *, to match a version number. 1294 # Remember, each alternative MUST END IN *, to match a version number.
1314 ;; 1295 ;;
1315 -qnx*) 1296 -qnx*)
@@ -1442,8 +1423,6 @@ case $os in
1442 -dicos*) 1423 -dicos*)
1443 os=-dicos 1424 os=-dicos
1444 ;; 1425 ;;
1445 -nacl*)
1446 ;;
1447 -none) 1426 -none)
1448 ;; 1427 ;;
1449 *) 1428 *)
diff --git a/libraries/eina/configure b/libraries/eina/configure
index 7c01482..d3c2f30 100755
--- a/libraries/eina/configure
+++ b/libraries/eina/configure
@@ -1,13 +1,13 @@
1#! /bin/sh 1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles. 2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for eina 1.1.0. 3# Generated by GNU Autoconf 2.65 for eina 1.1.99.67344.
4# 4#
5# Report bugs to <enlightenment-devel@lists.sourceforge.net>. 5# Report bugs to <enlightenment-devel@lists.sourceforge.net>.
6# 6#
7# 7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software 9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
10# Foundation, Inc. 10# Inc.
11# 11#
12# 12#
13# This configure script is free software; the Free Software Foundation 13# This configure script is free software; the Free Software Foundation
@@ -319,7 +319,7 @@ $as_echo X"$as_dir" |
319 test -d "$as_dir" && break 319 test -d "$as_dir" && break
320 done 320 done
321 test -z "$as_dirs" || eval "mkdir $as_dirs" 321 test -z "$as_dirs" || eval "mkdir $as_dirs"
322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 322 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
323 323
324 324
325} # as_fn_mkdir_p 325} # as_fn_mkdir_p
@@ -359,19 +359,19 @@ else
359fi # as_fn_arith 359fi # as_fn_arith
360 360
361 361
362# as_fn_error STATUS ERROR [LINENO LOG_FD] 362# as_fn_error ERROR [LINENO LOG_FD]
363# ---------------------------------------- 363# ---------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0. 366# script with status $?, using 1 if that was 0.
367as_fn_error () 367as_fn_error ()
368{ 368{
369 as_status=$1; test $as_status -eq 0 && as_status=1 369 as_status=$?; test $as_status -eq 0 && as_status=1
370 if test "$4"; then 370 if test "$3"; then
371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 371 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
373 fi 373 fi
374 $as_echo "$as_me: error: $2" >&2 374 $as_echo "$as_me: error: $1" >&2
375 as_fn_exit $as_status 375 as_fn_exit $as_status
376} # as_fn_error 376} # as_fn_error
377 377
@@ -682,7 +682,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
682exec 6>&1 682exec 6>&1
683 683
684# Name of the host. 684# Name of the host.
685# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 685# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
686# so uname gets run too. 686# so uname gets run too.
687ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 687ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
688 688
@@ -701,8 +701,8 @@ MAKEFLAGS=
701# Identity of this package. 701# Identity of this package.
702PACKAGE_NAME='eina' 702PACKAGE_NAME='eina'
703PACKAGE_TARNAME='eina' 703PACKAGE_TARNAME='eina'
704PACKAGE_VERSION='1.1.0' 704PACKAGE_VERSION='1.1.99.67344'
705PACKAGE_STRING='eina 1.1.0' 705PACKAGE_STRING='eina 1.1.99.67344'
706PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' 706PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net'
707PACKAGE_URL='' 707PACKAGE_URL=''
708 708
@@ -799,22 +799,24 @@ EINA_BUILD_CHAINED_POOL_FALSE
799EINA_BUILD_CHAINED_POOL_TRUE 799EINA_BUILD_CHAINED_POOL_TRUE
800rt_libs 800rt_libs
801iconv_libs 801iconv_libs
802EINA_CONFIGURE_ENABLE_LOG
802EFL_FNMATCH_LIBS 803EFL_FNMATCH_LIBS
803dlopen_libs 804dlopen_libs
804ALLOCA 805ALLOCA
805ESCAPE_LIBS 806EINA_CONFIGURE_HAVE_DIRENT_H
806ESCAPE_CFLAGS 807EINA_SIZEOF_WCHAR_T
808EINA_CONFIGURE_HAVE_STDINT_H
809EINA_CONFIGURE_HAVE_INTTYPES_H
807lt_enable_auto_import 810lt_enable_auto_import
808EINA_LIBS 811EINA_LIBS
809EINA_CFLAGS 812EINA_CFLAGS
810EINA_CPPFLAGS 813EINA_CPPFLAGS
814ESCAPE_LIBS
815ESCAPE_CFLAGS
811EINA_HAVE_WIN32_FALSE 816EINA_HAVE_WIN32_FALSE
812EINA_HAVE_WIN32_TRUE 817EINA_HAVE_WIN32_TRUE
813EINA_HAVE_WINCE_FALSE 818EINA_HAVE_WINCE_FALSE
814EINA_HAVE_WINCE_TRUE 819EINA_HAVE_WINCE_TRUE
815EINA_SIZEOF_WCHAR_T
816EINA_CONFIGURE_HAVE_STDINT_H
817EINA_CONFIGURE_HAVE_INTTYPES_H
818BUILD_TILER_EXAMPLE_FALSE 820BUILD_TILER_EXAMPLE_FALSE
819BUILD_TILER_EXAMPLE_TRUE 821BUILD_TILER_EXAMPLE_TRUE
820ECORE_EVAS_LIBS 822ECORE_EVAS_LIBS
@@ -831,8 +833,6 @@ EFL_BUILD_DOC_TRUE
831efl_doxygen 833efl_doxygen
832efl_have_doxygen 834efl_have_doxygen
833pkgconfig_requires_private 835pkgconfig_requires_private
834PKG_CONFIG_LIBDIR
835PKG_CONFIG_PATH
836PKG_CONFIG 836PKG_CONFIG
837CXXCPP 837CXXCPP
838am__fastdepCXX_FALSE 838am__fastdepCXX_FALSE
@@ -1007,6 +1007,8 @@ with_doxygen
1007enable_valgrind 1007enable_valgrind
1008enable_ememoa 1008enable_ememoa
1009enable_assert 1009enable_assert
1010enable_debug_malloc
1011enable_log
1010with_iconv_link 1012with_iconv_link
1011enable_mempool_chained_pool 1013enable_mempool_chained_pool
1012enable_mempool_ememoa_fixed 1014enable_mempool_ememoa_fixed
@@ -1037,8 +1039,6 @@ CXXFLAGS
1037CCC 1039CCC
1038CXXCPP 1040CXXCPP
1039PKG_CONFIG 1041PKG_CONFIG
1040PKG_CONFIG_PATH
1041PKG_CONFIG_LIBDIR
1042VALGRIND_CFLAGS 1042VALGRIND_CFLAGS
1043VALGRIND_LIBS 1043VALGRIND_LIBS
1044EVIL_CFLAGS 1044EVIL_CFLAGS
@@ -1115,9 +1115,8 @@ do
1115 fi 1115 fi
1116 1116
1117 case $ac_option in 1117 case $ac_option in
1118 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 1118 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1119 *=) ac_optarg= ;; 1119 *) ac_optarg=yes ;;
1120 *) ac_optarg=yes ;;
1121 esac 1120 esac
1122 1121
1123 # Accept the important Cygnus configure options, so we can diagnose typos. 1122 # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1162,7 +1161,7 @@ do
1162 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 1161 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1163 # Reject names that are not valid shell variable names. 1162 # Reject names that are not valid shell variable names.
1164 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1163 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1165 as_fn_error $? "invalid feature name: $ac_useropt" 1164 as_fn_error "invalid feature name: $ac_useropt"
1166 ac_useropt_orig=$ac_useropt 1165 ac_useropt_orig=$ac_useropt
1167 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1166 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1168 case $ac_user_opts in 1167 case $ac_user_opts in
@@ -1188,7 +1187,7 @@ do
1188 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 1187 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1189 # Reject names that are not valid shell variable names. 1188 # Reject names that are not valid shell variable names.
1190 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1191 as_fn_error $? "invalid feature name: $ac_useropt" 1190 as_fn_error "invalid feature name: $ac_useropt"
1192 ac_useropt_orig=$ac_useropt 1191 ac_useropt_orig=$ac_useropt
1193 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1192 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1194 case $ac_user_opts in 1193 case $ac_user_opts in
@@ -1392,7 +1391,7 @@ do
1392 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1391 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1393 # Reject names that are not valid shell variable names. 1392 # Reject names that are not valid shell variable names.
1394 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1393 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1395 as_fn_error $? "invalid package name: $ac_useropt" 1394 as_fn_error "invalid package name: $ac_useropt"
1396 ac_useropt_orig=$ac_useropt 1395 ac_useropt_orig=$ac_useropt
1397 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1396 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1398 case $ac_user_opts in 1397 case $ac_user_opts in
@@ -1408,7 +1407,7 @@ do
1408 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1407 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1409 # Reject names that are not valid shell variable names. 1408 # Reject names that are not valid shell variable names.
1410 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1409 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1411 as_fn_error $? "invalid package name: $ac_useropt" 1410 as_fn_error "invalid package name: $ac_useropt"
1412 ac_useropt_orig=$ac_useropt 1411 ac_useropt_orig=$ac_useropt
1413 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1412 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1414 case $ac_user_opts in 1413 case $ac_user_opts in
@@ -1438,8 +1437,8 @@ do
1438 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1437 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1439 x_libraries=$ac_optarg ;; 1438 x_libraries=$ac_optarg ;;
1440 1439
1441 -*) as_fn_error $? "unrecognized option: \`$ac_option' 1440 -*) as_fn_error "unrecognized option: \`$ac_option'
1442Try \`$0 --help' for more information" 1441Try \`$0 --help' for more information."
1443 ;; 1442 ;;
1444 1443
1445 *=*) 1444 *=*)
@@ -1447,7 +1446,7 @@ Try \`$0 --help' for more information"
1447 # Reject names that are not valid shell variable names. 1446 # Reject names that are not valid shell variable names.
1448 case $ac_envvar in #( 1447 case $ac_envvar in #(
1449 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1448 '' | [0-9]* | *[!_$as_cr_alnum]* )
1450 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1449 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1451 esac 1450 esac
1452 eval $ac_envvar=\$ac_optarg 1451 eval $ac_envvar=\$ac_optarg
1453 export $ac_envvar ;; 1452 export $ac_envvar ;;
@@ -1465,13 +1464,13 @@ done
1465 1464
1466if test -n "$ac_prev"; then 1465if test -n "$ac_prev"; then
1467 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1466 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1468 as_fn_error $? "missing argument to $ac_option" 1467 as_fn_error "missing argument to $ac_option"
1469fi 1468fi
1470 1469
1471if test -n "$ac_unrecognized_opts"; then 1470if test -n "$ac_unrecognized_opts"; then
1472 case $enable_option_checking in 1471 case $enable_option_checking in
1473 no) ;; 1472 no) ;;
1474 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1473 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1475 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1474 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1476 esac 1475 esac
1477fi 1476fi
@@ -1494,7 +1493,7 @@ do
1494 [\\/$]* | ?:[\\/]* ) continue;; 1493 [\\/$]* | ?:[\\/]* ) continue;;
1495 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1494 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1496 esac 1495 esac
1497 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1496 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1498done 1497done
1499 1498
1500# There might be people who depend on the old broken behavior: `$host' 1499# There might be people who depend on the old broken behavior: `$host'
@@ -1508,8 +1507,8 @@ target=$target_alias
1508if test "x$host_alias" != x; then 1507if test "x$host_alias" != x; then
1509 if test "x$build_alias" = x; then 1508 if test "x$build_alias" = x; then
1510 cross_compiling=maybe 1509 cross_compiling=maybe
1511 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. 1510 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1512 If a cross compiler is detected then cross compile mode will be used" >&2 1511 If a cross compiler is detected then cross compile mode will be used." >&2
1513 elif test "x$build_alias" != "x$host_alias"; then 1512 elif test "x$build_alias" != "x$host_alias"; then
1514 cross_compiling=yes 1513 cross_compiling=yes
1515 fi 1514 fi
@@ -1524,9 +1523,9 @@ test "$silent" = yes && exec 6>/dev/null
1524ac_pwd=`pwd` && test -n "$ac_pwd" && 1523ac_pwd=`pwd` && test -n "$ac_pwd" &&
1525ac_ls_di=`ls -di .` && 1524ac_ls_di=`ls -di .` &&
1526ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1525ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1527 as_fn_error $? "working directory cannot be determined" 1526 as_fn_error "working directory cannot be determined"
1528test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1527test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1529 as_fn_error $? "pwd does not report name of working directory" 1528 as_fn_error "pwd does not report name of working directory"
1530 1529
1531 1530
1532# Find the source files, if location was not specified. 1531# Find the source files, if location was not specified.
@@ -1565,11 +1564,11 @@ else
1565fi 1564fi
1566if test ! -r "$srcdir/$ac_unique_file"; then 1565if test ! -r "$srcdir/$ac_unique_file"; then
1567 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1566 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1568 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1567 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1569fi 1568fi
1570ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1569ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1571ac_abs_confdir=`( 1570ac_abs_confdir=`(
1572 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1571 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1573 pwd)` 1572 pwd)`
1574# When building in place, set srcdir=. 1573# When building in place, set srcdir=.
1575if test "$ac_abs_confdir" = "$ac_pwd"; then 1574if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1595,7 +1594,7 @@ if test "$ac_init_help" = "long"; then
1595 # Omit some internal or obsolete options to make the list less imposing. 1594 # Omit some internal or obsolete options to make the list less imposing.
1596 # This message is too long to be a string in the A/UX 3.1 sh. 1595 # This message is too long to be a string in the A/UX 3.1 sh.
1597 cat <<_ACEOF 1596 cat <<_ACEOF
1598\`configure' configures eina 1.1.0 to adapt to many kinds of systems. 1597\`configure' configures eina 1.1.99.67344 to adapt to many kinds of systems.
1599 1598
1600Usage: $0 [OPTION]... [VAR=VALUE]... 1599Usage: $0 [OPTION]... [VAR=VALUE]...
1601 1600
@@ -1609,7 +1608,7 @@ Configuration:
1609 --help=short display options specific to this package 1608 --help=short display options specific to this package
1610 --help=recursive display the short help of all the included packages 1609 --help=recursive display the short help of all the included packages
1611 -V, --version display version information and exit 1610 -V, --version display version information and exit
1612 -q, --quiet, --silent do not print \`checking ...' messages 1611 -q, --quiet, --silent do not print \`checking...' messages
1613 --cache-file=FILE cache test results in FILE [disabled] 1612 --cache-file=FILE cache test results in FILE [disabled]
1614 -C, --config-cache alias for \`--cache-file=config.cache' 1613 -C, --config-cache alias for \`--cache-file=config.cache'
1615 -n, --no-create do not create output files 1614 -n, --no-create do not create output files
@@ -1665,7 +1664,7 @@ fi
1665 1664
1666if test -n "$ac_init_help"; then 1665if test -n "$ac_init_help"; then
1667 case $ac_init_help in 1666 case $ac_init_help in
1668 short | recursive ) echo "Configuration of eina 1.1.0:";; 1667 short | recursive ) echo "Configuration of eina 1.1.99.67344:";;
1669 esac 1668 esac
1670 cat <<\_ACEOF 1669 cat <<\_ACEOF
1671 1670
@@ -1711,6 +1710,10 @@ Optional Features:
1711 usages, having it to report proper mempool leaks. 1710 usages, having it to report proper mempool leaks.
1712 --enable-ememoa build ememoa memory pool module [default=yes] 1711 --enable-ememoa build ememoa memory pool module [default=yes]
1713 --disable-assert turn off assertions 1712 --disable-assert turn off assertions
1713 --enable-debug-malloc enable debugging of malloc usage overhead in our
1714 allocator [default=enabled]
1715 --disable-log disable Eina_Log infrastructure completly
1716 [default=enabled]
1714 --enable-mempool-chained-pool 1717 --enable-mempool-chained-pool
1715 enable build of chained pool 1718 enable build of chained pool
1716 [default=${enable_chained_pool}] 1719 [default=${enable_chained_pool}]
@@ -1769,10 +1772,6 @@ Some influential environment variables:
1769 CXXFLAGS C++ compiler flags 1772 CXXFLAGS C++ compiler flags
1770 CXXCPP C++ preprocessor 1773 CXXCPP C++ preprocessor
1771 PKG_CONFIG path to pkg-config utility 1774 PKG_CONFIG path to pkg-config utility
1772 PKG_CONFIG_PATH
1773 directories to add to pkg-config's search path
1774 PKG_CONFIG_LIBDIR
1775 path overriding pkg-config's built-in search path
1776 VALGRIND_CFLAGS 1775 VALGRIND_CFLAGS
1777 C compiler flags for VALGRIND, overriding pkg-config 1776 C compiler flags for VALGRIND, overriding pkg-config
1778 VALGRIND_LIBS 1777 VALGRIND_LIBS
@@ -1861,10 +1860,10 @@ fi
1861test -n "$ac_init_help" && exit $ac_status 1860test -n "$ac_init_help" && exit $ac_status
1862if $ac_init_version; then 1861if $ac_init_version; then
1863 cat <<\_ACEOF 1862 cat <<\_ACEOF
1864eina configure 1.1.0 1863eina configure 1.1.99.67344
1865generated by GNU Autoconf 2.67 1864generated by GNU Autoconf 2.65
1866 1865
1867Copyright (C) 2010 Free Software Foundation, Inc. 1866Copyright (C) 2009 Free Software Foundation, Inc.
1868This configure script is free software; the Free Software Foundation 1867This configure script is free software; the Free Software Foundation
1869gives unlimited permission to copy, distribute and modify it. 1868gives unlimited permission to copy, distribute and modify it.
1870_ACEOF 1869_ACEOF
@@ -1934,7 +1933,7 @@ $as_echo "$ac_try_echo"; } >&5
1934 mv -f conftest.er1 conftest.err 1933 mv -f conftest.er1 conftest.err
1935 fi 1934 fi
1936 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1937 test $ac_status = 0; } > conftest.i && { 1936 test $ac_status = 0; } >/dev/null && {
1938 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 1937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1939 test ! -s conftest.err 1938 test ! -s conftest.err
1940 }; then : 1939 }; then :
@@ -1958,10 +1957,10 @@ fi
1958ac_fn_c_check_header_mongrel () 1957ac_fn_c_check_header_mongrel ()
1959{ 1958{
1960 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1959 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1961 if eval "test \"\${$3+set}\"" = set; then : 1960 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1963$as_echo_n "checking for $2... " >&6; } 1962$as_echo_n "checking for $2... " >&6; }
1964if eval "test \"\${$3+set}\"" = set; then : 1963if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1965 $as_echo_n "(cached) " >&6 1964 $as_echo_n "(cached) " >&6
1966fi 1965fi
1967eval ac_res=\$$3 1966eval ac_res=\$$3
@@ -1997,7 +1996,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
1997else 1996else
1998 ac_header_preproc=no 1997 ac_header_preproc=no
1999fi 1998fi
2000rm -f conftest.err conftest.i conftest.$ac_ext 1999rm -f conftest.err conftest.$ac_ext
2001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2002$as_echo "$ac_header_preproc" >&6; } 2001$as_echo "$ac_header_preproc" >&6; }
2003 2002
@@ -2020,15 +2019,17 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2020$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} 2019$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2021 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2020 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2022$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2021$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2023( $as_echo "## -------------------------------------------------------- ## 2022( cat <<\_ASBOX
2023## -------------------------------------------------------- ##
2024## Report this to enlightenment-devel@lists.sourceforge.net ## 2024## Report this to enlightenment-devel@lists.sourceforge.net ##
2025## -------------------------------------------------------- ##" 2025## -------------------------------------------------------- ##
2026_ASBOX
2026 ) | sed "s/^/$as_me: WARNING: /" >&2 2027 ) | sed "s/^/$as_me: WARNING: /" >&2
2027 ;; 2028 ;;
2028esac 2029esac
2029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2030$as_echo_n "checking for $2... " >&6; } 2031$as_echo_n "checking for $2... " >&6; }
2031if eval "test \"\${$3+set}\"" = set; then : 2032if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2032 $as_echo_n "(cached) " >&6 2033 $as_echo_n "(cached) " >&6
2033else 2034else
2034 eval "$3=\$ac_header_compiler" 2035 eval "$3=\$ac_header_compiler"
@@ -2092,7 +2093,7 @@ ac_fn_c_check_header_compile ()
2092 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2093 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2094$as_echo_n "checking for $2... " >&6; } 2095$as_echo_n "checking for $2... " >&6; }
2095if eval "test \"\${$3+set}\"" = set; then : 2096if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2096 $as_echo_n "(cached) " >&6 2097 $as_echo_n "(cached) " >&6
2097else 2098else
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2168,7 +2169,7 @@ ac_fn_c_check_func ()
2168 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2169 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2170$as_echo_n "checking for $2... " >&6; } 2171$as_echo_n "checking for $2... " >&6; }
2171if eval "test \"\${$3+set}\"" = set; then : 2172if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2172 $as_echo_n "(cached) " >&6 2173 $as_echo_n "(cached) " >&6
2173else 2174else
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2286,7 +2287,7 @@ $as_echo "$ac_try_echo"; } >&5
2286 mv -f conftest.er1 conftest.err 2287 mv -f conftest.er1 conftest.err
2287 fi 2288 fi
2288 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2289 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2289 test $ac_status = 0; } > conftest.i && { 2290 test $ac_status = 0; } >/dev/null && {
2290 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || 2291 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2291 test ! -s conftest.err 2292 test ! -s conftest.err
2292 }; then : 2293 }; then :
@@ -2535,7 +2536,7 @@ ac_fn_c_check_type ()
2535 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2536 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2537$as_echo_n "checking for $2... " >&6; } 2538$as_echo_n "checking for $2... " >&6; }
2538if eval "test \"\${$3+set}\"" = set; then : 2539if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2539 $as_echo_n "(cached) " >&6 2540 $as_echo_n "(cached) " >&6
2540else 2541else
2541 eval "$3=no" 2542 eval "$3=no"
@@ -2583,8 +2584,8 @@ cat >config.log <<_ACEOF
2583This file contains any messages produced by compilers while 2584This file contains any messages produced by compilers while
2584running configure, to aid debugging if configure makes a mistake. 2585running configure, to aid debugging if configure makes a mistake.
2585 2586
2586It was created by eina $as_me 1.1.0, which was 2587It was created by eina $as_me 1.1.99.67344, which was
2587generated by GNU Autoconf 2.67. Invocation command line was 2588generated by GNU Autoconf 2.65. Invocation command line was
2588 2589
2589 $ $0 $@ 2590 $ $0 $@
2590 2591
@@ -2694,9 +2695,11 @@ trap 'exit_status=$?
2694 { 2695 {
2695 echo 2696 echo
2696 2697
2697 $as_echo "## ---------------- ## 2698 cat <<\_ASBOX
2699## ---------------- ##
2698## Cache variables. ## 2700## Cache variables. ##
2699## ---------------- ##" 2701## ---------------- ##
2702_ASBOX
2700 echo 2703 echo
2701 # The following way of writing the cache mishandles newlines in values, 2704 # The following way of writing the cache mishandles newlines in values,
2702( 2705(
@@ -2730,9 +2733,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2730) 2733)
2731 echo 2734 echo
2732 2735
2733 $as_echo "## ----------------- ## 2736 cat <<\_ASBOX
2737## ----------------- ##
2734## Output variables. ## 2738## Output variables. ##
2735## ----------------- ##" 2739## ----------------- ##
2740_ASBOX
2736 echo 2741 echo
2737 for ac_var in $ac_subst_vars 2742 for ac_var in $ac_subst_vars
2738 do 2743 do
@@ -2745,9 +2750,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2745 echo 2750 echo
2746 2751
2747 if test -n "$ac_subst_files"; then 2752 if test -n "$ac_subst_files"; then
2748 $as_echo "## ------------------- ## 2753 cat <<\_ASBOX
2754## ------------------- ##
2749## File substitutions. ## 2755## File substitutions. ##
2750## ------------------- ##" 2756## ------------------- ##
2757_ASBOX
2751 echo 2758 echo
2752 for ac_var in $ac_subst_files 2759 for ac_var in $ac_subst_files
2753 do 2760 do
@@ -2761,9 +2768,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2761 fi 2768 fi
2762 2769
2763 if test -s confdefs.h; then 2770 if test -s confdefs.h; then
2764 $as_echo "## ----------- ## 2771 cat <<\_ASBOX
2772## ----------- ##
2765## confdefs.h. ## 2773## confdefs.h. ##
2766## ----------- ##" 2774## ----------- ##
2775_ASBOX
2767 echo 2776 echo
2768 cat confdefs.h 2777 cat confdefs.h
2769 echo 2778 echo
@@ -2818,12 +2827,7 @@ _ACEOF
2818ac_site_file1=NONE 2827ac_site_file1=NONE
2819ac_site_file2=NONE 2828ac_site_file2=NONE
2820if test -n "$CONFIG_SITE"; then 2829if test -n "$CONFIG_SITE"; then
2821 # We do not want a PATH search for config.site. 2830 ac_site_file1=$CONFIG_SITE
2822 case $CONFIG_SITE in #((
2823 -*) ac_site_file1=./$CONFIG_SITE;;
2824 */*) ac_site_file1=$CONFIG_SITE;;
2825 *) ac_site_file1=./$CONFIG_SITE;;
2826 esac
2827elif test "x$prefix" != xNONE; then 2831elif test "x$prefix" != xNONE; then
2828 ac_site_file1=$prefix/share/config.site 2832 ac_site_file1=$prefix/share/config.site
2829 ac_site_file2=$prefix/etc/config.site 2833 ac_site_file2=$prefix/etc/config.site
@@ -2838,11 +2842,7 @@ do
2838 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2842 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2839$as_echo "$as_me: loading site script $ac_site_file" >&6;} 2843$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2840 sed 's/^/| /' "$ac_site_file" >&5 2844 sed 's/^/| /' "$ac_site_file" >&5
2841 . "$ac_site_file" \ 2845 . "$ac_site_file"
2842 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2844as_fn_error $? "failed to load site script $ac_site_file
2845See \`config.log' for more details" "$LINENO" 5 ; }
2846 fi 2846 fi
2847done 2847done
2848 2848
@@ -2918,7 +2918,7 @@ if $ac_cache_corrupted; then
2918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2919 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2920$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 2920$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2921 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 2921 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2922fi 2922fi
2923## -------------------- ## 2923## -------------------- ##
2924## Main body of script. ## 2924## Main body of script. ##
@@ -2944,22 +2944,16 @@ am__api_version='1.11'
2944 2944
2945ac_aux_dir= 2945ac_aux_dir=
2946for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 2946for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2947 if test -f "$ac_dir/install-sh"; then 2947 for ac_t in install-sh install.sh shtool; do
2948 ac_aux_dir=$ac_dir 2948 if test -f "$ac_dir/$ac_t"; then
2949 ac_install_sh="$ac_aux_dir/install-sh -c" 2949 ac_aux_dir=$ac_dir
2950 break 2950 ac_install_sh="$ac_aux_dir/$ac_t -c"
2951 elif test -f "$ac_dir/install.sh"; then 2951 break 2
2952 ac_aux_dir=$ac_dir 2952 fi
2953 ac_install_sh="$ac_aux_dir/install.sh -c" 2953 done
2954 break
2955 elif test -f "$ac_dir/shtool"; then
2956 ac_aux_dir=$ac_dir
2957 ac_install_sh="$ac_aux_dir/shtool install -c"
2958 break
2959 fi
2960done 2954done
2961if test -z "$ac_aux_dir"; then 2955if test -z "$ac_aux_dir"; then
2962 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 2956 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2963fi 2957fi
2964 2958
2965# These three variables are undocumented and unsupported, 2959# These three variables are undocumented and unsupported,
@@ -3075,11 +3069,11 @@ am_lf='
3075' 3069'
3076case `pwd` in 3070case `pwd` in
3077 *[\\\"\#\$\&\'\`$am_lf]*) 3071 *[\\\"\#\$\&\'\`$am_lf]*)
3078 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; 3072 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3079esac 3073esac
3080case $srcdir in 3074case $srcdir in
3081 *[\\\"\#\$\&\'\`$am_lf\ \ ]*) 3075 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3082 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; 3076 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3083esac 3077esac
3084 3078
3085# Do `set' in a subshell so we don't clobber the current shell's 3079# Do `set' in a subshell so we don't clobber the current shell's
@@ -3101,7 +3095,7 @@ if (
3101 # if, for instance, CONFIG_SHELL is bash and it inherits a 3095 # if, for instance, CONFIG_SHELL is bash and it inherits a
3102 # broken ls alias from the environment. This has actually 3096 # broken ls alias from the environment. This has actually
3103 # happened. Such a system could not be considered "sane". 3097 # happened. Such a system could not be considered "sane".
3104 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken 3098 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3105alias in your environment" "$LINENO" 5 3099alias in your environment" "$LINENO" 5
3106 fi 3100 fi
3107 3101
@@ -3111,7 +3105,7 @@ then
3111 # Ok. 3105 # Ok.
3112 : 3106 :
3113else 3107else
3114 as_fn_error $? "newly created file is older than distributed files! 3108 as_fn_error "newly created file is older than distributed files!
3115Check your system clock" "$LINENO" 5 3109Check your system clock" "$LINENO" 5
3116fi 3110fi
3117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -3349,7 +3343,7 @@ done
3349$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } 3343$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3350set x ${MAKE-make} 3344set x ${MAKE-make}
3351ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` 3345ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3352if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : 3346if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3353 $as_echo_n "(cached) " >&6 3347 $as_echo_n "(cached) " >&6
3354else 3348else
3355 cat >conftest.make <<\_ACEOF 3349 cat >conftest.make <<\_ACEOF
@@ -3357,7 +3351,7 @@ SHELL = /bin/sh
3357all: 3351all:
3358 @echo '@@@%%%=$(MAKE)=@@@%%%' 3352 @echo '@@@%%%=$(MAKE)=@@@%%%'
3359_ACEOF 3353_ACEOF
3360# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 3354# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3361case `${MAKE-make} -f conftest.make 2>/dev/null` in 3355case `${MAKE-make} -f conftest.make 2>/dev/null` in
3362 *@@@%%%=?*=@@@%%%*) 3356 *@@@%%%=?*=@@@%%%*)
3363 eval ac_cv_prog_make_${ac_make}_set=yes;; 3357 eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -3391,7 +3385,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
3391 am__isrc=' -I$(srcdir)' 3385 am__isrc=' -I$(srcdir)'
3392 # test to see if srcdir already configured 3386 # test to see if srcdir already configured
3393 if test -f $srcdir/config.status; then 3387 if test -f $srcdir/config.status; then
3394 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 3388 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3395 fi 3389 fi
3396fi 3390fi
3397 3391
@@ -3407,7 +3401,7 @@ fi
3407 3401
3408# Define the identity of the package. 3402# Define the identity of the package.
3409 PACKAGE='eina' 3403 PACKAGE='eina'
3410 VERSION='1.1.0' 3404 VERSION='1.1.99.67344'
3411 3405
3412 3406
3413cat >>confdefs.h <<_ACEOF 3407cat >>confdefs.h <<_ACEOF
@@ -3822,8 +3816,8 @@ fi
3822 3816
3823test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3817test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3825as_fn_error $? "no acceptable C compiler found in \$PATH 3819as_fn_error "no acceptable C compiler found in \$PATH
3826See \`config.log' for more details" "$LINENO" 5 ; } 3820See \`config.log' for more details." "$LINENO" 5; }
3827 3821
3828# Provide some information about the compiler. 3822# Provide some information about the compiler.
3829$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 3823$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3937,8 +3931,9 @@ sed 's/^/| /' conftest.$ac_ext >&5
3937 3931
3938{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3932{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3940as_fn_error 77 "C compiler cannot create executables 3934{ as_fn_set_status 77
3941See \`config.log' for more details" "$LINENO" 5 ; } 3935as_fn_error "C compiler cannot create executables
3936See \`config.log' for more details." "$LINENO" 5; }; }
3942else 3937else
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3944$as_echo "yes" >&6; } 3939$as_echo "yes" >&6; }
@@ -3980,8 +3975,8 @@ done
3980else 3975else
3981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3983as_fn_error $? "cannot compute suffix of executables: cannot compile and link 3978as_fn_error "cannot compute suffix of executables: cannot compile and link
3984See \`config.log' for more details" "$LINENO" 5 ; } 3979See \`config.log' for more details." "$LINENO" 5; }
3985fi 3980fi
3986rm -f conftest conftest$ac_cv_exeext 3981rm -f conftest conftest$ac_cv_exeext
3987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 3982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -4038,9 +4033,9 @@ $as_echo "$ac_try_echo"; } >&5
4038 else 4033 else
4039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4041as_fn_error $? "cannot run C compiled programs. 4036as_fn_error "cannot run C compiled programs.
4042If you meant to cross compile, use \`--host'. 4037If you meant to cross compile, use \`--host'.
4043See \`config.log' for more details" "$LINENO" 5 ; } 4038See \`config.log' for more details." "$LINENO" 5; }
4044 fi 4039 fi
4045 fi 4040 fi
4046fi 4041fi
@@ -4091,8 +4086,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
4091 4086
4092{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4087{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4094as_fn_error $? "cannot compute suffix of object files: cannot compile 4089as_fn_error "cannot compute suffix of object files: cannot compile
4095See \`config.log' for more details" "$LINENO" 5 ; } 4090See \`config.log' for more details." "$LINENO" 5; }
4096fi 4091fi
4097rm -f conftest.$ac_cv_objext conftest.$ac_ext 4092rm -f conftest.$ac_cv_objext conftest.$ac_ext
4098fi 4093fi
@@ -4482,7 +4477,7 @@ else
4482 # Broken: fails on valid input. 4477 # Broken: fails on valid input.
4483continue 4478continue
4484fi 4479fi
4485rm -f conftest.err conftest.i conftest.$ac_ext 4480rm -f conftest.err conftest.$ac_ext
4486 4481
4487 # OK, works on sane cases. Now check whether nonexistent headers 4482 # OK, works on sane cases. Now check whether nonexistent headers
4488 # can be detected and how. 4483 # can be detected and how.
@@ -4498,11 +4493,11 @@ else
4498ac_preproc_ok=: 4493ac_preproc_ok=:
4499break 4494break
4500fi 4495fi
4501rm -f conftest.err conftest.i conftest.$ac_ext 4496rm -f conftest.err conftest.$ac_ext
4502 4497
4503done 4498done
4504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 4499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4505rm -f conftest.i conftest.err conftest.$ac_ext 4500rm -f conftest.err conftest.$ac_ext
4506if $ac_preproc_ok; then : 4501if $ac_preproc_ok; then :
4507 break 4502 break
4508fi 4503fi
@@ -4541,7 +4536,7 @@ else
4541 # Broken: fails on valid input. 4536 # Broken: fails on valid input.
4542continue 4537continue
4543fi 4538fi
4544rm -f conftest.err conftest.i conftest.$ac_ext 4539rm -f conftest.err conftest.$ac_ext
4545 4540
4546 # OK, works on sane cases. Now check whether nonexistent headers 4541 # OK, works on sane cases. Now check whether nonexistent headers
4547 # can be detected and how. 4542 # can be detected and how.
@@ -4557,18 +4552,18 @@ else
4557ac_preproc_ok=: 4552ac_preproc_ok=:
4558break 4553break
4559fi 4554fi
4560rm -f conftest.err conftest.i conftest.$ac_ext 4555rm -f conftest.err conftest.$ac_ext
4561 4556
4562done 4557done
4563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 4558# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4564rm -f conftest.i conftest.err conftest.$ac_ext 4559rm -f conftest.err conftest.$ac_ext
4565if $ac_preproc_ok; then : 4560if $ac_preproc_ok; then :
4566 4561
4567else 4562else
4568 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4563 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4570as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 4565as_fn_error "C preprocessor \"$CPP\" fails sanity check
4571See \`config.log' for more details" "$LINENO" 5 ; } 4566See \`config.log' for more details." "$LINENO" 5; }
4572fi 4567fi
4573 4568
4574ac_ext=c 4569ac_ext=c
@@ -4629,7 +4624,7 @@ esac
4629 done 4624 done
4630IFS=$as_save_IFS 4625IFS=$as_save_IFS
4631 if test -z "$ac_cv_path_GREP"; then 4626 if test -z "$ac_cv_path_GREP"; then
4632 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 4627 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4633 fi 4628 fi
4634else 4629else
4635 ac_cv_path_GREP=$GREP 4630 ac_cv_path_GREP=$GREP
@@ -4695,7 +4690,7 @@ esac
4695 done 4690 done
4696IFS=$as_save_IFS 4691IFS=$as_save_IFS
4697 if test -z "$ac_cv_path_EGREP"; then 4692 if test -z "$ac_cv_path_EGREP"; then
4698 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 4693 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4699 fi 4694 fi
4700else 4695else
4701 ac_cv_path_EGREP=$EGREP 4696 ac_cv_path_EGREP=$EGREP
@@ -4827,7 +4822,8 @@ do :
4827 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 4822 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4828ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 4823ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4829" 4824"
4830if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 4825eval as_val=\$$as_ac_Header
4826 if test "x$as_val" = x""yes; then :
4831 cat >>confdefs.h <<_ACEOF 4827 cat >>confdefs.h <<_ACEOF
4832#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 4828#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4833_ACEOF 4829_ACEOF
@@ -5100,7 +5096,7 @@ fi
5100 5096
5101# Make sure we can run config.sub. 5097# Make sure we can run config.sub.
5102$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 5098$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5103 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 5099 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5104 5100
5105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 5101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5106$as_echo_n "checking build system type... " >&6; } 5102$as_echo_n "checking build system type... " >&6; }
@@ -5111,16 +5107,16 @@ else
5111test "x$ac_build_alias" = x && 5107test "x$ac_build_alias" = x &&
5112 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 5108 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5113test "x$ac_build_alias" = x && 5109test "x$ac_build_alias" = x &&
5114 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 5110 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5115ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 5111ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5116 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 5112 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5117 5113
5118fi 5114fi
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 5115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5120$as_echo "$ac_cv_build" >&6; } 5116$as_echo "$ac_cv_build" >&6; }
5121case $ac_cv_build in 5117case $ac_cv_build in
5122*-*-*) ;; 5118*-*-*) ;;
5123*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; 5119*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5124esac 5120esac
5125build=$ac_cv_build 5121build=$ac_cv_build
5126ac_save_IFS=$IFS; IFS='-' 5122ac_save_IFS=$IFS; IFS='-'
@@ -5145,7 +5141,7 @@ else
5145 ac_cv_host=$ac_cv_build 5141 ac_cv_host=$ac_cv_build
5146else 5142else
5147 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 5143 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5148 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 5144 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5149fi 5145fi
5150 5146
5151fi 5147fi
@@ -5153,7 +5149,7 @@ fi
5153$as_echo "$ac_cv_host" >&6; } 5149$as_echo "$ac_cv_host" >&6; }
5154case $ac_cv_host in 5150case $ac_cv_host in
5155*-*-*) ;; 5151*-*-*) ;;
5156*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; 5152*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5157esac 5153esac
5158host=$ac_cv_host 5154host=$ac_cv_host
5159ac_save_IFS=$IFS; IFS='-' 5155ac_save_IFS=$IFS; IFS='-'
@@ -5172,7 +5168,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5172enable_win32_dll=yes 5168enable_win32_dll=yes
5173 5169
5174case $host in 5170case $host in
5175*-*-cygwin* | *-*-mingw* | *-*-pw32*) 5171*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
5176 if test -n "$ac_tool_prefix"; then 5172 if test -n "$ac_tool_prefix"; then
5177 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. 5173 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
5178set dummy ${ac_tool_prefix}as; ac_word=$2 5174set dummy ${ac_tool_prefix}as; ac_word=$2
@@ -5554,7 +5550,7 @@ esac
5554 done 5550 done
5555IFS=$as_save_IFS 5551IFS=$as_save_IFS
5556 if test -z "$ac_cv_path_SED"; then 5552 if test -z "$ac_cv_path_SED"; then
5557 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 5553 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
5558 fi 5554 fi
5559else 5555else
5560 ac_cv_path_SED=$SED 5556 ac_cv_path_SED=$SED
@@ -5633,7 +5629,7 @@ esac
5633 done 5629 done
5634IFS=$as_save_IFS 5630IFS=$as_save_IFS
5635 if test -z "$ac_cv_path_FGREP"; then 5631 if test -z "$ac_cv_path_FGREP"; then
5636 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 5632 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5637 fi 5633 fi
5638else 5634else
5639 ac_cv_path_FGREP=$FGREP 5635 ac_cv_path_FGREP=$FGREP
@@ -5749,7 +5745,7 @@ else
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5750$as_echo "no" >&6; } 5746$as_echo "no" >&6; }
5751fi 5747fi
5752test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 5748test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
5753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
5754$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } 5750$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5755if test "${lt_cv_prog_gnu_ld+set}" = set; then : 5751if test "${lt_cv_prog_gnu_ld+set}" = set; then :
@@ -5951,13 +5947,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
5951else 5947else
5952 lt_cv_nm_interface="BSD nm" 5948 lt_cv_nm_interface="BSD nm"
5953 echo "int some_variable = 0;" > conftest.$ac_ext 5949 echo "int some_variable = 0;" > conftest.$ac_ext
5954 (eval echo "\"\$as_me:5954: $ac_compile\"" >&5) 5950 (eval echo "\"\$as_me:5950: $ac_compile\"" >&5)
5955 (eval "$ac_compile" 2>conftest.err) 5951 (eval "$ac_compile" 2>conftest.err)
5956 cat conftest.err >&5 5952 cat conftest.err >&5
5957 (eval echo "\"\$as_me:5957: $NM \\\"conftest.$ac_objext\\\"\"" >&5) 5953 (eval echo "\"\$as_me:5953: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5958 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 5954 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5959 cat conftest.err >&5 5955 cat conftest.err >&5
5960 (eval echo "\"\$as_me:5960: output\"" >&5) 5956 (eval echo "\"\$as_me:5956: output\"" >&5)
5961 cat conftest.out >&5 5957 cat conftest.out >&5
5962 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 5958 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5963 lt_cv_nm_interface="MS dumpbin" 5959 lt_cv_nm_interface="MS dumpbin"
@@ -6003,7 +5999,7 @@ else
6003 lt_cv_sys_max_cmd_len=-1; 5999 lt_cv_sys_max_cmd_len=-1;
6004 ;; 6000 ;;
6005 6001
6006 cygwin* | mingw*) 6002 cygwin* | mingw* | cegcc*)
6007 # On Win9x/ME, this test blows up -- it succeeds, but takes 6003 # On Win9x/ME, this test blows up -- it succeeds, but takes
6008 # about 5 minutes as the teststring grows exponentially. 6004 # about 5 minutes as the teststring grows exponentially.
6009 # Worse, since 9x/ME are not pre-emptively multitasking, 6005 # Worse, since 9x/ME are not pre-emptively multitasking,
@@ -6204,6 +6200,104 @@ esac
6204 6200
6205 6201
6206 6202
6203if test -n "$ac_tool_prefix"; then
6204 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6205set dummy ${ac_tool_prefix}objdump; ac_word=$2
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6207$as_echo_n "checking for $ac_word... " >&6; }
6208if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
6209 $as_echo_n "(cached) " >&6
6210else
6211 if test -n "$OBJDUMP"; then
6212 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6213else
6214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6215for as_dir in $PATH
6216do
6217 IFS=$as_save_IFS
6218 test -z "$as_dir" && as_dir=.
6219 for ac_exec_ext in '' $ac_executable_extensions; do
6220 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6221 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6222 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6223 break 2
6224 fi
6225done
6226 done
6227IFS=$as_save_IFS
6228
6229fi
6230fi
6231OBJDUMP=$ac_cv_prog_OBJDUMP
6232if test -n "$OBJDUMP"; then
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
6234$as_echo "$OBJDUMP" >&6; }
6235else
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6237$as_echo "no" >&6; }
6238fi
6239
6240
6241fi
6242if test -z "$ac_cv_prog_OBJDUMP"; then
6243 ac_ct_OBJDUMP=$OBJDUMP
6244 # Extract the first word of "objdump", so it can be a program name with args.
6245set dummy objdump; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
6249 $as_echo_n "(cached) " >&6
6250else
6251 if test -n "$ac_ct_OBJDUMP"; then
6252 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6253else
6254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257 IFS=$as_save_IFS
6258 test -z "$as_dir" && as_dir=.
6259 for ac_exec_ext in '' $ac_executable_extensions; do
6260 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6261 ac_cv_prog_ac_ct_OBJDUMP="objdump"
6262 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263 break 2
6264 fi
6265done
6266 done
6267IFS=$as_save_IFS
6268
6269fi
6270fi
6271ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6272if test -n "$ac_ct_OBJDUMP"; then
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
6274$as_echo "$ac_ct_OBJDUMP" >&6; }
6275else
6276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6277$as_echo "no" >&6; }
6278fi
6279
6280 if test "x$ac_ct_OBJDUMP" = x; then
6281 OBJDUMP="false"
6282 else
6283 case $cross_compiling:$ac_tool_warned in
6284yes:)
6285{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6286$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6287ac_tool_warned=yes ;;
6288esac
6289 OBJDUMP=$ac_ct_OBJDUMP
6290 fi
6291else
6292 OBJDUMP="$ac_cv_prog_OBJDUMP"
6293fi
6294
6295test -z "$OBJDUMP" && OBJDUMP=objdump
6296
6297
6298
6299
6300
6207 6301
6208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 6302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
6209$as_echo_n "checking how to recognize dependent libraries... " >&6; } 6303$as_echo_n "checking how to recognize dependent libraries... " >&6; }
@@ -6258,6 +6352,12 @@ mingw* | pw32*)
6258 fi 6352 fi
6259 ;; 6353 ;;
6260 6354
6355cegcc)
6356 # use the weaker test based on 'objdump'. See mingw*.
6357 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6358 lt_cv_file_magic_cmd='$OBJDUMP -f'
6359 ;;
6360
6261darwin* | rhapsody*) 6361darwin* | rhapsody*)
6262 lt_cv_deplibs_check_method=pass_all 6362 lt_cv_deplibs_check_method=pass_all
6263 ;; 6363 ;;
@@ -6316,7 +6416,7 @@ irix5* | irix6* | nonstopux*)
6316 ;; 6416 ;;
6317 6417
6318# This must be Linux ELF. 6418# This must be Linux ELF.
6319linux* | k*bsd*-gnu) 6419linux* | k*bsd*-gnu | kopensolaris*-gnu)
6320 lt_cv_deplibs_check_method=pass_all 6420 lt_cv_deplibs_check_method=pass_all
6321 ;; 6421 ;;
6322 6422
@@ -6796,7 +6896,7 @@ case $host_os in
6796aix*) 6896aix*)
6797 symcode='[BCDT]' 6897 symcode='[BCDT]'
6798 ;; 6898 ;;
6799cygwin* | mingw* | pw32*) 6899cygwin* | mingw* | pw32* | cegcc*)
6800 symcode='[ABCDGISTW]' 6900 symcode='[ABCDGISTW]'
6801 ;; 6901 ;;
6802hpux*) 6902hpux*)
@@ -7055,7 +7155,7 @@ ia64-*-hpux*)
7055 ;; 7155 ;;
7056*-*-irix6*) 7156*-*-irix6*)
7057 # Find out which ABI we are using. 7157 # Find out which ABI we are using.
7058 echo '#line 7058 "configure"' > conftest.$ac_ext 7158 echo '#line 7158 "configure"' > conftest.$ac_ext
7059 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7159 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7060 (eval $ac_compile) 2>&5 7160 (eval $ac_compile) 2>&5
7061 ac_status=$? 7161 ac_status=$?
@@ -8315,11 +8415,11 @@ else
8315 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 8415 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8316 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 8416 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8317 -e 's:$: $lt_compiler_flag:'` 8417 -e 's:$: $lt_compiler_flag:'`
8318 (eval echo "\"\$as_me:8318: $lt_compile\"" >&5) 8418 (eval echo "\"\$as_me:8418: $lt_compile\"" >&5)
8319 (eval "$lt_compile" 2>conftest.err) 8419 (eval "$lt_compile" 2>conftest.err)
8320 ac_status=$? 8420 ac_status=$?
8321 cat conftest.err >&5 8421 cat conftest.err >&5
8322 echo "$as_me:8322: \$? = $ac_status" >&5 8422 echo "$as_me:8422: \$? = $ac_status" >&5
8323 if (exit $ac_status) && test -s "$ac_outfile"; then 8423 if (exit $ac_status) && test -s "$ac_outfile"; then
8324 # The compiler can only warn and ignore the option if not recognized 8424 # The compiler can only warn and ignore the option if not recognized
8325 # So say no if there are warnings other than the usual output. 8425 # So say no if there are warnings other than the usual output.
@@ -8387,7 +8487,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8387 # PIC is the default for these OSes. 8487 # PIC is the default for these OSes.
8388 ;; 8488 ;;
8389 8489
8390 mingw* | cygwin* | pw32* | os2*) 8490 mingw* | cygwin* | pw32* | os2* | cegcc*)
8391 # This hack is so that the source file can tell whether it is being 8491 # This hack is so that the source file can tell whether it is being
8392 # built for inclusion in a dll (and should export symbols for example). 8492 # built for inclusion in a dll (and should export symbols for example).
8393 # Although the cygwin gcc ignores -fPIC, still need this for old-style 8493 # Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -8402,10 +8502,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8402 ;; 8502 ;;
8403 8503
8404 hpux*) 8504 hpux*)
8405 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8505 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8406 # not for PA HP-UX. 8506 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
8507 # sets the default TLS model and affects inlining.
8407 case $host_cpu in 8508 case $host_cpu in
8408 hppa*64*|ia64*) 8509 hppa*64*)
8409 # +Z the default 8510 # +Z the default
8410 ;; 8511 ;;
8411 *) 8512 *)
@@ -8455,7 +8556,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8455 fi 8556 fi
8456 ;; 8557 ;;
8457 8558
8458 mingw* | cygwin* | pw32* | os2*) 8559 mingw* | cygwin* | pw32* | os2* | cegcc*)
8459 # This hack is so that the source file can tell whether it is being 8560 # This hack is so that the source file can tell whether it is being
8460 # built for inclusion in a dll (and should export symbols for example). 8561 # built for inclusion in a dll (and should export symbols for example).
8461 lt_prog_compiler_pic='-DDLL_EXPORT' 8562 lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -8483,13 +8584,27 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8483 lt_prog_compiler_static='-non_shared' 8584 lt_prog_compiler_static='-non_shared'
8484 ;; 8585 ;;
8485 8586
8486 linux* | k*bsd*-gnu) 8587 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8487 case $cc_basename in 8588 case $cc_basename in
8488 icc* | ecc* | ifort*) 8589 # old Intel for x86_64 which still supported -KPIC.
8590 ecc*)
8489 lt_prog_compiler_wl='-Wl,' 8591 lt_prog_compiler_wl='-Wl,'
8490 lt_prog_compiler_pic='-KPIC' 8592 lt_prog_compiler_pic='-KPIC'
8491 lt_prog_compiler_static='-static' 8593 lt_prog_compiler_static='-static'
8492 ;; 8594 ;;
8595 # icc used to be incompatible with GCC.
8596 # ICC 10 doesn't accept -KPIC any more.
8597 icc* | ifort*)
8598 lt_prog_compiler_wl='-Wl,'
8599 lt_prog_compiler_pic='-fPIC'
8600 lt_prog_compiler_static='-static'
8601 ;;
8602 # Lahey Fortran 8.1.
8603 lf95*)
8604 lt_prog_compiler_wl='-Wl,'
8605 lt_prog_compiler_pic='--shared'
8606 lt_prog_compiler_static='--static'
8607 ;;
8493 pgcc* | pgf77* | pgf90* | pgf95*) 8608 pgcc* | pgf77* | pgf90* | pgf95*)
8494 # Portland Group compilers (*not* the Pentium gcc compiler, 8609 # Portland Group compilers (*not* the Pentium gcc compiler,
8495 # which looks to be a dead project) 8610 # which looks to be a dead project)
@@ -8639,11 +8754,11 @@ else
8639 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 8754 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8640 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 8755 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8641 -e 's:$: $lt_compiler_flag:'` 8756 -e 's:$: $lt_compiler_flag:'`
8642 (eval echo "\"\$as_me:8642: $lt_compile\"" >&5) 8757 (eval echo "\"\$as_me:8757: $lt_compile\"" >&5)
8643 (eval "$lt_compile" 2>conftest.err) 8758 (eval "$lt_compile" 2>conftest.err)
8644 ac_status=$? 8759 ac_status=$?
8645 cat conftest.err >&5 8760 cat conftest.err >&5
8646 echo "$as_me:8646: \$? = $ac_status" >&5 8761 echo "$as_me:8761: \$? = $ac_status" >&5
8647 if (exit $ac_status) && test -s "$ac_outfile"; then 8762 if (exit $ac_status) && test -s "$ac_outfile"; then
8648 # The compiler can only warn and ignore the option if not recognized 8763 # The compiler can only warn and ignore the option if not recognized
8649 # So say no if there are warnings other than the usual output. 8764 # So say no if there are warnings other than the usual output.
@@ -8744,11 +8859,11 @@ else
8744 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 8859 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8745 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 8860 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8746 -e 's:$: $lt_compiler_flag:'` 8861 -e 's:$: $lt_compiler_flag:'`
8747 (eval echo "\"\$as_me:8747: $lt_compile\"" >&5) 8862 (eval echo "\"\$as_me:8862: $lt_compile\"" >&5)
8748 (eval "$lt_compile" 2>out/conftest.err) 8863 (eval "$lt_compile" 2>out/conftest.err)
8749 ac_status=$? 8864 ac_status=$?
8750 cat out/conftest.err >&5 8865 cat out/conftest.err >&5
8751 echo "$as_me:8751: \$? = $ac_status" >&5 8866 echo "$as_me:8866: \$? = $ac_status" >&5
8752 if (exit $ac_status) && test -s out/conftest2.$ac_objext 8867 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8753 then 8868 then
8754 # The compiler can only warn and ignore the option if not recognized 8869 # The compiler can only warn and ignore the option if not recognized
@@ -8799,11 +8914,11 @@ else
8799 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 8914 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8800 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 8915 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8801 -e 's:$: $lt_compiler_flag:'` 8916 -e 's:$: $lt_compiler_flag:'`
8802 (eval echo "\"\$as_me:8802: $lt_compile\"" >&5) 8917 (eval echo "\"\$as_me:8917: $lt_compile\"" >&5)
8803 (eval "$lt_compile" 2>out/conftest.err) 8918 (eval "$lt_compile" 2>out/conftest.err)
8804 ac_status=$? 8919 ac_status=$?
8805 cat out/conftest.err >&5 8920 cat out/conftest.err >&5
8806 echo "$as_me:8806: \$? = $ac_status" >&5 8921 echo "$as_me:8921: \$? = $ac_status" >&5
8807 if (exit $ac_status) && test -s out/conftest2.$ac_objext 8922 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8808 then 8923 then
8809 # The compiler can only warn and ignore the option if not recognized 8924 # The compiler can only warn and ignore the option if not recognized
@@ -8903,7 +9018,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
8903 extract_expsyms_cmds= 9018 extract_expsyms_cmds=
8904 9019
8905 case $host_os in 9020 case $host_os in
8906 cygwin* | mingw* | pw32*) 9021 cygwin* | mingw* | pw32* | cegcc*)
8907 # FIXME: the MSVC++ port hasn't been tested in a loooong time 9022 # FIXME: the MSVC++ port hasn't been tested in a loooong time
8908 # When not using gcc, we currently assume that we are using 9023 # When not using gcc, we currently assume that we are using
8909 # Microsoft Visual C++. 9024 # Microsoft Visual C++.
@@ -8918,6 +9033,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
8918 openbsd*) 9033 openbsd*)
8919 with_gnu_ld=no 9034 with_gnu_ld=no
8920 ;; 9035 ;;
9036 linux* | k*bsd*-gnu)
9037 link_all_deplibs=no
9038 ;;
8921 esac 9039 esac
8922 9040
8923 ld_shlibs=yes 9041 ld_shlibs=yes
@@ -8939,6 +9057,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
8939 fi 9057 fi
8940 supports_anon_versioning=no 9058 supports_anon_versioning=no
8941 case `$LD -v 2>&1` in 9059 case `$LD -v 2>&1` in
9060 *GNU\ gold*) supports_anon_versioning=yes ;;
8942 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 9061 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8943 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 9062 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8944 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 9063 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -8990,7 +9109,7 @@ _LT_EOF
8990 fi 9109 fi
8991 ;; 9110 ;;
8992 9111
8993 cygwin* | mingw* | pw32*) 9112 cygwin* | mingw* | pw32* | cegcc*)
8994 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, 9113 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8995 # as there is no search path for DLLs. 9114 # as there is no search path for DLLs.
8996 hardcode_libdir_flag_spec='-L$libdir' 9115 hardcode_libdir_flag_spec='-L$libdir'
@@ -9030,7 +9149,7 @@ _LT_EOF
9030 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 9149 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9031 ;; 9150 ;;
9032 9151
9033 gnu* | linux* | tpf* | k*bsd*-gnu) 9152 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
9034 tmp_diet=no 9153 tmp_diet=no
9035 if test "$host_os" = linux-dietlibc; then 9154 if test "$host_os" = linux-dietlibc; then
9036 case $cc_basename in 9155 case $cc_basename in
@@ -9056,6 +9175,9 @@ _LT_EOF
9056 tmp_addflag=' -i_dynamic -nofor_main' ;; 9175 tmp_addflag=' -i_dynamic -nofor_main' ;;
9057 ifc* | ifort*) # Intel Fortran compiler 9176 ifc* | ifort*) # Intel Fortran compiler
9058 tmp_addflag=' -nofor_main' ;; 9177 tmp_addflag=' -nofor_main' ;;
9178 lf95*) # Lahey Fortran 8.1
9179 whole_archive_flag_spec=
9180 tmp_sharedflag='--shared' ;;
9059 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) 9181 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
9060 tmp_sharedflag='-qmkshrobj' 9182 tmp_sharedflag='-qmkshrobj'
9061 tmp_addflag= ;; 9183 tmp_addflag= ;;
@@ -9288,6 +9410,7 @@ _LT_EOF
9288 fi 9410 fi
9289 fi 9411 fi
9290 9412
9413 export_dynamic_flag_spec='${wl}-bexpall'
9291 # It seems that -bexpall does not export symbols beginning with 9414 # It seems that -bexpall does not export symbols beginning with
9292 # underscore (_), so it is better to generate a list of symbols to export. 9415 # underscore (_), so it is better to generate a list of symbols to export.
9293 always_export_symbols=yes 9416 always_export_symbols=yes
@@ -9400,7 +9523,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9400 export_dynamic_flag_spec=-rdynamic 9523 export_dynamic_flag_spec=-rdynamic
9401 ;; 9524 ;;
9402 9525
9403 cygwin* | mingw* | pw32*) 9526 cygwin* | mingw* | pw32* | cegcc*)
9404 # When not using gcc, we currently assume that we are using 9527 # When not using gcc, we currently assume that we are using
9405 # Microsoft Visual C++. 9528 # Microsoft Visual C++.
9406 # hardcode_libdir_flag_spec is actually meaningless, as there is 9529 # hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -9431,7 +9554,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9431 whole_archive_flag_spec='' 9554 whole_archive_flag_spec=''
9432 link_all_deplibs=yes 9555 link_all_deplibs=yes
9433 allow_undefined_flag="$_lt_dar_allow_undefined" 9556 allow_undefined_flag="$_lt_dar_allow_undefined"
9434 if test "$GCC" = "yes"; then 9557 case $cc_basename in
9558 ifort*) _lt_dar_can_shared=yes ;;
9559 *) _lt_dar_can_shared=$GCC ;;
9560 esac
9561 if test "$_lt_dar_can_shared" = "yes"; then
9435 output_verbose_link_cmd=echo 9562 output_verbose_link_cmd=echo
9436 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 9563 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
9437 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 9564 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
@@ -9523,7 +9650,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9523 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 9650 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9524 ;; 9651 ;;
9525 ia64*) 9652 ia64*)
9526 archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9653 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9527 ;; 9654 ;;
9528 *) 9655 *)
9529 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9656 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
@@ -10239,14 +10366,14 @@ bsdi[45]*)
10239 # libtool to hard-code these into programs 10366 # libtool to hard-code these into programs
10240 ;; 10367 ;;
10241 10368
10242cygwin* | mingw* | pw32*) 10369cygwin* | mingw* | pw32* | cegcc*)
10243 version_type=windows 10370 version_type=windows
10244 shrext_cmds=".dll" 10371 shrext_cmds=".dll"
10245 need_version=no 10372 need_version=no
10246 need_lib_prefix=no 10373 need_lib_prefix=no
10247 10374
10248 case $GCC,$host_os in 10375 case $GCC,$host_os in
10249 yes,cygwin* | yes,mingw* | yes,pw32*) 10376 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
10250 library_names_spec='$libname.dll.a' 10377 library_names_spec='$libname.dll.a'
10251 # DLL is installed to $(libdir)/../bin by postinstall_cmds 10378 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10252 postinstall_cmds='base_file=`basename \${file}`~ 10379 postinstall_cmds='base_file=`basename \${file}`~
@@ -10269,7 +10396,7 @@ cygwin* | mingw* | pw32*)
10269 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' 10396 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10270 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 10397 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10271 ;; 10398 ;;
10272 mingw*) 10399 mingw* | cegcc*)
10273 # MinGW DLLs use traditional 'lib' prefix 10400 # MinGW DLLs use traditional 'lib' prefix
10274 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' 10401 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10275 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 10402 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
@@ -10484,7 +10611,7 @@ linux*oldld* | linux*aout* | linux*coff*)
10484 ;; 10611 ;;
10485 10612
10486# This must be Linux ELF. 10613# This must be Linux ELF.
10487linux* | k*bsd*-gnu) 10614linux* | k*bsd*-gnu | kopensolaris*-gnu)
10488 version_type=linux 10615 version_type=linux
10489 need_lib_prefix=no 10616 need_lib_prefix=no
10490 need_version=no 10617 need_version=no
@@ -10722,7 +10849,7 @@ tpf*)
10722 version_type=linux 10849 version_type=linux
10723 need_lib_prefix=no 10850 need_lib_prefix=no
10724 need_version=no 10851 need_version=no
10725 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 10852 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10726 shlibpath_var=LD_LIBRARY_PATH 10853 shlibpath_var=LD_LIBRARY_PATH
10727 shlibpath_overrides_runpath=no 10854 shlibpath_overrides_runpath=no
10728 hardcode_into_libs=yes 10855 hardcode_into_libs=yes
@@ -10899,7 +11026,7 @@ else
10899 lt_cv_dlopen_self=yes 11026 lt_cv_dlopen_self=yes
10900 ;; 11027 ;;
10901 11028
10902 mingw* | pw32*) 11029 mingw* | pw32* | cegcc*)
10903 lt_cv_dlopen="LoadLibrary" 11030 lt_cv_dlopen="LoadLibrary"
10904 lt_cv_dlopen_libs= 11031 lt_cv_dlopen_libs=
10905 ;; 11032 ;;
@@ -11171,7 +11298,7 @@ else
11171 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 11298 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11172 lt_status=$lt_dlunknown 11299 lt_status=$lt_dlunknown
11173 cat > conftest.$ac_ext <<_LT_EOF 11300 cat > conftest.$ac_ext <<_LT_EOF
11174#line 11174 "configure" 11301#line 11301 "configure"
11175#include "confdefs.h" 11302#include "confdefs.h"
11176 11303
11177#if HAVE_DLFCN_H 11304#if HAVE_DLFCN_H
@@ -11212,10 +11339,6 @@ else
11212# endif 11339# endif
11213#endif 11340#endif
11214 11341
11215#ifdef __cplusplus
11216extern "C" void exit (int);
11217#endif
11218
11219void fnord() { int i=42;} 11342void fnord() { int i=42;}
11220int main () 11343int main ()
11221{ 11344{
@@ -11231,7 +11354,7 @@ int main ()
11231 else 11354 else
11232 puts (dlerror ()); 11355 puts (dlerror ());
11233 11356
11234 exit (status); 11357 return status;
11235} 11358}
11236_LT_EOF 11359_LT_EOF
11237 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 11360 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
@@ -11271,7 +11394,7 @@ else
11271 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 11394 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11272 lt_status=$lt_dlunknown 11395 lt_status=$lt_dlunknown
11273 cat > conftest.$ac_ext <<_LT_EOF 11396 cat > conftest.$ac_ext <<_LT_EOF
11274#line 11274 "configure" 11397#line 11397 "configure"
11275#include "confdefs.h" 11398#include "confdefs.h"
11276 11399
11277#if HAVE_DLFCN_H 11400#if HAVE_DLFCN_H
@@ -11312,10 +11435,6 @@ else
11312# endif 11435# endif
11313#endif 11436#endif
11314 11437
11315#ifdef __cplusplus
11316extern "C" void exit (int);
11317#endif
11318
11319void fnord() { int i=42;} 11438void fnord() { int i=42;}
11320int main () 11439int main ()
11321{ 11440{
@@ -11331,7 +11450,7 @@ int main ()
11331 else 11450 else
11332 puts (dlerror ()); 11451 puts (dlerror ());
11333 11452
11334 exit (status); 11453 return status;
11335} 11454}
11336_LT_EOF 11455_LT_EOF
11337 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 11456 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
@@ -11519,15 +11638,15 @@ _ACEOF
11519 11638
11520 11639
11521cat >>confdefs.h <<_ACEOF 11640cat >>confdefs.h <<_ACEOF
11522#define VMIC 0 11641#define VMIC 99
11523_ACEOF 11642_ACEOF
11524 11643
11525 11644
11526cat >>confdefs.h <<_ACEOF 11645cat >>confdefs.h <<_ACEOF
11527#define VREV 0 11646#define VREV 67344
11528_ACEOF 11647_ACEOF
11529 11648
11530version_info="2:0:1" 11649version_info="2:99:1"
11531release_info="" 11650release_info=""
11532 11651
11533 11652
@@ -11549,7 +11668,7 @@ case "$host_os" in
11549 MODULE_ARCH="$host_os-$host_cpu" 11668 MODULE_ARCH="$host_os-$host_cpu"
11550 ;; 11669 ;;
11551 *) 11670 *)
11552 MODULE_ARCH="$host_os-$host_cpu-1.1.0" 11671 MODULE_ARCH="$host_os-$host_cpu-1.1.99"
11553 ;; 11672 ;;
11554esac 11673esac
11555 11674
@@ -12047,7 +12166,7 @@ if test "x${_efl_enable_win32_threads}" = "xyes" ; then
12047 mingw*) 12166 mingw*)
12048 ;; 12167 ;;
12049 *) 12168 *)
12050 as_fn_error $? "Win32 threads support requested but non Windows system found." "$LINENO" 5 12169 as_fn_error "Win32 threads support requested but non Windows system found." "$LINENO" 5
12051 ;; 12170 ;;
12052 esac 12171 esac
12053fi 12172fi
@@ -12055,7 +12174,7 @@ fi
12055if test "x${_efl_enable_posix_threads}" = "xyes" ; then 12174if test "x${_efl_enable_posix_threads}" = "xyes" ; then
12056 case "$host_os" in 12175 case "$host_os" in
12057 mingw*) 12176 mingw*)
12058 as_fn_error $? "POSIX threads support requested but Windows system found." "$LINENO" 5 12177 as_fn_error "POSIX threads support requested but Windows system found." "$LINENO" 5
12059 ;; 12178 ;;
12060 *) 12179 *)
12061 ;; 12180 ;;
@@ -12118,7 +12237,7 @@ $as_echo_n "checking whether system support POSIX threads... " >&6; }
12118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_efl_have_posix_threads}" >&5 12237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_efl_have_posix_threads}" >&5
12119$as_echo "${_efl_have_posix_threads}" >&6; } 12238$as_echo "${_efl_have_posix_threads}" >&6; }
12120if test "$x{_efl_enable_posix_threads}" = "xyes" && test "x${_efl_have_posix_threads}" = "xno"; then 12239if test "$x{_efl_enable_posix_threads}" = "xyes" && test "x${_efl_have_posix_threads}" = "xno"; then
12121 as_fn_error $? "POSIX threads support requested but not found." "$LINENO" 5 12240 as_fn_error "POSIX threads support requested but not found." "$LINENO" 5
12122fi 12241fi
12123 12242
12124EFL_PTHREAD_CFLAGS="" 12243EFL_PTHREAD_CFLAGS=""
@@ -12379,7 +12498,7 @@ _ACEOF
12379 12498
12380 with_max_log_level="${withval}" 12499 with_max_log_level="${withval}"
12381 else 12500 else
12382 as_fn_error $? "--with-internal-maximum-log-level takes a decimal number, got \"${withval}\" instead." "$LINENO" 5 12501 as_fn_error "--with-internal-maximum-log-level takes a decimal number, got \"${withval}\" instead." "$LINENO" 5
12383 fi 12502 fi
12384 fi 12503 fi
12385 12504
@@ -12793,8 +12912,8 @@ fi
12793 12912
12794test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 12913test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 12914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12796as_fn_error $? "no acceptable C compiler found in \$PATH 12915as_fn_error "no acceptable C compiler found in \$PATH
12797See \`config.log' for more details" "$LINENO" 5 ; } 12916See \`config.log' for more details." "$LINENO" 5; }
12798 12917
12799# Provide some information about the compiler. 12918# Provide some information about the compiler.
12800$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 12919$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -13970,7 +14089,7 @@ else
13970 # Broken: fails on valid input. 14089 # Broken: fails on valid input.
13971continue 14090continue
13972fi 14091fi
13973rm -f conftest.err conftest.i conftest.$ac_ext 14092rm -f conftest.err conftest.$ac_ext
13974 14093
13975 # OK, works on sane cases. Now check whether nonexistent headers 14094 # OK, works on sane cases. Now check whether nonexistent headers
13976 # can be detected and how. 14095 # can be detected and how.
@@ -13986,11 +14105,11 @@ else
13986ac_preproc_ok=: 14105ac_preproc_ok=:
13987break 14106break
13988fi 14107fi
13989rm -f conftest.err conftest.i conftest.$ac_ext 14108rm -f conftest.err conftest.$ac_ext
13990 14109
13991done 14110done
13992# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 14111# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13993rm -f conftest.i conftest.err conftest.$ac_ext 14112rm -f conftest.err conftest.$ac_ext
13994if $ac_preproc_ok; then : 14113if $ac_preproc_ok; then :
13995 break 14114 break
13996fi 14115fi
@@ -14029,7 +14148,7 @@ else
14029 # Broken: fails on valid input. 14148 # Broken: fails on valid input.
14030continue 14149continue
14031fi 14150fi
14032rm -f conftest.err conftest.i conftest.$ac_ext 14151rm -f conftest.err conftest.$ac_ext
14033 14152
14034 # OK, works on sane cases. Now check whether nonexistent headers 14153 # OK, works on sane cases. Now check whether nonexistent headers
14035 # can be detected and how. 14154 # can be detected and how.
@@ -14045,11 +14164,11 @@ else
14045ac_preproc_ok=: 14164ac_preproc_ok=:
14046break 14165break
14047fi 14166fi
14048rm -f conftest.err conftest.i conftest.$ac_ext 14167rm -f conftest.err conftest.$ac_ext
14049 14168
14050done 14169done
14051# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 14170# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14052rm -f conftest.i conftest.err conftest.$ac_ext 14171rm -f conftest.err conftest.$ac_ext
14053if $ac_preproc_ok; then : 14172if $ac_preproc_ok; then :
14054 14173
14055else 14174else
@@ -14278,7 +14397,7 @@ else
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14279$as_echo "no" >&6; } 14398$as_echo "no" >&6; }
14280fi 14399fi
14281test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 14400test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
14282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 14401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
14283$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } 14402$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
14284if test "${lt_cv_prog_gnu_ld+set}" = set; then : 14403if test "${lt_cv_prog_gnu_ld+set}" = set; then :
@@ -14439,6 +14558,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
14439 fi 14558 fi
14440 fi 14559 fi
14441 14560
14561 export_dynamic_flag_spec_CXX='${wl}-bexpall'
14442 # It seems that -bexpall does not export symbols beginning with 14562 # It seems that -bexpall does not export symbols beginning with
14443 # underscore (_), so it is better to generate a list of symbols to 14563 # underscore (_), so it is better to generate a list of symbols to
14444 # export. 14564 # export.
@@ -14555,7 +14675,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14555 esac 14675 esac
14556 ;; 14676 ;;
14557 14677
14558 cygwin* | mingw* | pw32*) 14678 cygwin* | mingw* | pw32* | cegcc*)
14559 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, 14679 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
14560 # as there is no search path for DLLs. 14680 # as there is no search path for DLLs.
14561 hardcode_libdir_flag_spec_CXX='-L$libdir' 14681 hardcode_libdir_flag_spec_CXX='-L$libdir'
@@ -14588,7 +14708,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14588 whole_archive_flag_spec_CXX='' 14708 whole_archive_flag_spec_CXX=''
14589 link_all_deplibs_CXX=yes 14709 link_all_deplibs_CXX=yes
14590 allow_undefined_flag_CXX="$_lt_dar_allow_undefined" 14710 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
14591 if test "$GCC" = "yes"; then 14711 case $cc_basename in
14712 ifort*) _lt_dar_can_shared=yes ;;
14713 *) _lt_dar_can_shared=$GCC ;;
14714 esac
14715 if test "$_lt_dar_can_shared" = "yes"; then
14592 output_verbose_link_cmd=echo 14716 output_verbose_link_cmd=echo
14593 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 14717 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
14594 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 14718 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
@@ -14798,7 +14922,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14798 inherit_rpath_CXX=yes 14922 inherit_rpath_CXX=yes
14799 ;; 14923 ;;
14800 14924
14801 linux* | k*bsd*-gnu) 14925 linux* | k*bsd*-gnu | kopensolaris*-gnu)
14802 case $cc_basename in 14926 case $cc_basename in
14803 KCC*) 14927 KCC*)
14804 # Kuck and Associates, Inc. (KAI) C++ Compiler 14928 # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -15505,7 +15629,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
15505 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 15629 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
15506 # PIC is the default for these OSes. 15630 # PIC is the default for these OSes.
15507 ;; 15631 ;;
15508 mingw* | cygwin* | os2* | pw32*) 15632 mingw* | cygwin* | os2* | pw32* | cegcc*)
15509 # This hack is so that the source file can tell whether it is being 15633 # This hack is so that the source file can tell whether it is being
15510 # built for inclusion in a dll (and should export symbols for example). 15634 # built for inclusion in a dll (and should export symbols for example).
15511 # Although the cygwin gcc ignores -fPIC, still need this for old-style 15635 # Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -15531,10 +15655,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
15531 fi 15655 fi
15532 ;; 15656 ;;
15533 hpux*) 15657 hpux*)
15534 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 15658 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
15535 # not for PA HP-UX. 15659 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
15660 # sets the default TLS model and affects inlining.
15536 case $host_cpu in 15661 case $host_cpu in
15537 hppa*64*|ia64*) 15662 hppa*64*)
15538 ;; 15663 ;;
15539 *) 15664 *)
15540 lt_prog_compiler_pic_CXX='-fPIC' 15665 lt_prog_compiler_pic_CXX='-fPIC'
@@ -15625,19 +15750,26 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
15625 ;; 15750 ;;
15626 esac 15751 esac
15627 ;; 15752 ;;
15628 linux* | k*bsd*-gnu) 15753 linux* | k*bsd*-gnu | kopensolaris*-gnu)
15629 case $cc_basename in 15754 case $cc_basename in
15630 KCC*) 15755 KCC*)
15631 # KAI C++ Compiler 15756 # KAI C++ Compiler
15632 lt_prog_compiler_wl_CXX='--backend -Wl,' 15757 lt_prog_compiler_wl_CXX='--backend -Wl,'
15633 lt_prog_compiler_pic_CXX='-fPIC' 15758 lt_prog_compiler_pic_CXX='-fPIC'
15634 ;; 15759 ;;
15635 icpc* | ecpc* ) 15760 ecpc* )
15636 # Intel C++ 15761 # old Intel C++ for x86_64 which still supported -KPIC.
15637 lt_prog_compiler_wl_CXX='-Wl,' 15762 lt_prog_compiler_wl_CXX='-Wl,'
15638 lt_prog_compiler_pic_CXX='-KPIC' 15763 lt_prog_compiler_pic_CXX='-KPIC'
15639 lt_prog_compiler_static_CXX='-static' 15764 lt_prog_compiler_static_CXX='-static'
15640 ;; 15765 ;;
15766 icpc* )
15767 # Intel C++, used to be incompatible with GCC.
15768 # ICC 10 doesn't accept -KPIC any more.
15769 lt_prog_compiler_wl_CXX='-Wl,'
15770 lt_prog_compiler_pic_CXX='-fPIC'
15771 lt_prog_compiler_static_CXX='-static'
15772 ;;
15641 pgCC* | pgcpp*) 15773 pgCC* | pgcpp*)
15642 # Portland Group C++ compiler 15774 # Portland Group C++ compiler
15643 lt_prog_compiler_wl_CXX='-Wl,' 15775 lt_prog_compiler_wl_CXX='-Wl,'
@@ -15806,11 +15938,11 @@ else
15806 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15938 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15807 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 15939 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15808 -e 's:$: $lt_compiler_flag:'` 15940 -e 's:$: $lt_compiler_flag:'`
15809 (eval echo "\"\$as_me:15809: $lt_compile\"" >&5) 15941 (eval echo "\"\$as_me:15941: $lt_compile\"" >&5)
15810 (eval "$lt_compile" 2>conftest.err) 15942 (eval "$lt_compile" 2>conftest.err)
15811 ac_status=$? 15943 ac_status=$?
15812 cat conftest.err >&5 15944 cat conftest.err >&5
15813 echo "$as_me:15813: \$? = $ac_status" >&5 15945 echo "$as_me:15945: \$? = $ac_status" >&5
15814 if (exit $ac_status) && test -s "$ac_outfile"; then 15946 if (exit $ac_status) && test -s "$ac_outfile"; then
15815 # The compiler can only warn and ignore the option if not recognized 15947 # The compiler can only warn and ignore the option if not recognized
15816 # So say no if there are warnings other than the usual output. 15948 # So say no if there are warnings other than the usual output.
@@ -15905,11 +16037,11 @@ else
15905 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16037 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15906 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 16038 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15907 -e 's:$: $lt_compiler_flag:'` 16039 -e 's:$: $lt_compiler_flag:'`
15908 (eval echo "\"\$as_me:15908: $lt_compile\"" >&5) 16040 (eval echo "\"\$as_me:16040: $lt_compile\"" >&5)
15909 (eval "$lt_compile" 2>out/conftest.err) 16041 (eval "$lt_compile" 2>out/conftest.err)
15910 ac_status=$? 16042 ac_status=$?
15911 cat out/conftest.err >&5 16043 cat out/conftest.err >&5
15912 echo "$as_me:15912: \$? = $ac_status" >&5 16044 echo "$as_me:16044: \$? = $ac_status" >&5
15913 if (exit $ac_status) && test -s out/conftest2.$ac_objext 16045 if (exit $ac_status) && test -s out/conftest2.$ac_objext
15914 then 16046 then
15915 # The compiler can only warn and ignore the option if not recognized 16047 # The compiler can only warn and ignore the option if not recognized
@@ -15957,11 +16089,11 @@ else
15957 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16089 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15958 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ 16090 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15959 -e 's:$: $lt_compiler_flag:'` 16091 -e 's:$: $lt_compiler_flag:'`
15960 (eval echo "\"\$as_me:15960: $lt_compile\"" >&5) 16092 (eval echo "\"\$as_me:16092: $lt_compile\"" >&5)
15961 (eval "$lt_compile" 2>out/conftest.err) 16093 (eval "$lt_compile" 2>out/conftest.err)
15962 ac_status=$? 16094 ac_status=$?
15963 cat out/conftest.err >&5 16095 cat out/conftest.err >&5
15964 echo "$as_me:15964: \$? = $ac_status" >&5 16096 echo "$as_me:16096: \$? = $ac_status" >&5
15965 if (exit $ac_status) && test -s out/conftest2.$ac_objext 16097 if (exit $ac_status) && test -s out/conftest2.$ac_objext
15966 then 16098 then
15967 # The compiler can only warn and ignore the option if not recognized 16099 # The compiler can only warn and ignore the option if not recognized
@@ -16030,7 +16162,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
16030 pw32*) 16162 pw32*)
16031 export_symbols_cmds_CXX="$ltdll_cmds" 16163 export_symbols_cmds_CXX="$ltdll_cmds"
16032 ;; 16164 ;;
16033 cygwin* | mingw*) 16165 cygwin* | mingw* | cegcc*)
16034 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' 16166 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
16035 ;; 16167 ;;
16036 linux* | k*bsd*-gnu) 16168 linux* | k*bsd*-gnu)
@@ -16291,14 +16423,14 @@ bsdi[45]*)
16291 # libtool to hard-code these into programs 16423 # libtool to hard-code these into programs
16292 ;; 16424 ;;
16293 16425
16294cygwin* | mingw* | pw32*) 16426cygwin* | mingw* | pw32* | cegcc*)
16295 version_type=windows 16427 version_type=windows
16296 shrext_cmds=".dll" 16428 shrext_cmds=".dll"
16297 need_version=no 16429 need_version=no
16298 need_lib_prefix=no 16430 need_lib_prefix=no
16299 16431
16300 case $GCC,$host_os in 16432 case $GCC,$host_os in
16301 yes,cygwin* | yes,mingw* | yes,pw32*) 16433 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
16302 library_names_spec='$libname.dll.a' 16434 library_names_spec='$libname.dll.a'
16303 # DLL is installed to $(libdir)/../bin by postinstall_cmds 16435 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16304 postinstall_cmds='base_file=`basename \${file}`~ 16436 postinstall_cmds='base_file=`basename \${file}`~
@@ -16321,7 +16453,7 @@ cygwin* | mingw* | pw32*)
16321 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' 16453 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16322 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 16454 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
16323 ;; 16455 ;;
16324 mingw*) 16456 mingw* | cegcc*)
16325 # MinGW DLLs use traditional 'lib' prefix 16457 # MinGW DLLs use traditional 'lib' prefix
16326 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' 16458 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16327 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 16459 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
@@ -16535,7 +16667,7 @@ linux*oldld* | linux*aout* | linux*coff*)
16535 ;; 16667 ;;
16536 16668
16537# This must be Linux ELF. 16669# This must be Linux ELF.
16538linux* | k*bsd*-gnu) 16670linux* | k*bsd*-gnu | kopensolaris*-gnu)
16539 version_type=linux 16671 version_type=linux
16540 need_lib_prefix=no 16672 need_lib_prefix=no
16541 need_version=no 16673 need_version=no
@@ -16773,7 +16905,7 @@ tpf*)
16773 version_type=linux 16905 version_type=linux
16774 need_lib_prefix=no 16906 need_lib_prefix=no
16775 need_version=no 16907 need_version=no
16776 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16908 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16777 shlibpath_var=LD_LIBRARY_PATH 16909 shlibpath_var=LD_LIBRARY_PATH
16778 shlibpath_overrides_runpath=no 16910 shlibpath_overrides_runpath=no
16779 hardcode_into_libs=yes 16911 hardcode_into_libs=yes
@@ -16909,10 +17041,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
16909# pkg-config 17041# pkg-config
16910 17042
16911 17043
16912
16913
16914
16915
16916if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 17044if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
16917 if test -n "$ac_tool_prefix"; then 17045 if test -n "$ac_tool_prefix"; then
16918 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. 17046 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -17025,6 +17153,7 @@ $as_echo "yes" >&6; }
17025$as_echo "no" >&6; } 17153$as_echo "no" >&6; }
17026 PKG_CONFIG="" 17154 PKG_CONFIG=""
17027 fi 17155 fi
17156
17028fi 17157fi
17029 17158
17030# Check whether pkg-config supports Requires.private 17159# Check whether pkg-config supports Requires.private
@@ -17220,10 +17349,11 @@ pkg_failed=no
17220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND" >&5 17349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND" >&5
17221$as_echo_n "checking for VALGRIND... " >&6; } 17350$as_echo_n "checking for VALGRIND... " >&6; }
17222 17351
17223if test -n "$VALGRIND_CFLAGS"; then 17352if test -n "$PKG_CONFIG"; then
17224 pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" 17353 if test -n "$VALGRIND_CFLAGS"; then
17225 elif test -n "$PKG_CONFIG"; then 17354 pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS"
17226 if test -n "$PKG_CONFIG" && \ 17355 else
17356 if test -n "$PKG_CONFIG" && \
17227 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5 17357 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5
17228 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5 17358 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5
17229 ac_status=$? 17359 ac_status=$?
@@ -17233,13 +17363,15 @@ if test -n "$VALGRIND_CFLAGS"; then
17233else 17363else
17234 pkg_failed=yes 17364 pkg_failed=yes
17235fi 17365fi
17236 else 17366 fi
17237 pkg_failed=untried 17367else
17368 pkg_failed=untried
17238fi 17369fi
17239if test -n "$VALGRIND_LIBS"; then 17370if test -n "$PKG_CONFIG"; then
17240 pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" 17371 if test -n "$VALGRIND_LIBS"; then
17241 elif test -n "$PKG_CONFIG"; then 17372 pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS"
17242 if test -n "$PKG_CONFIG" && \ 17373 else
17374 if test -n "$PKG_CONFIG" && \
17243 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5 17375 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5
17244 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5 17376 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5
17245 ac_status=$? 17377 ac_status=$?
@@ -17249,15 +17381,14 @@ if test -n "$VALGRIND_LIBS"; then
17249else 17381else
17250 pkg_failed=yes 17382 pkg_failed=yes
17251fi 17383fi
17252 else 17384 fi
17253 pkg_failed=untried 17385else
17386 pkg_failed=untried
17254fi 17387fi
17255 17388
17256 17389
17257 17390
17258if test $pkg_failed = yes; then 17391if test $pkg_failed = yes; then
17259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17260$as_echo "no" >&6; }
17261 17392
17262if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 17393if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17263 _pkg_short_errors_supported=yes 17394 _pkg_short_errors_supported=yes
@@ -17265,30 +17396,30 @@ else
17265 _pkg_short_errors_supported=no 17396 _pkg_short_errors_supported=no
17266fi 17397fi
17267 if test $_pkg_short_errors_supported = yes; then 17398 if test $_pkg_short_errors_supported = yes; then
17268 VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "valgrind >= 2.4.0" 2>&1` 17399 VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "valgrind >= 2.4.0"`
17269 else 17400 else
17270 VALGRIND_PKG_ERRORS=`$PKG_CONFIG --print-errors "valgrind >= 2.4.0" 2>&1` 17401 VALGRIND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "valgrind >= 2.4.0"`
17271 fi 17402 fi
17272 # Put the nasty error message in config.log where it belongs 17403 # Put the nasty error message in config.log where it belongs
17273 echo "$VALGRIND_PKG_ERRORS" >&5 17404 echo "$VALGRIND_PKG_ERRORS" >&5
17274 17405
17406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17407$as_echo "no" >&6; }
17275 17408
17276 17409
17277$as_echo "#define NVALGRIND 1" >>confdefs.h 17410$as_echo "#define NVALGRIND 1" >>confdefs.h
17278 17411
17279 if test "x${want_valgrind}" = "xyes"; then 17412 if test "x${want_valgrind}" = "xyes"; then
17280 as_fn_error $? "Valgrind >= 2.4.0 is required" "$LINENO" 5 17413 as_fn_error "Valgrind >= 2.4.0 is required" "$LINENO" 5
17281 fi 17414 fi
17282 17415
17283elif test $pkg_failed = untried; then 17416elif test $pkg_failed = untried; then
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17285$as_echo "no" >&6; }
17286 17417
17287 17418
17288$as_echo "#define NVALGRIND 1" >>confdefs.h 17419$as_echo "#define NVALGRIND 1" >>confdefs.h
17289 17420
17290 if test "x${want_valgrind}" = "xyes"; then 17421 if test "x${want_valgrind}" = "xyes"; then
17291 as_fn_error $? "Valgrind >= 2.4.0 is required" "$LINENO" 5 17422 as_fn_error "Valgrind >= 2.4.0 is required" "$LINENO" 5
17292 fi 17423 fi
17293 17424
17294else 17425else
@@ -17318,10 +17449,11 @@ pkg_failed=no
17318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 17449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5
17319$as_echo_n "checking for EVIL... " >&6; } 17450$as_echo_n "checking for EVIL... " >&6; }
17320 17451
17321if test -n "$EVIL_CFLAGS"; then 17452if test -n "$PKG_CONFIG"; then
17322 pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" 17453 if test -n "$EVIL_CFLAGS"; then
17323 elif test -n "$PKG_CONFIG"; then 17454 pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS"
17324 if test -n "$PKG_CONFIG" && \ 17455 else
17456 if test -n "$PKG_CONFIG" && \
17325 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5 17457 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5
17326 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5 17458 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5
17327 ac_status=$? 17459 ac_status=$?
@@ -17331,13 +17463,15 @@ if test -n "$EVIL_CFLAGS"; then
17331else 17463else
17332 pkg_failed=yes 17464 pkg_failed=yes
17333fi 17465fi
17334 else 17466 fi
17335 pkg_failed=untried 17467else
17468 pkg_failed=untried
17336fi 17469fi
17337if test -n "$EVIL_LIBS"; then 17470if test -n "$PKG_CONFIG"; then
17338 pkg_cv_EVIL_LIBS="$EVIL_LIBS" 17471 if test -n "$EVIL_LIBS"; then
17339 elif test -n "$PKG_CONFIG"; then 17472 pkg_cv_EVIL_LIBS="$EVIL_LIBS"
17340 if test -n "$PKG_CONFIG" && \ 17473 else
17474 if test -n "$PKG_CONFIG" && \
17341 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5 17475 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5
17342 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5 17476 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5
17343 ac_status=$? 17477 ac_status=$?
@@ -17347,15 +17481,14 @@ if test -n "$EVIL_LIBS"; then
17347else 17481else
17348 pkg_failed=yes 17482 pkg_failed=yes
17349fi 17483fi
17350 else 17484 fi
17351 pkg_failed=untried 17485else
17486 pkg_failed=untried
17352fi 17487fi
17353 17488
17354 17489
17355 17490
17356if test $pkg_failed = yes; then 17491if test $pkg_failed = yes; then
17357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17358$as_echo "no" >&6; }
17359 17492
17360if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 17493if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17361 _pkg_short_errors_supported=yes 17494 _pkg_short_errors_supported=yes
@@ -17363,14 +17496,14 @@ else
17363 _pkg_short_errors_supported=no 17496 _pkg_short_errors_supported=no
17364fi 17497fi
17365 if test $_pkg_short_errors_supported = yes; then 17498 if test $_pkg_short_errors_supported = yes; then
17366 EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` 17499 EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"`
17367 else 17500 else
17368 EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` 17501 EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"`
17369 fi 17502 fi
17370 # Put the nasty error message in config.log where it belongs 17503 # Put the nasty error message in config.log where it belongs
17371 echo "$EVIL_PKG_ERRORS" >&5 17504 echo "$EVIL_PKG_ERRORS" >&5
17372 17505
17373 as_fn_error $? "Package requirements (evil >= 1.0.0) were not met: 17506 as_fn_error "Package requirements (evil >= 1.0.0) were not met:
17374 17507
17375$EVIL_PKG_ERRORS 17508$EVIL_PKG_ERRORS
17376 17509
@@ -17379,13 +17512,12 @@ installed software in a non-standard prefix.
17379 17512
17380Alternatively, you may set the environment variables EVIL_CFLAGS 17513Alternatively, you may set the environment variables EVIL_CFLAGS
17381and EVIL_LIBS to avoid the need to call pkg-config. 17514and EVIL_LIBS to avoid the need to call pkg-config.
17382See the pkg-config man page for more details." "$LINENO" 5 17515See the pkg-config man page for more details.
17516" "$LINENO" 5
17383elif test $pkg_failed = untried; then 17517elif test $pkg_failed = untried; then
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17385$as_echo "no" >&6; }
17386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 17518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 17519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17388as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 17520as_fn_error "The pkg-config script could not be found or is too old. Make sure it
17389is in your PATH or set the PKG_CONFIG environment variable to the full 17521is in your PATH or set the PKG_CONFIG environment variable to the full
17390path to pkg-config. 17522path to pkg-config.
17391 17523
@@ -17394,13 +17526,13 @@ and EVIL_LIBS to avoid the need to call pkg-config.
17394See the pkg-config man page for more details. 17526See the pkg-config man page for more details.
17395 17527
17396To get pkg-config, see <http://pkg-config.freedesktop.org/>. 17528To get pkg-config, see <http://pkg-config.freedesktop.org/>.
17397See \`config.log' for more details" "$LINENO" 5 ; } 17529See \`config.log' for more details." "$LINENO" 5; }
17398else 17530else
17399 EVIL_CFLAGS=$pkg_cv_EVIL_CFLAGS 17531 EVIL_CFLAGS=$pkg_cv_EVIL_CFLAGS
17400 EVIL_LIBS=$pkg_cv_EVIL_LIBS 17532 EVIL_LIBS=$pkg_cv_EVIL_LIBS
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 17533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17402$as_echo "yes" >&6; } 17534$as_echo "yes" >&6; }
17403 17535 :
17404fi 17536fi
17405 17537
17406$as_echo "#define HAVE_EVIL 1" >>confdefs.h 17538$as_echo "#define HAVE_EVIL 1" >>confdefs.h
@@ -17438,10 +17570,11 @@ pkg_failed=no
17438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMEMOA" >&5 17570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMEMOA" >&5
17439$as_echo_n "checking for EMEMOA... " >&6; } 17571$as_echo_n "checking for EMEMOA... " >&6; }
17440 17572
17441if test -n "$EMEMOA_CFLAGS"; then 17573if test -n "$PKG_CONFIG"; then
17442 pkg_cv_EMEMOA_CFLAGS="$EMEMOA_CFLAGS" 17574 if test -n "$EMEMOA_CFLAGS"; then
17443 elif test -n "$PKG_CONFIG"; then 17575 pkg_cv_EMEMOA_CFLAGS="$EMEMOA_CFLAGS"
17444 if test -n "$PKG_CONFIG" && \ 17576 else
17577 if test -n "$PKG_CONFIG" && \
17445 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ememoa >= 0.0.26 \""; } >&5 17578 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ememoa >= 0.0.26 \""; } >&5
17446 ($PKG_CONFIG --exists --print-errors "ememoa >= 0.0.26 ") 2>&5 17579 ($PKG_CONFIG --exists --print-errors "ememoa >= 0.0.26 ") 2>&5
17447 ac_status=$? 17580 ac_status=$?
@@ -17451,13 +17584,15 @@ if test -n "$EMEMOA_CFLAGS"; then
17451else 17584else
17452 pkg_failed=yes 17585 pkg_failed=yes
17453fi 17586fi
17454 else 17587 fi
17455 pkg_failed=untried 17588else
17589 pkg_failed=untried
17456fi 17590fi
17457if test -n "$EMEMOA_LIBS"; then 17591if test -n "$PKG_CONFIG"; then
17458 pkg_cv_EMEMOA_LIBS="$EMEMOA_LIBS" 17592 if test -n "$EMEMOA_LIBS"; then
17459 elif test -n "$PKG_CONFIG"; then 17593 pkg_cv_EMEMOA_LIBS="$EMEMOA_LIBS"
17460 if test -n "$PKG_CONFIG" && \ 17594 else
17595 if test -n "$PKG_CONFIG" && \
17461 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ememoa >= 0.0.26 \""; } >&5 17596 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ememoa >= 0.0.26 \""; } >&5
17462 ($PKG_CONFIG --exists --print-errors "ememoa >= 0.0.26 ") 2>&5 17597 ($PKG_CONFIG --exists --print-errors "ememoa >= 0.0.26 ") 2>&5
17463 ac_status=$? 17598 ac_status=$?
@@ -17467,15 +17602,14 @@ if test -n "$EMEMOA_LIBS"; then
17467else 17602else
17468 pkg_failed=yes 17603 pkg_failed=yes
17469fi 17604fi
17470 else 17605 fi
17471 pkg_failed=untried 17606else
17607 pkg_failed=untried
17472fi 17608fi
17473 17609
17474 17610
17475 17611
17476if test $pkg_failed = yes; then 17612if test $pkg_failed = yes; then
17477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17478$as_echo "no" >&6; }
17479 17613
17480if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 17614if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17481 _pkg_short_errors_supported=yes 17615 _pkg_short_errors_supported=yes
@@ -17483,17 +17617,17 @@ else
17483 _pkg_short_errors_supported=no 17617 _pkg_short_errors_supported=no
17484fi 17618fi
17485 if test $_pkg_short_errors_supported = yes; then 17619 if test $_pkg_short_errors_supported = yes; then
17486 EMEMOA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ememoa >= 0.0.26 " 2>&1` 17620 EMEMOA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ememoa >= 0.0.26 "`
17487 else 17621 else
17488 EMEMOA_PKG_ERRORS=`$PKG_CONFIG --print-errors "ememoa >= 0.0.26 " 2>&1` 17622 EMEMOA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ememoa >= 0.0.26 "`
17489 fi 17623 fi
17490 # Put the nasty error message in config.log where it belongs 17624 # Put the nasty error message in config.log where it belongs
17491 echo "$EMEMOA_PKG_ERRORS" >&5 17625 echo "$EMEMOA_PKG_ERRORS" >&5
17492 17626
17493 enable_ememoa="no" 17627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17494elif test $pkg_failed = untried; then
17495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17496$as_echo "no" >&6; } 17628$as_echo "no" >&6; }
17629 enable_ememoa="no"
17630elif test $pkg_failed = untried; then
17497 enable_ememoa="no" 17631 enable_ememoa="no"
17498else 17632else
17499 EMEMOA_CFLAGS=$pkg_cv_EMEMOA_CFLAGS 17633 EMEMOA_CFLAGS=$pkg_cv_EMEMOA_CFLAGS
@@ -17509,10 +17643,11 @@ pkg_failed=no
17509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_EVAS" >&5 17643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_EVAS" >&5
17510$as_echo_n "checking for ECORE_EVAS... " >&6; } 17644$as_echo_n "checking for ECORE_EVAS... " >&6; }
17511 17645
17512if test -n "$ECORE_EVAS_CFLAGS"; then 17646if test -n "$PKG_CONFIG"; then
17513 pkg_cv_ECORE_EVAS_CFLAGS="$ECORE_EVAS_CFLAGS" 17647 if test -n "$ECORE_EVAS_CFLAGS"; then
17514 elif test -n "$PKG_CONFIG"; then 17648 pkg_cv_ECORE_EVAS_CFLAGS="$ECORE_EVAS_CFLAGS"
17515 if test -n "$PKG_CONFIG" && \ 17649 else
17650 if test -n "$PKG_CONFIG" && \
17516 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore evas\""; } >&5 17651 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore evas\""; } >&5
17517 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore evas") 2>&5 17652 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore evas") 2>&5
17518 ac_status=$? 17653 ac_status=$?
@@ -17522,13 +17657,15 @@ if test -n "$ECORE_EVAS_CFLAGS"; then
17522else 17657else
17523 pkg_failed=yes 17658 pkg_failed=yes
17524fi 17659fi
17525 else 17660 fi
17526 pkg_failed=untried 17661else
17662 pkg_failed=untried
17527fi 17663fi
17528if test -n "$ECORE_EVAS_LIBS"; then 17664if test -n "$PKG_CONFIG"; then
17529 pkg_cv_ECORE_EVAS_LIBS="$ECORE_EVAS_LIBS" 17665 if test -n "$ECORE_EVAS_LIBS"; then
17530 elif test -n "$PKG_CONFIG"; then 17666 pkg_cv_ECORE_EVAS_LIBS="$ECORE_EVAS_LIBS"
17531 if test -n "$PKG_CONFIG" && \ 17667 else
17668 if test -n "$PKG_CONFIG" && \
17532 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore evas\""; } >&5 17669 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore evas\""; } >&5
17533 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore evas") 2>&5 17670 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore evas") 2>&5
17534 ac_status=$? 17671 ac_status=$?
@@ -17538,15 +17675,14 @@ if test -n "$ECORE_EVAS_LIBS"; then
17538else 17675else
17539 pkg_failed=yes 17676 pkg_failed=yes
17540fi 17677fi
17541 else 17678 fi
17542 pkg_failed=untried 17679else
17680 pkg_failed=untried
17543fi 17681fi
17544 17682
17545 17683
17546 17684
17547if test $pkg_failed = yes; then 17685if test $pkg_failed = yes; then
17548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17549$as_echo "no" >&6; }
17550 17686
17551if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 17687if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17552 _pkg_short_errors_supported=yes 17688 _pkg_short_errors_supported=yes
@@ -17554,17 +17690,17 @@ else
17554 _pkg_short_errors_supported=no 17690 _pkg_short_errors_supported=no
17555fi 17691fi
17556 if test $_pkg_short_errors_supported = yes; then 17692 if test $_pkg_short_errors_supported = yes; then
17557 ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore-evas ecore evas" 2>&1` 17693 ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore-evas ecore evas"`
17558 else 17694 else
17559 ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore-evas ecore evas" 2>&1` 17695 ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore-evas ecore evas"`
17560 fi 17696 fi
17561 # Put the nasty error message in config.log where it belongs 17697 # Put the nasty error message in config.log where it belongs
17562 echo "$ECORE_EVAS_PKG_ERRORS" >&5 17698 echo "$ECORE_EVAS_PKG_ERRORS" >&5
17563 17699
17564 build_tiler_example="no" 17700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17565elif test $pkg_failed = untried; then
17566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17567$as_echo "no" >&6; } 17701$as_echo "no" >&6; }
17702 build_tiler_example="no"
17703elif test $pkg_failed = untried; then
17568 build_tiler_example="no" 17704 build_tiler_example="no"
17569else 17705else
17570 ECORE_EVAS_CFLAGS=$pkg_cv_ECORE_EVAS_CFLAGS 17706 ECORE_EVAS_CFLAGS=$pkg_cv_ECORE_EVAS_CFLAGS
@@ -17583,360 +17719,6 @@ else
17583fi 17719fi
17584 17720
17585 17721
17586
17587### Checks for header files
17588
17589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
17590$as_echo_n "checking whether to enable assertions... " >&6; }
17591 # Check whether --enable-assert was given.
17592if test "${enable_assert+set}" = set; then :
17593 enableval=$enable_assert; ac_enable_assert=$enableval
17594 if test "x$enableval" = xno; then :
17595
17596$as_echo "#define NDEBUG 1" >>confdefs.h
17597
17598elif test "x$enableval" != xyes; then :
17599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
17600$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
17601 ac_enable_assert=yes
17602fi
17603else
17604 ac_enable_assert=yes
17605fi
17606
17607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_assert" >&5
17608$as_echo "$ac_enable_assert" >&6; }
17609
17610ac_header_dirent=no
17611for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17612 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
17614$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
17615if eval "test \"\${$as_ac_Header+set}\"" = set; then :
17616 $as_echo_n "(cached) " >&6
17617else
17618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17619/* end confdefs.h. */
17620#include <sys/types.h>
17621#include <$ac_hdr>
17622
17623int
17624main ()
17625{
17626if ((DIR *) 0)
17627return 0;
17628 ;
17629 return 0;
17630}
17631_ACEOF
17632if ac_fn_c_try_compile "$LINENO"; then :
17633 eval "$as_ac_Header=yes"
17634else
17635 eval "$as_ac_Header=no"
17636fi
17637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17638fi
17639eval ac_res=\$$as_ac_Header
17640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17641$as_echo "$ac_res" >&6; }
17642if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17643 cat >>confdefs.h <<_ACEOF
17644#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17645_ACEOF
17646
17647ac_header_dirent=$ac_hdr; break
17648fi
17649
17650done
17651# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17652if test $ac_header_dirent = dirent.h; then
17653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
17654$as_echo_n "checking for library containing opendir... " >&6; }
17655if test "${ac_cv_search_opendir+set}" = set; then :
17656 $as_echo_n "(cached) " >&6
17657else
17658 ac_func_search_save_LIBS=$LIBS
17659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17660/* end confdefs.h. */
17661
17662/* Override any GCC internal prototype to avoid an error.
17663 Use char because int might match the return type of a GCC
17664 builtin and then its argument prototype would still apply. */
17665#ifdef __cplusplus
17666extern "C"
17667#endif
17668char opendir ();
17669int
17670main ()
17671{
17672return opendir ();
17673 ;
17674 return 0;
17675}
17676_ACEOF
17677for ac_lib in '' dir; do
17678 if test -z "$ac_lib"; then
17679 ac_res="none required"
17680 else
17681 ac_res=-l$ac_lib
17682 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17683 fi
17684 if ac_fn_c_try_link "$LINENO"; then :
17685 ac_cv_search_opendir=$ac_res
17686fi
17687rm -f core conftest.err conftest.$ac_objext \
17688 conftest$ac_exeext
17689 if test "${ac_cv_search_opendir+set}" = set; then :
17690 break
17691fi
17692done
17693if test "${ac_cv_search_opendir+set}" = set; then :
17694
17695else
17696 ac_cv_search_opendir=no
17697fi
17698rm conftest.$ac_ext
17699LIBS=$ac_func_search_save_LIBS
17700fi
17701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
17702$as_echo "$ac_cv_search_opendir" >&6; }
17703ac_res=$ac_cv_search_opendir
17704if test "$ac_res" != no; then :
17705 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17706
17707fi
17708
17709else
17710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
17711$as_echo_n "checking for library containing opendir... " >&6; }
17712if test "${ac_cv_search_opendir+set}" = set; then :
17713 $as_echo_n "(cached) " >&6
17714else
17715 ac_func_search_save_LIBS=$LIBS
17716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17717/* end confdefs.h. */
17718
17719/* Override any GCC internal prototype to avoid an error.
17720 Use char because int might match the return type of a GCC
17721 builtin and then its argument prototype would still apply. */
17722#ifdef __cplusplus
17723extern "C"
17724#endif
17725char opendir ();
17726int
17727main ()
17728{
17729return opendir ();
17730 ;
17731 return 0;
17732}
17733_ACEOF
17734for ac_lib in '' x; do
17735 if test -z "$ac_lib"; then
17736 ac_res="none required"
17737 else
17738 ac_res=-l$ac_lib
17739 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17740 fi
17741 if ac_fn_c_try_link "$LINENO"; then :
17742 ac_cv_search_opendir=$ac_res
17743fi
17744rm -f core conftest.err conftest.$ac_objext \
17745 conftest$ac_exeext
17746 if test "${ac_cv_search_opendir+set}" = set; then :
17747 break
17748fi
17749done
17750if test "${ac_cv_search_opendir+set}" = set; then :
17751
17752else
17753 ac_cv_search_opendir=no
17754fi
17755rm conftest.$ac_ext
17756LIBS=$ac_func_search_save_LIBS
17757fi
17758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
17759$as_echo "$ac_cv_search_opendir" >&6; }
17760ac_res=$ac_cv_search_opendir
17761if test "$ac_res" != no; then :
17762 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17763
17764fi
17765
17766fi
17767
17768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
17769$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
17770if test "${ac_cv_header_time+set}" = set; then :
17771 $as_echo_n "(cached) " >&6
17772else
17773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17774/* end confdefs.h. */
17775#include <sys/types.h>
17776#include <sys/time.h>
17777#include <time.h>
17778
17779int
17780main ()
17781{
17782if ((struct tm *) 0)
17783return 0;
17784 ;
17785 return 0;
17786}
17787_ACEOF
17788if ac_fn_c_try_compile "$LINENO"; then :
17789 ac_cv_header_time=yes
17790else
17791 ac_cv_header_time=no
17792fi
17793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17794fi
17795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
17796$as_echo "$ac_cv_header_time" >&6; }
17797if test $ac_cv_header_time = yes; then
17798
17799$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
17800
17801fi
17802
17803
17804
17805default_max="4096"
17806ac_ext=c
17807ac_cpp='$CPP $CPPFLAGS'
17808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17810ac_compiler_gnu=$ac_cv_c_compiler_gnu
17811
17812
17813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX in limits.h" >&5
17814$as_echo_n "checking for PATH_MAX in limits.h... " >&6; }
17815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17816/* end confdefs.h. */
17817
17818#include <limits.h>
17819
17820int
17821main ()
17822{
17823
17824int i = PATH_MAX;
17825
17826 ;
17827 return 0;
17828}
17829_ACEOF
17830if ac_fn_c_try_compile "$LINENO"; then :
17831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17832$as_echo "yes" >&6; }
17833else
17834
17835
17836cat >>confdefs.h <<_ACEOF
17837#define PATH_MAX ${default_max}
17838_ACEOF
17839
17840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: using ${default_max}" >&5
17841$as_echo "no: using ${default_max}" >&6; }
17842
17843fi
17844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17845
17846ac_ext=c
17847ac_cpp='$CPP $CPPFLAGS'
17848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17850ac_compiler_gnu=$ac_cv_c_compiler_gnu
17851
17852
17853
17854for ac_header in unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h
17855do :
17856 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17857ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17858if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17859 cat >>confdefs.h <<_ACEOF
17860#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17861_ACEOF
17862
17863fi
17864
17865done
17866
17867
17868if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
17869 EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
17870
17871$as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h
17872
17873fi
17874
17875
17876if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
17877 EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
17878
17879$as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
17880
17881fi
17882
17883
17884### Checks for types
17885
17886# The cast to long int works around a bug in the HP C Compiler
17887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17889# This bug is HP SR number 8606223364.
17890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
17891$as_echo_n "checking size of wchar_t... " >&6; }
17892if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
17893 $as_echo_n "(cached) " >&6
17894else
17895 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then :
17896
17897else
17898 if test "$ac_cv_type_wchar_t" = yes; then
17899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17901as_fn_error 77 "cannot compute sizeof (wchar_t)
17902See \`config.log' for more details" "$LINENO" 5 ; }
17903 else
17904 ac_cv_sizeof_wchar_t=0
17905 fi
17906fi
17907
17908fi
17909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
17910$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
17911
17912
17913
17914cat >>confdefs.h <<_ACEOF
17915#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
17916_ACEOF
17917
17918
17919EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
17920
17921ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include <signal.h>
17922 #if HAVE_SIGINFO_H
17923 # include <siginfo.h>
17924 #endif
17925
17926"
17927if test "x$ac_cv_type_siginfo_t" = x""yes; then :
17928
17929cat >>confdefs.h <<_ACEOF
17930#define HAVE_SIGINFO_T 1
17931_ACEOF
17932
17933
17934fi
17935
17936
17937### Checks for structures
17938
17939
17940### Checks for compiler characteristics 17722### Checks for compiler characteristics
17941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 17723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
17942$as_echo_n "checking for an ANSI C-conforming const... " >&6; } 17724$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
@@ -18238,8 +18020,8 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
18238 18020
18239 ;; #( 18021 ;; #(
18240 *) 18022 *)
18241 as_fn_error $? "unknown endianness 18023 as_fn_error "unknown endianness
18242 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 18024 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
18243 esac 18025 esac
18244 18026
18245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 18027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
@@ -18787,37 +18569,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
18787 18569
18788 18570
18789 18571
18790
18791
18792
18793
18794### Checks for linker characteristics
18795EINA_LIBS=
18796lt_enable_auto_import=""
18797case "${host_os}" in
18798 mingw*)
18799 EINA_LIBS="-ldl ${EVIL_LIBS} -lm"
18800 lt_enable_auto_import="-Wl,--enable-auto-import"
18801 ;;
18802 dragonfly*|openbsd*)
18803 EINA_LIBS="-lm"
18804 ;;
18805 freebsd*|netbsd*)
18806 EINA_LIBS="-lrt -lm"
18807 ;;
18808 darwin*)
18809 EINA_LIBS="-lm"
18810 ;;
18811 cygwin*)
18812 EINA_LIBS="-ldl -lm"
18813 ;;
18814 *)
18815 EINA_LIBS="-ldl -lrt -lm"
18816 ;;
18817esac
18818
18819
18820
18821case "$host_vendor" in 18572case "$host_vendor" in
18822 ps3*) 18573 ps3*)
18823 18574
@@ -18825,10 +18576,11 @@ pkg_failed=no
18825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ESCAPE" >&5 18576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ESCAPE" >&5
18826$as_echo_n "checking for ESCAPE... " >&6; } 18577$as_echo_n "checking for ESCAPE... " >&6; }
18827 18578
18828if test -n "$ESCAPE_CFLAGS"; then 18579if test -n "$PKG_CONFIG"; then
18829 pkg_cv_ESCAPE_CFLAGS="$ESCAPE_CFLAGS" 18580 if test -n "$ESCAPE_CFLAGS"; then
18830 elif test -n "$PKG_CONFIG"; then 18581 pkg_cv_ESCAPE_CFLAGS="$ESCAPE_CFLAGS"
18831 if test -n "$PKG_CONFIG" && \ 18582 else
18583 if test -n "$PKG_CONFIG" && \
18832 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"escape\""; } >&5 18584 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"escape\""; } >&5
18833 ($PKG_CONFIG --exists --print-errors "escape") 2>&5 18585 ($PKG_CONFIG --exists --print-errors "escape") 2>&5
18834 ac_status=$? 18586 ac_status=$?
@@ -18838,13 +18590,15 @@ if test -n "$ESCAPE_CFLAGS"; then
18838else 18590else
18839 pkg_failed=yes 18591 pkg_failed=yes
18840fi 18592fi
18841 else 18593 fi
18842 pkg_failed=untried 18594else
18595 pkg_failed=untried
18843fi 18596fi
18844if test -n "$ESCAPE_LIBS"; then 18597if test -n "$PKG_CONFIG"; then
18845 pkg_cv_ESCAPE_LIBS="$ESCAPE_LIBS" 18598 if test -n "$ESCAPE_LIBS"; then
18846 elif test -n "$PKG_CONFIG"; then 18599 pkg_cv_ESCAPE_LIBS="$ESCAPE_LIBS"
18847 if test -n "$PKG_CONFIG" && \ 18600 else
18601 if test -n "$PKG_CONFIG" && \
18848 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"escape\""; } >&5 18602 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"escape\""; } >&5
18849 ($PKG_CONFIG --exists --print-errors "escape") 2>&5 18603 ($PKG_CONFIG --exists --print-errors "escape") 2>&5
18850 ac_status=$? 18604 ac_status=$?
@@ -18854,15 +18608,14 @@ if test -n "$ESCAPE_LIBS"; then
18854else 18608else
18855 pkg_failed=yes 18609 pkg_failed=yes
18856fi 18610fi
18857 else 18611 fi
18858 pkg_failed=untried 18612else
18613 pkg_failed=untried
18859fi 18614fi
18860 18615
18861 18616
18862 18617
18863if test $pkg_failed = yes; then 18618if test $pkg_failed = yes; then
18864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18865$as_echo "no" >&6; }
18866 18619
18867if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 18620if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18868 _pkg_short_errors_supported=yes 18621 _pkg_short_errors_supported=yes
@@ -18870,14 +18623,14 @@ else
18870 _pkg_short_errors_supported=no 18623 _pkg_short_errors_supported=no
18871fi 18624fi
18872 if test $_pkg_short_errors_supported = yes; then 18625 if test $_pkg_short_errors_supported = yes; then
18873 ESCAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "escape" 2>&1` 18626 ESCAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "escape"`
18874 else 18627 else
18875 ESCAPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "escape" 2>&1` 18628 ESCAPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "escape"`
18876 fi 18629 fi
18877 # Put the nasty error message in config.log where it belongs 18630 # Put the nasty error message in config.log where it belongs
18878 echo "$ESCAPE_PKG_ERRORS" >&5 18631 echo "$ESCAPE_PKG_ERRORS" >&5
18879 18632
18880 as_fn_error $? "Package requirements (escape) were not met: 18633 as_fn_error "Package requirements (escape) were not met:
18881 18634
18882$ESCAPE_PKG_ERRORS 18635$ESCAPE_PKG_ERRORS
18883 18636
@@ -18886,13 +18639,12 @@ installed software in a non-standard prefix.
18886 18639
18887Alternatively, you may set the environment variables ESCAPE_CFLAGS 18640Alternatively, you may set the environment variables ESCAPE_CFLAGS
18888and ESCAPE_LIBS to avoid the need to call pkg-config. 18641and ESCAPE_LIBS to avoid the need to call pkg-config.
18889See the pkg-config man page for more details." "$LINENO" 5 18642See the pkg-config man page for more details.
18643" "$LINENO" 5
18890elif test $pkg_failed = untried; then 18644elif test $pkg_failed = untried; then
18891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18892$as_echo "no" >&6; }
18893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 18645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 18646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18895as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 18647as_fn_error "The pkg-config script could not be found or is too old. Make sure it
18896is in your PATH or set the PKG_CONFIG environment variable to the full 18648is in your PATH or set the PKG_CONFIG environment variable to the full
18897path to pkg-config. 18649path to pkg-config.
18898 18650
@@ -18901,25 +18653,61 @@ and ESCAPE_LIBS to avoid the need to call pkg-config.
18901See the pkg-config man page for more details. 18653See the pkg-config man page for more details.
18902 18654
18903To get pkg-config, see <http://pkg-config.freedesktop.org/>. 18655To get pkg-config, see <http://pkg-config.freedesktop.org/>.
18904See \`config.log' for more details" "$LINENO" 5 ; } 18656See \`config.log' for more details." "$LINENO" 5; }
18905else 18657else
18906 ESCAPE_CFLAGS=$pkg_cv_ESCAPE_CFLAGS 18658 ESCAPE_CFLAGS=$pkg_cv_ESCAPE_CFLAGS
18907 ESCAPE_LIBS=$pkg_cv_ESCAPE_LIBS 18659 ESCAPE_LIBS=$pkg_cv_ESCAPE_LIBS
18908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 18660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18909$as_echo "yes" >&6; } 18661$as_echo "yes" >&6; }
18910 18662 :
18911fi 18663fi
18912 18664
18913$as_echo "#define HAVE_ESCAPE 1" >>confdefs.h 18665$as_echo "#define HAVE_ESCAPE 1" >>confdefs.h
18914 18666
18915 requirement_eina="escape" 18667 requirement_eina="escape"
18916 EINA_LIBS="${ESCAPE_LIBS}"
18917 EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" 18668 EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}"
18918 ;; 18669 ;;
18919esac 18670esac
18920 18671
18921 18672
18922 18673
18674
18675
18676### Checks for linker characteristics
18677EINA_LIBS=
18678lt_enable_auto_import=""
18679case "${host_os}" in
18680 mingw*)
18681 EINA_LIBS="-ldl ${EVIL_LIBS} -lm"
18682 lt_enable_auto_import="-Wl,--enable-auto-import"
18683 ;;
18684 dragonfly*|openbsd*)
18685 EINA_LIBS="-lm"
18686 ;;
18687 freebsd*|netbsd*)
18688 EINA_LIBS="-lrt -lm"
18689 ;;
18690 darwin*)
18691 EINA_LIBS="-lm"
18692 ;;
18693 cygwin*)
18694 EINA_LIBS="-ldl -lm"
18695 ;;
18696 *)
18697 EINA_LIBS="-ldl -lrt -lm"
18698 ;;
18699esac
18700case "$host_vendor" in
18701 ps3*)
18702 # Escape had already been checked to exist
18703 EINA_LIBS="${ESCAPE_LIBS}"
18704 ;;
18705esac
18706
18707
18708
18709
18710
18923LDFLAGS_save="${LDFLAGS}" 18711LDFLAGS_save="${LDFLAGS}"
18924LDFLAGS="${LDFLAGS} -fno-strict-aliasing" 18712LDFLAGS="${LDFLAGS} -fno-strict-aliasing"
18925 18713
@@ -18965,6 +18753,228 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
18965 18753
18966 18754
18967 18755
18756CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
18757LDFLAGS="${LDFLAGS} ${EINA_LDFLAGS}"
18758LIBS="${LIBS} ${EINA_LIBS}"
18759
18760### Checks for header files
18761
18762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
18763$as_echo_n "checking whether to enable assertions... " >&6; }
18764 # Check whether --enable-assert was given.
18765if test "${enable_assert+set}" = set; then :
18766 enableval=$enable_assert; ac_enable_assert=$enableval
18767 if test "x$enableval" = xno; then :
18768
18769$as_echo "#define NDEBUG 1" >>confdefs.h
18770
18771elif test "x$enableval" != xyes; then :
18772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
18773$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
18774 ac_enable_assert=yes
18775fi
18776else
18777 ac_enable_assert=yes
18778fi
18779
18780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_assert" >&5
18781$as_echo "$ac_enable_assert" >&6; }
18782
18783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
18784$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
18785if test "${ac_cv_header_time+set}" = set; then :
18786 $as_echo_n "(cached) " >&6
18787else
18788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18789/* end confdefs.h. */
18790#include <sys/types.h>
18791#include <sys/time.h>
18792#include <time.h>
18793
18794int
18795main ()
18796{
18797if ((struct tm *) 0)
18798return 0;
18799 ;
18800 return 0;
18801}
18802_ACEOF
18803if ac_fn_c_try_compile "$LINENO"; then :
18804 ac_cv_header_time=yes
18805else
18806 ac_cv_header_time=no
18807fi
18808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18809fi
18810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
18811$as_echo "$ac_cv_header_time" >&6; }
18812if test $ac_cv_header_time = yes; then
18813
18814$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
18815
18816fi
18817
18818
18819
18820default_max="4096"
18821ac_ext=c
18822ac_cpp='$CPP $CPPFLAGS'
18823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18825ac_compiler_gnu=$ac_cv_c_compiler_gnu
18826
18827
18828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX in limits.h" >&5
18829$as_echo_n "checking for PATH_MAX in limits.h... " >&6; }
18830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18831/* end confdefs.h. */
18832
18833#include <limits.h>
18834
18835int
18836main ()
18837{
18838
18839int i = PATH_MAX;
18840
18841 ;
18842 return 0;
18843}
18844_ACEOF
18845if ac_fn_c_try_compile "$LINENO"; then :
18846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18847$as_echo "yes" >&6; }
18848else
18849
18850
18851cat >>confdefs.h <<_ACEOF
18852#define PATH_MAX ${default_max}
18853_ACEOF
18854
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: using ${default_max}" >&5
18856$as_echo "no: using ${default_max}" >&6; }
18857
18858fi
18859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18860
18861ac_ext=c
18862ac_cpp='$CPP $CPPFLAGS'
18863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18865ac_compiler_gnu=$ac_cv_c_compiler_gnu
18866
18867
18868
18869for ac_header in unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h sys/mman.h
18870do :
18871 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18872ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18873eval as_val=\$$as_ac_Header
18874 if test "x$as_val" = x""yes; then :
18875 cat >>confdefs.h <<_ACEOF
18876#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18877_ACEOF
18878
18879fi
18880
18881done
18882
18883
18884if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
18885 EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
18886
18887$as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h
18888
18889fi
18890
18891
18892if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
18893 EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
18894
18895$as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
18896
18897fi
18898
18899
18900### Checks for types
18901
18902# The cast to long int works around a bug in the HP C Compiler
18903# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18904# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18905# This bug is HP SR number 8606223364.
18906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
18907$as_echo_n "checking size of wchar_t... " >&6; }
18908if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
18909 $as_echo_n "(cached) " >&6
18910else
18911 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then :
18912
18913else
18914 if test "$ac_cv_type_wchar_t" = yes; then
18915 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18917{ as_fn_set_status 77
18918as_fn_error "cannot compute sizeof (wchar_t)
18919See \`config.log' for more details." "$LINENO" 5; }; }
18920 else
18921 ac_cv_sizeof_wchar_t=0
18922 fi
18923fi
18924
18925fi
18926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
18927$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
18928
18929
18930
18931cat >>confdefs.h <<_ACEOF
18932#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
18933_ACEOF
18934
18935
18936EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
18937
18938ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include <signal.h>
18939 #if HAVE_SIGINFO_H
18940 # include <siginfo.h>
18941 #endif
18942
18943"
18944if test "x$ac_cv_type_siginfo_t" = x""yes; then :
18945
18946cat >>confdefs.h <<_ACEOF
18947#define HAVE_SIGINFO_T 1
18948_ACEOF
18949
18950
18951fi
18952
18953
18954### Check if dirent.h is usable
18955
18956ac_fn_c_check_type "$LINENO" "struct dirent" "ac_cv_type_struct_dirent" "#include <dirent.h>
18957
18958"
18959if test "x$ac_cv_type_struct_dirent" = x""yes; then :
18960
18961cat >>confdefs.h <<_ACEOF
18962#define HAVE_STRUCT_DIRENT 1
18963_ACEOF
18964
18965have_dirent="yes"
18966else
18967 have_dirent="no"
18968fi
18969
18970
18971if test "x${have_dirent}" = "xyes" ; then
18972 EINA_CONFIGURE_HAVE_DIRENT_H="#define EINA_HAVE_DIRENT_H"
18973
18974$as_echo "#define HAVE_DIRENT_H 1" >>confdefs.h
18975
18976fi
18977
18968 18978
18969### Checks for library functions 18979### Checks for library functions
18970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 18980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
@@ -19150,7 +19160,8 @@ if test $ac_cv_os_cray = yes; then
19150 for ac_func in _getb67 GETB67 getb67; do 19160 for ac_func in _getb67 GETB67 getb67; do
19151 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 19161 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19152ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 19162ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19153if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 19163eval as_val=\$$as_ac_var
19164 if test "x$as_val" = x""yes; then :
19154 19165
19155cat >>confdefs.h <<_ACEOF 19166cat >>confdefs.h <<_ACEOF
19156#define CRAY_STACKSEG_END $ac_func 19167#define CRAY_STACKSEG_END $ac_func
@@ -19212,11 +19223,12 @@ _ACEOF
19212 19223
19213fi 19224fi
19214 19225
19215for ac_func in strlcpy dirfd openat fstatat fpathconf execvp 19226for ac_func in strlcpy openat fstatat fpathconf execvp
19216do : 19227do :
19217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 19228 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19218ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 19229ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19219if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 19230eval as_val=\$$as_ac_var
19231 if test "x$as_val" = x""yes; then :
19220 cat >>confdefs.h <<_ACEOF 19232 cat >>confdefs.h <<_ACEOF
19221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 19233#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19222_ACEOF 19234_ACEOF
@@ -19225,6 +19237,87 @@ fi
19225done 19237done
19226 19238
19227 19239
19240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
19241$as_echo_n "checking for dirfd... " >&6; }
19242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19243/* end confdefs.h. */
19244
19245
19246#include <dirent.h>
19247
19248int
19249main ()
19250{
19251
19252int main(void)
19253{
19254 DIR *dirp;
19255 return dirfd(dirp);
19256}
19257
19258 ;
19259 return 0;
19260}
19261
19262_ACEOF
19263if ac_fn_c_try_link "$LINENO"; then :
19264 have_dirfd="yes"
19265else
19266 have_dirfd="no"
19267fi
19268rm -f core conftest.err conftest.$ac_objext \
19269 conftest$ac_exeext conftest.$ac_ext
19270
19271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_dirfd}" >&5
19272$as_echo "${have_dirfd}" >&6; }
19273
19274if test "x${have_dirfd}" = "xyes" ; then
19275
19276$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
19277
19278fi
19279
19280# check debug information for malloc
19281for ac_func in malloc_usable_size
19282do :
19283 ac_fn_c_check_func "$LINENO" "malloc_usable_size" "ac_cv_func_malloc_usable_size"
19284if test "x$ac_cv_func_malloc_usable_size" = x""yes; then :
19285 cat >>confdefs.h <<_ACEOF
19286#define HAVE_MALLOC_USABLE_SIZE 1
19287_ACEOF
19288 malloc_true_size="yes"
19289else
19290 malloc_true_size="no"
19291fi
19292done
19293
19294if test "x${malloc_true_size}" = "xyes" ; then
19295
19296$as_echo "#define HAVE_MALLOC_USABLE_SIZE 1" >>confdefs.h
19297
19298fi
19299
19300want_debug_malloc="no"
19301# Check whether --enable-debug-malloc was given.
19302if test "${enable_debug_malloc+set}" = set; then :
19303 enableval=$enable_debug_malloc;
19304 if test "x${enableval}" = "xyes" ; then
19305 want_debug_malloc="yes"
19306 else
19307 want_debug_malloc="no"
19308 fi
19309
19310else
19311 want_debug_malloc="no"
19312fi
19313
19314
19315if test "x${malloc_true_size}" = "xyes" -a "x${want_debug_malloc}" = "xyes"; then
19316
19317$as_echo "#define EINA_DEBUG_MALLOC 1" >>confdefs.h
19318
19319fi
19320
19228# dlopen and dladdr 19321# dlopen and dladdr
19229dlopen_libs="" 19322dlopen_libs=""
19230case "$host_os" in 19323case "$host_os" in
@@ -19358,6 +19451,7 @@ fi
19358esac 19451esac
19359 19452
19360 19453
19454have_log="yes"
19361 19455
19362 19456
19363ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default" 19457ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
@@ -19439,12 +19533,45 @@ fi
19439 19533
19440 19534
19441if test "x$_efl_have_fnmatch" = "xyes"; then : 19535if test "x$_efl_have_fnmatch" = "xyes"; then :
19536 have_log="yes"
19537else
19538 have_log="no"
19539fi
19540
19541
19542
19543want_log="yes"
19544# Check whether --enable-log was given.
19545if test "${enable_log+set}" = set; then :
19546 enableval=$enable_log;
19547 if test "x${enableval}" = "xyes" ; then
19548 want_log="yes"
19549 else
19550 want_log="no"
19551 fi
19442 19552
19443else 19553else
19444 as_fn_error $? "Cannot find fnmatch()" "$LINENO" 5 19554 want_log="yes"
19445fi 19555fi
19446 19556
19447 19557
19558enable_log="no"
19559if test "x${have_log}" = xyes -a "x${want_log}" = xyes; then
19560 enable_log="yes"
19561fi
19562
19563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking wether to build Eina_Log infrastructure" >&5
19564$as_echo_n "checking wether to build Eina_Log infrastructure... " >&6; }
19565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_log}" >&5
19566$as_echo "${enable_log}" >&6; }
19567
19568if test "x${enable_log}" = "xyes"; then
19569 EINA_CONFIGURE_ENABLE_LOG="#define EINA_ENABLE_LOG"
19570
19571$as_echo "#define HAVE_LOG 1" >>confdefs.h
19572
19573fi
19574
19448 19575
19449for ac_header in mcheck.h 19576for ac_header in mcheck.h
19450do : 19577do :
@@ -20239,10 +20366,11 @@ pkg_failed=no
20239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5 20366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5
20240$as_echo_n "checking for CHECK... " >&6; } 20367$as_echo_n "checking for CHECK... " >&6; }
20241 20368
20242if test -n "$CHECK_CFLAGS"; then 20369if test -n "$PKG_CONFIG"; then
20243 pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS" 20370 if test -n "$CHECK_CFLAGS"; then
20244 elif test -n "$PKG_CONFIG"; then 20371 pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS"
20245 if test -n "$PKG_CONFIG" && \ 20372 else
20373 if test -n "$PKG_CONFIG" && \
20246 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5 20374 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5
20247 ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5 20375 ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5
20248 ac_status=$? 20376 ac_status=$?
@@ -20252,13 +20380,15 @@ if test -n "$CHECK_CFLAGS"; then
20252else 20380else
20253 pkg_failed=yes 20381 pkg_failed=yes
20254fi 20382fi
20255 else 20383 fi
20256 pkg_failed=untried 20384else
20385 pkg_failed=untried
20257fi 20386fi
20258if test -n "$CHECK_LIBS"; then 20387if test -n "$PKG_CONFIG"; then
20259 pkg_cv_CHECK_LIBS="$CHECK_LIBS" 20388 if test -n "$CHECK_LIBS"; then
20260 elif test -n "$PKG_CONFIG"; then 20389 pkg_cv_CHECK_LIBS="$CHECK_LIBS"
20261 if test -n "$PKG_CONFIG" && \ 20390 else
20391 if test -n "$PKG_CONFIG" && \
20262 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5 20392 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5
20263 ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5 20393 ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5
20264 ac_status=$? 20394 ac_status=$?
@@ -20268,15 +20398,14 @@ if test -n "$CHECK_LIBS"; then
20268else 20398else
20269 pkg_failed=yes 20399 pkg_failed=yes
20270fi 20400fi
20271 else 20401 fi
20272 pkg_failed=untried 20402else
20403 pkg_failed=untried
20273fi 20404fi
20274 20405
20275 20406
20276 20407
20277if test $pkg_failed = yes; then 20408if test $pkg_failed = yes; then
20278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20279$as_echo "no" >&6; }
20280 20409
20281if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 20410if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20282 _pkg_short_errors_supported=yes 20411 _pkg_short_errors_supported=yes
@@ -20284,17 +20413,17 @@ else
20284 _pkg_short_errors_supported=no 20413 _pkg_short_errors_supported=no
20285fi 20414fi
20286 if test $_pkg_short_errors_supported = yes; then 20415 if test $_pkg_short_errors_supported = yes; then
20287 CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "check >= 0.9.5" 2>&1` 20416 CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check >= 0.9.5"`
20288 else 20417 else
20289 CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1` 20418 CHECK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "check >= 0.9.5"`
20290 fi 20419 fi
20291 # Put the nasty error message in config.log where it belongs 20420 # Put the nasty error message in config.log where it belongs
20292 echo "$CHECK_PKG_ERRORS" >&5 20421 echo "$CHECK_PKG_ERRORS" >&5
20293 20422
20294 _efl_enable_tests="no" 20423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20295elif test $pkg_failed = untried; then
20296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20297$as_echo "no" >&6; } 20424$as_echo "no" >&6; }
20425 _efl_enable_tests="no"
20426elif test $pkg_failed = untried; then
20298 _efl_enable_tests="no" 20427 _efl_enable_tests="no"
20299else 20428else
20300 CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS 20429 CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS
@@ -20489,10 +20618,11 @@ pkg_failed=no
20489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 20618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
20490$as_echo_n "checking for GLIB... " >&6; } 20619$as_echo_n "checking for GLIB... " >&6; }
20491 20620
20492if test -n "$GLIB_CFLAGS"; then 20621if test -n "$PKG_CONFIG"; then
20493 pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" 20622 if test -n "$GLIB_CFLAGS"; then
20494 elif test -n "$PKG_CONFIG"; then 20623 pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
20495 if test -n "$PKG_CONFIG" && \ 20624 else
20625 if test -n "$PKG_CONFIG" && \
20496 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 20626 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5
20497 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 20627 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
20498 ac_status=$? 20628 ac_status=$?
@@ -20502,13 +20632,15 @@ if test -n "$GLIB_CFLAGS"; then
20502else 20632else
20503 pkg_failed=yes 20633 pkg_failed=yes
20504fi 20634fi
20505 else 20635 fi
20506 pkg_failed=untried 20636else
20637 pkg_failed=untried
20507fi 20638fi
20508if test -n "$GLIB_LIBS"; then 20639if test -n "$PKG_CONFIG"; then
20509 pkg_cv_GLIB_LIBS="$GLIB_LIBS" 20640 if test -n "$GLIB_LIBS"; then
20510 elif test -n "$PKG_CONFIG"; then 20641 pkg_cv_GLIB_LIBS="$GLIB_LIBS"
20511 if test -n "$PKG_CONFIG" && \ 20642 else
20643 if test -n "$PKG_CONFIG" && \
20512 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 20644 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5
20513 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 20645 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
20514 ac_status=$? 20646 ac_status=$?
@@ -20518,15 +20650,14 @@ if test -n "$GLIB_LIBS"; then
20518else 20650else
20519 pkg_failed=yes 20651 pkg_failed=yes
20520fi 20652fi
20521 else 20653 fi
20522 pkg_failed=untried 20654else
20655 pkg_failed=untried
20523fi 20656fi
20524 20657
20525 20658
20526 20659
20527if test $pkg_failed = yes; then 20660if test $pkg_failed = yes; then
20528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20529$as_echo "no" >&6; }
20530 20661
20531if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 20662if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20532 _pkg_short_errors_supported=yes 20663 _pkg_short_errors_supported=yes
@@ -20534,17 +20665,17 @@ else
20534 _pkg_short_errors_supported=no 20665 _pkg_short_errors_supported=no
20535fi 20666fi
20536 if test $_pkg_short_errors_supported = yes; then 20667 if test $_pkg_short_errors_supported = yes; then
20537 GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0" 2>&1` 20668 GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0"`
20538 else 20669 else
20539 GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0" 2>&1` 20670 GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"`
20540 fi 20671 fi
20541 # Put the nasty error message in config.log where it belongs 20672 # Put the nasty error message in config.log where it belongs
20542 echo "$GLIB_PKG_ERRORS" >&5 20673 echo "$GLIB_PKG_ERRORS" >&5
20543 20674
20544 have_module="no" 20675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20545elif test $pkg_failed = untried; then
20546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20547$as_echo "no" >&6; } 20676$as_echo "no" >&6; }
20677 have_module="no"
20678elif test $pkg_failed = untried; then
20548 have_module="no" 20679 have_module="no"
20549else 20680else
20550 GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS 20681 GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
@@ -20753,7 +20884,6 @@ DEFS=-DHAVE_CONFIG_H
20753 20884
20754ac_libobjs= 20885ac_libobjs=
20755ac_ltlibobjs= 20886ac_ltlibobjs=
20756U=
20757for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 20887for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20758 # 1. Remove the extension, and $U if already installed. 20888 # 1. Remove the extension, and $U if already installed.
20759 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 20889 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -20777,148 +20907,148 @@ else
20777fi 20907fi
20778 20908
20779if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 20909if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
20780 as_fn_error $? "conditional \"AMDEP\" was never defined. 20910 as_fn_error "conditional \"AMDEP\" was never defined.
20781Usually this means the macro was only invoked conditionally." "$LINENO" 5 20911Usually this means the macro was only invoked conditionally." "$LINENO" 5
20782fi 20912fi
20783if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then 20913if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
20784 as_fn_error $? "conditional \"am__fastdepCC\" was never defined. 20914 as_fn_error "conditional \"am__fastdepCC\" was never defined.
20785Usually this means the macro was only invoked conditionally." "$LINENO" 5 20915Usually this means the macro was only invoked conditionally." "$LINENO" 5
20786fi 20916fi
20787if test -z "${EINA_HAVE_THREADS_TRUE}" && test -z "${EINA_HAVE_THREADS_FALSE}"; then 20917if test -z "${EINA_HAVE_THREADS_TRUE}" && test -z "${EINA_HAVE_THREADS_FALSE}"; then
20788 as_fn_error $? "conditional \"EINA_HAVE_THREADS\" was never defined. 20918 as_fn_error "conditional \"EINA_HAVE_THREADS\" was never defined.
20789Usually this means the macro was only invoked conditionally." "$LINENO" 5 20919Usually this means the macro was only invoked conditionally." "$LINENO" 5
20790fi 20920fi
20791if test -z "${EINA_DEBUG_THREADS_TRUE}" && test -z "${EINA_DEBUG_THREADS_FALSE}"; then 20921if test -z "${EINA_DEBUG_THREADS_TRUE}" && test -z "${EINA_DEBUG_THREADS_FALSE}"; then
20792 as_fn_error $? "conditional \"EINA_DEBUG_THREADS\" was never defined. 20922 as_fn_error "conditional \"EINA_DEBUG_THREADS\" was never defined.
20793Usually this means the macro was only invoked conditionally." "$LINENO" 5 20923Usually this means the macro was only invoked conditionally." "$LINENO" 5
20794fi 20924fi
20795if test -z "${EINA_ON_OFF_THREADS_TRUE}" && test -z "${EINA_ON_OFF_THREADS_FALSE}"; then 20925if test -z "${EINA_ON_OFF_THREADS_TRUE}" && test -z "${EINA_ON_OFF_THREADS_FALSE}"; then
20796 as_fn_error $? "conditional \"EINA_ON_OFF_THREADS\" was never defined. 20926 as_fn_error "conditional \"EINA_ON_OFF_THREADS\" was never defined.
20797Usually this means the macro was only invoked conditionally." "$LINENO" 5 20927Usually this means the macro was only invoked conditionally." "$LINENO" 5
20798fi 20928fi
20799if test -z "${SAFETY_CHECKS_TRUE}" && test -z "${SAFETY_CHECKS_FALSE}"; then 20929if test -z "${SAFETY_CHECKS_TRUE}" && test -z "${SAFETY_CHECKS_FALSE}"; then
20800 as_fn_error $? "conditional \"SAFETY_CHECKS\" was never defined. 20930 as_fn_error "conditional \"SAFETY_CHECKS\" was never defined.
20801Usually this means the macro was only invoked conditionally." "$LINENO" 5 20931Usually this means the macro was only invoked conditionally." "$LINENO" 5
20802fi 20932fi
20803if test -z "${EINA_AMALGAMATION_TRUE}" && test -z "${EINA_AMALGAMATION_FALSE}"; then 20933if test -z "${EINA_AMALGAMATION_TRUE}" && test -z "${EINA_AMALGAMATION_FALSE}"; then
20804 as_fn_error $? "conditional \"EINA_AMALGAMATION\" was never defined. 20934 as_fn_error "conditional \"EINA_AMALGAMATION\" was never defined.
20805Usually this means the macro was only invoked conditionally." "$LINENO" 5 20935Usually this means the macro was only invoked conditionally." "$LINENO" 5
20806fi 20936fi
20807if test -z "${EINA_ENABLE_BENCHMARK_E17_TRUE}" && test -z "${EINA_ENABLE_BENCHMARK_E17_FALSE}"; then 20937if test -z "${EINA_ENABLE_BENCHMARK_E17_TRUE}" && test -z "${EINA_ENABLE_BENCHMARK_E17_FALSE}"; then
20808 as_fn_error $? "conditional \"EINA_ENABLE_BENCHMARK_E17\" was never defined. 20938 as_fn_error "conditional \"EINA_ENABLE_BENCHMARK_E17\" was never defined.
20809Usually this means the macro was only invoked conditionally." "$LINENO" 5 20939Usually this means the macro was only invoked conditionally." "$LINENO" 5
20810fi 20940fi
20811if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then 20941if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
20812 as_fn_error $? "conditional \"am__fastdepCC\" was never defined. 20942 as_fn_error "conditional \"am__fastdepCC\" was never defined.
20813Usually this means the macro was only invoked conditionally." "$LINENO" 5 20943Usually this means the macro was only invoked conditionally." "$LINENO" 5
20814fi 20944fi
20815if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then 20945if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
20816 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. 20946 as_fn_error "conditional \"am__fastdepCXX\" was never defined.
20817Usually this means the macro was only invoked conditionally." "$LINENO" 5 20947Usually this means the macro was only invoked conditionally." "$LINENO" 5
20818fi 20948fi
20819if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then 20949if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
20820 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. 20950 as_fn_error "conditional \"am__fastdepCXX\" was never defined.
20821Usually this means the macro was only invoked conditionally." "$LINENO" 5 20951Usually this means the macro was only invoked conditionally." "$LINENO" 5
20822fi 20952fi
20823if test -z "${EFL_BUILD_DOC_TRUE}" && test -z "${EFL_BUILD_DOC_FALSE}"; then 20953if test -z "${EFL_BUILD_DOC_TRUE}" && test -z "${EFL_BUILD_DOC_FALSE}"; then
20824 as_fn_error $? "conditional \"EFL_BUILD_DOC\" was never defined. 20954 as_fn_error "conditional \"EFL_BUILD_DOC\" was never defined.
20825Usually this means the macro was only invoked conditionally." "$LINENO" 5 20955Usually this means the macro was only invoked conditionally." "$LINENO" 5
20826fi 20956fi
20827if test -z "${BUILD_TILER_EXAMPLE_TRUE}" && test -z "${BUILD_TILER_EXAMPLE_FALSE}"; then 20957if test -z "${BUILD_TILER_EXAMPLE_TRUE}" && test -z "${BUILD_TILER_EXAMPLE_FALSE}"; then
20828 as_fn_error $? "conditional \"BUILD_TILER_EXAMPLE\" was never defined. 20958 as_fn_error "conditional \"BUILD_TILER_EXAMPLE\" was never defined.
20829Usually this means the macro was only invoked conditionally." "$LINENO" 5 20959Usually this means the macro was only invoked conditionally." "$LINENO" 5
20830fi 20960fi
20831 20961
20832if test -z "${EINA_HAVE_WINCE_TRUE}" && test -z "${EINA_HAVE_WINCE_FALSE}"; then 20962if test -z "${EINA_HAVE_WINCE_TRUE}" && test -z "${EINA_HAVE_WINCE_FALSE}"; then
20833 as_fn_error $? "conditional \"EINA_HAVE_WINCE\" was never defined. 20963 as_fn_error "conditional \"EINA_HAVE_WINCE\" was never defined.
20834Usually this means the macro was only invoked conditionally." "$LINENO" 5 20964Usually this means the macro was only invoked conditionally." "$LINENO" 5
20835fi 20965fi
20836if test -z "${EINA_HAVE_WIN32_TRUE}" && test -z "${EINA_HAVE_WIN32_FALSE}"; then 20966if test -z "${EINA_HAVE_WIN32_TRUE}" && test -z "${EINA_HAVE_WIN32_FALSE}"; then
20837 as_fn_error $? "conditional \"EINA_HAVE_WIN32\" was never defined. 20967 as_fn_error "conditional \"EINA_HAVE_WIN32\" was never defined.
20838Usually this means the macro was only invoked conditionally." "$LINENO" 5 20968Usually this means the macro was only invoked conditionally." "$LINENO" 5
20839fi 20969fi
20840if test -z "${EINA_BUILD_CHAINED_POOL_TRUE}" && test -z "${EINA_BUILD_CHAINED_POOL_FALSE}"; then 20970if test -z "${EINA_BUILD_CHAINED_POOL_TRUE}" && test -z "${EINA_BUILD_CHAINED_POOL_FALSE}"; then
20841 as_fn_error $? "conditional \"EINA_BUILD_CHAINED_POOL\" was never defined. 20971 as_fn_error "conditional \"EINA_BUILD_CHAINED_POOL\" was never defined.
20842Usually this means the macro was only invoked conditionally." "$LINENO" 5 20972Usually this means the macro was only invoked conditionally." "$LINENO" 5
20843fi 20973fi
20844if test -z "${EINA_STATIC_BUILD_CHAINED_POOL_TRUE}" && test -z "${EINA_STATIC_BUILD_CHAINED_POOL_FALSE}"; then 20974if test -z "${EINA_STATIC_BUILD_CHAINED_POOL_TRUE}" && test -z "${EINA_STATIC_BUILD_CHAINED_POOL_FALSE}"; then
20845 as_fn_error $? "conditional \"EINA_STATIC_BUILD_CHAINED_POOL\" was never defined. 20975 as_fn_error "conditional \"EINA_STATIC_BUILD_CHAINED_POOL\" was never defined.
20846Usually this means the macro was only invoked conditionally." "$LINENO" 5 20976Usually this means the macro was only invoked conditionally." "$LINENO" 5
20847fi 20977fi
20848if test -z "${EINA_BUILD_EMEMOA_FIXED_TRUE}" && test -z "${EINA_BUILD_EMEMOA_FIXED_FALSE}"; then 20978if test -z "${EINA_BUILD_EMEMOA_FIXED_TRUE}" && test -z "${EINA_BUILD_EMEMOA_FIXED_FALSE}"; then
20849 as_fn_error $? "conditional \"EINA_BUILD_EMEMOA_FIXED\" was never defined. 20979 as_fn_error "conditional \"EINA_BUILD_EMEMOA_FIXED\" was never defined.
20850Usually this means the macro was only invoked conditionally." "$LINENO" 5 20980Usually this means the macro was only invoked conditionally." "$LINENO" 5
20851fi 20981fi
20852if test -z "${EINA_STATIC_BUILD_EMEMOA_FIXED_TRUE}" && test -z "${EINA_STATIC_BUILD_EMEMOA_FIXED_FALSE}"; then 20982if test -z "${EINA_STATIC_BUILD_EMEMOA_FIXED_TRUE}" && test -z "${EINA_STATIC_BUILD_EMEMOA_FIXED_FALSE}"; then
20853 as_fn_error $? "conditional \"EINA_STATIC_BUILD_EMEMOA_FIXED\" was never defined. 20983 as_fn_error "conditional \"EINA_STATIC_BUILD_EMEMOA_FIXED\" was never defined.
20854Usually this means the macro was only invoked conditionally." "$LINENO" 5 20984Usually this means the macro was only invoked conditionally." "$LINENO" 5
20855fi 20985fi
20856if test -z "${EINA_BUILD_EMEMOA_UNKNOWN_TRUE}" && test -z "${EINA_BUILD_EMEMOA_UNKNOWN_FALSE}"; then 20986if test -z "${EINA_BUILD_EMEMOA_UNKNOWN_TRUE}" && test -z "${EINA_BUILD_EMEMOA_UNKNOWN_FALSE}"; then
20857 as_fn_error $? "conditional \"EINA_BUILD_EMEMOA_UNKNOWN\" was never defined. 20987 as_fn_error "conditional \"EINA_BUILD_EMEMOA_UNKNOWN\" was never defined.
20858Usually this means the macro was only invoked conditionally." "$LINENO" 5 20988Usually this means the macro was only invoked conditionally." "$LINENO" 5
20859fi 20989fi
20860if test -z "${EINA_STATIC_BUILD_EMEMOA_UNKNOWN_TRUE}" && test -z "${EINA_STATIC_BUILD_EMEMOA_UNKNOWN_FALSE}"; then 20990if test -z "${EINA_STATIC_BUILD_EMEMOA_UNKNOWN_TRUE}" && test -z "${EINA_STATIC_BUILD_EMEMOA_UNKNOWN_FALSE}"; then
20861 as_fn_error $? "conditional \"EINA_STATIC_BUILD_EMEMOA_UNKNOWN\" was never defined. 20991 as_fn_error "conditional \"EINA_STATIC_BUILD_EMEMOA_UNKNOWN\" was never defined.
20862Usually this means the macro was only invoked conditionally." "$LINENO" 5 20992Usually this means the macro was only invoked conditionally." "$LINENO" 5
20863fi 20993fi
20864if test -z "${EINA_BUILD_FIXED_BITMAP_TRUE}" && test -z "${EINA_BUILD_FIXED_BITMAP_FALSE}"; then 20994if test -z "${EINA_BUILD_FIXED_BITMAP_TRUE}" && test -z "${EINA_BUILD_FIXED_BITMAP_FALSE}"; then
20865 as_fn_error $? "conditional \"EINA_BUILD_FIXED_BITMAP\" was never defined. 20995 as_fn_error "conditional \"EINA_BUILD_FIXED_BITMAP\" was never defined.
20866Usually this means the macro was only invoked conditionally." "$LINENO" 5 20996Usually this means the macro was only invoked conditionally." "$LINENO" 5
20867fi 20997fi
20868if test -z "${EINA_STATIC_BUILD_FIXED_BITMAP_TRUE}" && test -z "${EINA_STATIC_BUILD_FIXED_BITMAP_FALSE}"; then 20998if test -z "${EINA_STATIC_BUILD_FIXED_BITMAP_TRUE}" && test -z "${EINA_STATIC_BUILD_FIXED_BITMAP_FALSE}"; then
20869 as_fn_error $? "conditional \"EINA_STATIC_BUILD_FIXED_BITMAP\" was never defined. 20999 as_fn_error "conditional \"EINA_STATIC_BUILD_FIXED_BITMAP\" was never defined.
20870Usually this means the macro was only invoked conditionally." "$LINENO" 5 21000Usually this means the macro was only invoked conditionally." "$LINENO" 5
20871fi 21001fi
20872if test -z "${EINA_BUILD_PASS_THROUGH_TRUE}" && test -z "${EINA_BUILD_PASS_THROUGH_FALSE}"; then 21002if test -z "${EINA_BUILD_PASS_THROUGH_TRUE}" && test -z "${EINA_BUILD_PASS_THROUGH_FALSE}"; then
20873 as_fn_error $? "conditional \"EINA_BUILD_PASS_THROUGH\" was never defined. 21003 as_fn_error "conditional \"EINA_BUILD_PASS_THROUGH\" was never defined.
20874Usually this means the macro was only invoked conditionally." "$LINENO" 5 21004Usually this means the macro was only invoked conditionally." "$LINENO" 5
20875fi 21005fi
20876if test -z "${EINA_STATIC_BUILD_PASS_THROUGH_TRUE}" && test -z "${EINA_STATIC_BUILD_PASS_THROUGH_FALSE}"; then 21006if test -z "${EINA_STATIC_BUILD_PASS_THROUGH_TRUE}" && test -z "${EINA_STATIC_BUILD_PASS_THROUGH_FALSE}"; then
20877 as_fn_error $? "conditional \"EINA_STATIC_BUILD_PASS_THROUGH\" was never defined. 21007 as_fn_error "conditional \"EINA_STATIC_BUILD_PASS_THROUGH\" was never defined.
20878Usually this means the macro was only invoked conditionally." "$LINENO" 5 21008Usually this means the macro was only invoked conditionally." "$LINENO" 5
20879fi 21009fi
20880if test -z "${EINA_BUILD_BUDDY_TRUE}" && test -z "${EINA_BUILD_BUDDY_FALSE}"; then 21010if test -z "${EINA_BUILD_BUDDY_TRUE}" && test -z "${EINA_BUILD_BUDDY_FALSE}"; then
20881 as_fn_error $? "conditional \"EINA_BUILD_BUDDY\" was never defined. 21011 as_fn_error "conditional \"EINA_BUILD_BUDDY\" was never defined.
20882Usually this means the macro was only invoked conditionally." "$LINENO" 5 21012Usually this means the macro was only invoked conditionally." "$LINENO" 5
20883fi 21013fi
20884if test -z "${EINA_STATIC_BUILD_BUDDY_TRUE}" && test -z "${EINA_STATIC_BUILD_BUDDY_FALSE}"; then 21014if test -z "${EINA_STATIC_BUILD_BUDDY_TRUE}" && test -z "${EINA_STATIC_BUILD_BUDDY_FALSE}"; then
20885 as_fn_error $? "conditional \"EINA_STATIC_BUILD_BUDDY\" was never defined. 21015 as_fn_error "conditional \"EINA_STATIC_BUILD_BUDDY\" was never defined.
20886Usually this means the macro was only invoked conditionally." "$LINENO" 5 21016Usually this means the macro was only invoked conditionally." "$LINENO" 5
20887fi 21017fi
20888if test -z "${EINA_BUILD_ONE_BIG_TRUE}" && test -z "${EINA_BUILD_ONE_BIG_FALSE}"; then 21018if test -z "${EINA_BUILD_ONE_BIG_TRUE}" && test -z "${EINA_BUILD_ONE_BIG_FALSE}"; then
20889 as_fn_error $? "conditional \"EINA_BUILD_ONE_BIG\" was never defined. 21019 as_fn_error "conditional \"EINA_BUILD_ONE_BIG\" was never defined.
20890Usually this means the macro was only invoked conditionally." "$LINENO" 5 21020Usually this means the macro was only invoked conditionally." "$LINENO" 5
20891fi 21021fi
20892if test -z "${EINA_STATIC_BUILD_ONE_BIG_TRUE}" && test -z "${EINA_STATIC_BUILD_ONE_BIG_FALSE}"; then 21022if test -z "${EINA_STATIC_BUILD_ONE_BIG_TRUE}" && test -z "${EINA_STATIC_BUILD_ONE_BIG_FALSE}"; then
20893 as_fn_error $? "conditional \"EINA_STATIC_BUILD_ONE_BIG\" was never defined. 21023 as_fn_error "conditional \"EINA_STATIC_BUILD_ONE_BIG\" was never defined.
20894Usually this means the macro was only invoked conditionally." "$LINENO" 5 21024Usually this means the macro was only invoked conditionally." "$LINENO" 5
20895fi 21025fi
20896if test -z "${EFL_ENABLE_TESTS_TRUE}" && test -z "${EFL_ENABLE_TESTS_FALSE}"; then 21026if test -z "${EFL_ENABLE_TESTS_TRUE}" && test -z "${EFL_ENABLE_TESTS_FALSE}"; then
20897 as_fn_error $? "conditional \"EFL_ENABLE_TESTS\" was never defined. 21027 as_fn_error "conditional \"EFL_ENABLE_TESTS\" was never defined.
20898Usually this means the macro was only invoked conditionally." "$LINENO" 5 21028Usually this means the macro was only invoked conditionally." "$LINENO" 5
20899fi 21029fi
20900if test -z "${EFL_ENABLE_COVERAGE_TRUE}" && test -z "${EFL_ENABLE_COVERAGE_FALSE}"; then 21030if test -z "${EFL_ENABLE_COVERAGE_TRUE}" && test -z "${EFL_ENABLE_COVERAGE_FALSE}"; then
20901 as_fn_error $? "conditional \"EFL_ENABLE_COVERAGE\" was never defined. 21031 as_fn_error "conditional \"EFL_ENABLE_COVERAGE\" was never defined.
20902Usually this means the macro was only invoked conditionally." "$LINENO" 5 21032Usually this means the macro was only invoked conditionally." "$LINENO" 5
20903fi 21033fi
20904if test -z "${EFL_ENABLE_BENCHMARK_TRUE}" && test -z "${EFL_ENABLE_BENCHMARK_FALSE}"; then 21034if test -z "${EFL_ENABLE_BENCHMARK_TRUE}" && test -z "${EFL_ENABLE_BENCHMARK_FALSE}"; then
20905 as_fn_error $? "conditional \"EFL_ENABLE_BENCHMARK\" was never defined. 21035 as_fn_error "conditional \"EFL_ENABLE_BENCHMARK\" was never defined.
20906Usually this means the macro was only invoked conditionally." "$LINENO" 5 21036Usually this means the macro was only invoked conditionally." "$LINENO" 5
20907fi 21037fi
20908if test -z "${EINA_HAVE_GLIB_TRUE}" && test -z "${EINA_HAVE_GLIB_FALSE}"; then 21038if test -z "${EINA_HAVE_GLIB_TRUE}" && test -z "${EINA_HAVE_GLIB_FALSE}"; then
20909 as_fn_error $? "conditional \"EINA_HAVE_GLIB\" was never defined. 21039 as_fn_error "conditional \"EINA_HAVE_GLIB\" was never defined.
20910Usually this means the macro was only invoked conditionally." "$LINENO" 5 21040Usually this means the macro was only invoked conditionally." "$LINENO" 5
20911fi 21041fi
20912if test -z "${CITYHASH_BENCH_TRUE}" && test -z "${CITYHASH_BENCH_FALSE}"; then 21042if test -z "${CITYHASH_BENCH_TRUE}" && test -z "${CITYHASH_BENCH_FALSE}"; then
20913 as_fn_error $? "conditional \"CITYHASH_BENCH\" was never defined. 21043 as_fn_error "conditional \"CITYHASH_BENCH\" was never defined.
20914Usually this means the macro was only invoked conditionally." "$LINENO" 5 21044Usually this means the macro was only invoked conditionally." "$LINENO" 5
20915fi 21045fi
20916if test -z "${EFL_BUILD_EXAMPLES_TRUE}" && test -z "${EFL_BUILD_EXAMPLES_FALSE}"; then 21046if test -z "${EFL_BUILD_EXAMPLES_TRUE}" && test -z "${EFL_BUILD_EXAMPLES_FALSE}"; then
20917 as_fn_error $? "conditional \"EFL_BUILD_EXAMPLES\" was never defined. 21047 as_fn_error "conditional \"EFL_BUILD_EXAMPLES\" was never defined.
20918Usually this means the macro was only invoked conditionally." "$LINENO" 5 21048Usually this means the macro was only invoked conditionally." "$LINENO" 5
20919fi 21049fi
20920if test -z "${EFL_INSTALL_EXAMPLES_TRUE}" && test -z "${EFL_INSTALL_EXAMPLES_FALSE}"; then 21050if test -z "${EFL_INSTALL_EXAMPLES_TRUE}" && test -z "${EFL_INSTALL_EXAMPLES_FALSE}"; then
20921 as_fn_error $? "conditional \"EFL_INSTALL_EXAMPLES\" was never defined. 21051 as_fn_error "conditional \"EFL_INSTALL_EXAMPLES\" was never defined.
20922Usually this means the macro was only invoked conditionally." "$LINENO" 5 21052Usually this means the macro was only invoked conditionally." "$LINENO" 5
20923fi 21053fi
20924 21054
@@ -21068,19 +21198,19 @@ export LANGUAGE
21068(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 21198(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21069 21199
21070 21200
21071# as_fn_error STATUS ERROR [LINENO LOG_FD] 21201# as_fn_error ERROR [LINENO LOG_FD]
21072# ---------------------------------------- 21202# ---------------------------------
21073# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 21203# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21074# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 21204# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21075# script with STATUS, using 1 if that was 0. 21205# script with status $?, using 1 if that was 0.
21076as_fn_error () 21206as_fn_error ()
21077{ 21207{
21078 as_status=$1; test $as_status -eq 0 && as_status=1 21208 as_status=$?; test $as_status -eq 0 && as_status=1
21079 if test "$4"; then 21209 if test "$3"; then
21080 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 21210 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21081 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 21211 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
21082 fi 21212 fi
21083 $as_echo "$as_me: error: $2" >&2 21213 $as_echo "$as_me: error: $1" >&2
21084 as_fn_exit $as_status 21214 as_fn_exit $as_status
21085} # as_fn_error 21215} # as_fn_error
21086 21216
@@ -21276,7 +21406,7 @@ $as_echo X"$as_dir" |
21276 test -d "$as_dir" && break 21406 test -d "$as_dir" && break
21277 done 21407 done
21278 test -z "$as_dirs" || eval "mkdir $as_dirs" 21408 test -z "$as_dirs" || eval "mkdir $as_dirs"
21279 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 21409 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
21280 21410
21281 21411
21282} # as_fn_mkdir_p 21412} # as_fn_mkdir_p
@@ -21329,8 +21459,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21329# report actual input values of CONFIG_FILES etc. instead of their 21459# report actual input values of CONFIG_FILES etc. instead of their
21330# values after options handling. 21460# values after options handling.
21331ac_log=" 21461ac_log="
21332This file was extended by eina $as_me 1.1.0, which was 21462This file was extended by eina $as_me 1.1.99.67344, which was
21333generated by GNU Autoconf 2.67. Invocation command line was 21463generated by GNU Autoconf 2.65. Invocation command line was
21334 21464
21335 CONFIG_FILES = $CONFIG_FILES 21465 CONFIG_FILES = $CONFIG_FILES
21336 CONFIG_HEADERS = $CONFIG_HEADERS 21466 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -21395,11 +21525,11 @@ _ACEOF
21395cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 21525cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21396ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 21526ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21397ac_cs_version="\\ 21527ac_cs_version="\\
21398eina config.status 1.1.0 21528eina config.status 1.1.99.67344
21399configured by $0, generated by GNU Autoconf 2.67, 21529configured by $0, generated by GNU Autoconf 2.65,
21400 with options \\"\$ac_cs_config\\" 21530 with options \\"\$ac_cs_config\\"
21401 21531
21402Copyright (C) 2010 Free Software Foundation, Inc. 21532Copyright (C) 2009 Free Software Foundation, Inc.
21403This config.status script is free software; the Free Software Foundation 21533This config.status script is free software; the Free Software Foundation
21404gives unlimited permission to copy, distribute and modify it." 21534gives unlimited permission to copy, distribute and modify it."
21405 21535
@@ -21417,16 +21547,11 @@ ac_need_defaults=:
21417while test $# != 0 21547while test $# != 0
21418do 21548do
21419 case $1 in 21549 case $1 in
21420 --*=?*) 21550 --*=*)
21421 ac_option=`expr "X$1" : 'X\([^=]*\)='` 21551 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21422 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 21552 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21423 ac_shift=: 21553 ac_shift=:
21424 ;; 21554 ;;
21425 --*=)
21426 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21427 ac_optarg=
21428 ac_shift=:
21429 ;;
21430 *) 21555 *)
21431 ac_option=$1 21556 ac_option=$1
21432 ac_optarg=$2 21557 ac_optarg=$2
@@ -21448,7 +21573,6 @@ do
21448 $ac_shift 21573 $ac_shift
21449 case $ac_optarg in 21574 case $ac_optarg in
21450 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 21575 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21451 '') as_fn_error $? "missing file argument" ;;
21452 esac 21576 esac
21453 as_fn_append CONFIG_FILES " '$ac_optarg'" 21577 as_fn_append CONFIG_FILES " '$ac_optarg'"
21454 ac_need_defaults=false;; 21578 ac_need_defaults=false;;
@@ -21461,7 +21585,7 @@ do
21461 ac_need_defaults=false;; 21585 ac_need_defaults=false;;
21462 --he | --h) 21586 --he | --h)
21463 # Conflict between --help and --header 21587 # Conflict between --help and --header
21464 as_fn_error $? "ambiguous option: \`$1' 21588 as_fn_error "ambiguous option: \`$1'
21465Try \`$0 --help' for more information.";; 21589Try \`$0 --help' for more information.";;
21466 --help | --hel | -h ) 21590 --help | --hel | -h )
21467 $as_echo "$ac_cs_usage"; exit ;; 21591 $as_echo "$ac_cs_usage"; exit ;;
@@ -21470,7 +21594,7 @@ Try \`$0 --help' for more information.";;
21470 ac_cs_silent=: ;; 21594 ac_cs_silent=: ;;
21471 21595
21472 # This is an error. 21596 # This is an error.
21473 -*) as_fn_error $? "unrecognized option: \`$1' 21597 -*) as_fn_error "unrecognized option: \`$1'
21474Try \`$0 --help' for more information." ;; 21598Try \`$0 --help' for more information." ;;
21475 21599
21476 *) as_fn_append ac_config_targets " $1" 21600 *) as_fn_append ac_config_targets " $1"
@@ -21900,7 +22024,7 @@ do
21900 "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;; 22024 "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;;
21901 "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;; 22025 "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;;
21902 22026
21903 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; 22027 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
21904 esac 22028 esac
21905done 22029done
21906 22030
@@ -21938,7 +22062,7 @@ $debug ||
21938{ 22062{
21939 tmp=./conf$$-$RANDOM 22063 tmp=./conf$$-$RANDOM
21940 (umask 077 && mkdir "$tmp") 22064 (umask 077 && mkdir "$tmp")
21941} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 22065} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
21942 22066
21943# Set up the scripts for CONFIG_FILES section. 22067# Set up the scripts for CONFIG_FILES section.
21944# No need to generate them if there are no CONFIG_FILES. 22068# No need to generate them if there are no CONFIG_FILES.
@@ -21955,7 +22079,7 @@ if test "x$ac_cr" = x; then
21955fi 22079fi
21956ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 22080ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21957if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 22081if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21958 ac_cs_awk_cr='\\r' 22082 ac_cs_awk_cr='\r'
21959else 22083else
21960 ac_cs_awk_cr=$ac_cr 22084 ac_cs_awk_cr=$ac_cr
21961fi 22085fi
@@ -21969,18 +22093,18 @@ _ACEOF
21969 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 22093 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21970 echo "_ACEOF" 22094 echo "_ACEOF"
21971} >conf$$subs.sh || 22095} >conf$$subs.sh ||
21972 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 22096 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
21973ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 22097ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
21974ac_delim='%!_!# ' 22098ac_delim='%!_!# '
21975for ac_last_try in false false false false false :; do 22099for ac_last_try in false false false false false :; do
21976 . ./conf$$subs.sh || 22100 . ./conf$$subs.sh ||
21977 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 22101 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
21978 22102
21979 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 22103 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21980 if test $ac_delim_n = $ac_delim_num; then 22104 if test $ac_delim_n = $ac_delim_num; then
21981 break 22105 break
21982 elif $ac_last_try; then 22106 elif $ac_last_try; then
21983 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 22107 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
21984 else 22108 else
21985 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 22109 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21986 fi 22110 fi
@@ -22069,28 +22193,20 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22069else 22193else
22070 cat 22194 cat
22071fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ 22195fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
22072 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 22196 || as_fn_error "could not setup config files machinery" "$LINENO" 5
22073_ACEOF 22197_ACEOF
22074 22198
22075# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 22199# VPATH may cause trouble with some makes, so we remove $(srcdir),
22076# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 22200# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22077# trailing colons and then remove the whole line if VPATH becomes empty 22201# trailing colons and then remove the whole line if VPATH becomes empty
22078# (actually we leave an empty line to preserve line numbers). 22202# (actually we leave an empty line to preserve line numbers).
22079if test "x$srcdir" = x.; then 22203if test "x$srcdir" = x.; then
22080 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 22204 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22081h 22205s/:*\$(srcdir):*/:/
22082s/// 22206s/:*\${srcdir}:*/:/
22083s/^/:/ 22207s/:*@srcdir@:*/:/
22084s/[ ]*$/:/ 22208s/^\([^=]*=[ ]*\):*/\1/
22085s/:\$(srcdir):/:/g
22086s/:\${srcdir}:/:/g
22087s/:@srcdir@:/:/g
22088s/^:*//
22089s/:*$// 22209s/:*$//
22090x
22091s/\(=[ ]*\).*/\1/
22092G
22093s/\n//
22094s/^[^=]*=[ ]*$// 22210s/^[^=]*=[ ]*$//
22095}' 22211}'
22096fi 22212fi
@@ -22118,7 +22234,7 @@ for ac_last_try in false false :; do
22118 if test -z "$ac_t"; then 22234 if test -z "$ac_t"; then
22119 break 22235 break
22120 elif $ac_last_try; then 22236 elif $ac_last_try; then
22121 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 22237 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
22122 else 22238 else
22123 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 22239 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22124 fi 22240 fi
@@ -22203,7 +22319,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22203_ACAWK 22319_ACAWK
22204_ACEOF 22320_ACEOF
22205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 22321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22206 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 22322 as_fn_error "could not setup config headers machinery" "$LINENO" 5
22207fi # test -n "$CONFIG_HEADERS" 22323fi # test -n "$CONFIG_HEADERS"
22208 22324
22209 22325
@@ -22216,7 +22332,7 @@ do
22216 esac 22332 esac
22217 case $ac_mode$ac_tag in 22333 case $ac_mode$ac_tag in
22218 :[FHL]*:*);; 22334 :[FHL]*:*);;
22219 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; 22335 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
22220 :[FH]-) ac_tag=-:-;; 22336 :[FH]-) ac_tag=-:-;;
22221 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 22337 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22222 esac 22338 esac
@@ -22244,7 +22360,7 @@ do
22244 [\\/$]*) false;; 22360 [\\/$]*) false;;
22245 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 22361 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22246 esac || 22362 esac ||
22247 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; 22363 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22248 esac 22364 esac
22249 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 22365 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22250 as_fn_append ac_file_inputs " '$ac_f'" 22366 as_fn_append ac_file_inputs " '$ac_f'"
@@ -22271,7 +22387,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
22271 22387
22272 case $ac_tag in 22388 case $ac_tag in
22273 *:-:* | *:-) cat >"$tmp/stdin" \ 22389 *:-:* | *:-) cat >"$tmp/stdin" \
22274 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 22390 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
22275 esac 22391 esac
22276 ;; 22392 ;;
22277 esac 22393 esac
@@ -22408,22 +22524,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
22408$ac_datarootdir_hack 22524$ac_datarootdir_hack
22409" 22525"
22410eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ 22526eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
22411 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 22527 || as_fn_error "could not create $ac_file" "$LINENO" 5
22412 22528
22413test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 22529test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22414 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && 22530 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
22415 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && 22531 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
22416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 22532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22417which seems to be undefined. Please make sure it is defined" >&5 22533which seems to be undefined. Please make sure it is defined." >&5
22418$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 22534$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22419which seems to be undefined. Please make sure it is defined" >&2;} 22535which seems to be undefined. Please make sure it is defined." >&2;}
22420 22536
22421 rm -f "$tmp/stdin" 22537 rm -f "$tmp/stdin"
22422 case $ac_file in 22538 case $ac_file in
22423 -) cat "$tmp/out" && rm -f "$tmp/out";; 22539 -) cat "$tmp/out" && rm -f "$tmp/out";;
22424 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; 22540 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
22425 esac \ 22541 esac \
22426 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 22542 || as_fn_error "could not create $ac_file" "$LINENO" 5
22427 ;; 22543 ;;
22428 :H) 22544 :H)
22429 # 22545 #
@@ -22434,19 +22550,19 @@ which seems to be undefined. Please make sure it is defined" >&2;}
22434 $as_echo "/* $configure_input */" \ 22550 $as_echo "/* $configure_input */" \
22435 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" 22551 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
22436 } >"$tmp/config.h" \ 22552 } >"$tmp/config.h" \
22437 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 22553 || as_fn_error "could not create $ac_file" "$LINENO" 5
22438 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then 22554 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
22439 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 22555 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22440$as_echo "$as_me: $ac_file is unchanged" >&6;} 22556$as_echo "$as_me: $ac_file is unchanged" >&6;}
22441 else 22557 else
22442 rm -f "$ac_file" 22558 rm -f "$ac_file"
22443 mv "$tmp/config.h" "$ac_file" \ 22559 mv "$tmp/config.h" "$ac_file" \
22444 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 22560 || as_fn_error "could not create $ac_file" "$LINENO" 5
22445 fi 22561 fi
22446 else 22562 else
22447 $as_echo "/* $configure_input */" \ 22563 $as_echo "/* $configure_input */" \
22448 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ 22564 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
22449 || as_fn_error $? "could not create -" "$LINENO" 5 22565 || as_fn_error "could not create -" "$LINENO" 5
22450 fi 22566 fi
22451# Compute "$ac_file"'s index in $config_headers. 22567# Compute "$ac_file"'s index in $config_headers.
22452_am_arg="$ac_file" 22568_am_arg="$ac_file"
@@ -23404,7 +23520,7 @@ _ACEOF
23404ac_clean_files=$ac_clean_files_save 23520ac_clean_files=$ac_clean_files_save
23405 23521
23406test $ac_write_fail = 0 || 23522test $ac_write_fail = 0 ||
23407 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 23523 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
23408 23524
23409 23525
23410# configure is writing to config.log, and then calls config.status. 23526# configure is writing to config.log, and then calls config.status.
@@ -23425,7 +23541,7 @@ if test "$no_create" != yes; then
23425 exec 5>>config.log 23541 exec 5>>config.log
23426 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 23542 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23427 # would make configure fail if this is the last instruction. 23543 # would make configure fail if this is the last instruction.
23428 $ac_cs_success || as_fn_exit 1 23544 $ac_cs_success || as_fn_exit $?
23429fi 23545fi
23430if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 23546if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23431 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 23547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
@@ -23452,6 +23568,7 @@ echo " Maximum log level....: ${with_max_log_level}"
23452echo " Report string usage..: ${have_stringshare_usage}" 23568echo " Report string usage..: ${have_stringshare_usage}"
23453echo " Valgrind support.....: ${have_valgrind}" 23569echo " Valgrind support.....: ${have_valgrind}"
23454echo " Default mempool......: ${have_default_mempool}" 23570echo " Default mempool......: ${have_default_mempool}"
23571echo " Log support..........: ${enable_log}"
23455echo " Thread Support.......: ${have_threads}" 23572echo " Thread Support.......: ${have_threads}"
23456if test "${have_threads}" = "POSIX" ; then 23573if test "${have_threads}" = "POSIX" ; then
23457echo " spinlock...........: ${have_posix_threads_spinlock}" 23574echo " spinlock...........: ${have_posix_threads_spinlock}"
@@ -23460,7 +23577,7 @@ echo " on/off support.....: ${have_on_off_threads}"
23460fi 23577fi
23461echo " Amalgamation.........: ${do_amalgamation}" 23578echo " Amalgamation.........: ${do_amalgamation}"
23462echo " Iconv support........: ${have_iconv}" 23579echo " Iconv support........: ${have_iconv}"
23463echo " File dirfd...........: ${ac_cv_func_dirfd}" 23580echo " File dirfd...........: ${have_dirfd}"
23464echo " File xattr...........: ${have_xattr}" 23581echo " File xattr...........: ${have_xattr}"
23465echo 23582echo
23466echo " Documentation........: ${build_doc}" 23583echo " Documentation........: ${build_doc}"
diff --git a/libraries/eina/configure.ac b/libraries/eina/configure.ac
index 5e2fab2..367ffe1 100644
--- a/libraries/eina/configure.ac
+++ b/libraries/eina/configure.ac
@@ -2,11 +2,11 @@
2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## 2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1]) 3m4_define([v_maj], [1])
4m4_define([v_min], [1]) 4m4_define([v_min], [1])
5m4_define([v_mic], [0]) 5m4_define([v_mic], [99])
6m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) 6m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) 7m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8##-- When released, remove the dnl on the below line 8##-- When released, remove the dnl on the below line
9m4_undefine([v_rev]) 9dnl m4_undefine([v_rev])
10##-- When doing snapshots - change soname. remove dnl on below line 10##-- When doing snapshots - change soname. remove dnl on below line
11dnl m4_define([relname], [ver-pre-svn-07]) 11dnl m4_define([relname], [ver-pre-svn-07])
12dnl m4_define([v_rel], [-release relname]) 12dnl m4_define([v_rel], [-release relname])
@@ -352,41 +352,6 @@ PKG_CHECK_MODULES([ECORE_EVAS],
352 352
353AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"]) 353AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"])
354 354
355
356### Checks for header files
357AC_HEADER_ASSERT
358AC_HEADER_DIRENT
359AC_HEADER_TIME
360EFL_CHECK_PATH_MAX
361AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h])
362
363if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
364 EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
365 AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.])
366fi
367AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H])
368
369if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
370 EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
371 AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.])
372fi
373AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H])
374
375### Checks for types
376
377AC_CHECK_SIZEOF([wchar_t])
378EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
379AC_SUBST([EINA_SIZEOF_WCHAR_T])
380AC_CHECK_TYPES([siginfo_t], [], [],
381 [[#include <signal.h>
382 #if HAVE_SIGINFO_H
383 # include <siginfo.h>
384 #endif
385 ]])
386
387### Checks for structures
388
389
390### Checks for compiler characteristics 355### Checks for compiler characteristics
391AC_C_CONST 356AC_C_CONST
392AC_C_BIGENDIAN 357AC_C_BIGENDIAN
@@ -422,6 +387,15 @@ m4_ifdef([v_mic],
422 387
423EFL_COMPILER_FLAG([-Wshadow]) 388EFL_COMPILER_FLAG([-Wshadow])
424 389
390case "$host_vendor" in
391 ps3*)
392 PKG_CHECK_MODULES([ESCAPE], [escape])
393 AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if evil package is installed])
394 requirement_eina="escape"
395 EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}"
396 ;;
397esac
398
425AC_SUBST([EINA_CPPFLAGS]) 399AC_SUBST([EINA_CPPFLAGS])
426AC_SUBST([EINA_CFLAGS]) 400AC_SUBST([EINA_CFLAGS])
427 401
@@ -450,26 +424,112 @@ case "${host_os}" in
450 EINA_LIBS="-ldl -lrt -lm" 424 EINA_LIBS="-ldl -lrt -lm"
451 ;; 425 ;;
452esac 426esac
453AC_SUBST([EINA_LIBS])
454AC_SUBST([lt_enable_auto_import])
455
456case "$host_vendor" in 427case "$host_vendor" in
457 ps3*) 428 ps3*)
458 PKG_CHECK_MODULES([ESCAPE], [escape]) 429 # Escape had already been checked to exist
459 AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if evil package is installed])
460 requirement_eina="escape"
461 EINA_LIBS="${ESCAPE_LIBS}" 430 EINA_LIBS="${ESCAPE_LIBS}"
462 EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}"
463 ;; 431 ;;
464esac 432esac
433AC_SUBST([EINA_LIBS])
434AC_SUBST([lt_enable_auto_import])
465 435
466EFL_LINKER_FLAG([-fno-strict-aliasing]) 436EFL_LINKER_FLAG([-fno-strict-aliasing])
467 437
438CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
439LDFLAGS="${LDFLAGS} ${EINA_LDFLAGS}"
440LIBS="${LIBS} ${EINA_LIBS}"
441
442### Checks for header files
443AC_HEADER_ASSERT
444AC_HEADER_TIME
445EFL_CHECK_PATH_MAX
446AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h sys/mman.h])
447
448if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
449 EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
450 AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.])
451fi
452AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H])
453
454if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
455 EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
456 AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.])
457fi
458AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H])
459
460### Checks for types
461
462AC_CHECK_SIZEOF([wchar_t])
463EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
464AC_SUBST([EINA_SIZEOF_WCHAR_T])
465AC_CHECK_TYPES([siginfo_t], [], [],
466 [[#include <signal.h>
467 #if HAVE_SIGINFO_H
468 # include <siginfo.h>
469 #endif
470 ]])
471
472### Check if dirent.h is usable
473
474AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"],
475 [[#include <dirent.h>
476 ]])
477
478if test "x${have_dirent}" = "xyes" ; then
479 EINA_CONFIGURE_HAVE_DIRENT_H="#define EINA_HAVE_DIRENT_H"
480 AC_DEFINE([HAVE_DIRENT_H], [1], [Define to 1 if you have a valid <dirent.h> header file.])
481fi
482AC_SUBST([EINA_CONFIGURE_HAVE_DIRENT_H])
468 483
469### Checks for library functions 484### Checks for library functions
470AC_ISC_POSIX 485AC_ISC_POSIX
471AC_FUNC_ALLOCA 486AC_FUNC_ALLOCA
472AC_CHECK_FUNCS([strlcpy dirfd openat fstatat fpathconf execvp]) 487AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp])
488
489AC_MSG_CHECKING([for dirfd])
490AC_LINK_IFELSE(
491 [
492 AC_LANG_PROGRAM(
493 [[
494#include <dirent.h>
495 ]],
496 [[
497int main(void)
498{
499 DIR *dirp;
500 return dirfd(dirp);
501}
502 ]])
503 ],
504 [have_dirfd="yes"],
505 [have_dirfd="no"])
506
507AC_MSG_RESULT([${have_dirfd}])
508
509if test "x${have_dirfd}" = "xyes" ; then
510 AC_DEFINE([HAVE_DIRFD], [1], [ Define to 1 if you have the `dirfd' function or macro.])
511fi
512
513# check debug information for malloc
514AC_CHECK_FUNCS([malloc_usable_size], [malloc_true_size="yes"], [malloc_true_size="no"])
515if test "x${malloc_true_size}" = "xyes" ; then
516 AC_DEFINE([HAVE_MALLOC_USABLE_SIZE], [1], [We will be able to know the exact amount of wasted memory])
517fi
518
519want_debug_malloc="no"
520AC_ARG_ENABLE([debug-malloc],
521 [AC_HELP_STRING([--enable-debug-malloc], [enable debugging of malloc usage overhead in our allocator @<:@default=enabled@:>@])],
522 [
523 if test "x${enableval}" = "xyes" ; then
524 want_debug_malloc="yes"
525 else
526 want_debug_malloc="no"
527 fi
528 ], [want_debug_malloc="no"])
529
530if test "x${malloc_true_size}" = "xyes" -a "x${want_debug_malloc}" = "xyes"; then
531 AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool])
532fi
473 533
474# dlopen and dladdr 534# dlopen and dladdr
475dlopen_libs="" 535dlopen_libs=""
@@ -496,7 +556,34 @@ case "$host_os" in
496esac 556esac
497AC_SUBST([dlopen_libs]) 557AC_SUBST([dlopen_libs])
498 558
499EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])]) 559have_log="yes"
560EFL_CHECK_FNMATCH([have_log="yes"], [have_log="no"])
561
562want_log="yes"
563AC_ARG_ENABLE([log],
564 [AC_HELP_STRING([--disable-log], [disable Eina_Log infrastructure completly @<:@default=enabled@:>@])],
565 [
566 if test "x${enableval}" = "xyes" ; then
567 want_log="yes"
568 else
569 want_log="no"
570 fi
571 ],
572 [want_log="yes"])
573
574enable_log="no"
575if test "x${have_log}" = xyes -a "x${want_log}" = xyes; then
576 enable_log="yes"
577fi
578
579AC_MSG_CHECKING([wether to build Eina_Log infrastructure])
580AC_MSG_RESULT([${enable_log}])
581
582if test "x${enable_log}" = "xyes"; then
583 EINA_CONFIGURE_ENABLE_LOG="#define EINA_ENABLE_LOG"
584 AC_DEFINE([HAVE_LOG], [1], [Define to 1 if we log support is on])
585fi
586AC_SUBST([EINA_CONFIGURE_ENABLE_LOG])
500 587
501AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])]) 588AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])])
502AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])]) 589AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])])
@@ -748,6 +835,7 @@ echo " Maximum log level....: ${with_max_log_level}"
748echo " Report string usage..: ${have_stringshare_usage}" 835echo " Report string usage..: ${have_stringshare_usage}"
749echo " Valgrind support.....: ${have_valgrind}" 836echo " Valgrind support.....: ${have_valgrind}"
750echo " Default mempool......: ${have_default_mempool}" 837echo " Default mempool......: ${have_default_mempool}"
838echo " Log support..........: ${enable_log}"
751echo " Thread Support.......: ${have_threads}" 839echo " Thread Support.......: ${have_threads}"
752if test "${have_threads}" = "POSIX" ; then 840if test "${have_threads}" = "POSIX" ; then
753echo " spinlock...........: ${have_posix_threads_spinlock}" 841echo " spinlock...........: ${have_posix_threads_spinlock}"
@@ -756,7 +844,7 @@ echo " on/off support.....: ${have_on_off_threads}"
756fi 844fi
757echo " Amalgamation.........: ${do_amalgamation}" 845echo " Amalgamation.........: ${do_amalgamation}"
758echo " Iconv support........: ${have_iconv}" 846echo " Iconv support........: ${have_iconv}"
759echo " File dirfd...........: ${ac_cv_func_dirfd}" 847echo " File dirfd...........: ${have_dirfd}"
760echo " File xattr...........: ${have_xattr}" 848echo " File xattr...........: ${have_xattr}"
761echo 849echo
762echo " Documentation........: ${build_doc}" 850echo " Documentation........: ${build_doc}"
diff --git a/libraries/eina/doc/Doxyfile.in b/libraries/eina/doc/Doxyfile.in
index 5843161..97b0bf9 100644
--- a/libraries/eina/doc/Doxyfile.in
+++ b/libraries/eina/doc/Doxyfile.in
@@ -1,224 +1,240 @@
1# Doxyfile 1.5.5 1# Doxyfile 1.7.3
2 2
3# This file describes the settings to be used by the documentation system 3# This file describes the settings to be used by the documentation system
4# doxygen (www.doxygen.org) for a project 4# doxygen (www.doxygen.org) for a project.
5# 5#
6# All text after a hash (#) is considered a comment and will be ignored 6# All text after a hash (#) is considered a comment and will be ignored.
7# The format is: 7# The format is:
8# TAG = value [value, ...] 8# TAG = value [value, ...]
9# For lists items can also be appended using: 9# For lists items can also be appended using:
10# TAG += value [value, ...] 10# TAG += value [value, ...]
11# Values that contain spaces should be placed between quotes (" ") 11# Values that contain spaces should be placed between quotes (" ").
12 12
13#--------------------------------------------------------------------------- 13#---------------------------------------------------------------------------
14# Project related configuration options 14# Project related configuration options
15#--------------------------------------------------------------------------- 15#---------------------------------------------------------------------------
16 16
17# This tag specifies the encoding used for all characters in the config file 17# This tag specifies the encoding used for all characters in the config file
18# that follow. The default is UTF-8 which is also the encoding used for all 18# that follow. The default is UTF-8 which is also the encoding used for all
19# text before the first occurrence of this tag. Doxygen uses libiconv (or the 19# text before the first occurrence of this tag. Doxygen uses libiconv (or the
20# iconv built into libc) for the transcoding. See 20# iconv built into libc) for the transcoding. See
21# http://www.gnu.org/software/libiconv for the list of possible encodings. 21# http://www.gnu.org/software/libiconv for the list of possible encodings.
22 22
23DOXYFILE_ENCODING = UTF-8 23DOXYFILE_ENCODING = UTF-8
24 24
25# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 25# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
26# by quotes) that should identify the project. 26# by quotes) that should identify the project.
27 27
28PROJECT_NAME = Eina 28PROJECT_NAME = Eina
29 29
30# The PROJECT_NUMBER tag can be used to enter a project or revision number. 30# The PROJECT_NUMBER tag can be used to enter a project or revision number.
31# This could be handy for archiving the generated documentation or 31# This could be handy for archiving the generated documentation or
32# if some version control system is used. 32# if some version control system is used.
33 33
34PROJECT_NUMBER = @PACKAGE_VERSION@ 34PROJECT_NUMBER = @PACKAGE_VERSION@
35 35
36# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 36# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
37# base path where the generated documentation will be put. 37
38# If a relative path is entered, it will be relative to the location 38PROJECT_BRIEF =
39
40# With the PROJECT_LOGO tag one can specify an logo or icon that is
41# included in the documentation. The maximum height of the logo should not
42# exceed 55 pixels and the maximum width should not exceed 200 pixels.
43# Doxygen will copy the logo to the output directory.
44
45PROJECT_LOGO =
46
47# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
48# base path where the generated documentation will be put.
49# If a relative path is entered, it will be relative to the location
39# where doxygen was started. If left blank the current directory will be used. 50# where doxygen was started. If left blank the current directory will be used.
40 51
41OUTPUT_DIRECTORY = . 52OUTPUT_DIRECTORY = .
42 53
43# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 54# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
44# 4096 sub-directories (in 2 levels) under the output directory of each output 55# 4096 sub-directories (in 2 levels) under the output directory of each output
45# format and will distribute the generated files over these directories. 56# format and will distribute the generated files over these directories.
46# Enabling this option can be useful when feeding doxygen a huge amount of 57# Enabling this option can be useful when feeding doxygen a huge amount of
47# source files, where putting all generated files in the same directory would 58# source files, where putting all generated files in the same directory would
48# otherwise cause performance problems for the file system. 59# otherwise cause performance problems for the file system.
49 60
50CREATE_SUBDIRS = NO 61CREATE_SUBDIRS = NO
51 62
52# The OUTPUT_LANGUAGE tag is used to specify the language in which all 63# The OUTPUT_LANGUAGE tag is used to specify the language in which all
53# documentation generated by doxygen is written. Doxygen will use this 64# documentation generated by doxygen is written. Doxygen will use this
54# information to generate all constant output in the proper language. 65# information to generate all constant output in the proper language.
55# The default language is English, other supported languages are: 66# The default language is English, other supported languages are:
56# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 67# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
57# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, 68# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
58# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), 69# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
59# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, 70# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
60# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, 71# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
61# and Ukrainian. 72# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
62 73
63OUTPUT_LANGUAGE = English 74OUTPUT_LANGUAGE = English
64 75
65# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 76# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
66# include brief member descriptions after the members that are listed in 77# include brief member descriptions after the members that are listed in
67# the file and class documentation (similar to JavaDoc). 78# the file and class documentation (similar to JavaDoc).
68# Set to NO to disable this. 79# Set to NO to disable this.
69 80
70BRIEF_MEMBER_DESC = YES 81BRIEF_MEMBER_DESC = YES
71 82
72# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 83# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
73# the brief description of a member or function before the detailed description. 84# the brief description of a member or function before the detailed description.
74# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 85# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
75# brief descriptions will be completely suppressed. 86# brief descriptions will be completely suppressed.
76 87
77REPEAT_BRIEF = YES 88REPEAT_BRIEF = YES
78 89
79# This tag implements a quasi-intelligent brief description abbreviator 90# This tag implements a quasi-intelligent brief description abbreviator
80# that is used to form the text in various listings. Each string 91# that is used to form the text in various listings. Each string
81# in this list, if found as the leading text of the brief description, will be 92# in this list, if found as the leading text of the brief description, will be
82# stripped from the text and the result after processing the whole list, is 93# stripped from the text and the result after processing the whole list, is
83# used as the annotated text. Otherwise, the brief description is used as-is. 94# used as the annotated text. Otherwise, the brief description is used as-is.
84# If left blank, the following values are used ("$name" is automatically 95# If left blank, the following values are used ("$name" is automatically
85# replaced with the name of the entity): "The $name class" "The $name widget" 96# replaced with the name of the entity): "The $name class" "The $name widget"
86# "The $name file" "is" "provides" "specifies" "contains" 97# "The $name file" "is" "provides" "specifies" "contains"
87# "represents" "a" "an" "the" 98# "represents" "a" "an" "the"
88 99
89ABBREVIATE_BRIEF = 100ABBREVIATE_BRIEF =
90 101
91# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 102# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
92# Doxygen will generate a detailed section even if there is only a brief 103# Doxygen will generate a detailed section even if there is only a brief
93# description. 104# description.
94 105
95ALWAYS_DETAILED_SEC = NO 106ALWAYS_DETAILED_SEC = NO
96 107
97# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 108# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
98# inherited members of a class in the documentation of that class as if those 109# inherited members of a class in the documentation of that class as if those
99# members were ordinary class members. Constructors, destructors and assignment 110# members were ordinary class members. Constructors, destructors and assignment
100# operators of the base classes will not be shown. 111# operators of the base classes will not be shown.
101 112
102INLINE_INHERITED_MEMB = NO 113INLINE_INHERITED_MEMB = NO
103 114
104# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 115# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
105# path before files name in the file list and in the header files. If set 116# path before files name in the file list and in the header files. If set
106# to NO the shortest path that makes the file name unique will be used. 117# to NO the shortest path that makes the file name unique will be used.
107 118
108FULL_PATH_NAMES = NO 119FULL_PATH_NAMES = NO
109 120
110# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 121# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
111# can be used to strip a user-defined part of the path. Stripping is 122# can be used to strip a user-defined part of the path. Stripping is
112# only done if one of the specified strings matches the left-hand part of 123# only done if one of the specified strings matches the left-hand part of
113# the path. The tag can be used to show relative paths in the file list. 124# the path. The tag can be used to show relative paths in the file list.
114# If left blank the directory from which doxygen is run is used as the 125# If left blank the directory from which doxygen is run is used as the
115# path to strip. 126# path to strip.
116 127
117STRIP_FROM_PATH = 128STRIP_FROM_PATH =
118 129
119# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 130# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
120# the path mentioned in the documentation of a class, which tells 131# the path mentioned in the documentation of a class, which tells
121# the reader which header file to include in order to use a class. 132# the reader which header file to include in order to use a class.
122# If left blank only the name of the header file containing the class 133# If left blank only the name of the header file containing the class
123# definition is used. Otherwise one should specify the include paths that 134# definition is used. Otherwise one should specify the include paths that
124# are normally passed to the compiler using the -I flag. 135# are normally passed to the compiler using the -I flag.
125 136
126STRIP_FROM_INC_PATH = 137STRIP_FROM_INC_PATH =
127 138
128# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 139# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
129# (but less readable) file names. This can be useful is your file systems 140# (but less readable) file names. This can be useful if your file system
130# doesn't support long names like on DOS, Mac, or CD-ROM. 141# doesn't support long names like on DOS, Mac, or CD-ROM.
131 142
132SHORT_NAMES = NO 143SHORT_NAMES = NO
133 144
134# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 145# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
135# will interpret the first line (until the first dot) of a JavaDoc-style 146# will interpret the first line (until the first dot) of a JavaDoc-style
136# comment as the brief description. If set to NO, the JavaDoc 147# comment as the brief description. If set to NO, the JavaDoc
137# comments will behave just like regular Qt-style comments 148# comments will behave just like regular Qt-style comments
138# (thus requiring an explicit @brief command for a brief description.) 149# (thus requiring an explicit @brief command for a brief description.)
139 150
140JAVADOC_AUTOBRIEF = YES 151JAVADOC_AUTOBRIEF = YES
141 152
142# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 153# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
143# interpret the first line (until the first dot) of a Qt-style 154# interpret the first line (until the first dot) of a Qt-style
144# comment as the brief description. If set to NO, the comments 155# comment as the brief description. If set to NO, the comments
145# will behave just like regular Qt-style comments (thus requiring 156# will behave just like regular Qt-style comments (thus requiring
146# an explicit \brief command for a brief description.) 157# an explicit \brief command for a brief description.)
147 158
148QT_AUTOBRIEF = NO 159QT_AUTOBRIEF = NO
149 160
150# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 161# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
151# treat a multi-line C++ special comment block (i.e. a block of //! or /// 162# treat a multi-line C++ special comment block (i.e. a block of //! or ///
152# comments) as a brief description. This used to be the default behaviour. 163# comments) as a brief description. This used to be the default behaviour.
153# The new default is to treat a multi-line C++ comment block as a detailed 164# The new default is to treat a multi-line C++ comment block as a detailed
154# description. Set this tag to YES if you prefer the old behaviour instead. 165# description. Set this tag to YES if you prefer the old behaviour instead.
155 166
156MULTILINE_CPP_IS_BRIEF = NO 167MULTILINE_CPP_IS_BRIEF = NO
157 168
158# If the DETAILS_AT_TOP tag is set to YES then Doxygen 169# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
159# will output the detailed description near the top, like JavaDoc. 170# member inherits the documentation from any documented member that it
160# If set to NO, the detailed description appears after the member
161# documentation.
162
163DETAILS_AT_TOP = NO
164
165# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
166# member inherits the documentation from any documented member that it
167# re-implements. 171# re-implements.
168 172
169INHERIT_DOCS = YES 173INHERIT_DOCS = YES
170 174
171# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 175# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
172# a new page for each member. If set to NO, the documentation of a member will 176# a new page for each member. If set to NO, the documentation of a member will
173# be part of the file/class/namespace that contains it. 177# be part of the file/class/namespace that contains it.
174 178
175SEPARATE_MEMBER_PAGES = NO 179SEPARATE_MEMBER_PAGES = NO
176 180
177# The TAB_SIZE tag can be used to set the number of spaces in a tab. 181# The TAB_SIZE tag can be used to set the number of spaces in a tab.
178# Doxygen uses this value to replace tabs by spaces in code fragments. 182# Doxygen uses this value to replace tabs by spaces in code fragments.
179 183
180TAB_SIZE = 8 184TAB_SIZE = 8
181 185
182# This tag can be used to specify a number of aliases that acts 186# This tag can be used to specify a number of aliases that acts
183# as commands in the documentation. An alias has the form "name=value". 187# as commands in the documentation. An alias has the form "name=value".
184# For example adding "sideeffect=\par Side Effects:\n" will allow you to 188# For example adding "sideeffect=\par Side Effects:\n" will allow you to
185# put the command \sideeffect (or @sideeffect) in the documentation, which 189# put the command \sideeffect (or @sideeffect) in the documentation, which
186# will result in a user-defined paragraph with heading "Side Effects:". 190# will result in a user-defined paragraph with heading "Side Effects:".
187# You can put \n's in the value part of an alias to insert newlines. 191# You can put \n's in the value part of an alias to insert newlines.
188 192
189ALIASES = 193ALIASES =
190 194
191# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 195# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
192# sources only. Doxygen will then generate output that is more tailored for C. 196# sources only. Doxygen will then generate output that is more tailored for C.
193# For instance, some of the names that are used will be different. The list 197# For instance, some of the names that are used will be different. The list
194# of all members will be omitted, etc. 198# of all members will be omitted, etc.
195 199
196OPTIMIZE_OUTPUT_FOR_C = YES 200OPTIMIZE_OUTPUT_FOR_C = YES
197 201
198# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 202# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
199# sources only. Doxygen will then generate output that is more tailored for 203# sources only. Doxygen will then generate output that is more tailored for
200# Java. For instance, namespaces will be presented as packages, qualified 204# Java. For instance, namespaces will be presented as packages, qualified
201# scopes will look different, etc. 205# scopes will look different, etc.
202 206
203OPTIMIZE_OUTPUT_JAVA = NO 207OPTIMIZE_OUTPUT_JAVA = NO
204 208
205# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 209# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
206# sources only. Doxygen will then generate output that is more tailored for 210# sources only. Doxygen will then generate output that is more tailored for
207# Fortran. 211# Fortran.
208 212
209OPTIMIZE_FOR_FORTRAN = NO 213OPTIMIZE_FOR_FORTRAN = NO
210 214
211# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 215# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
212# sources. Doxygen will then generate output that is tailored for 216# sources. Doxygen will then generate output that is tailored for
213# VHDL. 217# VHDL.
214 218
215OPTIMIZE_OUTPUT_VHDL = NO 219OPTIMIZE_OUTPUT_VHDL = NO
216 220
217# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 221# Doxygen selects the parser to use depending on the extension of the files it
218# to include (a tag file for) the STL sources as input, then you should 222# parses. With this tag you can assign which parser to use for a given extension.
219# set this tag to YES in order to let doxygen match functions declarations and 223# Doxygen has a built-in mapping, but you can override or extend it using this
220# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 224# tag. The format is ext=language, where ext is a file extension, and language
221# func(std::string) {}). This also make the inheritance and collaboration 225# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
226# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
227# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
228# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
229# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
230
231EXTENSION_MAPPING =
232
233# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
234# to include (a tag file for) the STL sources as input, then you should
235# set this tag to YES in order to let doxygen match functions declarations and
236# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
237# func(std::string) {}). This also makes the inheritance and collaboration
222# diagrams that involve STL classes more complete and accurate. 238# diagrams that involve STL classes more complete and accurate.
223 239
224BUILTIN_STL_SUPPORT = NO 240BUILTIN_STL_SUPPORT = NO
@@ -228,425 +244,510 @@ BUILTIN_STL_SUPPORT = NO
228 244
229CPP_CLI_SUPPORT = NO 245CPP_CLI_SUPPORT = NO
230 246
231# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 247# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
232# Doxygen will parse them like normal C++ but will assume all classes use public 248# Doxygen will parse them like normal C++ but will assume all classes use public
233# instead of private inheritance when no explicit protection keyword is present. 249# instead of private inheritance when no explicit protection keyword is present.
234 250
235SIP_SUPPORT = NO 251SIP_SUPPORT = NO
236 252
237# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 253# For Microsoft's IDL there are propget and propput attributes to indicate getter
238# tag is set to YES, then doxygen will reuse the documentation of the first 254# and setter methods for a property. Setting this option to YES (the default)
239# member in the group (if any) for the other members of the group. By default 255# will make doxygen replace the get and set methods by a property in the
256# documentation. This will only work if the methods are indeed getting or
257# setting a simple type. If this is not the case, or you want to show the
258# methods anyway, you should set this option to NO.
259
260IDL_PROPERTY_SUPPORT = YES
261
262# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
263# tag is set to YES, then doxygen will reuse the documentation of the first
264# member in the group (if any) for the other members of the group. By default
240# all members of a group must be documented explicitly. 265# all members of a group must be documented explicitly.
241 266
242DISTRIBUTE_GROUP_DOC = NO 267DISTRIBUTE_GROUP_DOC = NO
243 268
244# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 269# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
245# the same type (for instance a group of public functions) to be put as a 270# the same type (for instance a group of public functions) to be put as a
246# subgroup of that type (e.g. under the Public Functions section). Set it to 271# subgroup of that type (e.g. under the Public Functions section). Set it to
247# NO to prevent subgrouping. Alternatively, this can be done per class using 272# NO to prevent subgrouping. Alternatively, this can be done per class using
248# the \nosubgrouping command. 273# the \nosubgrouping command.
249 274
250SUBGROUPING = YES 275SUBGROUPING = YES
251 276
252# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 277# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
253# is documented as struct, union, or enum with the name of the typedef. So 278# is documented as struct, union, or enum with the name of the typedef. So
254# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 279# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
255# with name TypeT. When disabled the typedef will appear as a member of a file, 280# with name TypeT. When disabled the typedef will appear as a member of a file,
256# namespace, or class. And the struct will be named TypeS. This can typically 281# namespace, or class. And the struct will be named TypeS. This can typically
257# be useful for C code in case the coding convention dictates that all compound 282# be useful for C code in case the coding convention dictates that all compound
258# types are typedef'ed and only the typedef is referenced, never the tag name. 283# types are typedef'ed and only the typedef is referenced, never the tag name.
259 284
260TYPEDEF_HIDES_STRUCT = NO 285TYPEDEF_HIDES_STRUCT = NO
261 286
287# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
288# determine which symbols to keep in memory and which to flush to disk.
289# When the cache is full, less often used symbols will be written to disk.
290# For small to medium size projects (<1000 input files) the default value is
291# probably good enough. For larger projects a too small cache size can cause
292# doxygen to be busy swapping symbols to and from disk most of the time
293# causing a significant performance penalty.
294# If the system has enough physical memory increasing the cache will improve the
295# performance by keeping more symbols in memory. Note that the value works on
296# a logarithmic scale so increasing the size by one will roughly double the
297# memory usage. The cache size is given by this formula:
298# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
299# corresponding to a cache size of 2^16 = 65536 symbols
300
301SYMBOL_CACHE_SIZE = 0
302
262#--------------------------------------------------------------------------- 303#---------------------------------------------------------------------------
263# Build related configuration options 304# Build related configuration options
264#--------------------------------------------------------------------------- 305#---------------------------------------------------------------------------
265 306
266# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 307# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
267# documentation are documented, even if no documentation was available. 308# documentation are documented, even if no documentation was available.
268# Private class members and static file members will be hidden unless 309# Private class members and static file members will be hidden unless
269# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 310# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
270 311
271EXTRACT_ALL = NO 312EXTRACT_ALL = NO
272 313
273# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 314# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
274# will be included in the documentation. 315# will be included in the documentation.
275 316
276EXTRACT_PRIVATE = NO 317EXTRACT_PRIVATE = NO
277 318
278# If the EXTRACT_STATIC tag is set to YES all static members of a file 319# If the EXTRACT_STATIC tag is set to YES all static members of a file
279# will be included in the documentation. 320# will be included in the documentation.
280 321
281EXTRACT_STATIC = YES 322EXTRACT_STATIC = YES
282 323
283# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 324# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
284# defined locally in source files will be included in the documentation. 325# defined locally in source files will be included in the documentation.
285# If set to NO only classes defined in header files are included. 326# If set to NO only classes defined in header files are included.
286 327
287EXTRACT_LOCAL_CLASSES = NO 328EXTRACT_LOCAL_CLASSES = NO
288 329
289# This flag is only useful for Objective-C code. When set to YES local 330# This flag is only useful for Objective-C code. When set to YES local
290# methods, which are defined in the implementation section but not in 331# methods, which are defined in the implementation section but not in
291# the interface are included in the documentation. 332# the interface are included in the documentation.
292# If set to NO (the default) only methods in the interface are included. 333# If set to NO (the default) only methods in the interface are included.
293 334
294EXTRACT_LOCAL_METHODS = NO 335EXTRACT_LOCAL_METHODS = NO
295 336
296# If this flag is set to YES, the members of anonymous namespaces will be 337# If this flag is set to YES, the members of anonymous namespaces will be
297# extracted and appear in the documentation as a namespace called 338# extracted and appear in the documentation as a namespace called
298# 'anonymous_namespace{file}', where file will be replaced with the base 339# 'anonymous_namespace{file}', where file will be replaced with the base
299# name of the file that contains the anonymous namespace. By default 340# name of the file that contains the anonymous namespace. By default
300# anonymous namespace are hidden. 341# anonymous namespaces are hidden.
301 342
302EXTRACT_ANON_NSPACES = NO 343EXTRACT_ANON_NSPACES = NO
303 344
304# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 345# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
305# undocumented members of documented classes, files or namespaces. 346# undocumented members of documented classes, files or namespaces.
306# If set to NO (the default) these members will be included in the 347# If set to NO (the default) these members will be included in the
307# various overviews, but no documentation section is generated. 348# various overviews, but no documentation section is generated.
308# This option has no effect if EXTRACT_ALL is enabled. 349# This option has no effect if EXTRACT_ALL is enabled.
309 350
310HIDE_UNDOC_MEMBERS = NO 351HIDE_UNDOC_MEMBERS = NO
311 352
312# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 353# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
313# undocumented classes that are normally visible in the class hierarchy. 354# undocumented classes that are normally visible in the class hierarchy.
314# If set to NO (the default) these classes will be included in the various 355# If set to NO (the default) these classes will be included in the various
315# overviews. This option has no effect if EXTRACT_ALL is enabled. 356# overviews. This option has no effect if EXTRACT_ALL is enabled.
316 357
317HIDE_UNDOC_CLASSES = NO 358HIDE_UNDOC_CLASSES = NO
318 359
319# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 360# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
320# friend (class|struct|union) declarations. 361# friend (class|struct|union) declarations.
321# If set to NO (the default) these declarations will be included in the 362# If set to NO (the default) these declarations will be included in the
322# documentation. 363# documentation.
323 364
324HIDE_FRIEND_COMPOUNDS = NO 365HIDE_FRIEND_COMPOUNDS = NO
325 366
326# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 367# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
327# documentation blocks found inside the body of a function. 368# documentation blocks found inside the body of a function.
328# If set to NO (the default) these blocks will be appended to the 369# If set to NO (the default) these blocks will be appended to the
329# function's detailed documentation block. 370# function's detailed documentation block.
330 371
331HIDE_IN_BODY_DOCS = NO 372HIDE_IN_BODY_DOCS = NO
332 373
333# The INTERNAL_DOCS tag determines if documentation 374# The INTERNAL_DOCS tag determines if documentation
334# that is typed after a \internal command is included. If the tag is set 375# that is typed after a \internal command is included. If the tag is set
335# to NO (the default) then the documentation will be excluded. 376# to NO (the default) then the documentation will be excluded.
336# Set it to YES to include the internal documentation. 377# Set it to YES to include the internal documentation.
337 378
338INTERNAL_DOCS = NO 379INTERNAL_DOCS = NO
339 380
340# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 381# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
341# file names in lower-case letters. If set to YES upper-case letters are also 382# file names in lower-case letters. If set to YES upper-case letters are also
342# allowed. This is useful if you have classes or files whose names only differ 383# allowed. This is useful if you have classes or files whose names only differ
343# in case and if your file system supports case sensitive file names. Windows 384# in case and if your file system supports case sensitive file names. Windows
344# and Mac users are advised to set this option to NO. 385# and Mac users are advised to set this option to NO.
345 386
346CASE_SENSE_NAMES = YES 387CASE_SENSE_NAMES = YES
347 388
348# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 389# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
349# will show members with their full class and namespace scopes in the 390# will show members with their full class and namespace scopes in the
350# documentation. If set to YES the scope will be hidden. 391# documentation. If set to YES the scope will be hidden.
351 392
352HIDE_SCOPE_NAMES = NO 393HIDE_SCOPE_NAMES = NO
353 394
354# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 395# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
355# will put a list of the files that are included by a file in the documentation 396# will put a list of the files that are included by a file in the documentation
356# of that file. 397# of that file.
357 398
358SHOW_INCLUDE_FILES = NO 399SHOW_INCLUDE_FILES = NO
359 400
360# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 401# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
402# will list include files with double quotes in the documentation
403# rather than with sharp brackets.
404
405FORCE_LOCAL_INCLUDES = NO
406
407# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
361# is inserted in the documentation for inline members. 408# is inserted in the documentation for inline members.
362 409
363INLINE_INFO = YES 410INLINE_INFO = YES
364 411
365# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 412# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
366# will sort the (detailed) documentation of file and class members 413# will sort the (detailed) documentation of file and class members
367# alphabetically by member name. If set to NO the members will appear in 414# alphabetically by member name. If set to NO the members will appear in
368# declaration order. 415# declaration order.
369 416
370SORT_MEMBER_DOCS = NO 417SORT_MEMBER_DOCS = NO
371 418
372# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 419# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
373# brief documentation of file, namespace and class members alphabetically 420# brief documentation of file, namespace and class members alphabetically
374# by member name. If set to NO (the default) the members will appear in 421# by member name. If set to NO (the default) the members will appear in
375# declaration order. 422# declaration order.
376 423
377SORT_BRIEF_DOCS = NO 424SORT_BRIEF_DOCS = NO
378 425
379# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 426# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
380# hierarchy of group names into alphabetical order. If set to NO (the default) 427# will sort the (brief and detailed) documentation of class members so that
428# constructors and destructors are listed first. If set to NO (the default)
429# the constructors will appear in the respective orders defined by
430# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
431# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
432# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
433
434SORT_MEMBERS_CTORS_1ST = NO
435
436# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
437# hierarchy of group names into alphabetical order. If set to NO (the default)
381# the group names will appear in their defined order. 438# the group names will appear in their defined order.
382 439
383SORT_GROUP_NAMES = NO 440SORT_GROUP_NAMES = NO
384 441
385# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 442# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
386# sorted by fully-qualified names, including namespaces. If set to 443# sorted by fully-qualified names, including namespaces. If set to
387# NO (the default), the class list will be sorted only by class name, 444# NO (the default), the class list will be sorted only by class name,
388# not including the namespace part. 445# not including the namespace part.
389# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 446# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
390# Note: This option applies only to the class list, not to the 447# Note: This option applies only to the class list, not to the
391# alphabetical list. 448# alphabetical list.
392 449
393SORT_BY_SCOPE_NAME = NO 450SORT_BY_SCOPE_NAME = NO
394 451
395# The GENERATE_TODOLIST tag can be used to enable (YES) or 452# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a
396# disable (NO) the todo list. This list is created by putting \todo 453# match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
454# will still accept a match between prototype and implementation in such cases.
455
456STRICT_PROTO_MATCHING = NO
457
458# The GENERATE_TODOLIST tag can be used to enable (YES) or
459# disable (NO) the todo list. This list is created by putting \todo
397# commands in the documentation. 460# commands in the documentation.
398 461
399GENERATE_TODOLIST = YES 462GENERATE_TODOLIST = YES
400 463
401# The GENERATE_TESTLIST tag can be used to enable (YES) or 464# The GENERATE_TESTLIST tag can be used to enable (YES) or
402# disable (NO) the test list. This list is created by putting \test 465# disable (NO) the test list. This list is created by putting \test
403# commands in the documentation. 466# commands in the documentation.
404 467
405GENERATE_TESTLIST = YES 468GENERATE_TESTLIST = YES
406 469
407# The GENERATE_BUGLIST tag can be used to enable (YES) or 470# The GENERATE_BUGLIST tag can be used to enable (YES) or
408# disable (NO) the bug list. This list is created by putting \bug 471# disable (NO) the bug list. This list is created by putting \bug
409# commands in the documentation. 472# commands in the documentation.
410 473
411GENERATE_BUGLIST = YES 474GENERATE_BUGLIST = YES
412 475
413# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 476# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
414# disable (NO) the deprecated list. This list is created by putting 477# disable (NO) the deprecated list. This list is created by putting
415# \deprecated commands in the documentation. 478# \deprecated commands in the documentation.
416 479
417GENERATE_DEPRECATEDLIST= YES 480GENERATE_DEPRECATEDLIST= YES
418 481
419# The ENABLED_SECTIONS tag can be used to enable conditional 482# The ENABLED_SECTIONS tag can be used to enable conditional
420# documentation sections, marked by \if sectionname ... \endif. 483# documentation sections, marked by \if sectionname ... \endif.
421 484
422ENABLED_SECTIONS = 485ENABLED_SECTIONS =
423 486
424# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 487# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
425# the initial value of a variable or define consists of for it to appear in 488# the initial value of a variable or macro consists of for it to appear in
426# the documentation. If the initializer consists of more lines than specified 489# the documentation. If the initializer consists of more lines than specified
427# here it will be hidden. Use a value of 0 to hide initializers completely. 490# here it will be hidden. Use a value of 0 to hide initializers completely.
428# The appearance of the initializer of individual variables and defines in the 491# The appearance of the initializer of individual variables and macros in the
429# documentation can be controlled using \showinitializer or \hideinitializer 492# documentation can be controlled using \showinitializer or \hideinitializer
430# command in the documentation regardless of this setting. 493# command in the documentation regardless of this setting.
431 494
432MAX_INITIALIZER_LINES = 30 495MAX_INITIALIZER_LINES = 30
433 496
434# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 497# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
435# at the bottom of the documentation of classes and structs. If set to YES the 498# at the bottom of the documentation of classes and structs. If set to YES the
436# list will mention the files that were used to generate the documentation. 499# list will mention the files that were used to generate the documentation.
437 500
438SHOW_USED_FILES = NO 501SHOW_USED_FILES = NO
439 502
440# If the sources in your project are distributed over multiple directories 503# If the sources in your project are distributed over multiple directories
441# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 504# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
442# in the documentation. The default is NO. 505# in the documentation. The default is NO.
443 506
444SHOW_DIRECTORIES = NO 507SHOW_DIRECTORIES = NO
445 508
446# The FILE_VERSION_FILTER tag can be used to specify a program or script that 509# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
447# doxygen should invoke to get the current version for each file (typically from 510# This will remove the Files entry from the Quick Index and from the
448# the version control system). Doxygen will invoke the program by executing (via 511# Folder Tree View (if specified). The default is YES.
449# popen()) the command <command> <input-file>, where <command> is the value of 512
450# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 513SHOW_FILES = YES
451# provided by doxygen. Whatever the program writes to standard output 514
515# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
516# Namespaces page.
517# This will remove the Namespaces entry from the Quick Index
518# and from the Folder Tree View (if specified). The default is YES.
519
520SHOW_NAMESPACES = YES
521
522# The FILE_VERSION_FILTER tag can be used to specify a program or script that
523# doxygen should invoke to get the current version for each file (typically from
524# the version control system). Doxygen will invoke the program by executing (via
525# popen()) the command <command> <input-file>, where <command> is the value of
526# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
527# provided by doxygen. Whatever the program writes to standard output
452# is used as the file version. See the manual for examples. 528# is used as the file version. See the manual for examples.
453 529
454FILE_VERSION_FILTER = 530FILE_VERSION_FILTER =
531
532# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
533# by doxygen. The layout file controls the global structure of the generated
534# output files in an output format independent way. The create the layout file
535# that represents doxygen's defaults, run doxygen with the -l option.
536# You can optionally specify a file name after the option, if omitted
537# DoxygenLayout.xml will be used as the name of the layout file.
538
539LAYOUT_FILE =
455 540
456#--------------------------------------------------------------------------- 541#---------------------------------------------------------------------------
457# configuration options related to warning and progress messages 542# configuration options related to warning and progress messages
458#--------------------------------------------------------------------------- 543#---------------------------------------------------------------------------
459 544
460# The QUIET tag can be used to turn on/off the messages that are generated 545# The QUIET tag can be used to turn on/off the messages that are generated
461# by doxygen. Possible values are YES and NO. If left blank NO is used. 546# by doxygen. Possible values are YES and NO. If left blank NO is used.
462 547
463QUIET = NO 548QUIET = NO
464 549
465# The WARNINGS tag can be used to turn on/off the warning messages that are 550# The WARNINGS tag can be used to turn on/off the warning messages that are
466# generated by doxygen. Possible values are YES and NO. If left blank 551# generated by doxygen. Possible values are YES and NO. If left blank
467# NO is used. 552# NO is used.
468 553
469WARNINGS = YES 554WARNINGS = YES
470 555
471# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 556# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
472# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 557# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
473# automatically be disabled. 558# automatically be disabled.
474 559
475WARN_IF_UNDOCUMENTED = YES 560WARN_IF_UNDOCUMENTED = YES
476 561
477# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 562# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
478# potential errors in the documentation, such as not documenting some 563# potential errors in the documentation, such as not documenting some
479# parameters in a documented function, or documenting parameters that 564# parameters in a documented function, or documenting parameters that
480# don't exist or using markup commands wrongly. 565# don't exist or using markup commands wrongly.
481 566
482WARN_IF_DOC_ERROR = YES 567WARN_IF_DOC_ERROR = YES
483 568
484# This WARN_NO_PARAMDOC option can be abled to get warnings for 569# The WARN_NO_PARAMDOC option can be enabled to get warnings for
485# functions that are documented, but have no documentation for their parameters 570# functions that are documented, but have no documentation for their parameters
486# or return value. If set to NO (the default) doxygen will only warn about 571# or return value. If set to NO (the default) doxygen will only warn about
487# wrong or incomplete parameter documentation, but not about the absence of 572# wrong or incomplete parameter documentation, but not about the absence of
488# documentation. 573# documentation.
489 574
490WARN_NO_PARAMDOC = YES 575WARN_NO_PARAMDOC = YES
491 576
492# The WARN_FORMAT tag determines the format of the warning messages that 577# The WARN_FORMAT tag determines the format of the warning messages that
493# doxygen can produce. The string should contain the $file, $line, and $text 578# doxygen can produce. The string should contain the $file, $line, and $text
494# tags, which will be replaced by the file and line number from which the 579# tags, which will be replaced by the file and line number from which the
495# warning originated and the warning text. Optionally the format may contain 580# warning originated and the warning text. Optionally the format may contain
496# $version, which will be replaced by the version of the file (if it could 581# $version, which will be replaced by the version of the file (if it could
497# be obtained via FILE_VERSION_FILTER) 582# be obtained via FILE_VERSION_FILTER)
498 583
499WARN_FORMAT = "$file:$line: $text" 584WARN_FORMAT = "$file:$line: $text"
500 585
501# The WARN_LOGFILE tag can be used to specify a file to which warning 586# The WARN_LOGFILE tag can be used to specify a file to which warning
502# and error messages should be written. If left blank the output is written 587# and error messages should be written. If left blank the output is written
503# to stderr. 588# to stderr.
504 589
505WARN_LOGFILE = 590WARN_LOGFILE =
506 591
507#--------------------------------------------------------------------------- 592#---------------------------------------------------------------------------
508# configuration options related to the input files 593# configuration options related to the input files
509#--------------------------------------------------------------------------- 594#---------------------------------------------------------------------------
510 595
511# The INPUT tag can be used to specify the files and/or directories that contain 596# The INPUT tag can be used to specify the files and/or directories that contain
512# documented source files. You may enter file names like "myfile.cpp" or 597# documented source files. You may enter file names like "myfile.cpp" or
513# directories like "/usr/src/myproject". Separate the files or directories 598# directories like "/usr/src/myproject". Separate the files or directories
514# with spaces. 599# with spaces.
515 600
516INPUT = @top_srcdir@/src/include @top_srcdir@/src/lib 601INPUT = @top_srcdir@/src/include \
602 @top_srcdir@/src/lib
517 603
518# This tag can be used to specify the character encoding of the source files 604# This tag can be used to specify the character encoding of the source files
519# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 605# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
520# also the default input encoding. Doxygen uses libiconv (or the iconv built 606# also the default input encoding. Doxygen uses libiconv (or the iconv built
521# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 607# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
522# the list of possible encodings. 608# the list of possible encodings.
523 609
524INPUT_ENCODING = UTF-8 610INPUT_ENCODING = UTF-8
525 611
526# If the value of the INPUT tag contains directories, you can use the 612# If the value of the INPUT tag contains directories, you can use the
527# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 613# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
528# and *.h) to filter out the source-files in the directories. If left 614# and *.h) to filter out the source-files in the directories. If left
529# blank the following patterns are tested: 615# blank the following patterns are tested:
530# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 616# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
531# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 617# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
618# *.f90 *.f *.for *.vhd *.vhdl
532 619
533FILE_PATTERNS = *.c *.h *.x 620FILE_PATTERNS = *.c \
621 *.h \
622 *.x
534 623
535# The RECURSIVE tag can be used to turn specify whether or not subdirectories 624# The RECURSIVE tag can be used to turn specify whether or not subdirectories
536# should be searched for input files as well. Possible values are YES and NO. 625# should be searched for input files as well. Possible values are YES and NO.
537# If left blank NO is used. 626# If left blank NO is used.
538 627
539RECURSIVE = YES 628RECURSIVE = YES
540 629
541# The EXCLUDE tag can be used to specify files and/or directories that should 630# The EXCLUDE tag can be used to specify files and/or directories that should
542# excluded from the INPUT source files. This way you can easily exclude a 631# excluded from the INPUT source files. This way you can easily exclude a
543# subdirectory from a directory tree whose root is specified with the INPUT tag. 632# subdirectory from a directory tree whose root is specified with the INPUT tag.
544 633
545EXCLUDE = @top_srcdir@/src/lib/eina_amalgamation.c 634EXCLUDE = @top_builddir@/src/lib/eina_amalgamation.c
546 635
547# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 636# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
548# directories that are symbolic links (a Unix filesystem feature) are excluded 637# directories that are symbolic links (a Unix file system feature) are excluded
549# from the input. 638# from the input.
550 639
551EXCLUDE_SYMLINKS = NO 640EXCLUDE_SYMLINKS = NO
552 641
553# If the value of the INPUT tag contains directories, you can use the 642# If the value of the INPUT tag contains directories, you can use the
554# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 643# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
555# certain files from those directories. Note that the wildcards are matched 644# certain files from those directories. Note that the wildcards are matched
556# against the file with absolute path, so to exclude all test directories 645# against the file with absolute path, so to exclude all test directories
557# for example use the pattern */test/* 646# for example use the pattern */test/*
558 647
559EXCLUDE_PATTERNS = 648EXCLUDE_PATTERNS =
560 649
561# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 650# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
562# (namespaces, classes, functions, etc.) that should be excluded from the 651# (namespaces, classes, functions, etc.) that should be excluded from the
563# output. The symbol name can be a fully qualified name, a word, or if the 652# output. The symbol name can be a fully qualified name, a word, or if the
564# wildcard * is used, a substring. Examples: ANamespace, AClass, 653# wildcard * is used, a substring. Examples: ANamespace, AClass,
565# AClass::ANamespace, ANamespace::*Test 654# AClass::ANamespace, ANamespace::*Test
566 655
567EXCLUDE_SYMBOLS = 656EXCLUDE_SYMBOLS =
568 657
569# The EXAMPLE_PATH tag can be used to specify one or more files or 658# The EXAMPLE_PATH tag can be used to specify one or more files or
570# directories that contain example code fragments that are included (see 659# directories that contain example code fragments that are included (see
571# the \include command). 660# the \include command).
572 661
573EXAMPLE_PATH = @top_srcdir@/src/examples 662EXAMPLE_PATH = @top_srcdir@/src/examples
574 663
575# If the value of the EXAMPLE_PATH tag contains directories, you can use the 664# If the value of the EXAMPLE_PATH tag contains directories, you can use the
576# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 665# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
577# and *.h) to filter out the source-files in the directories. If left 666# and *.h) to filter out the source-files in the directories. If left
578# blank all files are included. 667# blank all files are included.
579 668
580EXAMPLE_PATTERNS = *.c,*.h,*.x 669EXAMPLE_PATTERNS = *.c,*.h,*.x
581 670
582# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 671# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
583# searched for input files to be used with the \include or \dontinclude 672# searched for input files to be used with the \include or \dontinclude
584# commands irrespective of the value of the RECURSIVE tag. 673# commands irrespective of the value of the RECURSIVE tag.
585# Possible values are YES and NO. If left blank NO is used. 674# Possible values are YES and NO. If left blank NO is used.
586 675
587EXAMPLE_RECURSIVE = NO 676EXAMPLE_RECURSIVE = NO
588 677
589# The IMAGE_PATH tag can be used to specify one or more files or 678# The IMAGE_PATH tag can be used to specify one or more files or
590# directories that contain image that are included in the documentation (see 679# directories that contain image that are included in the documentation (see
591# the \image command). 680# the \image command).
592 681
593IMAGE_PATH = doc/img doc/benchmark 682IMAGE_PATH = @top_srcdir@/doc/img \
683 @top_srcdir@/doc/benchmark
594 684
595# The INPUT_FILTER tag can be used to specify a program that doxygen should 685# The INPUT_FILTER tag can be used to specify a program that doxygen should
596# invoke to filter for each input file. Doxygen will invoke the filter program 686# invoke to filter for each input file. Doxygen will invoke the filter program
597# by executing (via popen()) the command <filter> <input-file>, where <filter> 687# by executing (via popen()) the command <filter> <input-file>, where <filter>
598# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 688# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
599# input file. Doxygen will then use the output that the filter program writes 689# input file. Doxygen will then use the output that the filter program writes
600# to standard output. If FILTER_PATTERNS is specified, this tag will be 690# to standard output.
691# If FILTER_PATTERNS is specified, this tag will be
601# ignored. 692# ignored.
602 693
603INPUT_FILTER = 694INPUT_FILTER =
604 695
605# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 696# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
606# basis. Doxygen will compare the file name with each pattern and apply the 697# basis.
607# filter if there is a match. The filters are a list of the form: 698# Doxygen will compare the file name with each pattern and apply the
608# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 699# filter if there is a match.
609# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 700# The filters are a list of the form:
610# is applied to all files. 701# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
702# info on how filters are used. If FILTER_PATTERNS is empty or if
703# non of the patterns match the file name, INPUT_FILTER is applied.
611 704
612FILTER_PATTERNS = 705FILTER_PATTERNS =
613 706
614# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 707# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
615# INPUT_FILTER) will be used to filter the input files when producing source 708# INPUT_FILTER) will be used to filter the input files when producing source
616# files to browse (i.e. when SOURCE_BROWSER is set to YES). 709# files to browse (i.e. when SOURCE_BROWSER is set to YES).
617 710
618FILTER_SOURCE_FILES = NO 711FILTER_SOURCE_FILES = NO
619 712
713# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
714# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
715# and it is also possible to disable source filtering for a specific pattern
716# using *.ext= (so without naming a filter). This option only has effect when
717# FILTER_SOURCE_FILES is enabled.
718
719FILTER_SOURCE_PATTERNS =
720
620#--------------------------------------------------------------------------- 721#---------------------------------------------------------------------------
621# configuration options related to source browsing 722# configuration options related to source browsing
622#--------------------------------------------------------------------------- 723#---------------------------------------------------------------------------
623 724
624# If the SOURCE_BROWSER tag is set to YES then a list of source files will 725# If the SOURCE_BROWSER tag is set to YES then a list of source files will
625# be generated. Documented entities will be cross-referenced with these sources. 726# be generated. Documented entities will be cross-referenced with these sources.
626# Note: To get rid of all source code in the generated output, make sure also 727# Note: To get rid of all source code in the generated output, make sure also
627# VERBATIM_HEADERS is set to NO. 728# VERBATIM_HEADERS is set to NO.
628 729
629SOURCE_BROWSER = NO 730SOURCE_BROWSER = NO
630 731
631# Setting the INLINE_SOURCES tag to YES will include the body 732# Setting the INLINE_SOURCES tag to YES will include the body
632# of functions and classes directly in the documentation. 733# of functions and classes directly in the documentation.
633 734
634INLINE_SOURCES = NO 735INLINE_SOURCES = NO
635 736
636# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 737# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
637# doxygen to hide any special comment blocks from generated source code 738# doxygen to hide any special comment blocks from generated source code
638# fragments. Normal C and C++ comments will always remain visible. 739# fragments. Normal C and C++ comments will always remain visible.
639 740
640STRIP_CODE_COMMENTS = YES 741STRIP_CODE_COMMENTS = YES
641 742
642# If the REFERENCED_BY_RELATION tag is set to YES (the default) 743# If the REFERENCED_BY_RELATION tag is set to YES
643# then for each documented function all documented 744# then for each documented function all documented
644# functions referencing it will be listed. 745# functions referencing it will be listed.
645 746
646REFERENCED_BY_RELATION = YES 747REFERENCED_BY_RELATION = YES
647 748
648# If the REFERENCES_RELATION tag is set to YES (the default) 749# If the REFERENCES_RELATION tag is set to YES
649# then for each documented function all documented entities 750# then for each documented function all documented entities
650# called/used by that function will be listed. 751# called/used by that function will be listed.
651 752
652REFERENCES_RELATION = YES 753REFERENCES_RELATION = YES
@@ -654,20 +755,21 @@ REFERENCES_RELATION = YES
654# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 755# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
655# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 756# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
656# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 757# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
657# link to the source code. Otherwise they will link to the documentstion. 758# link to the source code.
759# Otherwise they will link to the documentation.
658 760
659REFERENCES_LINK_SOURCE = YES 761REFERENCES_LINK_SOURCE = YES
660 762
661# If the USE_HTAGS tag is set to YES then the references to source code 763# If the USE_HTAGS tag is set to YES then the references to source code
662# will point to the HTML generated by the htags(1) tool instead of doxygen 764# will point to the HTML generated by the htags(1) tool instead of doxygen
663# built-in source browser. The htags tool is part of GNU's global source 765# built-in source browser. The htags tool is part of GNU's global source
664# tagging system (see http://www.gnu.org/software/global/global.html). You 766# tagging system (see http://www.gnu.org/software/global/global.html). You
665# will need version 4.8.6 or higher. 767# will need version 4.8.6 or higher.
666 768
667USE_HTAGS = NO 769USE_HTAGS = NO
668 770
669# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 771# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
670# will generate a verbatim copy of the header file for each class for 772# will generate a verbatim copy of the header file for each class for
671# which an include is specified. Set to NO to disable this. 773# which an include is specified. Set to NO to disable this.
672 774
673VERBATIM_HEADERS = NO 775VERBATIM_HEADERS = NO
@@ -676,312 +778,513 @@ VERBATIM_HEADERS = NO
676# configuration options related to the alphabetical class index 778# configuration options related to the alphabetical class index
677#--------------------------------------------------------------------------- 779#---------------------------------------------------------------------------
678 780
679# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 781# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
680# of all compounds will be generated. Enable this if the project 782# of all compounds will be generated. Enable this if the project
681# contains a lot of classes, structs, unions or interfaces. 783# contains a lot of classes, structs, unions or interfaces.
682 784
683ALPHABETICAL_INDEX = YES 785ALPHABETICAL_INDEX = YES
684 786
685# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 787# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
686# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 788# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
687# in which this list will be split (can be a number in the range [1..20]) 789# in which this list will be split (can be a number in the range [1..20])
688 790
689COLS_IN_ALPHA_INDEX = 2 791COLS_IN_ALPHA_INDEX = 2
690 792
691# In case all classes in a project start with a common prefix, all 793# In case all classes in a project start with a common prefix, all
692# classes will be put under the same header in the alphabetical index. 794# classes will be put under the same header in the alphabetical index.
693# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 795# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
694# should be ignored while generating the index headers. 796# should be ignored while generating the index headers.
695 797
696IGNORE_PREFIX = 798IGNORE_PREFIX = eina_ \
799 _eina_ \
800 Eina_ \
801 _Eina_ \
802 EINA_ \
803 _EINA_
697 804
698#--------------------------------------------------------------------------- 805#---------------------------------------------------------------------------
699# configuration options related to the HTML output 806# configuration options related to the HTML output
700#--------------------------------------------------------------------------- 807#---------------------------------------------------------------------------
701 808
702# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 809# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
703# generate HTML output. 810# generate HTML output.
704 811
705GENERATE_HTML = YES 812GENERATE_HTML = YES
706 813
707# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 814# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
708# If a relative path is entered the value of OUTPUT_DIRECTORY will be 815# If a relative path is entered the value of OUTPUT_DIRECTORY will be
709# put in front of it. If left blank `html' will be used as the default path. 816# put in front of it. If left blank `html' will be used as the default path.
710 817
711HTML_OUTPUT = html 818HTML_OUTPUT = html
712 819
713# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 820# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
714# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 821# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
715# doxygen will generate files with .html extension. 822# doxygen will generate files with .html extension.
716 823
717HTML_FILE_EXTENSION = .html 824HTML_FILE_EXTENSION = .html
718 825
719# The HTML_HEADER tag can be used to specify a personal HTML header for 826# The HTML_HEADER tag can be used to specify a personal HTML header for
720# each generated HTML page. If it is left blank doxygen will generate a 827# each generated HTML page. If it is left blank doxygen will generate a
721# standard header. 828# standard header.
722 829
723HTML_HEADER = @srcdir@/head.html 830HTML_HEADER = @srcdir@/head.html
724 831
725# The HTML_FOOTER tag can be used to specify a personal HTML footer for 832# The HTML_FOOTER tag can be used to specify a personal HTML footer for
726# each generated HTML page. If it is left blank doxygen will generate a 833# each generated HTML page. If it is left blank doxygen will generate a
727# standard footer. 834# standard footer.
728 835
729HTML_FOOTER = @srcdir@/foot.html 836HTML_FOOTER = @srcdir@/foot.html
730 837
731# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 838# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
732# style sheet that is used by each HTML page. It can be used to 839# style sheet that is used by each HTML page. It can be used to
733# fine-tune the look of the HTML output. If the tag is left blank doxygen 840# fine-tune the look of the HTML output. If the tag is left blank doxygen
734# will generate a default style sheet. Note that doxygen will try to copy 841# will generate a default style sheet. Note that doxygen will try to copy
735# the style sheet file to the HTML output directory, so don't put your own 842# the style sheet file to the HTML output directory, so don't put your own
736# stylesheet in the HTML output directory as well, or it will be erased! 843# stylesheet in the HTML output directory as well, or it will be erased!
737 844
738HTML_STYLESHEET = @srcdir@/e.css 845HTML_STYLESHEET = @srcdir@/e.css
739 846
740# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 847# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
741# files or namespaces will be aligned in HTML using tables. If set to 848# Doxygen will adjust the colors in the stylesheet and background images
849# according to this color. Hue is specified as an angle on a colorwheel,
850# see http://en.wikipedia.org/wiki/Hue for more information.
851# For instance the value 0 represents red, 60 is yellow, 120 is green,
852# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
853# The allowed range is 0 to 359.
854
855HTML_COLORSTYLE_HUE = 220
856
857# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
858# the colors in the HTML output. For a value of 0 the output will use
859# grayscales only. A value of 255 will produce the most vivid colors.
860
861HTML_COLORSTYLE_SAT = 100
862
863# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
864# the luminance component of the colors in the HTML output. Values below
865# 100 gradually make the output lighter, whereas values above 100 make
866# the output darker. The value divided by 100 is the actual gamma applied,
867# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
868# and 100 does not change the gamma.
869
870HTML_COLORSTYLE_GAMMA = 80
871
872# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
873# page will contain the date and time when the page was generated. Setting
874# this to NO can help when comparing the output of multiple runs.
875
876HTML_TIMESTAMP = YES
877
878# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
879# files or namespaces will be aligned in HTML using tables. If set to
742# NO a bullet list will be used. 880# NO a bullet list will be used.
743 881
744HTML_ALIGN_MEMBERS = YES 882HTML_ALIGN_MEMBERS = YES
745 883
746# If the GENERATE_HTMLHELP tag is set to YES, additional index files 884# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
747# will be generated that can be used as input for tools like the 885# documentation will contain sections that can be hidden and shown after the
748# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 886# page has loaded. For this to work a browser that supports
749# of the generated HTML documentation. 887# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
888# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
750 889
751GENERATE_HTMLHELP = NO 890HTML_DYNAMIC_SECTIONS = YES
752 891
753# If the GENERATE_DOCSET tag is set to YES, additional index files 892# If the GENERATE_DOCSET tag is set to YES, additional index files
754# will be generated that can be used as input for Apple's Xcode 3 893# will be generated that can be used as input for Apple's Xcode 3
755# integrated development environment, introduced with OSX 10.5 (Leopard). 894# integrated development environment, introduced with OSX 10.5 (Leopard).
756# To create a documentation set, doxygen will generate a Makefile in the 895# To create a documentation set, doxygen will generate a Makefile in the
757# HTML output directory. Running make will produce the docset in that 896# HTML output directory. Running make will produce the docset in that
758# directory and running "make install" will install the docset in 897# directory and running "make install" will install the docset in
759# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 898# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
760# it at startup. 899# it at startup.
900# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
901# for more information.
761 902
762GENERATE_DOCSET = NO 903GENERATE_DOCSET = YES
763 904
764# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 905# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
765# feed. A documentation feed provides an umbrella under which multiple 906# feed. A documentation feed provides an umbrella under which multiple
766# documentation sets from a single provider (such as a company or product suite) 907# documentation sets from a single provider (such as a company or product suite)
767# can be grouped. 908# can be grouped.
768 909
769DOCSET_FEEDNAME = "Doxygen generated docs" 910DOCSET_FEEDNAME = "Doxygen generated docs"
770 911
771# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 912# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
772# should uniquely identify the documentation set bundle. This should be a 913# should uniquely identify the documentation set bundle. This should be a
773# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 914# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
774# will append .docset to the name. 915# will append .docset to the name.
775 916
776DOCSET_BUNDLE_ID = org.enlightenment.Eina 917DOCSET_BUNDLE_ID = org.enlightenment.Eina
777 918
778# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 919# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
779# documentation will contain sections that can be hidden and shown after the 920# the documentation publisher. This should be a reverse domain-name style
780# page has loaded. For this to work a browser that supports 921# string, e.g. com.mycompany.MyDocSet.documentation.
781# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
782# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
783 922
784HTML_DYNAMIC_SECTIONS = NO 923DOCSET_PUBLISHER_ID = org.enlightenment.Eina
785 924
786# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 925# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
787# be used to specify the file name of the resulting .chm file. You 926
788# can add a path in front of the file if the result should not be 927DOCSET_PUBLISHER_NAME = Enlightenment
928
929# If the GENERATE_HTMLHELP tag is set to YES, additional index files
930# will be generated that can be used as input for tools like the
931# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
932# of the generated HTML documentation.
933
934GENERATE_HTMLHELP = YES
935
936# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
937# be used to specify the file name of the resulting .chm file. You
938# can add a path in front of the file if the result should not be
789# written to the html output directory. 939# written to the html output directory.
790 940
791CHM_FILE = 941CHM_FILE =
792 942
793# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 943# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
794# be used to specify the location (absolute path including file name) of 944# be used to specify the location (absolute path including file name) of
795# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 945# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
796# the HTML help compiler on the generated index.hhp. 946# the HTML help compiler on the generated index.hhp.
797 947
798HHC_LOCATION = 948HHC_LOCATION =
799 949
800# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 950# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
801# controls if a separate .chi index file is generated (YES) or that 951# controls if a separate .chi index file is generated (YES) or that
802# it should be included in the master .chm file (NO). 952# it should be included in the master .chm file (NO).
803 953
804GENERATE_CHI = NO 954GENERATE_CHI = NO
805 955
806# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 956# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
807# controls whether a binary table of contents is generated (YES) or a 957# is used to encode HtmlHelp index (hhk), content (hhc) and project file
958# content.
959
960CHM_INDEX_ENCODING =
961
962# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
963# controls whether a binary table of contents is generated (YES) or a
808# normal table of contents (NO) in the .chm file. 964# normal table of contents (NO) in the .chm file.
809 965
810BINARY_TOC = NO 966BINARY_TOC = NO
811 967
812# The TOC_EXPAND flag can be set to YES to add extra items for group members 968# The TOC_EXPAND flag can be set to YES to add extra items for group members
813# to the contents of the HTML help documentation and to the tree view. 969# to the contents of the HTML help documentation and to the tree view.
814 970
815TOC_EXPAND = NO 971TOC_EXPAND = NO
816 972
817# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 973# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
818# top of each HTML page. The value NO (the default) enables the index and 974# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
975# that can be used as input for Qt's qhelpgenerator to generate a
976# Qt Compressed Help (.qch) of the generated HTML documentation.
977
978GENERATE_QHP = NO
979
980# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
981# be used to specify the file name of the resulting .qch file.
982# The path specified is relative to the HTML output folder.
983
984QCH_FILE =
985
986# The QHP_NAMESPACE tag specifies the namespace to use when generating
987# Qt Help Project output. For more information please see
988# http://doc.trolltech.com/qthelpproject.html#namespace
989
990QHP_NAMESPACE = org.enlightenment.Eina
991
992# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
993# Qt Help Project output. For more information please see
994# http://doc.trolltech.com/qthelpproject.html#virtual-folders
995
996QHP_VIRTUAL_FOLDER = doc
997
998# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
999# add. For more information please see
1000# http://doc.trolltech.com/qthelpproject.html#custom-filters
1001
1002QHP_CUST_FILTER_NAME =
1003
1004# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
1005# custom filter to add. For more information please see
1006# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
1007# Qt Help Project / Custom Filters</a>.
1008
1009QHP_CUST_FILTER_ATTRS =
1010
1011# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1012# project's
1013# filter section matches.
1014# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
1015# Qt Help Project / Filter Attributes</a>.
1016
1017QHP_SECT_FILTER_ATTRS =
1018
1019# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
1020# be used to specify the location of Qt's qhelpgenerator.
1021# If non-empty doxygen will try to run qhelpgenerator on the generated
1022# .qhp file.
1023
1024QHG_LOCATION =
1025
1026# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
1027# will be generated, which together with the HTML files, form an Eclipse help
1028# plugin. To install this plugin and make it available under the help contents
1029# menu in Eclipse, the contents of the directory containing the HTML and XML
1030# files needs to be copied into the plugins directory of eclipse. The name of
1031# the directory within the plugins directory should be the same as
1032# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
1033# the help appears.
1034
1035GENERATE_ECLIPSEHELP = NO
1036
1037# A unique identifier for the eclipse help plugin. When installing the plugin
1038# the directory name containing the HTML and XML files should also have
1039# this name.
1040
1041ECLIPSE_DOC_ID = org.enlightenment.Eina
1042
1043# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
1044# top of each HTML page. The value NO (the default) enables the index and
819# the value YES disables it. 1045# the value YES disables it.
820 1046
821DISABLE_INDEX = YES 1047DISABLE_INDEX = YES
822 1048
823# This tag can be used to set the number of enum values (range [1..20]) 1049# This tag can be used to set the number of enum values (range [0,1..20])
824# that doxygen will group on one line in the generated HTML documentation. 1050# that doxygen will group on one line in the generated HTML documentation.
1051# Note that a value of 0 will completely suppress the enum values from appearing in the overview section.
825 1052
826ENUM_VALUES_PER_LINE = 1 1053ENUM_VALUES_PER_LINE = 1
827 1054
828# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be 1055# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
829# generated containing a tree-like index structure (just like the one that 1056# structure should be generated to display hierarchical information.
830# is generated for HTML Help). For this to work a browser that supports 1057# If the tag value is set to YES, a side panel will be generated
831# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 1058# containing a tree-like index structure (just like the one that
832# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 1059# is generated for HTML Help). For this to work a browser that supports
833# probably better off using the HTML help feature. 1060# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1061# Windows users are probably better off using the HTML help feature.
834 1062
835GENERATE_TREEVIEW = NO 1063GENERATE_TREEVIEW = NO
836 1064
837# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 1065# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
838# used to set the initial width (in pixels) of the frame in which the tree 1066# and Class Hierarchy pages using a tree view instead of an ordered list.
1067
1068USE_INLINE_TREES = NO
1069
1070# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
1071# used to set the initial width (in pixels) of the frame in which the tree
839# is shown. 1072# is shown.
840 1073
841TREEVIEW_WIDTH = 250 1074TREEVIEW_WIDTH = 250
842 1075
1076# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
1077# links to external symbols imported via tag files in a separate window.
1078
1079EXT_LINKS_IN_WINDOW = NO
1080
1081# Use this tag to change the font size of Latex formulas included
1082# as images in the HTML documentation. The default is 10. Note that
1083# when you change the font size after a successful doxygen run you need
1084# to manually remove any form_*.png images from the HTML output directory
1085# to force them to be regenerated.
1086
1087FORMULA_FONTSIZE = 10
1088
1089# Use the FORMULA_TRANPARENT tag to determine whether or not the images
1090# generated for formulas are transparent PNGs. Transparent PNGs are
1091# not supported properly for IE 6.0, but are supported on all modern browsers.
1092# Note that when changing this option you need to delete any form_*.png files
1093# in the HTML output before the changes have effect.
1094
1095FORMULA_TRANSPARENT = YES
1096
1097# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
1098# (see http://www.mathjax.org) which uses client side Javascript for the
1099# rendering instead of using prerendered bitmaps. Use this if you do not
1100# have LaTeX installed or if you want to formulas look prettier in the HTML
1101# output. When enabled you also need to install MathJax separately and
1102# configure the path to it using the MATHJAX_RELPATH option.
1103
1104USE_MATHJAX = NO
1105
1106# When MathJax is enabled you need to specify the location relative to the
1107# HTML output directory using the MATHJAX_RELPATH option. The destination
1108# directory should contain the MathJax.js script. For instance, if the mathjax
1109# directory is located at the same level as the HTML output directory, then
1110# MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing
1111# MathJax, but it is strongly recommended to install a local copy of MathJax
1112# before deployment.
1113
1114MATHJAX_RELPATH = http://www.mathjax.org/mathjax
1115
1116# When the SEARCHENGINE tag is enabled doxygen will generate a search box
1117# for the HTML output. The underlying search engine uses javascript
1118# and DHTML and should work on any modern browser. Note that when using
1119# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
1120# (GENERATE_DOCSET) there is already a search function so this one should
1121# typically be disabled. For large projects the javascript based search engine
1122# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1123
1124SEARCHENGINE = NO
1125
1126# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1127# implemented using a PHP enabled web server instead of at the web client
1128# using Javascript. Doxygen will generate the search PHP script and index
1129# file to put on the web server. The advantage of the server
1130# based approach is that it scales better to large projects and allows
1131# full text search. The disadvantages are that it is more difficult to setup
1132# and does not have live searching capabilities.
1133
1134SERVER_BASED_SEARCH = NO
1135
843#--------------------------------------------------------------------------- 1136#---------------------------------------------------------------------------
844# configuration options related to the LaTeX output 1137# configuration options related to the LaTeX output
845#--------------------------------------------------------------------------- 1138#---------------------------------------------------------------------------
846 1139
847# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 1140# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
848# generate Latex output. 1141# generate Latex output.
849 1142
850GENERATE_LATEX = YES 1143GENERATE_LATEX = YES
851 1144
852# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 1145# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
853# If a relative path is entered the value of OUTPUT_DIRECTORY will be 1146# If a relative path is entered the value of OUTPUT_DIRECTORY will be
854# put in front of it. If left blank `latex' will be used as the default path. 1147# put in front of it. If left blank `latex' will be used as the default path.
855 1148
856LATEX_OUTPUT = latex 1149LATEX_OUTPUT = latex
857 1150
858# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 1151# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
859# invoked. If left blank `latex' will be used as the default command name. 1152# invoked. If left blank `latex' will be used as the default command name.
1153# Note that when enabling USE_PDFLATEX this option is only used for
1154# generating bitmaps for formulas in the HTML output, but not in the
1155# Makefile that is written to the output directory.
860 1156
861LATEX_CMD_NAME = latex 1157LATEX_CMD_NAME = latex
862 1158
863# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 1159# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
864# generate index for LaTeX. If left blank `makeindex' will be used as the 1160# generate index for LaTeX. If left blank `makeindex' will be used as the
865# default command name. 1161# default command name.
866 1162
867MAKEINDEX_CMD_NAME = makeindex 1163MAKEINDEX_CMD_NAME = makeindex
868 1164
869# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 1165# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
870# LaTeX documents. This may be useful for small projects and may help to 1166# LaTeX documents. This may be useful for small projects and may help to
871# save some trees in general. 1167# save some trees in general.
872 1168
873COMPACT_LATEX = NO 1169COMPACT_LATEX = NO
874 1170
875# The PAPER_TYPE tag can be used to set the paper type that is used 1171# The PAPER_TYPE tag can be used to set the paper type that is used
876# by the printer. Possible values are: a4, a4wide, letter, legal and 1172# by the printer. Possible values are: a4, letter, legal and
877# executive. If left blank a4wide will be used. 1173# executive. If left blank a4wide will be used.
878 1174
879PAPER_TYPE = a4wide 1175PAPER_TYPE = a4wide
880 1176
881# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 1177# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
882# packages that should be included in the LaTeX output. 1178# packages that should be included in the LaTeX output.
883 1179
884EXTRA_PACKAGES = 1180EXTRA_PACKAGES =
885 1181
886# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 1182# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
887# the generated latex document. The header should contain everything until 1183# the generated latex document. The header should contain everything until
888# the first chapter. If it is left blank doxygen will generate a 1184# the first chapter. If it is left blank doxygen will generate a
889# standard header. Notice: only use this tag if you know what you are doing! 1185# standard header. Notice: only use this tag if you know what you are doing!
890 1186
891LATEX_HEADER = 1187LATEX_HEADER =
892 1188
893# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 1189# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
894# is prepared for conversion to pdf (using ps2pdf). The pdf file will 1190# is prepared for conversion to pdf (using ps2pdf). The pdf file will
895# contain links (just like the HTML output) instead of page references 1191# contain links (just like the HTML output) instead of page references
896# This makes the output suitable for online browsing using a pdf viewer. 1192# This makes the output suitable for online browsing using a pdf viewer.
897 1193
898PDF_HYPERLINKS = YES 1194PDF_HYPERLINKS = YES
899 1195
900# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 1196# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
901# plain latex in the generated Makefile. Set this option to YES to get a 1197# plain latex in the generated Makefile. Set this option to YES to get a
902# higher quality PDF documentation. 1198# higher quality PDF documentation.
903 1199
904USE_PDFLATEX = NO 1200USE_PDFLATEX = YES
905 1201
906# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 1202# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
907# command to the generated LaTeX files. This will instruct LaTeX to keep 1203# command to the generated LaTeX files. This will instruct LaTeX to keep
908# running if errors occur, instead of asking the user for help. 1204# running if errors occur, instead of asking the user for help.
909# This option is also used when generating formulas in HTML. 1205# This option is also used when generating formulas in HTML.
910 1206
911LATEX_BATCHMODE = NO 1207LATEX_BATCHMODE = NO
912 1208
913# If LATEX_HIDE_INDICES is set to YES then doxygen will not 1209# If LATEX_HIDE_INDICES is set to YES then doxygen will not
914# include the index chapters (such as File Index, Compound Index, etc.) 1210# include the index chapters (such as File Index, Compound Index, etc.)
915# in the output. 1211# in the output.
916 1212
917LATEX_HIDE_INDICES = NO 1213LATEX_HIDE_INDICES = NO
918 1214
1215# If LATEX_SOURCE_CODE is set to YES then doxygen will include
1216# source code with syntax highlighting in the LaTeX output.
1217# Note that which sources are shown also depends on other settings
1218# such as SOURCE_BROWSER.
1219
1220LATEX_SOURCE_CODE = NO
1221
919#--------------------------------------------------------------------------- 1222#---------------------------------------------------------------------------
920# configuration options related to the RTF output 1223# configuration options related to the RTF output
921#--------------------------------------------------------------------------- 1224#---------------------------------------------------------------------------
922 1225
923# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 1226# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
924# The RTF output is optimized for Word 97 and may not look very pretty with 1227# The RTF output is optimized for Word 97 and may not look very pretty with
925# other RTF readers or editors. 1228# other RTF readers or editors.
926 1229
927GENERATE_RTF = NO 1230GENERATE_RTF = NO
928 1231
929# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 1232# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
930# If a relative path is entered the value of OUTPUT_DIRECTORY will be 1233# If a relative path is entered the value of OUTPUT_DIRECTORY will be
931# put in front of it. If left blank `rtf' will be used as the default path. 1234# put in front of it. If left blank `rtf' will be used as the default path.
932 1235
933RTF_OUTPUT = rtf 1236RTF_OUTPUT = rtf
934 1237
935# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 1238# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
936# RTF documents. This may be useful for small projects and may help to 1239# RTF documents. This may be useful for small projects and may help to
937# save some trees in general. 1240# save some trees in general.
938 1241
939COMPACT_RTF = NO 1242COMPACT_RTF = NO
940 1243
941# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 1244# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
942# will contain hyperlink fields. The RTF file will 1245# will contain hyperlink fields. The RTF file will
943# contain links (just like the HTML output) instead of page references. 1246# contain links (just like the HTML output) instead of page references.
944# This makes the output suitable for online browsing using WORD or other 1247# This makes the output suitable for online browsing using WORD or other
945# programs which support those fields. 1248# programs which support those fields.
946# Note: wordpad (write) and others do not support links. 1249# Note: wordpad (write) and others do not support links.
947 1250
948RTF_HYPERLINKS = NO 1251RTF_HYPERLINKS = NO
949 1252
950# Load stylesheet definitions from file. Syntax is similar to doxygen's 1253# Load stylesheet definitions from file. Syntax is similar to doxygen's
951# config file, i.e. a series of assignments. You only have to provide 1254# config file, i.e. a series of assignments. You only have to provide
952# replacements, missing definitions are set to their default value. 1255# replacements, missing definitions are set to their default value.
953 1256
954RTF_STYLESHEET_FILE = 1257RTF_STYLESHEET_FILE =
955 1258
956# Set optional variables used in the generation of an rtf document. 1259# Set optional variables used in the generation of an rtf document.
957# Syntax is similar to doxygen's config file. 1260# Syntax is similar to doxygen's config file.
958 1261
959RTF_EXTENSIONS_FILE = 1262RTF_EXTENSIONS_FILE =
960 1263
961#--------------------------------------------------------------------------- 1264#---------------------------------------------------------------------------
962# configuration options related to the man page output 1265# configuration options related to the man page output
963#--------------------------------------------------------------------------- 1266#---------------------------------------------------------------------------
964 1267
965# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 1268# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
966# generate man pages 1269# generate man pages
967 1270
968GENERATE_MAN = YES 1271GENERATE_MAN = YES
969 1272
970# The MAN_OUTPUT tag is used to specify where the man pages will be put. 1273# The MAN_OUTPUT tag is used to specify where the man pages will be put.
971# If a relative path is entered the value of OUTPUT_DIRECTORY will be 1274# If a relative path is entered the value of OUTPUT_DIRECTORY will be
972# put in front of it. If left blank `man' will be used as the default path. 1275# put in front of it. If left blank `man' will be used as the default path.
973 1276
974MAN_OUTPUT = man 1277MAN_OUTPUT = man
975 1278
976# The MAN_EXTENSION tag determines the extension that is added to 1279# The MAN_EXTENSION tag determines the extension that is added to
977# the generated man pages (default is the subroutine's section .3) 1280# the generated man pages (default is the subroutine's section .3)
978 1281
979MAN_EXTENSION = .3 1282MAN_EXTENSION = .3
980 1283
981# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 1284# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
982# then it will generate one additional man file for each entity 1285# then it will generate one additional man file for each entity
983# documented in the real man page(s). These additional files 1286# documented in the real man page(s). These additional files
984# only source the real man page, but without them the man command 1287# only source the real man page, but without them the man command
985# would be unable to find the correct page. The default is NO. 1288# would be unable to find the correct page. The default is NO.
986 1289
987MAN_LINKS = YES 1290MAN_LINKS = YES
@@ -990,33 +1293,33 @@ MAN_LINKS = YES
990# configuration options related to the XML output 1293# configuration options related to the XML output
991#--------------------------------------------------------------------------- 1294#---------------------------------------------------------------------------
992 1295
993# If the GENERATE_XML tag is set to YES Doxygen will 1296# If the GENERATE_XML tag is set to YES Doxygen will
994# generate an XML file that captures the structure of 1297# generate an XML file that captures the structure of
995# the code including all documentation. 1298# the code including all documentation.
996 1299
997GENERATE_XML = NO 1300GENERATE_XML = NO
998 1301
999# The XML_OUTPUT tag is used to specify where the XML pages will be put. 1302# The XML_OUTPUT tag is used to specify where the XML pages will be put.
1000# If a relative path is entered the value of OUTPUT_DIRECTORY will be 1303# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1001# put in front of it. If left blank `xml' will be used as the default path. 1304# put in front of it. If left blank `xml' will be used as the default path.
1002 1305
1003XML_OUTPUT = xml 1306XML_OUTPUT = xml
1004 1307
1005# The XML_SCHEMA tag can be used to specify an XML schema, 1308# The XML_SCHEMA tag can be used to specify an XML schema,
1006# which can be used by a validating XML parser to check the 1309# which can be used by a validating XML parser to check the
1007# syntax of the XML files. 1310# syntax of the XML files.
1008 1311
1009XML_SCHEMA = 1312XML_SCHEMA =
1010 1313
1011# The XML_DTD tag can be used to specify an XML DTD, 1314# The XML_DTD tag can be used to specify an XML DTD,
1012# which can be used by a validating XML parser to check the 1315# which can be used by a validating XML parser to check the
1013# syntax of the XML files. 1316# syntax of the XML files.
1014 1317
1015XML_DTD = 1318XML_DTD =
1016 1319
1017# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 1320# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1018# dump the program listings (including syntax highlighting 1321# dump the program listings (including syntax highlighting
1019# and cross-referencing information) to the XML output. Note that 1322# and cross-referencing information) to the XML output. Note that
1020# enabling this will significantly increase the size of the XML output. 1323# enabling this will significantly increase the size of the XML output.
1021 1324
1022XML_PROGRAMLISTING = YES 1325XML_PROGRAMLISTING = YES
@@ -1025,10 +1328,10 @@ XML_PROGRAMLISTING = YES
1025# configuration options for the AutoGen Definitions output 1328# configuration options for the AutoGen Definitions output
1026#--------------------------------------------------------------------------- 1329#---------------------------------------------------------------------------
1027 1330
1028# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 1331# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1029# generate an AutoGen Definitions (see autogen.sf.net) file 1332# generate an AutoGen Definitions (see autogen.sf.net) file
1030# that captures the structure of the code including all 1333# that captures the structure of the code including all
1031# documentation. Note that this feature is still experimental 1334# documentation. Note that this feature is still experimental
1032# and incomplete at the moment. 1335# and incomplete at the moment.
1033 1336
1034GENERATE_AUTOGEN_DEF = NO 1337GENERATE_AUTOGEN_DEF = NO
@@ -1037,320 +1340,356 @@ GENERATE_AUTOGEN_DEF = NO
1037# configuration options related to the Perl module output 1340# configuration options related to the Perl module output
1038#--------------------------------------------------------------------------- 1341#---------------------------------------------------------------------------
1039 1342
1040# If the GENERATE_PERLMOD tag is set to YES Doxygen will 1343# If the GENERATE_PERLMOD tag is set to YES Doxygen will
1041# generate a Perl module file that captures the structure of 1344# generate a Perl module file that captures the structure of
1042# the code including all documentation. Note that this 1345# the code including all documentation. Note that this
1043# feature is still experimental and incomplete at the 1346# feature is still experimental and incomplete at the
1044# moment. 1347# moment.
1045 1348
1046GENERATE_PERLMOD = NO 1349GENERATE_PERLMOD = NO
1047 1350
1048# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 1351# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1049# the necessary Makefile rules, Perl scripts and LaTeX code to be able 1352# the necessary Makefile rules, Perl scripts and LaTeX code to be able
1050# to generate PDF and DVI output from the Perl module output. 1353# to generate PDF and DVI output from the Perl module output.
1051 1354
1052PERLMOD_LATEX = NO 1355PERLMOD_LATEX = NO
1053 1356
1054# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 1357# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1055# nicely formatted so it can be parsed by a human reader. This is useful 1358# nicely formatted so it can be parsed by a human reader.
1056# if you want to understand what is going on. On the other hand, if this 1359# This is useful
1057# tag is set to NO the size of the Perl module output will be much smaller 1360# if you want to understand what is going on.
1361# On the other hand, if this
1362# tag is set to NO the size of the Perl module output will be much smaller
1058# and Perl will parse it just the same. 1363# and Perl will parse it just the same.
1059 1364
1060PERLMOD_PRETTY = YES 1365PERLMOD_PRETTY = YES
1061 1366
1062# The names of the make variables in the generated doxyrules.make file 1367# The names of the make variables in the generated doxyrules.make file
1063# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 1368# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1064# This is useful so different doxyrules.make files included by the same 1369# This is useful so different doxyrules.make files included by the same
1065# Makefile don't overwrite each other's variables. 1370# Makefile don't overwrite each other's variables.
1066 1371
1067PERLMOD_MAKEVAR_PREFIX = 1372PERLMOD_MAKEVAR_PREFIX =
1068 1373
1069#--------------------------------------------------------------------------- 1374#---------------------------------------------------------------------------
1070# Configuration options related to the preprocessor 1375# Configuration options related to the preprocessor
1071#--------------------------------------------------------------------------- 1376#---------------------------------------------------------------------------
1072 1377
1073# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 1378# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1074# evaluate all C-preprocessor directives found in the sources and include 1379# evaluate all C-preprocessor directives found in the sources and include
1075# files. 1380# files.
1076 1381
1077ENABLE_PREPROCESSING = YES 1382ENABLE_PREPROCESSING = YES
1078 1383
1079# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 1384# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1080# names in the source code. If set to NO (the default) only conditional 1385# names in the source code. If set to NO (the default) only conditional
1081# compilation will be performed. Macro expansion can be done in a controlled 1386# compilation will be performed. Macro expansion can be done in a controlled
1082# way by setting EXPAND_ONLY_PREDEF to YES. 1387# way by setting EXPAND_ONLY_PREDEF to YES.
1083 1388
1084MACRO_EXPANSION = YES 1389MACRO_EXPANSION = YES
1085 1390
1086# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 1391# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1087# then the macro expansion is limited to the macros specified with the 1392# then the macro expansion is limited to the macros specified with the
1088# PREDEFINED and EXPAND_AS_DEFINED tags. 1393# PREDEFINED and EXPAND_AS_DEFINED tags.
1089 1394
1090EXPAND_ONLY_PREDEF = YES 1395EXPAND_ONLY_PREDEF = YES
1091 1396
1092# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 1397# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1093# in the INCLUDE_PATH (see below) will be search if a #include is found. 1398# in the INCLUDE_PATH (see below) will be search if a #include is found.
1094 1399
1095SEARCH_INCLUDES = NO 1400SEARCH_INCLUDES = NO
1096 1401
1097# The INCLUDE_PATH tag can be used to specify one or more directories that 1402# The INCLUDE_PATH tag can be used to specify one or more directories that
1098# contain include files that are not input files but should be processed by 1403# contain include files that are not input files but should be processed by
1099# the preprocessor. 1404# the preprocessor.
1100 1405
1101INCLUDE_PATH = 1406INCLUDE_PATH =
1102 1407
1103# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 1408# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1104# patterns (like *.h and *.hpp) to filter out the header-files in the 1409# patterns (like *.h and *.hpp) to filter out the header-files in the
1105# directories. If left blank, the patterns specified with FILE_PATTERNS will 1410# directories. If left blank, the patterns specified with FILE_PATTERNS will
1106# be used. 1411# be used.
1107 1412
1108INCLUDE_FILE_PATTERNS = 1413INCLUDE_FILE_PATTERNS =
1109 1414
1110# The PREDEFINED tag can be used to specify one or more macro names that 1415# The PREDEFINED tag can be used to specify one or more macro names that
1111# are defined before the preprocessor is started (similar to the -D option of 1416# are defined before the preprocessor is started (similar to the -D option of
1112# gcc). The argument of the tag is a list of macros of the form: name 1417# gcc). The argument of the tag is a list of macros of the form: name
1113# or name=definition (no spaces). If the definition and the = are 1418# or name=definition (no spaces). If the definition and the = are
1114# omitted =1 is assumed. To prevent a macro definition from being 1419# omitted =1 is assumed. To prevent a macro definition from being
1115# undefined via #undef or recursively expanded use the := operator 1420# undefined via #undef or recursively expanded use the := operator
1116# instead of the = operator. 1421# instead of the = operator.
1117 1422
1118PREDEFINED = EINA_MAGIC_DEBUG __UNUSED__= EINA_ARG_NONNULL()= EINA_MALLOC= EINA_WARN_UNUSED_RESULT= EAPI= 1423PREDEFINED = EINA_MAGIC_DEBUG \
1424 __UNUSED__= \
1425 EINA_ARG_NONNULL()= \
1426 EINA_MALLOC= \
1427 EINA_WARN_UNUSED_RESULT= \
1428 EAPI= \
1429 EINA_PURE= \
1430 EINA_CONST=
1119 1431
1120# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 1432# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1121# this tag can be used to specify a list of macro names that should be expanded. 1433# this tag can be used to specify a list of macro names that should be expanded.
1122# The macro definition that is found in the sources will be used. 1434# The macro definition that is found in the sources will be used.
1123# Use the PREDEFINED tag if you want to use a different macro definition. 1435# Use the PREDEFINED tag if you want to use a different macro definition that overrules the definition found in the source code.
1124 1436
1125EXPAND_AS_DEFINED = 1437EXPAND_AS_DEFINED =
1126 1438
1127# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 1439# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1128# doxygen's preprocessor will remove all function-like macros that are alone 1440# doxygen's preprocessor will remove all references to function-like macros
1129# on a line, have an all uppercase name, and do not end with a semicolon. Such 1441# that are alone on a line, have an all uppercase name, and do not end with a
1130# function macros are typically used for boiler-plate code, and will confuse 1442# semicolon, because these will confuse the parser if not removed.
1131# the parser if not removed.
1132 1443
1133SKIP_FUNCTION_MACROS = YES 1444SKIP_FUNCTION_MACROS = YES
1134 1445
1135#--------------------------------------------------------------------------- 1446#---------------------------------------------------------------------------
1136# Configuration::additions related to external references 1447# Configuration::additions related to external references
1137#--------------------------------------------------------------------------- 1448#---------------------------------------------------------------------------
1138 1449
1139# The TAGFILES option can be used to specify one or more tagfiles. 1450# The TAGFILES option can be used to specify one or more tagfiles.
1140# Optionally an initial location of the external documentation 1451# Optionally an initial location of the external documentation
1141# can be added for each tagfile. The format of a tag file without 1452# can be added for each tagfile. The format of a tag file without
1142# this location is as follows: 1453# this location is as follows:
1143# TAGFILES = file1 file2 ... 1454#
1144# Adding location for the tag files is done as follows: 1455# TAGFILES = file1 file2 ...
1145# TAGFILES = file1=loc1 "file2 = loc2" ... 1456# Adding location for the tag files is done as follows:
1146# where "loc1" and "loc2" can be relative or absolute paths or 1457#
1147# URLs. If a location is present for each tag, the installdox tool 1458# TAGFILES = file1=loc1 "file2 = loc2" ...
1459# where "loc1" and "loc2" can be relative or absolute paths or
1460# URLs. If a location is present for each tag, the installdox tool
1148# does not have to be run to correct the links. 1461# does not have to be run to correct the links.
1149# Note that each tag file must have a unique name 1462# Note that each tag file must have a unique name
1150# (where the name does NOT include the path) 1463# (where the name does NOT include the path)
1151# If a tag file is not located in the directory in which doxygen 1464# If a tag file is not located in the directory in which doxygen
1152# is run, you must also specify the path to the tagfile here. 1465# is run, you must also specify the path to the tagfile here.
1153 1466
1154TAGFILES = 1467TAGFILES =
1155 1468
1156# When a file name is specified after GENERATE_TAGFILE, doxygen will create 1469# When a file name is specified after GENERATE_TAGFILE, doxygen will create
1157# a tag file that is based on the input files it reads. 1470# a tag file that is based on the input files it reads.
1158 1471
1159GENERATE_TAGFILE = 1472GENERATE_TAGFILE =
1160 1473
1161# If the ALLEXTERNALS tag is set to YES all external classes will be listed 1474# If the ALLEXTERNALS tag is set to YES all external classes will be listed
1162# in the class index. If set to NO only the inherited external classes 1475# in the class index. If set to NO only the inherited external classes
1163# will be listed. 1476# will be listed.
1164 1477
1165ALLEXTERNALS = NO 1478ALLEXTERNALS = NO
1166 1479
1167# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 1480# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1168# in the modules index. If set to NO, only the current project's groups will 1481# in the modules index. If set to NO, only the current project's groups will
1169# be listed. 1482# be listed.
1170 1483
1171EXTERNAL_GROUPS = YES 1484EXTERNAL_GROUPS = YES
1172 1485
1173# The PERL_PATH should be the absolute path and name of the perl script 1486# The PERL_PATH should be the absolute path and name of the perl script
1174# interpreter (i.e. the result of `which perl'). 1487# interpreter (i.e. the result of `which perl').
1175 1488
1176PERL_PATH = /usr/bin/perl 1489PERL_PATH = /usr/bin/perl
1177 1490
1178#--------------------------------------------------------------------------- 1491#---------------------------------------------------------------------------
1179# Configuration options related to the dot tool 1492# Configuration options related to the dot tool
1180#--------------------------------------------------------------------------- 1493#---------------------------------------------------------------------------
1181 1494
1182# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 1495# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1183# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 1496# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1184# or super classes. Setting the tag to NO turns the diagrams off. Note that 1497# or super classes. Setting the tag to NO turns the diagrams off. Note that
1185# this option is superseded by the HAVE_DOT option below. This is only a 1498# this option also works with HAVE_DOT disabled, but it is recommended to
1186# fallback. It is recommended to install and use dot, since it yields more 1499# install and use dot, since it yields more powerful graphs.
1187# powerful graphs.
1188 1500
1189CLASS_DIAGRAMS = NO 1501CLASS_DIAGRAMS = NO
1190 1502
1191# You can define message sequence charts within doxygen comments using the \msc 1503# You can define message sequence charts within doxygen comments using the \msc
1192# command. Doxygen will then run the mscgen tool (see 1504# command. Doxygen will then run the mscgen tool (see
1193# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 1505# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1194# documentation. The MSCGEN_PATH tag allows you to specify the directory where 1506# documentation. The MSCGEN_PATH tag allows you to specify the directory where
1195# the mscgen tool resides. If left empty the tool is assumed to be found in the 1507# the mscgen tool resides. If left empty the tool is assumed to be found in the
1196# default search path. 1508# default search path.
1197 1509
1198MSCGEN_PATH = 1510MSCGEN_PATH =
1199 1511
1200# If set to YES, the inheritance and collaboration graphs will hide 1512# If set to YES, the inheritance and collaboration graphs will hide
1201# inheritance and usage relations if the target is undocumented 1513# inheritance and usage relations if the target is undocumented
1202# or is not a class. 1514# or is not a class.
1203 1515
1204HIDE_UNDOC_RELATIONS = YES 1516HIDE_UNDOC_RELATIONS = YES
1205 1517
1206# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 1518# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1207# available from the path. This tool is part of Graphviz, a graph visualization 1519# available from the path. This tool is part of Graphviz, a graph visualization
1208# toolkit from AT&T and Lucent Bell Labs. The other options in this section 1520# toolkit from AT&T and Lucent Bell Labs. The other options in this section
1209# have no effect if this option is set to NO (the default) 1521# have no effect if this option is set to NO (the default)
1210 1522
1211HAVE_DOT = NO 1523HAVE_DOT = NO
1212 1524
1213# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 1525# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1214# will generate a graph for each documented class showing the direct and 1526# allowed to run in parallel. When set to 0 (the default) doxygen will
1215# indirect inheritance relations. Setting this tag to YES will force the 1527# base this on the number of processors available in the system. You can set it
1528# explicitly to a value larger than 0 to get control over the balance
1529# between CPU load and processing speed.
1530
1531DOT_NUM_THREADS = 0
1532
1533# By default doxygen will write a font called Helvetica to the output
1534# directory and reference it in all dot files that doxygen generates.
1535# When you want a differently looking font you can specify the font name
1536# using DOT_FONTNAME. You need to make sure dot is able to find the font,
1537# which can be done by putting it in a standard location or by setting the
1538# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
1539# containing the font.
1540
1541DOT_FONTNAME = Helvetica
1542
1543# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1544# The default size is 10pt.
1545
1546DOT_FONTSIZE = 10
1547
1548# By default doxygen will tell dot to use the output directory to look for the
1549# FreeSans.ttf font (which doxygen will put there itself). If you specify a
1550# different font using DOT_FONTNAME you can set the path where dot
1551# can find it using this tag.
1552
1553DOT_FONTPATH =
1554
1555# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1556# will generate a graph for each documented class showing the direct and
1557# indirect inheritance relations. Setting this tag to YES will force the
1216# the CLASS_DIAGRAMS tag to NO. 1558# the CLASS_DIAGRAMS tag to NO.
1217 1559
1218CLASS_GRAPH = NO 1560CLASS_GRAPH = NO
1219 1561
1220# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 1562# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1221# will generate a graph for each documented class showing the direct and 1563# will generate a graph for each documented class showing the direct and
1222# indirect implementation dependencies (inheritance, containment, and 1564# indirect implementation dependencies (inheritance, containment, and
1223# class references variables) of the class with other documented classes. 1565# class references variables) of the class with other documented classes.
1224 1566
1225COLLABORATION_GRAPH = NO 1567COLLABORATION_GRAPH = NO
1226 1568
1227# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 1569# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1228# will generate a graph for groups, showing the direct groups dependencies 1570# will generate a graph for groups, showing the direct groups dependencies
1229 1571
1230GROUP_GRAPHS = YES 1572GROUP_GRAPHS = YES
1231 1573
1232# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 1574# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1233# collaboration diagrams in a style similar to the OMG's Unified Modeling 1575# collaboration diagrams in a style similar to the OMG's Unified Modeling
1234# Language. 1576# Language.
1235 1577
1236UML_LOOK = NO 1578UML_LOOK = NO
1237 1579
1238# If set to YES, the inheritance and collaboration graphs will show the 1580# If set to YES, the inheritance and collaboration graphs will show the
1239# relations between templates and their instances. 1581# relations between templates and their instances.
1240 1582
1241TEMPLATE_RELATIONS = NO 1583TEMPLATE_RELATIONS = NO
1242 1584
1243# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 1585# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1244# tags are set to YES then doxygen will generate a graph for each documented 1586# tags are set to YES then doxygen will generate a graph for each documented
1245# file showing the direct and indirect include dependencies of the file with 1587# file showing the direct and indirect include dependencies of the file with
1246# other documented files. 1588# other documented files.
1247 1589
1248INCLUDE_GRAPH = NO 1590INCLUDE_GRAPH = NO
1249 1591
1250# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 1592# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1251# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 1593# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1252# documented header file showing the documented files that directly or 1594# documented header file showing the documented files that directly or
1253# indirectly include this file. 1595# indirectly include this file.
1254 1596
1255INCLUDED_BY_GRAPH = NO 1597INCLUDED_BY_GRAPH = NO
1256 1598
1257# If the CALL_GRAPH and HAVE_DOT options are set to YES then 1599# If the CALL_GRAPH and HAVE_DOT options are set to YES then
1258# doxygen will generate a call dependency graph for every global function 1600# doxygen will generate a call dependency graph for every global function
1259# or class method. Note that enabling this option will significantly increase 1601# or class method. Note that enabling this option will significantly increase
1260# the time of a run. So in most cases it will be better to enable call graphs 1602# the time of a run. So in most cases it will be better to enable call graphs
1261# for selected functions only using the \callgraph command. 1603# for selected functions only using the \callgraph command.
1262 1604
1263CALL_GRAPH = NO 1605CALL_GRAPH = NO
1264 1606
1265# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 1607# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1266# doxygen will generate a caller dependency graph for every global function 1608# doxygen will generate a caller dependency graph for every global function
1267# or class method. Note that enabling this option will significantly increase 1609# or class method. Note that enabling this option will significantly increase
1268# the time of a run. So in most cases it will be better to enable caller 1610# the time of a run. So in most cases it will be better to enable caller
1269# graphs for selected functions only using the \callergraph command. 1611# graphs for selected functions only using the \callergraph command.
1270 1612
1271CALLER_GRAPH = NO 1613CALLER_GRAPH = NO
1272 1614
1273# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 1615# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1274# will graphical hierarchy of all classes instead of a textual one. 1616# will generate a graphical hierarchy of all classes instead of a textual one.
1275 1617
1276GRAPHICAL_HIERARCHY = NO 1618GRAPHICAL_HIERARCHY = NO
1277 1619
1278# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 1620# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
1279# then doxygen will show the dependencies a directory has on other directories 1621# then doxygen will show the dependencies a directory has on other directories
1280# in a graphical way. The dependency relations are determined by the #include 1622# in a graphical way. The dependency relations are determined by the #include
1281# relations between the files in the directories. 1623# relations between the files in the directories.
1282 1624
1283DIRECTORY_GRAPH = YES 1625DIRECTORY_GRAPH = YES
1284 1626
1285# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 1627# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1286# generated by dot. Possible values are png, jpg, or gif 1628# generated by dot. Possible values are png, svg, gif or svg.
1287# If left blank png will be used. 1629# If left blank png will be used.
1288 1630
1289DOT_IMAGE_FORMAT = png 1631DOT_IMAGE_FORMAT = png
1290 1632
1291# The tag DOT_PATH can be used to specify the path where the dot tool can be 1633# The tag DOT_PATH can be used to specify the path where the dot tool can be
1292# found. If left blank, it is assumed the dot tool can be found in the path. 1634# found. If left blank, it is assumed the dot tool can be found in the path.
1293 1635
1294DOT_PATH = 1636DOT_PATH =
1295 1637
1296# The DOTFILE_DIRS tag can be used to specify one or more directories that 1638# The DOTFILE_DIRS tag can be used to specify one or more directories that
1297# contain dot files that are included in the documentation (see the 1639# contain dot files that are included in the documentation (see the
1298# \dotfile command). 1640# \dotfile command).
1299 1641
1300DOTFILE_DIRS = 1642DOTFILE_DIRS =
1643
1644# The MSCFILE_DIRS tag can be used to specify one or more directories that
1645# contain msc files that are included in the documentation (see the
1646# \mscfile command).
1647
1648MSCFILE_DIRS =
1301 1649
1302# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 1650# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1303# nodes that will be shown in the graph. If the number of nodes in a graph 1651# nodes that will be shown in the graph. If the number of nodes in a graph
1304# becomes larger than this value, doxygen will truncate the graph, which is 1652# becomes larger than this value, doxygen will truncate the graph, which is
1305# visualized by representing a node as a red box. Note that doxygen if the 1653# visualized by representing a node as a red box. Note that doxygen if the
1306# number of direct children of the root node in a graph is already larger than 1654# number of direct children of the root node in a graph is already larger than
1307# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 1655# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1308# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. 1656# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1309 1657
1310DOT_GRAPH_MAX_NODES = 50 1658DOT_GRAPH_MAX_NODES = 50
1311 1659
1312# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 1660# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1313# graphs generated by dot. A depth value of 3 means that only nodes reachable 1661# graphs generated by dot. A depth value of 3 means that only nodes reachable
1314# from the root by following a path via at most 3 edges will be shown. Nodes 1662# from the root by following a path via at most 3 edges will be shown. Nodes
1315# that lay further from the root node will be omitted. Note that setting this 1663# that lay further from the root node will be omitted. Note that setting this
1316# option to 1 or 2 may greatly reduce the computation time needed for large 1664# option to 1 or 2 may greatly reduce the computation time needed for large
1317# code bases. Also note that the size of a graph can be further restricted by 1665# code bases. Also note that the size of a graph can be further restricted by
1318# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. 1666# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1319 1667
1320MAX_DOT_GRAPH_DEPTH = 0 1668MAX_DOT_GRAPH_DEPTH = 0
1321 1669
1322# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 1670# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1323# background. This is enabled by default, which results in a transparent 1671# background. This is disabled by default, because dot on Windows does not
1324# background. Warning: Depending on the platform used, enabling this option 1672# seem to support this out of the box. Warning: Depending on the platform used,
1325# may lead to badly anti-aliased labels on the edges of a graph (i.e. they 1673# enabling this option may lead to badly anti-aliased labels on the edges of
1326# become hard to read). 1674# a graph (i.e. they become hard to read).
1327 1675
1328DOT_TRANSPARENT = YES 1676DOT_TRANSPARENT = YES
1329 1677
1330# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 1678# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1331# files in one run (i.e. multiple -o and -T options on the command line). This 1679# files in one run (i.e. multiple -o and -T options on the command line). This
1332# makes dot run faster, but since only newer versions of dot (>1.8.10) 1680# makes dot run faster, but since only newer versions of dot (>1.8.10)
1333# support this, this feature is disabled by default. 1681# support this, this feature is disabled by default.
1334 1682
1335DOT_MULTI_TARGETS = NO 1683DOT_MULTI_TARGETS = NO
1336 1684
1337# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 1685# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1338# generate a legend page explaining the meaning of the various boxes and 1686# generate a legend page explaining the meaning of the various boxes and
1339# arrows in the dot generated graphs. 1687# arrows in the dot generated graphs.
1340 1688
1341GENERATE_LEGEND = YES 1689GENERATE_LEGEND = YES
1342 1690
1343# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 1691# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1344# remove the intermediate dot files that are used to generate 1692# remove the intermediate dot files that are used to generate
1345# the various graphs. 1693# the various graphs.
1346 1694
1347DOT_CLEANUP = YES 1695DOT_CLEANUP = YES
1348
1349#---------------------------------------------------------------------------
1350# Configuration::additions related to the search engine
1351#---------------------------------------------------------------------------
1352
1353# The SEARCHENGINE tag specifies whether or not a search engine should be
1354# used. If set to NO the values of all tags below this one will be ignored.
1355
1356SEARCHENGINE = NO
diff --git a/libraries/eina/doc/Makefile.am b/libraries/eina/doc/Makefile.am
index 6f31b96..7856c13 100644
--- a/libraries/eina/doc/Makefile.am
+++ b/libraries/eina/doc/Makefile.am
@@ -20,6 +20,7 @@ doc: all
20 bzip2 -9 $(PACKAGE_DOCNAME).tar 20 bzip2 -9 $(PACKAGE_DOCNAME).tar
21 rm -rf $(PACKAGE_DOCNAME)/ 21 rm -rf $(PACKAGE_DOCNAME)/
22 mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir) 22 mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
23 @echo "Documentation Package: $(top_builddir)/$(PACKAGE_DOCNAME).tar.bz2"
23 24
24clean-local: doc-clean 25clean-local: doc-clean
25 26
diff --git a/libraries/eina/doc/Makefile.in b/libraries/eina/doc/Makefile.in
index e8e647a..7331cf1 100644
--- a/libraries/eina/doc/Makefile.in
+++ b/libraries/eina/doc/Makefile.in
@@ -108,7 +108,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
108EGREP = @EGREP@ 108EGREP = @EGREP@
109EINA_CFLAGS = @EINA_CFLAGS@ 109EINA_CFLAGS = @EINA_CFLAGS@
110EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 110EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
111EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
111EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 112EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
113EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
112EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 114EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
113EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 115EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
114EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 116EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -160,8 +162,6 @@ PACKAGE_URL = @PACKAGE_URL@
160PACKAGE_VERSION = @PACKAGE_VERSION@ 162PACKAGE_VERSION = @PACKAGE_VERSION@
161PATH_SEPARATOR = @PATH_SEPARATOR@ 163PATH_SEPARATOR = @PATH_SEPARATOR@
162PKG_CONFIG = @PKG_CONFIG@ 164PKG_CONFIG = @PKG_CONFIG@
163PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
164PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
165RANLIB = @RANLIB@ 165RANLIB = @RANLIB@
166SED = @SED@ 166SED = @SED@
167SET_MAKE = @SET_MAKE@ 167SET_MAKE = @SET_MAKE@
@@ -449,6 +449,7 @@ uninstall-am:
449@EFL_BUILD_DOC_TRUE@ bzip2 -9 $(PACKAGE_DOCNAME).tar 449@EFL_BUILD_DOC_TRUE@ bzip2 -9 $(PACKAGE_DOCNAME).tar
450@EFL_BUILD_DOC_TRUE@ rm -rf $(PACKAGE_DOCNAME)/ 450@EFL_BUILD_DOC_TRUE@ rm -rf $(PACKAGE_DOCNAME)/
451@EFL_BUILD_DOC_TRUE@ mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir) 451@EFL_BUILD_DOC_TRUE@ mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
452@EFL_BUILD_DOC_TRUE@ @echo "Documentation Package: $(top_builddir)/$(PACKAGE_DOCNAME).tar.bz2"
452 453
453@EFL_BUILD_DOC_TRUE@clean-local: doc-clean 454@EFL_BUILD_DOC_TRUE@clean-local: doc-clean
454 455
diff --git a/libraries/eina/eina.pc b/libraries/eina/eina.pc
index 067d7c5..0ca596f 100644
--- a/libraries/eina/eina.pc
+++ b/libraries/eina/eina.pc
@@ -1,4 +1,4 @@
1prefix=/usr/local 1prefix=/opt/e17
2exec_prefix=${prefix} 2exec_prefix=${prefix}
3libdir=${exec_prefix}/lib 3libdir=${exec_prefix}/lib
4includedir=${prefix}/include 4includedir=${prefix}/include
@@ -6,7 +6,7 @@ includedir=${prefix}/include
6Name: Eina 6Name: Eina
7Description: A Library that implements fast data types and miscellaneous tools 7Description: A Library that implements fast data types and miscellaneous tools
8Requires.private: valgrind 8Requires.private: valgrind
9Version: 1.1.0 9Version: 1.1.99.67344
10Libs: -L${libdir} -leina -pthread 10Libs: -L${libdir} -leina -pthread
11Libs.private: -pthread -lrt -ldl -lrt -lm 11Libs.private: -pthread -lrt -ldl -lrt -lm
12Cflags: -I${includedir}/eina-1 -I${includedir}/eina-1/eina 12Cflags: -I${includedir}/eina-1 -I${includedir}/eina-1/eina
diff --git a/libraries/eina/eina.spec b/libraries/eina/eina.spec
index c325f06..0ad6732 100644
--- a/libraries/eina/eina.spec
+++ b/libraries/eina/eina.spec
@@ -3,7 +3,7 @@
3 3
4Summary: Data Type Library 4Summary: Data Type Library
5Name: eina 5Name: eina
6Version: 1.1.0 6Version: 1.1.99.67344
7Release: %{_rel} 7Release: %{_rel}
8License: LGPLv2.1 8License: LGPLv2.1
9Group: System Environment/Libraries 9Group: System Environment/Libraries
diff --git a/libraries/eina/ltmain.sh b/libraries/eina/ltmain.sh
index fa4b1e1..7ed280b 100755
--- a/libraries/eina/ltmain.sh
+++ b/libraries/eina/ltmain.sh
@@ -65,7 +65,7 @@
65# compiler: $LTCC 65# compiler: $LTCC
66# compiler flags: $LTCFLAGS 66# compiler flags: $LTCFLAGS
67# linker: $LD (gnu? $with_gnu_ld) 67# linker: $LD (gnu? $with_gnu_ld)
68# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 68# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
69# automake: $automake_version 69# automake: $automake_version
70# autoconf: $autoconf_version 70# autoconf: $autoconf_version
71# 71#
@@ -73,7 +73,7 @@
73 73
74PROGRAM=ltmain.sh 74PROGRAM=ltmain.sh
75PACKAGE=libtool 75PACKAGE=libtool
76VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" 76VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
77TIMESTAMP="" 77TIMESTAMP=""
78package_revision=1.3017 78package_revision=1.3017
79 79
diff --git a/libraries/eina/m4/libtool.m4 b/libraries/eina/m4/libtool.m4
index 6e86e5b..a3fee53 100644
--- a/libraries/eina/m4/libtool.m4
+++ b/libraries/eina/m4/libtool.m4
@@ -380,12 +380,12 @@ m4_define([lt_decl_dquote_varnames],
380# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 380# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
381# --------------------------------------------------- 381# ---------------------------------------------------
382m4_define([lt_decl_varnames_tagged], 382m4_define([lt_decl_varnames_tagged],
383[_$0(m4_quote(m4_default([$1], [[, ]])), 383[m4_assert([$# <= 2])dnl
384 m4_quote(m4_if([$2], [], 384_$0(m4_quote(m4_default([$1], [[, ]])),
385 m4_quote(lt_decl_tag_varnames), 385 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
386 m4_quote(m4_shift($@)))), 386 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
387 m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) 387m4_define([_lt_decl_varnames_tagged],
388m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) 388[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
389 389
390 390
391# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 391# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
@@ -945,10 +945,10 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
945 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 945 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
946 darwin1.*) 946 darwin1.*)
947 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 947 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
948 darwin*) # darwin 5.x on 948 darwin*) # darwin 5.x on
949 # if running on 10.5 or later, the deployment target defaults 949 # if running on 10.5 or later, the deployment target defaults
950 # to the OS version, if on x86, and 10.4, the deployment 950 # to the OS version, if on x86, and 10.4, the deployment
951 # target defaults to 10.4. Don't you love it? 951 # target defaults to 10.4. Don't you love it?
952 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 952 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
953 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 953 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
954 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 954 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -990,7 +990,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
990 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 990 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
991 _LT_TAGVAR(link_all_deplibs, $1)=yes 991 _LT_TAGVAR(link_all_deplibs, $1)=yes
992 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 992 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
993 if test "$GCC" = "yes"; then 993 case $cc_basename in
994 ifort*) _lt_dar_can_shared=yes ;;
995 *) _lt_dar_can_shared=$GCC ;;
996 esac
997 if test "$_lt_dar_can_shared" = "yes"; then
994 output_verbose_link_cmd=echo 998 output_verbose_link_cmd=echo
995 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 999 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
996 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1000 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
@@ -1512,7 +1516,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1512 lt_cv_sys_max_cmd_len=-1; 1516 lt_cv_sys_max_cmd_len=-1;
1513 ;; 1517 ;;
1514 1518
1515 cygwin* | mingw*) 1519 cygwin* | mingw* | cegcc*)
1516 # On Win9x/ME, this test blows up -- it succeeds, but takes 1520 # On Win9x/ME, this test blows up -- it succeeds, but takes
1517 # about 5 minutes as the teststring grows exponentially. 1521 # about 5 minutes as the teststring grows exponentially.
1518 # Worse, since 9x/ME are not pre-emptively multitasking, 1522 # Worse, since 9x/ME are not pre-emptively multitasking,
@@ -1680,10 +1684,6 @@ else
1680# endif 1684# endif
1681#endif 1685#endif
1682 1686
1683#ifdef __cplusplus
1684extern "C" void exit (int);
1685#endif
1686
1687void fnord() { int i=42;} 1687void fnord() { int i=42;}
1688int main () 1688int main ()
1689{ 1689{
@@ -1699,7 +1699,7 @@ int main ()
1699 else 1699 else
1700 puts (dlerror ()); 1700 puts (dlerror ());
1701 1701
1702 exit (status); 1702 return status;
1703}] 1703}]
1704_LT_EOF 1704_LT_EOF
1705 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1705 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
@@ -1738,7 +1738,7 @@ else
1738 lt_cv_dlopen_self=yes 1738 lt_cv_dlopen_self=yes
1739 ;; 1739 ;;
1740 1740
1741 mingw* | pw32*) 1741 mingw* | pw32* | cegcc*)
1742 lt_cv_dlopen="LoadLibrary" 1742 lt_cv_dlopen="LoadLibrary"
1743 lt_cv_dlopen_libs= 1743 lt_cv_dlopen_libs=
1744 ;; 1744 ;;
@@ -2035,6 +2035,7 @@ m4_defun([_LT_SYS_DYNAMIC_LINKER],
2035[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2035[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2036m4_require([_LT_DECL_EGREP])dnl 2036m4_require([_LT_DECL_EGREP])dnl
2037m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2037m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2038m4_require([_LT_DECL_OBJDUMP])dnl
2038m4_require([_LT_DECL_SED])dnl 2039m4_require([_LT_DECL_SED])dnl
2039AC_MSG_CHECKING([dynamic linker characteristics]) 2040AC_MSG_CHECKING([dynamic linker characteristics])
2040m4_if([$1], 2041m4_if([$1],
@@ -2199,14 +2200,14 @@ bsdi[[45]]*)
2199 # libtool to hard-code these into programs 2200 # libtool to hard-code these into programs
2200 ;; 2201 ;;
2201 2202
2202cygwin* | mingw* | pw32*) 2203cygwin* | mingw* | pw32* | cegcc*)
2203 version_type=windows 2204 version_type=windows
2204 shrext_cmds=".dll" 2205 shrext_cmds=".dll"
2205 need_version=no 2206 need_version=no
2206 need_lib_prefix=no 2207 need_lib_prefix=no
2207 2208
2208 case $GCC,$host_os in 2209 case $GCC,$host_os in
2209 yes,cygwin* | yes,mingw* | yes,pw32*) 2210 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2210 library_names_spec='$libname.dll.a' 2211 library_names_spec='$libname.dll.a'
2211 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2212 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2212 postinstall_cmds='base_file=`basename \${file}`~ 2213 postinstall_cmds='base_file=`basename \${file}`~
@@ -2229,7 +2230,7 @@ cygwin* | mingw* | pw32*)
2229 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2230 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2230 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2231 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2231 ;; 2232 ;;
2232 mingw*) 2233 mingw* | cegcc*)
2233 # MinGW DLLs use traditional 'lib' prefix 2234 # MinGW DLLs use traditional 'lib' prefix
2234 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2235 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2235 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2236 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
@@ -2444,7 +2445,7 @@ linux*oldld* | linux*aout* | linux*coff*)
2444 ;; 2445 ;;
2445 2446
2446# This must be Linux ELF. 2447# This must be Linux ELF.
2447linux* | k*bsd*-gnu) 2448linux* | k*bsd*-gnu | kopensolaris*-gnu)
2448 version_type=linux 2449 version_type=linux
2449 need_lib_prefix=no 2450 need_lib_prefix=no
2450 need_version=no 2451 need_version=no
@@ -2667,7 +2668,7 @@ tpf*)
2667 version_type=linux 2668 version_type=linux
2668 need_lib_prefix=no 2669 need_lib_prefix=no
2669 need_version=no 2670 need_version=no
2670 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2671 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2671 shlibpath_var=LD_LIBRARY_PATH 2672 shlibpath_var=LD_LIBRARY_PATH
2672 shlibpath_overrides_runpath=no 2673 shlibpath_overrides_runpath=no
2673 hardcode_into_libs=yes 2674 hardcode_into_libs=yes
@@ -2691,7 +2692,7 @@ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2691if test "$GCC" = yes; then 2692if test "$GCC" = yes; then
2692 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2693 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2693fi 2694fi
2694 2695
2695if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2696if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2696 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2697 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2697fi 2698fi
@@ -2968,6 +2969,7 @@ _LT_DECL([], [reload_cmds], [2])dnl
2968# -- PORTME fill in with the dynamic library characteristics 2969# -- PORTME fill in with the dynamic library characteristics
2969m4_defun([_LT_CHECK_MAGIC_METHOD], 2970m4_defun([_LT_CHECK_MAGIC_METHOD],
2970[m4_require([_LT_DECL_EGREP]) 2971[m4_require([_LT_DECL_EGREP])
2972m4_require([_LT_DECL_OBJDUMP])
2971AC_CACHE_CHECK([how to recognize dependent libraries], 2973AC_CACHE_CHECK([how to recognize dependent libraries],
2972lt_cv_deplibs_check_method, 2974lt_cv_deplibs_check_method,
2973[lt_cv_file_magic_cmd='$MAGIC_CMD' 2975[lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -3018,6 +3020,12 @@ mingw* | pw32*)
3018 fi 3020 fi
3019 ;; 3021 ;;
3020 3022
3023cegcc)
3024 # use the weaker test based on 'objdump'. See mingw*.
3025 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3026 lt_cv_file_magic_cmd='$OBJDUMP -f'
3027 ;;
3028
3021darwin* | rhapsody*) 3029darwin* | rhapsody*)
3022 lt_cv_deplibs_check_method=pass_all 3030 lt_cv_deplibs_check_method=pass_all
3023 ;; 3031 ;;
@@ -3076,7 +3084,7 @@ irix5* | irix6* | nonstopux*)
3076 ;; 3084 ;;
3077 3085
3078# This must be Linux ELF. 3086# This must be Linux ELF.
3079linux* | k*bsd*-gnu) 3087linux* | k*bsd*-gnu | kopensolaris*-gnu)
3080 lt_cv_deplibs_check_method=pass_all 3088 lt_cv_deplibs_check_method=pass_all
3081 ;; 3089 ;;
3082 3090
@@ -3329,7 +3337,7 @@ case $host_os in
3329aix*) 3337aix*)
3330 symcode='[[BCDT]]' 3338 symcode='[[BCDT]]'
3331 ;; 3339 ;;
3332cygwin* | mingw* | pw32*) 3340cygwin* | mingw* | pw32* | cegcc*)
3333 symcode='[[ABCDGISTW]]' 3341 symcode='[[ABCDGISTW]]'
3334 ;; 3342 ;;
3335hpux*) 3343hpux*)
@@ -3575,7 +3583,7 @@ m4_if([$1], [CXX], [
3575 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3583 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3576 # PIC is the default for these OSes. 3584 # PIC is the default for these OSes.
3577 ;; 3585 ;;
3578 mingw* | cygwin* | os2* | pw32*) 3586 mingw* | cygwin* | os2* | pw32* | cegcc*)
3579 # This hack is so that the source file can tell whether it is being 3587 # This hack is so that the source file can tell whether it is being
3580 # built for inclusion in a dll (and should export symbols for example). 3588 # built for inclusion in a dll (and should export symbols for example).
3581 # Although the cygwin gcc ignores -fPIC, still need this for old-style 3589 # Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -3602,10 +3610,11 @@ m4_if([$1], [CXX], [
3602 fi 3610 fi
3603 ;; 3611 ;;
3604 hpux*) 3612 hpux*)
3605 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3613 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3606 # not for PA HP-UX. 3614 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3615 # sets the default TLS model and affects inlining.
3607 case $host_cpu in 3616 case $host_cpu in
3608 hppa*64*|ia64*) 3617 hppa*64*)
3609 ;; 3618 ;;
3610 *) 3619 *)
3611 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3620 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
@@ -3696,19 +3705,26 @@ m4_if([$1], [CXX], [
3696 ;; 3705 ;;
3697 esac 3706 esac
3698 ;; 3707 ;;
3699 linux* | k*bsd*-gnu) 3708 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3700 case $cc_basename in 3709 case $cc_basename in
3701 KCC*) 3710 KCC*)
3702 # KAI C++ Compiler 3711 # KAI C++ Compiler
3703 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3712 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3704 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3713 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3705 ;; 3714 ;;
3706 icpc* | ecpc* ) 3715 ecpc* )
3707 # Intel C++ 3716 # old Intel C++ for x86_64 which still supported -KPIC.
3708 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3717 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3718 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3719 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3711 ;; 3720 ;;
3721 icpc* )
3722 # Intel C++, used to be incompatible with GCC.
3723 # ICC 10 doesn't accept -KPIC any more.
3724 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3725 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3726 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3727 ;;
3712 pgCC* | pgcpp*) 3728 pgCC* | pgcpp*)
3713 # Portland Group C++ compiler 3729 # Portland Group C++ compiler
3714 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3730 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -3874,7 +3890,7 @@ m4_if([$1], [CXX], [
3874 # PIC is the default for these OSes. 3890 # PIC is the default for these OSes.
3875 ;; 3891 ;;
3876 3892
3877 mingw* | cygwin* | pw32* | os2*) 3893 mingw* | cygwin* | pw32* | os2* | cegcc*)
3878 # This hack is so that the source file can tell whether it is being 3894 # This hack is so that the source file can tell whether it is being
3879 # built for inclusion in a dll (and should export symbols for example). 3895 # built for inclusion in a dll (and should export symbols for example).
3880 # Although the cygwin gcc ignores -fPIC, still need this for old-style 3896 # Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -3890,10 +3906,11 @@ m4_if([$1], [CXX], [
3890 ;; 3906 ;;
3891 3907
3892 hpux*) 3908 hpux*)
3893 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3909 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3894 # not for PA HP-UX. 3910 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3911 # sets the default TLS model and affects inlining.
3895 case $host_cpu in 3912 case $host_cpu in
3896 hppa*64*|ia64*) 3913 hppa*64*)
3897 # +Z the default 3914 # +Z the default
3898 ;; 3915 ;;
3899 *) 3916 *)
@@ -3943,7 +3960,7 @@ m4_if([$1], [CXX], [
3943 fi 3960 fi
3944 ;; 3961 ;;
3945 3962
3946 mingw* | cygwin* | pw32* | os2*) 3963 mingw* | cygwin* | pw32* | os2* | cegcc*)
3947 # This hack is so that the source file can tell whether it is being 3964 # This hack is so that the source file can tell whether it is being
3948 # built for inclusion in a dll (and should export symbols for example). 3965 # built for inclusion in a dll (and should export symbols for example).
3949 m4_if([$1], [GCJ], [], 3966 m4_if([$1], [GCJ], [],
@@ -3972,13 +3989,27 @@ m4_if([$1], [CXX], [
3972 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3989 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3973 ;; 3990 ;;
3974 3991
3975 linux* | k*bsd*-gnu) 3992 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3976 case $cc_basename in 3993 case $cc_basename in
3977 icc* | ecc* | ifort*) 3994 # old Intel for x86_64 which still supported -KPIC.
3995 ecc*)
3978 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3996 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3979 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3997 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3980 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3998 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3981 ;; 3999 ;;
4000 # icc used to be incompatible with GCC.
4001 # ICC 10 doesn't accept -KPIC any more.
4002 icc* | ifort*)
4003 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4004 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4005 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4006 ;;
4007 # Lahey Fortran 8.1.
4008 lf95*)
4009 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4010 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4011 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4012 ;;
3982 pgcc* | pgf77* | pgf90* | pgf95*) 4013 pgcc* | pgf77* | pgf90* | pgf95*)
3983 # Portland Group compilers (*not* the Pentium gcc compiler, 4014 # Portland Group compilers (*not* the Pentium gcc compiler,
3984 # which looks to be a dead project) 4015 # which looks to be a dead project)
@@ -4160,7 +4191,7 @@ m4_if([$1], [CXX], [
4160 pw32*) 4191 pw32*)
4161 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4192 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4162 ;; 4193 ;;
4163 cygwin* | mingw*) 4194 cygwin* | mingw* | cegcc*)
4164 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4195 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4165 ;; 4196 ;;
4166 linux* | k*bsd*-gnu) 4197 linux* | k*bsd*-gnu)
@@ -4215,7 +4246,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
4215 extract_expsyms_cmds= 4246 extract_expsyms_cmds=
4216 4247
4217 case $host_os in 4248 case $host_os in
4218 cygwin* | mingw* | pw32*) 4249 cygwin* | mingw* | pw32* | cegcc*)
4219 # FIXME: the MSVC++ port hasn't been tested in a loooong time 4250 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4220 # When not using gcc, we currently assume that we are using 4251 # When not using gcc, we currently assume that we are using
4221 # Microsoft Visual C++. 4252 # Microsoft Visual C++.
@@ -4230,6 +4261,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
4230 openbsd*) 4261 openbsd*)
4231 with_gnu_ld=no 4262 with_gnu_ld=no
4232 ;; 4263 ;;
4264 linux* | k*bsd*-gnu)
4265 _LT_TAGVAR(link_all_deplibs, $1)=no
4266 ;;
4233 esac 4267 esac
4234 4268
4235 _LT_TAGVAR(ld_shlibs, $1)=yes 4269 _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -4251,6 +4285,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
4251 fi 4285 fi
4252 supports_anon_versioning=no 4286 supports_anon_versioning=no
4253 case `$LD -v 2>&1` in 4287 case `$LD -v 2>&1` in
4288 *GNU\ gold*) supports_anon_versioning=yes ;;
4254 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4289 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4255 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4290 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4256 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4291 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -4302,7 +4337,7 @@ _LT_EOF
4302 fi 4337 fi
4303 ;; 4338 ;;
4304 4339
4305 cygwin* | mingw* | pw32*) 4340 cygwin* | mingw* | pw32* | cegcc*)
4306 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4341 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4307 # as there is no search path for DLLs. 4342 # as there is no search path for DLLs.
4308 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -4342,7 +4377,7 @@ _LT_EOF
4342 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 4377 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4343 ;; 4378 ;;
4344 4379
4345 gnu* | linux* | tpf* | k*bsd*-gnu) 4380 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4346 tmp_diet=no 4381 tmp_diet=no
4347 if test "$host_os" = linux-dietlibc; then 4382 if test "$host_os" = linux-dietlibc; then
4348 case $cc_basename in 4383 case $cc_basename in
@@ -4368,6 +4403,9 @@ _LT_EOF
4368 tmp_addflag=' -i_dynamic -nofor_main' ;; 4403 tmp_addflag=' -i_dynamic -nofor_main' ;;
4369 ifc* | ifort*) # Intel Fortran compiler 4404 ifc* | ifort*) # Intel Fortran compiler
4370 tmp_addflag=' -nofor_main' ;; 4405 tmp_addflag=' -nofor_main' ;;
4406 lf95*) # Lahey Fortran 8.1
4407 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4408 tmp_sharedflag='--shared' ;;
4371 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4409 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4372 tmp_sharedflag='-qmkshrobj' 4410 tmp_sharedflag='-qmkshrobj'
4373 tmp_addflag= ;; 4411 tmp_addflag= ;;
@@ -4600,6 +4638,7 @@ _LT_EOF
4600 fi 4638 fi
4601 fi 4639 fi
4602 4640
4641 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4603 # It seems that -bexpall does not export symbols beginning with 4642 # It seems that -bexpall does not export symbols beginning with
4604 # underscore (_), so it is better to generate a list of symbols to export. 4643 # underscore (_), so it is better to generate a list of symbols to export.
4605 _LT_TAGVAR(always_export_symbols, $1)=yes 4644 _LT_TAGVAR(always_export_symbols, $1)=yes
@@ -4654,7 +4693,7 @@ _LT_EOF
4654 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4693 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4655 ;; 4694 ;;
4656 4695
4657 cygwin* | mingw* | pw32*) 4696 cygwin* | mingw* | pw32* | cegcc*)
4658 # When not using gcc, we currently assume that we are using 4697 # When not using gcc, we currently assume that we are using
4659 # Microsoft Visual C++. 4698 # Microsoft Visual C++.
4660 # hardcode_libdir_flag_spec is actually meaningless, as there is 4699 # hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -4758,7 +4797,7 @@ _LT_EOF
4758 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4797 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4759 ;; 4798 ;;
4760 ia64*) 4799 ia64*)
4761 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4800 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4762 ;; 4801 ;;
4763 *) 4802 *)
4764 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4803 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
@@ -5543,6 +5582,7 @@ if test "$_lt_caught_CXX_error" != yes; then
5543 fi 5582 fi
5544 fi 5583 fi
5545 5584
5585 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5546 # It seems that -bexpall does not export symbols beginning with 5586 # It seems that -bexpall does not export symbols beginning with
5547 # underscore (_), so it is better to generate a list of symbols to 5587 # underscore (_), so it is better to generate a list of symbols to
5548 # export. 5588 # export.
@@ -5601,7 +5641,7 @@ if test "$_lt_caught_CXX_error" != yes; then
5601 esac 5641 esac
5602 ;; 5642 ;;
5603 5643
5604 cygwin* | mingw* | pw32*) 5644 cygwin* | mingw* | pw32* | cegcc*)
5605 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5645 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5606 # as there is no search path for DLLs. 5646 # as there is no search path for DLLs.
5607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -5821,7 +5861,7 @@ if test "$_lt_caught_CXX_error" != yes; then
5821 _LT_TAGVAR(inherit_rpath, $1)=yes 5861 _LT_TAGVAR(inherit_rpath, $1)=yes
5822 ;; 5862 ;;
5823 5863
5824 linux* | k*bsd*-gnu) 5864 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5825 case $cc_basename in 5865 case $cc_basename in
5826 KCC*) 5866 KCC*)
5827 # Kuck and Associates, Inc. (KAI) C++ Compiler 5867 # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -6986,6 +7026,18 @@ AC_SUBST([GREP])
6986]) 7026])
6987 7027
6988 7028
7029# _LT_DECL_OBJDUMP
7030# --------------
7031# If we don't have a new enough Autoconf to choose the best objdump
7032# available, choose the one first in the user's PATH.
7033m4_defun([_LT_DECL_OBJDUMP],
7034[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7035test -z "$OBJDUMP" && OBJDUMP=objdump
7036_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7037AC_SUBST([OBJDUMP])
7038])
7039
7040
6989# _LT_DECL_SED 7041# _LT_DECL_SED
6990# ------------ 7042# ------------
6991# Check for a fully-functional sed program, that truncates 7043# Check for a fully-functional sed program, that truncates
diff --git a/libraries/eina/m4/ltoptions.m4 b/libraries/eina/m4/ltoptions.m4
index e970119..34151a3 100644
--- a/libraries/eina/m4/ltoptions.m4
+++ b/libraries/eina/m4/ltoptions.m4
@@ -125,7 +125,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125[enable_win32_dll=yes 125[enable_win32_dll=yes
126 126
127case $host in 127case $host in
128*-*-cygwin* | *-*-mingw* | *-*-pw32*) 128*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
129 AC_CHECK_TOOL(AS, as, false) 129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false) 131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
diff --git a/libraries/eina/sha1-for-source.txt b/libraries/eina/sha1-for-source.txt
deleted file mode 100644
index 0f5bce1..0000000
--- a/libraries/eina/sha1-for-source.txt
+++ /dev/null
@@ -1 +0,0 @@
1cbaf0e4752d2758ae79c353cb342eb8451a52be7
diff --git a/libraries/eina/src/Makefile.in b/libraries/eina/src/Makefile.in
index c954fc5..eb3a2c0 100644
--- a/libraries/eina/src/Makefile.in
+++ b/libraries/eina/src/Makefile.in
@@ -147,7 +147,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
147EGREP = @EGREP@ 147EGREP = @EGREP@
148EINA_CFLAGS = @EINA_CFLAGS@ 148EINA_CFLAGS = @EINA_CFLAGS@
149EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 149EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
150EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
150EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 151EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
152EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
151EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 153EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
152EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 154EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
153EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 155EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -199,8 +201,6 @@ PACKAGE_URL = @PACKAGE_URL@
199PACKAGE_VERSION = @PACKAGE_VERSION@ 201PACKAGE_VERSION = @PACKAGE_VERSION@
200PATH_SEPARATOR = @PATH_SEPARATOR@ 202PATH_SEPARATOR = @PATH_SEPARATOR@
201PKG_CONFIG = @PKG_CONFIG@ 203PKG_CONFIG = @PKG_CONFIG@
202PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
203PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
204RANLIB = @RANLIB@ 204RANLIB = @RANLIB@
205SED = @SED@ 205SED = @SED@
206SET_MAKE = @SET_MAKE@ 206SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/examples/Makefile.am b/libraries/eina/src/examples/Makefile.am
index ea5ca6a..45b72f0 100644
--- a/libraries/eina/src/examples/Makefile.am
+++ b/libraries/eina/src/examples/Makefile.am
@@ -1,6 +1,6 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2 2
3pkglibdir = $(datadir)/$(PACKAGE)/examples 3examplesdir = $(datadir)/$(PACKAGE)/examples
4 4
5AM_CPPFLAGS = \ 5AM_CPPFLAGS = \
6-I. \ 6-I. \
@@ -39,7 +39,7 @@ SRCS = \
39 eina_strbuf_01.c \ 39 eina_strbuf_01.c \
40 eina_tiler_01.c 40 eina_tiler_01.c
41 41
42pkglib_PROGRAMS = 42examples_PROGRAMS =
43 43
44if EFL_INSTALL_EXAMPLES 44if EFL_INSTALL_EXAMPLES
45filesdir = $(datadir)/$(PACKAGE)/examples 45filesdir = $(datadir)/$(PACKAGE)/examples
@@ -47,9 +47,9 @@ files_DATA = $(SRCS)
47endif 47endif
48 48
49if EFL_BUILD_EXAMPLES 49if EFL_BUILD_EXAMPLES
50pkglib_PROGRAMS += \ 50examples_PROGRAMS += \
51 eina_accessor_01 \ 51 eina_accessor_01 \
52 eina_array_01 \ 52 eina_array_01 \
53 eina_array_02 \ 53 eina_array_02 \
54 eina_error_01 \ 54 eina_error_01 \
55 eina_file_01 \ 55 eina_file_01 \
@@ -77,7 +77,7 @@ pkglib_PROGRAMS += \
77 77
78if BUILD_TILER_EXAMPLE 78if BUILD_TILER_EXAMPLE
79AM_CPPFLAGS += @ECORE_EVAS_CFLAGS@ 79AM_CPPFLAGS += @ECORE_EVAS_CFLAGS@
80pkglib_PROGRAMS += eina_tiler_01 80examples_PROGRAMS += eina_tiler_01
81eina_tiler_01_LDADD = $(top_builddir)/src/lib/libeina.la @ECORE_EVAS_LIBS@ 81eina_tiler_01_LDADD = $(top_builddir)/src/lib/libeina.la @ECORE_EVAS_LIBS@
82endif 82endif
83 83
diff --git a/libraries/eina/src/examples/Makefile.in b/libraries/eina/src/examples/Makefile.in
index 3379e55..6e432bb 100644
--- a/libraries/eina/src/examples/Makefile.in
+++ b/libraries/eina/src/examples/Makefile.in
@@ -19,6 +19,7 @@
19VPATH = @srcdir@ 19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@ 20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@ 21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@ 23pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644 25install_sh_DATA = $(install_sh) -c -m 644
@@ -34,10 +35,10 @@ PRE_UNINSTALL = :
34POST_UNINSTALL = : 35POST_UNINSTALL = :
35build_triplet = @build@ 36build_triplet = @build@
36host_triplet = @host@ 37host_triplet = @host@
37pkglib_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) 38examples_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
38@EFL_BUILD_EXAMPLES_TRUE@am__append_1 = \ 39@EFL_BUILD_EXAMPLES_TRUE@am__append_1 = \
39@EFL_BUILD_EXAMPLES_TRUE@ eina_accessor_01 \ 40@EFL_BUILD_EXAMPLES_TRUE@ eina_accessor_01 \
40@EFL_BUILD_EXAMPLES_TRUE@ eina_array_01 \ 41@EFL_BUILD_EXAMPLES_TRUE@ eina_array_01 \
41@EFL_BUILD_EXAMPLES_TRUE@ eina_array_02 \ 42@EFL_BUILD_EXAMPLES_TRUE@ eina_array_02 \
42@EFL_BUILD_EXAMPLES_TRUE@ eina_error_01 \ 43@EFL_BUILD_EXAMPLES_TRUE@ eina_error_01 \
43@EFL_BUILD_EXAMPLES_TRUE@ eina_file_01 \ 44@EFL_BUILD_EXAMPLES_TRUE@ eina_file_01 \
@@ -115,8 +116,8 @@ CONFIG_CLEAN_VPATH_FILES =
115@EFL_BUILD_EXAMPLES_TRUE@ eina_str_01$(EXEEXT) \ 116@EFL_BUILD_EXAMPLES_TRUE@ eina_str_01$(EXEEXT) \
116@EFL_BUILD_EXAMPLES_TRUE@ eina_strbuf_01$(EXEEXT) 117@EFL_BUILD_EXAMPLES_TRUE@ eina_strbuf_01$(EXEEXT)
117@BUILD_TILER_EXAMPLE_TRUE@@EFL_BUILD_EXAMPLES_TRUE@am__EXEEXT_2 = eina_tiler_01$(EXEEXT) 118@BUILD_TILER_EXAMPLE_TRUE@@EFL_BUILD_EXAMPLES_TRUE@am__EXEEXT_2 = eina_tiler_01$(EXEEXT)
118am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" 119am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"
119PROGRAMS = $(pkglib_PROGRAMS) 120PROGRAMS = $(examples_PROGRAMS)
120eina_accessor_01_SOURCES = eina_accessor_01.c 121eina_accessor_01_SOURCES = eina_accessor_01.c
121eina_accessor_01_OBJECTS = eina_accessor_01.$(OBJEXT) 122eina_accessor_01_OBJECTS = eina_accessor_01.$(OBJEXT)
122eina_accessor_01_LDADD = $(LDADD) 123eina_accessor_01_LDADD = $(LDADD)
@@ -294,7 +295,6 @@ DATA = $(files_DATA)
294ETAGS = etags 295ETAGS = etags
295CTAGS = ctags 296CTAGS = ctags
296DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 297DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
297pkglibdir = $(datadir)/$(PACKAGE)/examples
298ACLOCAL = @ACLOCAL@ 298ACLOCAL = @ACLOCAL@
299ALLOCA = @ALLOCA@ 299ALLOCA = @ALLOCA@
300AMTAR = @AMTAR@ 300AMTAR = @AMTAR@
@@ -337,7 +337,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
337EGREP = @EGREP@ 337EGREP = @EGREP@
338EINA_CFLAGS = @EINA_CFLAGS@ 338EINA_CFLAGS = @EINA_CFLAGS@
339EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 339EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
340EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
340EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 341EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
342EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
341EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 343EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
342EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 344EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
343EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 345EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -389,8 +391,6 @@ PACKAGE_URL = @PACKAGE_URL@
389PACKAGE_VERSION = @PACKAGE_VERSION@ 391PACKAGE_VERSION = @PACKAGE_VERSION@
390PATH_SEPARATOR = @PATH_SEPARATOR@ 392PATH_SEPARATOR = @PATH_SEPARATOR@
391PKG_CONFIG = @PKG_CONFIG@ 393PKG_CONFIG = @PKG_CONFIG@
392PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
393PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
394RANLIB = @RANLIB@ 394RANLIB = @RANLIB@
395SED = @SED@ 395SED = @SED@
396SET_MAKE = @SET_MAKE@ 396SET_MAKE = @SET_MAKE@
@@ -465,6 +465,7 @@ top_builddir = @top_builddir@
465top_srcdir = @top_srcdir@ 465top_srcdir = @top_srcdir@
466version_info = @version_info@ 466version_info = @version_info@
467MAINTAINERCLEANFILES = Makefile.in 467MAINTAINERCLEANFILES = Makefile.in
468examplesdir = $(datadir)/$(PACKAGE)/examples
468AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include \ 469AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include \
469 -I$(top_builddir)/src/include $(am__append_2) 470 -I$(top_builddir)/src/include $(am__append_2)
470LDADD = \ 471LDADD = \
@@ -536,10 +537,10 @@ $(top_srcdir)/configure: $(am__configure_deps)
536$(ACLOCAL_M4): $(am__aclocal_m4_deps) 537$(ACLOCAL_M4): $(am__aclocal_m4_deps)
537 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 538 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
538$(am__aclocal_m4_deps): 539$(am__aclocal_m4_deps):
539install-pkglibPROGRAMS: $(pkglib_PROGRAMS) 540install-examplesPROGRAMS: $(examples_PROGRAMS)
540 @$(NORMAL_INSTALL) 541 @$(NORMAL_INSTALL)
541 test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" 542 test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)"
542 @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ 543 @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \
543 for p in $$list; do echo "$$p $$p"; done | \ 544 for p in $$list; do echo "$$p $$p"; done | \
544 sed 's/$(EXEEXT)$$//' | \ 545 sed 's/$(EXEEXT)$$//' | \
545 while read p p1; do if test -f $$p || test -f $$p1; \ 546 while read p p1; do if test -f $$p || test -f $$p1; \
@@ -556,23 +557,23 @@ install-pkglibPROGRAMS: $(pkglib_PROGRAMS)
556 while read type dir files; do \ 557 while read type dir files; do \
557 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 558 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
558 test -z "$$files" || { \ 559 test -z "$$files" || { \
559 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ 560 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \
560 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ 561 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \
561 } \ 562 } \
562 ; done 563 ; done
563 564
564uninstall-pkglibPROGRAMS: 565uninstall-examplesPROGRAMS:
565 @$(NORMAL_UNINSTALL) 566 @$(NORMAL_UNINSTALL)
566 @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ 567 @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \
567 files=`for p in $$list; do echo "$$p"; done | \ 568 files=`for p in $$list; do echo "$$p"; done | \
568 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 569 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
569 -e 's/$$/$(EXEEXT)/' `; \ 570 -e 's/$$/$(EXEEXT)/' `; \
570 test -n "$$list" || exit 0; \ 571 test -n "$$list" || exit 0; \
571 echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ 572 echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \
572 cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files 573 cd "$(DESTDIR)$(examplesdir)" && rm -f $$files
573 574
574clean-pkglibPROGRAMS: 575clean-examplesPROGRAMS:
575 @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ 576 @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \
576 echo " rm -f" $$list; \ 577 echo " rm -f" $$list; \
577 rm -f $$list || exit $$?; \ 578 rm -f $$list || exit $$?; \
578 test -n "$(EXEEXT)" || exit 0; \ 579 test -n "$(EXEEXT)" || exit 0; \
@@ -831,7 +832,7 @@ check-am: all-am
831check: check-am 832check: check-am
832all-am: Makefile $(PROGRAMS) $(DATA) 833all-am: Makefile $(PROGRAMS) $(DATA)
833installdirs: 834installdirs:
834 for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ 835 for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \
835 test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 836 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
836 done 837 done
837install: install-am 838install: install-am
@@ -862,7 +863,7 @@ maintainer-clean-generic:
862 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) 863 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
863clean: clean-am 864clean: clean-am
864 865
865clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ 866clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \
866 mostlyclean-am 867 mostlyclean-am
867 868
868distclean: distclean-am 869distclean: distclean-am
@@ -883,13 +884,13 @@ info: info-am
883 884
884info-am: 885info-am:
885 886
886install-data-am: install-filesDATA 887install-data-am: install-examplesPROGRAMS install-filesDATA
887 888
888install-dvi: install-dvi-am 889install-dvi: install-dvi-am
889 890
890install-dvi-am: 891install-dvi-am:
891 892
892install-exec-am: install-pkglibPROGRAMS 893install-exec-am:
893 894
894install-html: install-html-am 895install-html: install-html-am
895 896
@@ -929,24 +930,25 @@ ps: ps-am
929 930
930ps-am: 931ps-am:
931 932
932uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS 933uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA
933 934
934.MAKE: install-am install-strip 935.MAKE: install-am install-strip
935 936
936.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ 937.PHONY: CTAGS GTAGS all all-am check check-am clean \
937 clean-libtool clean-pkglibPROGRAMS ctags distclean \ 938 clean-examplesPROGRAMS clean-generic clean-libtool ctags \
938 distclean-compile distclean-generic distclean-libtool \ 939 distclean distclean-compile distclean-generic \
939 distclean-tags distdir dvi dvi-am html html-am info info-am \ 940 distclean-libtool distclean-tags distdir dvi dvi-am html \
940 install install-am install-data install-data-am install-dvi \ 941 html-am info info-am install install-am install-data \
941 install-dvi-am install-exec install-exec-am install-filesDATA \ 942 install-data-am install-dvi install-dvi-am \
942 install-html install-html-am install-info install-info-am \ 943 install-examplesPROGRAMS install-exec install-exec-am \
943 install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ 944 install-filesDATA install-html install-html-am install-info \
945 install-info-am install-man install-pdf install-pdf-am \
944 install-ps install-ps-am install-strip installcheck \ 946 install-ps install-ps-am install-strip installcheck \
945 installcheck-am installdirs maintainer-clean \ 947 installcheck-am installdirs maintainer-clean \
946 maintainer-clean-generic mostlyclean mostlyclean-compile \ 948 maintainer-clean-generic mostlyclean mostlyclean-compile \
947 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ 949 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
948 tags uninstall uninstall-am uninstall-filesDATA \ 950 tags uninstall uninstall-am uninstall-examplesPROGRAMS \
949 uninstall-pkglibPROGRAMS 951 uninstall-filesDATA
950 952
951 953
952# Tell versions [3.59,3.63) of GNU make to not export all variables. 954# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libraries/eina/src/examples/eina_array_01.c b/libraries/eina/src/examples/eina_array_01.c
index 25e0944..d93eb35 100644
--- a/libraries/eina/src/examples/eina_array_01.c
+++ b/libraries/eina/src/examples/eina_array_01.c
@@ -35,12 +35,12 @@ main(int argc, char **argv)
35 for (i = 0; i < 20; i++) 35 for (i = 0; i < 20; i++)
36 eina_array_push(array, strdup(strings[i])); 36 eina_array_push(array, strdup(strings[i]));
37 37
38 printf("array count: %d\n", eina_array_count_get(array)); 38 printf("array count: %d\n", eina_array_count(array));
39 eina_array_foreach(array, _print, NULL); 39 eina_array_foreach(array, _print, NULL);
40 40
41 printf("Top gun: %s\n", (char*)eina_array_data_get(array, 2)); 41 printf("Top gun: %s\n", (char*)eina_array_data_get(array, 2));
42 42
43 while (eina_array_count_get(array)) 43 while (eina_array_count(array))
44 free(eina_array_pop(array)); 44 free(eina_array_pop(array));
45 45
46 eina_array_free(array); 46 eina_array_free(array);
diff --git a/libraries/eina/src/include/Eina.h b/libraries/eina/src/include/Eina.h
index 68c41f5..721a991 100644
--- a/libraries/eina/src/include/Eina.h
+++ b/libraries/eina/src/include/Eina.h
@@ -47,7 +47,7 @@
47 * 47 *
48 * @version 1.1 48 * @version 1.1
49 * @date 2008-2011 49 * @date 2008-2011
50 * 50 *
51 * @section eina_intro_sec Introduction 51 * @section eina_intro_sec Introduction
52 * 52 *
53 * The Eina library is a library that implements an API for data types 53 * The Eina library is a library that implements an API for data types
@@ -59,10 +59,11 @@
59 * Linux, BSD, Opensolaris and Windows (XP and CE). 59 * Linux, BSD, Opensolaris and Windows (XP and CE).
60 * 60 *
61 * The data types that are available are (see @ref Eina_Data_Types_Group): 61 * The data types that are available are (see @ref Eina_Data_Types_Group):
62 * @li @ref Eina_Inline_Array_Group standard array of inlined members.
62 * @li @ref Eina_Array_Group standard array of @c void* data. 63 * @li @ref Eina_Array_Group standard array of @c void* data.
63 * @li @ref Eina_Hash_Group standard hash of @c void* data. 64 * @li @ref Eina_Hash_Group standard hash of @c void* data.
64 * @li @ref Eina_Inline_List_Group list with nodes inlined into user type. 65 * @li @ref Eina_Inline_List_Group list with nodes inlined into user type.
65 * @li @ref Eina_CList_Group compact inlined list. 66 * @li @ref Eina_CList_Group Compact List.
66 * @li @ref Eina_List_Group standard list of @c void* data. 67 * @li @ref Eina_List_Group standard list of @c void* data.
67 * @li @ref Eina_Iterator_Group Iterator functions. 68 * @li @ref Eina_Iterator_Group Iterator functions.
68 * @li @ref Eina_Matrixsparse_Group sparse matrix of @c void* data. 69 * @li @ref Eina_Matrixsparse_Group sparse matrix of @c void* data.
@@ -89,7 +90,7 @@
89 * 90 *
90 * Please see the @ref authors page for contact details. 91 * Please see the @ref authors page for contact details.
91 * 92 *
92 * @defgroup Eina_Data_Types_Group Data types 93 * @defgroup Eina_Data_Types_Group Data Types
93 * 94 *
94 * Eina provide easy to use and optimized data types and structures. 95 * Eina provide easy to use and optimized data types and structures.
95 * 96 *
@@ -158,6 +159,7 @@ extern "C" {
158#include "eina_mempool.h" 159#include "eina_mempool.h"
159#include "eina_error.h" 160#include "eina_error.h"
160#include "eina_log.h" 161#include "eina_log.h"
162#include "eina_inarray.h"
161#include "eina_array.h" 163#include "eina_array.h"
162#include "eina_binshare.h" 164#include "eina_binshare.h"
163#include "eina_stringshare.h" 165#include "eina_stringshare.h"
@@ -186,6 +188,7 @@ extern "C" {
186#include "eina_refcount.h" 188#include "eina_refcount.h"
187#include "eina_mmap.h" 189#include "eina_mmap.h"
188#include "eina_xattr.h" 190#include "eina_xattr.h"
191#include "eina_value.h"
189 192
190#ifdef __cplusplus 193#ifdef __cplusplus
191} 194}
diff --git a/libraries/eina/src/include/Makefile.am b/libraries/eina/src/include/Makefile.am
index 41a37cb..a818d5f 100644
--- a/libraries/eina/src/include/Makefile.am
+++ b/libraries/eina/src/include/Makefile.am
@@ -14,6 +14,8 @@ eina_hash.h \
14eina_inline_hash.x \ 14eina_inline_hash.x \
15eina_lalloc.h \ 15eina_lalloc.h \
16eina_clist.h \ 16eina_clist.h \
17eina_inline_clist.x \
18eina_inarray.h \
17eina_inlist.h \ 19eina_inlist.h \
18eina_list.h \ 20eina_list.h \
19eina_file.h \ 21eina_file.h \
@@ -60,7 +62,9 @@ eina_lock.h \
60eina_prefix.h \ 62eina_prefix.h \
61eina_refcount.h \ 63eina_refcount.h \
62eina_mmap.h \ 64eina_mmap.h \
63eina_xattr.h 65eina_xattr.h \
66eina_value.h \
67eina_inline_value.x
64 68
65# Will be back for developper after 1.1. 69# Will be back for developper after 1.1.
66# eina_object.h 70# eina_object.h
diff --git a/libraries/eina/src/include/Makefile.in b/libraries/eina/src/include/Makefile.in
index f6e0074..ea922e5 100644
--- a/libraries/eina/src/include/Makefile.in
+++ b/libraries/eina/src/include/Makefile.in
@@ -78,23 +78,24 @@ am__dist_installed_headers_DATA_DIST = eina_safety_checks.h \
78 eina_error.h eina_log.h eina_inline_log.x eina_fp.h \ 78 eina_error.h eina_log.h eina_inline_log.x eina_fp.h \
79 eina_inline_f32p32.x eina_inline_f16p16.x eina_inline_f8p24.x \ 79 eina_inline_f32p32.x eina_inline_f16p16.x eina_inline_f8p24.x \
80 eina_inline_fp.x eina_hash.h eina_inline_hash.x eina_lalloc.h \ 80 eina_inline_fp.x eina_hash.h eina_inline_hash.x eina_lalloc.h \
81 eina_clist.h eina_inlist.h eina_list.h eina_file.h \ 81 eina_clist.h eina_inline_clist.x eina_inarray.h eina_inlist.h \
82 eina_mempool.h eina_module.h eina_rectangle.h eina_types.h \ 82 eina_list.h eina_file.h eina_mempool.h eina_module.h \
83 eina_array.h eina_counter.h eina_inline_array.x eina_magic.h \ 83 eina_rectangle.h eina_types.h eina_array.h eina_counter.h \
84 eina_stringshare.h eina_binshare.h eina_binbuf.h \ 84 eina_inline_array.x eina_magic.h eina_stringshare.h \
85 eina_ustringshare.h eina_inline_stringshare.x \ 85 eina_binshare.h eina_binbuf.h eina_ustringshare.h \
86 eina_inline_ustringshare.x eina_inline_list.x eina_accessor.h \ 86 eina_inline_stringshare.x eina_inline_ustringshare.x \
87 eina_convert.h eina_rbtree.h eina_benchmark.h \ 87 eina_inline_list.x eina_accessor.h eina_convert.h \
88 eina_inline_rbtree.x eina_inline_mempool.x \ 88 eina_rbtree.h eina_benchmark.h eina_inline_rbtree.x \
89 eina_inline_rectangle.x eina_inline_trash.x eina_trash.h \ 89 eina_inline_mempool.x eina_inline_rectangle.x \
90 eina_iterator.h eina_main.h eina_cpu.h eina_sched.h \ 90 eina_inline_trash.x eina_trash.h eina_iterator.h eina_main.h \
91 eina_tiler.h eina_hamster.h eina_matrixsparse.h \ 91 eina_cpu.h eina_sched.h eina_tiler.h eina_hamster.h \
92 eina_inline_tiler.x eina_str.h eina_inline_str.x eina_strbuf.h \ 92 eina_matrixsparse.h eina_inline_tiler.x eina_str.h \
93 eina_ustrbuf.h eina_unicode.h eina_quadtree.h \ 93 eina_inline_str.x eina_strbuf.h eina_ustrbuf.h eina_unicode.h \
94 eina_simple_xml_parser.h eina_lock.h eina_prefix.h \ 94 eina_quadtree.h eina_simple_xml_parser.h eina_lock.h \
95 eina_refcount.h eina_mmap.h eina_xattr.h \ 95 eina_prefix.h eina_refcount.h eina_mmap.h eina_xattr.h \
96 eina_inline_lock_wince.x eina_inline_lock_win32.x \ 96 eina_value.h eina_inline_value.x eina_inline_lock_wince.x \
97 eina_inline_lock_posix.x eina_inline_lock_void.x 97 eina_inline_lock_win32.x eina_inline_lock_posix.x \
98 eina_inline_lock_void.x
98am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 99am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
99am__vpath_adj = case $$p in \ 100am__vpath_adj = case $$p in \
100 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 101 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -163,7 +164,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
163EGREP = @EGREP@ 164EGREP = @EGREP@
164EINA_CFLAGS = @EINA_CFLAGS@ 165EINA_CFLAGS = @EINA_CFLAGS@
165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 166EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
167EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
166EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 168EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
169EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
167EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 170EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
168EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 171EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
169EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 172EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -215,8 +218,6 @@ PACKAGE_URL = @PACKAGE_URL@
215PACKAGE_VERSION = @PACKAGE_VERSION@ 218PACKAGE_VERSION = @PACKAGE_VERSION@
216PATH_SEPARATOR = @PATH_SEPARATOR@ 219PATH_SEPARATOR = @PATH_SEPARATOR@
217PKG_CONFIG = @PKG_CONFIG@ 220PKG_CONFIG = @PKG_CONFIG@
218PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
219PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
220RANLIB = @RANLIB@ 221RANLIB = @RANLIB@
221SED = @SED@ 222SED = @SED@
222SET_MAKE = @SET_MAKE@ 223SET_MAKE = @SET_MAKE@
@@ -295,10 +296,10 @@ EINAHEADERS = eina_safety_checks.h eina_error.h eina_log.h \
295 eina_inline_log.x eina_fp.h eina_inline_f32p32.x \ 296 eina_inline_log.x eina_fp.h eina_inline_f32p32.x \
296 eina_inline_f16p16.x eina_inline_f8p24.x eina_inline_fp.x \ 297 eina_inline_f16p16.x eina_inline_f8p24.x eina_inline_fp.x \
297 eina_hash.h eina_inline_hash.x eina_lalloc.h eina_clist.h \ 298 eina_hash.h eina_inline_hash.x eina_lalloc.h eina_clist.h \
298 eina_inlist.h eina_list.h eina_file.h eina_mempool.h \ 299 eina_inline_clist.x eina_inarray.h eina_inlist.h eina_list.h \
299 eina_module.h eina_rectangle.h eina_types.h eina_array.h \ 300 eina_file.h eina_mempool.h eina_module.h eina_rectangle.h \
300 eina_counter.h eina_inline_array.x eina_magic.h \ 301 eina_types.h eina_array.h eina_counter.h eina_inline_array.x \
301 eina_stringshare.h eina_binshare.h eina_binbuf.h \ 302 eina_magic.h eina_stringshare.h eina_binshare.h eina_binbuf.h \
302 eina_ustringshare.h eina_inline_stringshare.x \ 303 eina_ustringshare.h eina_inline_stringshare.x \
303 eina_inline_ustringshare.x eina_inline_list.x eina_accessor.h \ 304 eina_inline_ustringshare.x eina_inline_list.x eina_accessor.h \
304 eina_convert.h eina_rbtree.h eina_benchmark.h \ 305 eina_convert.h eina_rbtree.h eina_benchmark.h \
@@ -309,8 +310,9 @@ EINAHEADERS = eina_safety_checks.h eina_error.h eina_log.h \
309 eina_inline_tiler.x eina_str.h eina_inline_str.x eina_strbuf.h \ 310 eina_inline_tiler.x eina_str.h eina_inline_str.x eina_strbuf.h \
310 eina_ustrbuf.h eina_unicode.h eina_quadtree.h \ 311 eina_ustrbuf.h eina_unicode.h eina_quadtree.h \
311 eina_simple_xml_parser.h eina_lock.h eina_prefix.h \ 312 eina_simple_xml_parser.h eina_lock.h eina_prefix.h \
312 eina_refcount.h eina_mmap.h eina_xattr.h $(am__append_1) \ 313 eina_refcount.h eina_mmap.h eina_xattr.h eina_value.h \
313 $(am__append_2) $(am__append_3) $(am__append_4) 314 eina_inline_value.x $(am__append_1) $(am__append_2) \
315 $(am__append_3) $(am__append_4)
314installed_mainheaderdir = $(includedir)/eina-@VMAJ@ 316installed_mainheaderdir = $(includedir)/eina-@VMAJ@
315dist_installed_mainheader_DATA = Eina.h eina_config.h 317dist_installed_mainheader_DATA = Eina.h eina_config.h
316installed_headersdir = $(includedir)/eina-@VMAJ@/eina 318installed_headersdir = $(includedir)/eina-@VMAJ@/eina
diff --git a/libraries/eina/src/include/eina_array.h b/libraries/eina/src/include/eina_array.h
index d33f5e9..53183b4 100644
--- a/libraries/eina/src/include/eina_array.h
+++ b/libraries/eina/src/include/eina_array.h
@@ -31,7 +31,7 @@
31 31
32 32
33/** 33/**
34 * @page array_01_example_page Basic array usage 34 * @page eina_array_01_example_page Basic array usage
35 * @dontinclude eina_array_01.c 35 * @dontinclude eina_array_01.c
36 * 36 *
37 * For this example we add stdlib.h, stdio.h and string.h for some 37 * For this example we add stdlib.h, stdio.h and string.h for some
@@ -94,7 +94,7 @@
94 */ 94 */
95 95
96/** 96/**
97 * @page array_02_example_page Removing array elements 97 * @page eina_array_02_example_page Removing array elements
98 * @dontinclude eina_array_02.c 98 * @dontinclude eina_array_02.c
99 * 99 *
100 * Just the usual includes: 100 * Just the usual includes:
@@ -169,7 +169,7 @@
169 * element, use eina_array_push() and to remove the last element, use 169 * element, use eina_array_push() and to remove the last element, use
170 * eina_array_pop(). To retrieve the element at a given position, use 170 * eina_array_pop(). To retrieve the element at a given position, use
171 * eina_array_data_get(). The number of elements can be retrieved with 171 * eina_array_data_get(). The number of elements can be retrieved with
172 * eina_array_count_get(). 172 * eina_array_count().
173 * 173 *
174 * Eina_Array is different from a conventional C array in a number of ways, most 174 * Eina_Array is different from a conventional C array in a number of ways, most
175 * importantly they grow and shrink dynamically, this means that if you add an 175 * importantly they grow and shrink dynamically, this means that if you add an
@@ -191,8 +191,8 @@
191 * of void pointers. 191 * of void pointers.
192 * 192 *
193 * See here some examples: 193 * See here some examples:
194 * @li @ref array_01_example_page 194 * @li @ref eina_array_01_example_page
195 * @li @ref array_02_example_page 195 * @li @ref eina_array_02_example_page
196 */ 196 */
197 197
198/** 198/**
@@ -351,7 +351,8 @@ static inline void *eina_array_data_get(const Eina_Array *array,
351static inline void eina_array_data_set(const Eina_Array *array, 351static inline void eina_array_data_set(const Eina_Array *array,
352 unsigned int idx, 352 unsigned int idx,
353 const void *data) EINA_ARG_NONNULL(1); 353 const void *data) EINA_ARG_NONNULL(1);
354static inline unsigned int eina_array_count_get(const Eina_Array *array) EINA_ARG_NONNULL(1); 354static inline unsigned int eina_array_count_get(const Eina_Array *array) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT EINA_DEPRECATED;
355static inline unsigned int eina_array_count(const Eina_Array *array) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
355 356
356/** 357/**
357 * @brief Returned a new iterator associated to an array. 358 * @brief Returned a new iterator associated to an array.
@@ -394,7 +395,7 @@ EAPI Eina_Accessor *eina_array_accessor_new(const Eina_Array *array) EINA
394 */ 395 */
395static inline Eina_Bool eina_array_foreach(Eina_Array *array, 396static inline Eina_Bool eina_array_foreach(Eina_Array *array,
396 Eina_Each_Cb cb, 397 Eina_Each_Cb cb,
397 void *data); 398 void *fdata);
398/** 399/**
399 * @def EINA_ARRAY_ITER_NEXT 400 * @def EINA_ARRAY_ITER_NEXT
400 * @brief Macro to iterate over an array easily. 401 * @brief Macro to iterate over an array easily.
@@ -429,7 +430,7 @@ static inline Eina_Bool eina_array_foreach(Eina_Array *array,
429 */ 430 */
430#define EINA_ARRAY_ITER_NEXT(array, index, item, iterator) \ 431#define EINA_ARRAY_ITER_NEXT(array, index, item, iterator) \
431 for (index = 0, iterator = (array)->data; \ 432 for (index = 0, iterator = (array)->data; \
432 (index < eina_array_count_get(array)) && ((item = *((iterator)++))); \ 433 (index < eina_array_count(array)) && ((item = *((iterator)++))); \
433 ++(index)) 434 ++(index))
434 435
435#include "eina_inline_array.x" 436#include "eina_inline_array.x"
diff --git a/libraries/eina/src/include/eina_benchmark.h b/libraries/eina/src/include/eina_benchmark.h
index 721e1c0..9e96d64 100644
--- a/libraries/eina/src/include/eina_benchmark.h
+++ b/libraries/eina/src/include/eina_benchmark.h
@@ -398,9 +398,9 @@ EAPI void eina_benchmark_free(Eina_Benchmark *bench);
398 * 398 *
399 * This function adds the test named @p name to @p benchmark. @p 399 * This function adds the test named @p name to @p benchmark. @p
400 * bench_cb is the function called when the test is executed. That 400 * bench_cb is the function called when the test is executed. That
401 * test can be executed a certain amount of time. @p start, @p end and 401 * test can be executed a certain amount of time. @p count_start, @p count_end and
402 * @p step define a loop with a step increment. The integer that is 402 * @p count_step define a loop with a step increment. The integer that is
403 * increasing by @p step from @p start to @p end is passed to @p 403 * increasing by @p count_step from @p count_start to @p count_end is passed to @p
404 * bench_cb when eina_benchmark_run() is called. 404 * bench_cb when eina_benchmark_run() is called.
405 * 405 *
406 * If @p bench is @c NULL, this function returns imediatly. If the 406 * If @p bench is @c NULL, this function returns imediatly. If the
@@ -413,7 +413,7 @@ EAPI Eina_Bool eina_benchmark_register(Eina_Benchmark *bench,
413 Eina_Benchmark_Specimens bench_cb, 413 Eina_Benchmark_Specimens bench_cb,
414 int count_start, 414 int count_start,
415 int count_end, 415 int count_end,
416 int count_set); 416 int count_step);
417 417
418/** 418/**
419 * @brief Run the benchmark tests that have been registered. 419 * @brief Run the benchmark tests that have been registered.
diff --git a/libraries/eina/src/include/eina_binbuf.h b/libraries/eina/src/include/eina_binbuf.h
index 92f788e..7c3524b 100644
--- a/libraries/eina/src/include/eina_binbuf.h
+++ b/libraries/eina/src/include/eina_binbuf.h
@@ -49,6 +49,24 @@ typedef struct _Eina_Strbuf Eina_Binbuf;
49EAPI Eina_Binbuf *eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; 49EAPI Eina_Binbuf *eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
50 50
51/** 51/**
52 * @brief Create a new string buffer using the passed string. The passed
53 * string is used directly as the buffer, it's somehow the opposite function of
54 * @ref eina_binbuf_string_steal . The passed string must be malloced.
55 *
56 * @param str the string to manage
57 * @param length the length of the string.
58 * @return Newly allocated string buffer instance.
59 *
60 * This function creates a new string buffer. On error, @c NULL is
61 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To
62 * free the resources, use eina_binbuf_free().
63 *
64 * @see eina_binbuf_manage_new()
65 * @since 1.2.0
66 */
67EAPI Eina_Binbuf *eina_binbuf_manage_new_length(unsigned char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
68
69/**
52 * @brief Free a string buffer. 70 * @brief Free a string buffer.
53 * 71 *
54 * @param buf The string buffer to free. 72 * @param buf The string buffer to free.
diff --git a/libraries/eina/src/include/eina_clist.h b/libraries/eina/src/include/eina_clist.h
index 68f15df..096a4b7 100644
--- a/libraries/eina/src/include/eina_clist.h
+++ b/libraries/eina/src/include/eina_clist.h
@@ -23,7 +23,22 @@
23#define __EINA_CLIST_H__ 23#define __EINA_CLIST_H__
24 24
25/** 25/**
26 * @addtogroup Eina_CList_Group Compact inline list 26 * @addtogroup Eina_Data_Types_Group Data Types
27 *
28 * @{
29 */
30
31/**
32 * @addtogroup Eina_Containers_Group Containers
33 *
34 * @{
35 */
36
37/**
38 * @defgroup Eina_CList_Group Compact List
39 *
40 * @{
41 *
27 * @brief Eina_Clist is a compact (inline) list implementation 42 * @brief Eina_Clist is a compact (inline) list implementation
28 * 43 *
29 * Elements of this list are members of the structs stored in the list 44 * Elements of this list are members of the structs stored in the list
@@ -42,9 +57,8 @@
42 * @note There's no NULL at the end of the list, the last item points to the head. 57 * @note There's no NULL at the end of the list, the last item points to the head.
43 * 58 *
44 * @note List heads must be initialized with EINA_CLIST_INIT or by calling eina_clist_element_init 59 * @note List heads must be initialized with EINA_CLIST_INIT or by calling eina_clist_element_init
45 */ 60 *
46 61 * Define a list like so:
47/* Define a list like so:
48 * 62 *
49 * @code 63 * @code
50 * struct gadget 64 * struct gadget
@@ -88,24 +102,6 @@
88 */ 102 */
89 103
90/** 104/**
91 * @addtogroup Eina_Data_Types_Group Data Types
92 *
93 * @{
94 */
95
96/**
97 * @addtogroup Eina_Containers_Group Containers
98 *
99 * @{
100 */
101
102/**
103 * @defgroup Eina_CList_Group Compact list
104 *
105 * @{
106 */
107
108/**
109 * @typedef Eina_Clist 105 * @typedef Eina_Clist
110 * This is the list head and the list entry. 106 * This is the list head and the list entry.
111 * @since 1.1.0 107 * @since 1.1.0
@@ -135,13 +131,7 @@ struct _Eina_Clist
135 * @note There's no need to initialize an element before adding it to the list. 131 * @note There's no need to initialize an element before adding it to the list.
136 * @since 1.1.0 132 * @since 1.1.0
137 */ 133 */
138static inline void eina_clist_add_after(Eina_Clist *elem, Eina_Clist *to_add) 134static inline void eina_clist_add_after(Eina_Clist *elem, Eina_Clist *to_add);
139{
140 to_add->next = elem->next;
141 to_add->prev = elem;
142 elem->next->prev = to_add;
143 elem->next = to_add;
144}
145 135
146/** 136/**
147 * Add an element before the specified one. 137 * Add an element before the specified one.
@@ -154,13 +144,7 @@ static inline void eina_clist_add_after(Eina_Clist *elem, Eina_Clist *to_add)
154 * @note There's no need to initialize an element before adding it to the list. 144 * @note There's no need to initialize an element before adding it to the list.
155 * @since 1.1.0 145 * @since 1.1.0
156 */ 146 */
157static inline void eina_clist_add_before(Eina_Clist *elem, Eina_Clist *to_add) 147static inline void eina_clist_add_before(Eina_Clist *elem, Eina_Clist *to_add);
158{
159 to_add->next = elem;
160 to_add->prev = elem->prev;
161 elem->prev->next = to_add;
162 elem->prev = to_add;
163}
164 148
165/** 149/**
166 * Add element at the head of the list. 150 * Add element at the head of the list.
@@ -173,10 +157,7 @@ static inline void eina_clist_add_before(Eina_Clist *elem, Eina_Clist *to_add)
173 * @note There's no need to initialize an element before adding it to the list. 157 * @note There's no need to initialize an element before adding it to the list.
174 * @since 1.1.0 158 * @since 1.1.0
175 */ 159 */
176static inline void eina_clist_add_head(Eina_Clist *list, Eina_Clist *elem) 160static inline void eina_clist_add_head(Eina_Clist *list, Eina_Clist *elem);
177{
178 eina_clist_add_after(list, elem);
179}
180 161
181/** 162/**
182 * Add element at the tail of the list. 163 * Add element at the tail of the list.
@@ -189,10 +170,7 @@ static inline void eina_clist_add_head(Eina_Clist *list, Eina_Clist *elem)
189 * @note There's no need to initialize an element before adding it to the list. 170 * @note There's no need to initialize an element before adding it to the list.
190 * @since 1.1.0 171 * @since 1.1.0
191 */ 172 */
192static inline void eina_clist_add_tail(Eina_Clist *list, Eina_Clist *elem) 173static inline void eina_clist_add_tail(Eina_Clist *list, Eina_Clist *elem);
193{
194 eina_clist_add_before(list, elem);
195}
196 174
197/** 175/**
198 * Init an (unlinked) element. 176 * Init an (unlinked) element.
@@ -207,11 +185,7 @@ static inline void eina_clist_add_tail(Eina_Clist *list, Eina_Clist *elem)
207 * @note It is not necessary to call this before adding an element to this list. 185 * @note It is not necessary to call this before adding an element to this list.
208 * @since 1.1.0 186 * @since 1.1.0
209 */ 187 */
210static inline void eina_clist_element_init(Eina_Clist *elem) 188static inline void eina_clist_element_init(Eina_Clist *elem);
211{
212 elem->next = NULL;
213 elem->prev = NULL;
214}
215 189
216/** 190/**
217 * Check if an element is in a list or not. 191 * Check if an element is in a list or not.
@@ -222,10 +196,7 @@ static inline void eina_clist_element_init(Eina_Clist *elem)
222 * it has been added to a list or remove from a list. 196 * it has been added to a list or remove from a list.
223 * @since 1.1.0 197 * @since 1.1.0
224 */ 198 */
225static inline int eina_clist_element_is_linked(Eina_Clist *elem) 199static inline int eina_clist_element_is_linked(Eina_Clist *elem);
226{
227 return (elem->next != NULL && elem->prev != NULL);
228}
229 200
230/** 201/**
231 * Remove an element from its list. 202 * Remove an element from its list.
@@ -235,12 +206,7 @@ static inline int eina_clist_element_is_linked(Eina_Clist *elem)
235 * @post The element is marked as not being in any list 206 * @post The element is marked as not being in any list
236 * @since 1.1.0 207 * @since 1.1.0
237 */ 208 */
238static inline void eina_clist_remove(Eina_Clist *elem) 209static inline void eina_clist_remove(Eina_Clist *elem);
239{
240 elem->next->prev = elem->prev;
241 elem->prev->next = elem->next;
242 eina_clist_element_init(elem);
243}
244 210
245/** 211/**
246 * Get the next element. 212 * Get the next element.
@@ -248,15 +214,10 @@ static inline void eina_clist_remove(Eina_Clist *elem)
248 * @param list The list 214 * @param list The list
249 * @param elem An element 215 * @param elem An element
250 * @pre @a elem is in @a list 216 * @pre @a elem is in @a list
251 * @return The element after @elem in @list or NULL if @a elem is last in @a list 217 * @return The element after @a elem in @a list or @c NULL if @a elem is last in @a list
252 * @since 1.1.0 218 * @since 1.1.0
253 */ 219 */
254static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Eina_Clist *elem) 220static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Eina_Clist *elem);
255{
256 Eina_Clist *ret = elem->next;
257 if (elem->next == list) ret = NULL;
258 return ret;
259}
260 221
261/** 222/**
262 * Get the previous element. 223 * Get the previous element.
@@ -267,12 +228,7 @@ static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Eina_Cli
267 * @return The element before @a elem or NULL if @a elem is the first in the list 228 * @return The element before @a elem or NULL if @a elem is the first in the list
268 * @since 1.1.0 229 * @since 1.1.0
269 */ 230 */
270static inline Eina_Clist *eina_clist_prev(const Eina_Clist *list, const Eina_Clist *elem) 231static inline Eina_Clist *eina_clist_prev(const Eina_Clist *list, const Eina_Clist *elem);
271{
272 Eina_Clist *ret = elem->prev;
273 if (elem->prev == list) ret = NULL;
274 return ret;
275}
276 232
277/** 233/**
278 * Get the first element. 234 * Get the first element.
@@ -281,22 +237,16 @@ static inline Eina_Clist *eina_clist_prev(const Eina_Clist *list, const Eina_Cli
281 * @returns The first element in @a list or NULL if @a list is empty 237 * @returns The first element in @a list or NULL if @a list is empty
282 * @since 1.1.0 238 * @since 1.1.0
283 */ 239 */
284static inline Eina_Clist *eina_clist_head(const Eina_Clist *list) 240static inline Eina_Clist *eina_clist_head(const Eina_Clist *list);
285{
286 return eina_clist_next(list, list);
287}
288 241
289/** 242/**
290 * Get the last element. 243 * Get the last element.
291 * 244 *
292 * @param list The list 245 * @param list The list
293 * @returns The last element in @a list or NULL if @list is empty 246 * @returns The last element in @a list or NULL if @a list is empty
294 * @since 1.1.0 247 * @since 1.1.0
295 */ 248 */
296static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list) 249static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list);
297{
298 return eina_clist_prev(list, list);
299}
300 250
301/** 251/**
302 * Check if a list is empty. 252 * Check if a list is empty.
@@ -305,10 +255,7 @@ static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list)
305 * @returns non-zero if @a list is empty, zero if it is not 255 * @returns non-zero if @a list is empty, zero if it is not
306 * @since 1.1.0 256 * @since 1.1.0
307 */ 257 */
308static inline int eina_clist_empty(const Eina_Clist *list) 258static inline int eina_clist_empty(const Eina_Clist *list);
309{
310 return list->next == list;
311}
312 259
313/** 260/**
314 * Initialize a list 261 * Initialize a list
@@ -322,10 +269,7 @@ static inline int eina_clist_empty(const Eina_Clist *list)
322 * initialize the list by zero'ing out the list head. 269 * initialize the list by zero'ing out the list head.
323 * @since 1.1.0 270 * @since 1.1.0
324 */ 271 */
325static inline void eina_clist_init(Eina_Clist *list) 272static inline void eina_clist_init(Eina_Clist *list);
326{
327 list->next = list->prev = list;
328}
329 273
330/** 274/**
331 * Count the elements of a list 275 * Count the elements of a list
@@ -334,13 +278,7 @@ static inline void eina_clist_init(Eina_Clist *list)
334 * @returns The number of items in the list 278 * @returns The number of items in the list
335 * @since 1.1.0 279 * @since 1.1.0
336 */ 280 */
337static inline unsigned int eina_clist_count(const Eina_Clist *list) 281static inline unsigned int eina_clist_count(const Eina_Clist *list);
338{
339 unsigned count = 0;
340 const Eina_Clist *ptr;
341 for (ptr = list->next; ptr != list; ptr = ptr->next) count++;
342 return count;
343}
344 282
345/** 283/**
346 * Move all elements from src to the tail of dst 284 * Move all elements from src to the tail of dst
@@ -351,16 +289,7 @@ static inline unsigned int eina_clist_count(const Eina_Clist *list)
351 * @post @a src is initialized but empty after this operation 289 * @post @a src is initialized but empty after this operation
352 * @since 1.1.0 290 * @since 1.1.0
353 */ 291 */
354static inline void eina_clist_move_tail(Eina_Clist *dst, Eina_Clist *src) 292static inline void eina_clist_move_tail(Eina_Clist *dst, Eina_Clist *src);
355{
356 if (eina_clist_empty(src)) return;
357
358 dst->prev->next = src->next;
359 src->next->prev = dst->prev;
360 dst->prev = src->prev;
361 src->prev->next = dst;
362 eina_clist_init(src);
363}
364 293
365/** 294/**
366 * move all elements from src to the head of dst 295 * move all elements from src to the head of dst
@@ -371,16 +300,7 @@ static inline void eina_clist_move_tail(Eina_Clist *dst, Eina_Clist *src)
371 * @post @a src is initialized but empty after this operation 300 * @post @a src is initialized but empty after this operation
372 * @since 1.1.0 301 * @since 1.1.0
373 */ 302 */
374static inline void eina_clist_move_head(Eina_Clist *dst, Eina_Clist *src) 303static inline void eina_clist_move_head(Eina_Clist *dst, Eina_Clist *src);
375{
376 if (eina_clist_empty(src)) return;
377
378 dst->next->prev = src->prev;
379 src->prev->next = dst->next;
380 dst->next = src->next;
381 src->next->prev = dst;
382 eina_clist_init(src);
383}
384 304
385/** 305/**
386 * iterate through the list 306 * iterate through the list
@@ -441,15 +361,17 @@ static inline void eina_clist_move_head(Eina_Clist *dst, Eina_Clist *src)
441#define EINA_CLIST_ENTRY(elem, type, field) \ 361#define EINA_CLIST_ENTRY(elem, type, field) \
442 ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field))) 362 ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field)))
443 363
444/* 364#include "eina_inline_clist.x"
365
366/**
445 * @} 367 * @}
446 */ 368 */
447 369
448/* 370/**
449 * @} 371 * @}
450 */ 372 */
451 373
452/* 374/**
453 * @} 375 * @}
454 */ 376 */
455 377
diff --git a/libraries/eina/src/include/eina_config.h b/libraries/eina/src/include/eina_config.h
index 3341731..474edaa 100644
--- a/libraries/eina/src/include/eina_config.h
+++ b/libraries/eina/src/include/eina_config.h
@@ -64,4 +64,14 @@
64#endif 64#endif
65 65
66 66
67#ifdef EINA_CONFIGURE_HAVE_DIRENT_H
68# undef EINA_CONFIGURE_HAVE_DIRENT_H
69#endif
70#define EINA_HAVE_DIRENT_H
71
72#ifdef EINA_CONFIGURE_ENABLE_LOG
73# undef EINA_CONFIGURE_ENABLE_LOG
74#endif
75#define EINA_ENABLE_LOG
76
67#endif /* EINA_CONFIG_H_ */ 77#endif /* EINA_CONFIG_H_ */
diff --git a/libraries/eina/src/include/eina_config.h.in b/libraries/eina/src/include/eina_config.h.in
index be328cd..2459ace 100644
--- a/libraries/eina/src/include/eina_config.h.in
+++ b/libraries/eina/src/include/eina_config.h.in
@@ -64,4 +64,14 @@
64#endif 64#endif
65@EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 65@EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
66 66
67#ifdef EINA_CONFIGURE_HAVE_DIRENT_H
68# undef EINA_CONFIGURE_HAVE_DIRENT_H
69#endif
70@EINA_CONFIGURE_HAVE_DIRENT_H@
71
72#ifdef EINA_CONFIGURE_ENABLE_LOG
73# undef EINA_CONFIGURE_ENABLE_LOG
74#endif
75@EINA_CONFIGURE_ENABLE_LOG@
76
67#endif /* EINA_CONFIG_H_ */ 77#endif /* EINA_CONFIG_H_ */
diff --git a/libraries/eina/src/include/eina_file.h b/libraries/eina/src/include/eina_file.h
index 01ef8f5..422fb65 100644
--- a/libraries/eina/src/include/eina_file.h
+++ b/libraries/eina/src/include/eina_file.h
@@ -94,6 +94,9 @@ typedef struct _Eina_File_Direct_Info Eina_File_Direct_Info;
94 * @typedef Eina_File_Dir_List_Cb 94 * @typedef Eina_File_Dir_List_Cb
95 * Type for a callback to be called when iterating over the files of a 95 * Type for a callback to be called when iterating over the files of a
96 * directory. 96 * directory.
97 * @param The file name EXCLUDING the path
98 * @param path The path passed to eina_file_dir_list()
99 * @param data The data passed to eina_file_dir_list()
97 */ 100 */
98typedef void (*Eina_File_Dir_List_Cb)(const char *name, const char *path, void *data); 101typedef void (*Eina_File_Dir_List_Cb)(const char *name, const char *path, void *data);
99 102
@@ -345,6 +348,33 @@ EAPI time_t eina_file_mtime_get(Eina_File *file);
345EAPI const char *eina_file_filename_get(Eina_File *file); 348EAPI const char *eina_file_filename_get(Eina_File *file);
346 349
347/** 350/**
351 * @brief Get the eXtended attribute of an open file.
352 *
353 * @param file The file handler to request the eXtended attribute from.
354 * @return an iterator.
355 *
356 * The iterator will list all eXtended attribute name without allocating
357 * them, so you need to copy them yourself if needed.
358 *
359 * @since 1.2
360 */
361EAPI Eina_Iterator *eina_file_xattr_get(Eina_File *file);
362
363/**
364 * @brief Get the eXtended attribute of an open file.
365 *
366 * @param file The file handler to request the eXtended attribute from.
367 * @return an iterator.
368 *
369 * The iterator will list all eXtended attribute without allocating
370 * them, so you need to copy them yourself if needed. It is returning
371 * Eina_Xattr structure.
372 *
373 * @since 1.2
374 */
375EAPI Eina_Iterator *eina_file_xattr_value_get(Eina_File *file);
376
377/**
348 * @brief Map all the file to a buffer. 378 * @brief Map all the file to a buffer.
349 * 379 *
350 * @param file The file handler to map in memory 380 * @param file The file handler to map in memory
@@ -382,6 +412,16 @@ EAPI void *eina_file_map_new(Eina_File *file, Eina_File_Populate rule,
382EAPI void eina_file_map_free(Eina_File *file, void *map); 412EAPI void eina_file_map_free(Eina_File *file, void *map);
383 413
384/** 414/**
415 * @brief Tell if their was an IO error during the life of a mmaped file
416 *
417 * @param file The file handler to the mmaped file.
418 * @param map Memory map to check if an error occured on it.
419 *
420 * @since 1.2
421 */
422EAPI Eina_Bool eina_file_map_faulted(Eina_File *file, void *map);
423
424/**
385 * @} 425 * @}
386 */ 426 */
387 427
diff --git a/libraries/eina/src/include/eina_hash.h b/libraries/eina/src/include/eina_hash.h
index c8eb048..57316b2 100644
--- a/libraries/eina/src/include/eina_hash.h
+++ b/libraries/eina/src/include/eina_hash.h
@@ -578,7 +578,7 @@ EAPI Eina_Bool eina_hash_del(Eina_Hash *hash,
578 * otherwise. 578 * otherwise.
579 */ 579 */
580EAPI void *eina_hash_find(const Eina_Hash *hash, 580EAPI void *eina_hash_find(const Eina_Hash *hash,
581 const void *key) EINA_ARG_NONNULL(1, 2); 581 const void *key) EINA_ARG_NONNULL(2);
582 582
583/** 583/**
584 * @brief Modify the entry pointer at the specified key and return the old 584 * @brief Modify the entry pointer at the specified key and return the old
@@ -1005,7 +1005,7 @@ EAPI Eina_Iterator *eina_hash_iterator_tuple_new(const Eina_Hash *hash) EINA_MAL
1005 * @endcode 1005 * @endcode
1006 */ 1006 */
1007EAPI void eina_hash_foreach(const Eina_Hash *hash, 1007EAPI void eina_hash_foreach(const Eina_Hash *hash,
1008 Eina_Hash_Foreach cb, 1008 Eina_Hash_Foreach func,
1009 const void *fdata) EINA_ARG_NONNULL(1, 2); 1009 const void *fdata) EINA_ARG_NONNULL(1, 2);
1010/* Paul Hsieh (http://www.azillionmonkeys.com/qed/hash.html) hash function used by WebCore (http://webkit.org/blog/8/hashtables-part-2/) */ 1010/* Paul Hsieh (http://www.azillionmonkeys.com/qed/hash.html) hash function used by WebCore (http://webkit.org/blog/8/hashtables-part-2/) */
1011EAPI int eina_hash_superfast(const char *key, 1011EAPI int eina_hash_superfast(const char *key,
diff --git a/libraries/eina/src/include/eina_inarray.h b/libraries/eina/src/include/eina_inarray.h
new file mode 100644
index 0000000..d37c76b
--- /dev/null
+++ b/libraries/eina/src/include/eina_inarray.h
@@ -0,0 +1,572 @@
1/* EINA - EFL data type library
2 * Copyright (C) 2012 ProFUSION embedded systems
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef EINA_INARRAY_H_
20#define EINA_INARRAY_H_
21
22#include "eina_types.h"
23#include "eina_iterator.h"
24#include "eina_accessor.h"
25
26/**
27 * @addtogroup Eina_Data_Types_Group Data Types
28 *
29 * @since 1.2
30 *
31 * @{
32 */
33
34/**
35 * @addtogroup Eina_Containers_Group Containers
36 *
37 * @{
38 */
39
40/**
41 * @defgroup Eina_Inline_Array_Group Inline Array
42 *
43 * @{
44 */
45
46
47/**
48 * @typedef Eina_Inarray
49 * Inlined array type.
50 *
51 * @since 1.2
52 */
53typedef struct _Eina_Inarray Eina_Inarray;
54
55/**
56 * Inline array structure, use #Eina_Inarray typedef instead.
57 *
58 * Do not modify these fields directly, use eina_inarray_setup() or
59 * eina_inarray_new() instead.
60 *
61 * @since 1.2
62 */
63struct _Eina_Inarray
64{
65 unsigned int member_size; /**< byte size of each entry in members */
66 unsigned int len; /**< number of elements used in members */
67 unsigned int max; /**< number of elements allocated in members */
68 unsigned int step; /**< amount to grow number of members allocated */
69 void *members; /**< actual array of elements */
70 EINA_MAGIC
71};
72
73/**
74 * @brief Create new inline array.
75 *
76 * @param member_size size of each member in the array.
77 * @param step when resizing the array, do this using the following
78 * extra amount.
79 * @return The new inline array table or @c NULL on failure.
80 *
81 * Create a new array where members are inlined in a sequence. Each
82 * member has @a member_size bytes.
83 *
84 * If the @a step is 0, then a safe default is chosen.
85 *
86 * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is
87 * set. If @a member_size is zero, then @c NULL is returned.
88 *
89 * @see eina_inarray_free()
90 *
91 * @since 1.2
92 */
93EAPI Eina_Inarray *eina_inarray_new(unsigned int member_size,
94 unsigned int step) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
95
96/**
97 * @brief Free array and its members.
98 * @param array array object
99 *
100 * @see eina_inarray_flush()
101 *
102 * @since 1.2
103 */
104EAPI void eina_inarray_free(Eina_Inarray *array) EINA_ARG_NONNULL(1);
105
106/**
107 * @brief Initialize inline array.
108 * @param array array object to initialize.
109 * @param member_size size of each member in the array.
110 * @param step when resizing the array, do this using the following
111 * extra amount.
112 *
113 * Initialize array. If the @a step is 0, then a safe default is
114 * chosen.
115 *
116 * This is useful for arrays inlined into other structures or
117 * allocated at stack.
118 *
119 * @see eina_inarray_flush()
120 *
121 * @since 1.2
122 */
123EAPI void eina_inarray_setup(Eina_Inarray *array,
124 unsigned int member_size,
125 unsigned int step) EINA_ARG_NONNULL(1);
126
127/**
128 * @brief Remove every member from array.
129 * @param array array object
130 *
131 * @since 1.2
132 */
133EAPI void eina_inarray_flush(Eina_Inarray *array) EINA_ARG_NONNULL(1);
134
135/**
136 * @brief Copy the data as the last member of the array.
137 * @param array array object
138 * @param data data to be copied at the end
139 * @return the index of the new member or -1 on errors.
140 *
141 * Copies the given pointer contents at the end of the array. The
142 * pointer is not referenced, instead it's contents is copied to the
143 * members array using the previously defined @c member_size.
144 *
145 * @see eina_inarray_insert_at().
146 *
147 * @since 1.2
148 */
149EAPI int eina_inarray_append(Eina_Inarray *array,
150 const void *data) EINA_ARG_NONNULL(1, 2);
151
152/**
153 * @brief Copy the data to array at position found by comparison function
154 * @param array array object
155 * @param data data to be copied
156 * @param compare compare function
157 * @return the index of the new member or -1 on errors.
158 *
159 * Copies the given pointer contents at the array position defined by
160 * given @a compare function. The pointer is not referenced, instead
161 * it's contents is copied to the members array using the previously
162 * defined @c member_size.
163 *
164 * The data given to @a compare function are the pointer to member
165 * memory itself, do no change it.
166 *
167 * @see eina_inarray_insert_sorted()
168 * @see eina_inarray_insert_at()
169 * @see eina_inarray_append()
170 *
171 * @since 1.2
172 */
173EAPI int eina_inarray_insert(Eina_Inarray *array,
174 const void *data,
175 Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2, 3);
176
177/**
178 * @brief Copy the data to array at position found by comparison function
179 * @param array array object
180 * @param data data to be copied
181 * @param compare compare function
182 * @return the index of the new member or -1 on errors.
183 *
184 * Copies the given pointer contents at the array position defined by
185 * given @a compare function. The pointer is not referenced, instead
186 * it's contents is copied to the members array using the previously
187 * defined @c member_size.
188 *
189 * The data given to @a compare function are the pointer to member
190 * memory itself, do no change it.
191 *
192 * This variation will optimize insertion position assuming the array
193 * is already sorted by doing binary search.
194 *
195 * @see eina_inarray_sort()
196 *
197 * @since 1.2
198 */
199EAPI int eina_inarray_insert_sorted(Eina_Inarray *array,
200 const void *data,
201 Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2, 3);
202
203/**
204 * @brief Find data and remove matching member
205 * @param array array object
206 * @param data data to be found and removed
207 * @return the index of the removed member or -1 on errors.
208 *
209 * Find data in the array and remove it. Data may be an existing
210 * member of array (then optimized) or the contents will be matched
211 * using memcmp().
212 *
213 * @see eina_inarray_pop()
214 * @see eina_inarray_remove_at()
215 *
216 * @since 1.2
217 */
218EAPI int eina_inarray_remove(Eina_Inarray *array,
219 const void *data) EINA_ARG_NONNULL(1, 2);
220
221/**
222 * @brief Removes the last member of the array
223 * @param array array object
224 * @return the index of the removed member or -1 on errors.
225 *
226 * @since 1.2
227 */
228EAPI int eina_inarray_pop(Eina_Inarray *array) EINA_ARG_NONNULL(1);
229
230/**
231 * @brief Get the member at given position
232 * @param array array object
233 * @param position member position
234 * @return pointer to current member memory.
235 *
236 * Gets the member given its position in the array. It is a pointer to
237 * its current memory, then it can be invalidated with functions that
238 * changes the array such as eina_inarray_append(),
239 * eina_inarray_insert_at() or eina_inarray_remove_at() or variants.
240 *
241 * See also eina_inarray_lookup() and eina_inarray_lookup_sorted().
242 *
243 * @since 1.2
244 */
245EAPI void *eina_inarray_nth(const Eina_Inarray *array,
246 unsigned int position) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
247
248/**
249 * @brief Copy the data at given position in the array
250 * @param array array object
251 * @param position where to insert the member
252 * @param data data to be copied at position
253 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
254 *
255 * Copies the given pointer contents at the given @a position in the
256 * array. The pointer is not referenced, instead it's contents is
257 * copied to the members array using the previously defined
258 * @c member_size.
259 *
260 * All the members from @a position to the end of the array are
261 * shifted to the end.
262 *
263 * If @a position is equal to the end of the array (equals to
264 * eina_inarray_count()), then the member is appended.
265 *
266 * If @a position is bigger than the array length, it will fail.
267 *
268 * @since 1.2
269 */
270EAPI Eina_Bool eina_inarray_insert_at(Eina_Inarray *array,
271 unsigned int position,
272 const void *data) EINA_ARG_NONNULL(1, 3);
273
274/**
275 * @brief Opens a space at given position, returning its pointer.
276 * @param array array object
277 * @param position where to insert first member (open/allocate space)
278 * @param member_count how many times member_size bytes will be allocated.
279 * @return pointer to first member memory allocated or @c NULL on errors.
280 *
281 * This is similar to eina_inarray_insert_at(), but useful if the
282 * members contents are still unknown or unallocated. It will make
283 * room for the required number of items and return the pointer to the
284 * first item, similar to malloc(member_count * member_size), with the
285 * guarantee all memory is within members array.
286 *
287 * The new member memory is undefined, it's not automatically zeroed.
288 *
289 * All the members from @a position to the end of the array are
290 * shifted to the end.
291 *
292 * If @a position is equal to the end of the array (equals to
293 * eina_inarray_count()), then the member is appended.
294 *
295 * If @a position is bigger than the array length, it will fail.
296 *
297 * @since 1.2
298 */
299EAPI void *eina_inarray_alloc_at(Eina_Inarray *array,
300 unsigned int position,
301 unsigned int member_count) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
302
303/**
304 * @brief Copy the data over the given position.
305 * @param array array object
306 * @param position where to replace the member
307 * @param data data to be copied at position
308 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
309 *
310 * Copies the given pointer contents at the given @a position in the
311 * array. The pointer is not referenced, instead it's contents is
312 * copied to the members array using the previously defined
313 * @c member_size.
314 *
315 * If @a position does not exist, it will fail.
316 *
317 * @since 1.2
318 */
319EAPI Eina_Bool eina_inarray_replace_at(Eina_Inarray *array,
320 unsigned int position,
321 const void *data) EINA_ARG_NONNULL(1, 3);
322
323/**
324 * @brief Remove member at given position
325 * @param array array object
326 * @param position position to be removed
327 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
328 *
329 * The member is removed from array and any members after it are moved
330 * towards the array head.
331 *
332 * See also eina_inarray_pop() and eina_inarray_remove().
333 *
334 * @since 1.2
335 */
336EAPI Eina_Bool eina_inarray_remove_at(Eina_Inarray *array,
337 unsigned int position) EINA_ARG_NONNULL(1);
338
339/**
340 * @brief Reverse members in the array.
341 * @param array array object
342 *
343 * If you do not want to change the array, just walk its elements
344 * backwards, then use EINA_INARRAY_REVERSE_FOREACH() macro.
345 *
346 * @see EINA_INARRAY_REVERSE_FOREACH()
347 *
348 * @since 1.2
349 */
350EAPI void eina_inarray_reverse(Eina_Inarray *array) EINA_ARG_NONNULL(1);
351
352/**
353 * @brief Applies quick sort to array
354 * @param array array object
355 * @param compare compare function
356 *
357 * Applies quick sort to the @a array.
358 *
359 * The data given to @a compare function are the pointer to member
360 * memory itself, do no change it.
361 *
362 * @see eina_inarray_insert_sorted()
363 *
364 * @since 1.2
365 */
366EAPI void eina_inarray_sort(Eina_Inarray *array,
367 Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2);
368
369/**
370 * @brief Search member (linear walk)
371 * @param array array object
372 * @param data member to search using @a compare function.
373 * @param compare compare function
374 * @return the member index or -1 if not found.
375 *
376 * Walks array linearly looking for given data as compared by
377 * @a compare function.
378 *
379 * The data given to @a compare function are the pointer to member
380 * memory itself, do no change it.
381 *
382 * See also eina_inarray_lookup_sorted().
383 *
384 * @since 1.2
385 */
386EAPI int eina_inarray_search(const Eina_Inarray *array,
387 const void *data,
388 Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2, 3);
389
390/**
391 * @brief Search member (binary search walk)
392 * @param array array object
393 * @param data member to search using @a compare function.
394 * @param compare compare function
395 * @return the member index or -1 if not found.
396 *
397 * Uses binary search for given data as compared by @a compare function.
398 *
399 * The data given to @a compare function are the pointer to member
400 * memory itself, do no change it.
401 *
402 * @since 1.2
403 */
404EAPI int eina_inarray_search_sorted(const Eina_Inarray *array,
405 const void *data,
406 Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2, 3);
407
408/**
409 * @brief Call function for each array member
410 * @param array array object
411 * @param function callback function
412 * @param user_data user data given to callback @a function
413 * @return #EINA_TRUE if it successfully iterate all items of the array.
414 *
415 * Call @a function for every given data in @a array.
416 *
417 * Safe way to iterate over an array. @p function should return
418 * #EINA_TRUE as long as you want the function to continue iterating,
419 * by returning #EINA_FALSE it will stop and return #EINA_FALSE as a
420 * result.
421 *
422 * The data given to @a function are the pointer to member memory
423 * itself.
424 *
425 * @see EINA_INARRAY_FOREACH()
426 *
427 * @since 1.2
428 */
429EAPI Eina_Bool eina_inarray_foreach(const Eina_Inarray *array,
430 Eina_Each_Cb function,
431 const void *user_data) EINA_ARG_NONNULL(1, 2);
432
433/**
434 * @brief Remove all members that matched.
435 * @param array array object
436 * @param match match function
437 * @param user_data user data given to callback @a match.
438 * @return number of removed entries or -1 on error.
439 *
440 * Remove all entries in the @a array where @a match function
441 * returns #EINA_TRUE.
442 *
443 * @since 1.2
444 */
445EAPI int eina_inarray_foreach_remove(Eina_Inarray *array,
446 Eina_Each_Cb match,
447 const void *user_data) EINA_ARG_NONNULL(1, 2);
448
449/**
450 * @brief number of members in array.
451 * @param array array object
452 * @return number of members in array.
453 *
454 * @since 1.2
455 */
456EAPI unsigned int eina_inarray_count(const Eina_Inarray *array) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
457
458/**
459 * @brief Returned a new iterator associated to an array.
460 * @param array array object
461 * @return A new iterator.
462 *
463 * This function returns a newly allocated iterator associated to
464 * @p array.
465 *
466 * If the memory can not be allocated, NULL is returned and
467 * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is
468 * returned.
469 *
470 * @warning if the array structure changes then the iterator becomes
471 * invalid! That is, if you add or remove members this
472 * iterator behavior is undefined and your program may crash!
473 *
474 * @since 1.2
475 */
476EAPI Eina_Iterator *eina_inarray_iterator_new(const Eina_Inarray *array) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
477
478/**
479 * @brief Returned a new reversed iterator associated to an array.
480 * @param array array object
481 * @return A new iterator.
482 *
483 * This function returns a newly allocated iterator associated to
484 * @p array.
485 *
486 * Unlike eina_inarray_iterator_new(), this will walk the array backwards.
487 *
488 * If the memory can not be allocated, NULL is returned and
489 * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is
490 * returned.
491 *
492 * @warning if the array structure changes then the iterator becomes
493 * invalid! That is, if you add or remove nodes this iterator
494 * behavior is undefined and your program may crash!
495 *
496 * @since 1.2
497 */
498EAPI Eina_Iterator *eina_inarray_iterator_reversed_new(const Eina_Inarray *array) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
499
500/**
501 * @brief Returned a new accessor associated to an array.
502 * @param array array object
503 * @return A new accessor.
504 *
505 * This function returns a newly allocated accessor associated to
506 * @p array.
507 *
508 * If the memory can not be allocated, NULL is returned and
509 * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid accessor is
510 * returned.
511 *
512 * @since 1.2
513 */
514EAPI Eina_Accessor *eina_inarray_accessor_new(const Eina_Inarray *array) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
515
516/**
517 * @def EINA_INARRAY_FOREACH
518 * @brief walks array linearly from head to tail
519 * @param array array object
520 * @param itr the iterator pointer
521 *
522 * @a itr must be a pointer with sizeof(itr*) == array->member_size.
523 *
524 * @warning This is fast as it does direct pointer access, but it will
525 * not check for @c NULL pointers or invalid array object!
526 * See eina_inarray_foreach() to do that.
527 *
528 * @warning Do not modify array as you walk it! If that is desired,
529 * then use eina_inarray_foreach_remove()
530 *
531 * @since 1.2
532 */
533#define EINA_INARRAY_FOREACH(array, itr) \
534 for ((itr) = array->members; \
535 (itr) < (((typeof(*itr)*)array->members) + array->len); \
536 (itr)++)
537
538/**
539 * @def EINA_INARRAY_REVERSE_FOREACH
540 * @brief walks array linearly from tail to head
541 * @param array array object
542 * @param itr the iterator pointer
543 *
544 * @a itr must be a pointer with sizeof(itr*) == array->member_size.
545 *
546 * @warning This is fast as it does direct pointer access, but it will
547 * not check for @c NULL pointers or invalid array object!
548 *
549 * @warning Do not modify array as you walk it! If that is desired,
550 * then use eina_inarray_foreach_remove()
551 *
552 * @since 1.2
553 */
554#define EINA_INARRAY_REVERSE_FOREACH(array, itr) \
555 for ((itr) = ((((typeof(*(itr))*)array->members) + array->len) - 1); \
556 (((itr) >= (typeof(*(itr))*)array->members) \
557 && (array->members != NULL)); \
558 (itr)--)
559
560/**
561 * @}
562 */
563
564/**
565 * @}
566 */
567
568/**
569 * @}
570 */
571
572#endif /*EINA_INARRAY_H_*/
diff --git a/libraries/eina/src/include/eina_inline_array.x b/libraries/eina/src/include/eina_inline_array.x
index f9f6026..a635ee2 100644
--- a/libraries/eina/src/include/eina_inline_array.x
+++ b/libraries/eina/src/include/eina_inline_array.x
@@ -19,6 +19,8 @@
19#ifndef EINA_INLINE_ARRAY_X_ 19#ifndef EINA_INLINE_ARRAY_X_
20#define EINA_INLINE_ARRAY_X_ 20#define EINA_INLINE_ARRAY_X_
21 21
22#include <stddef.h>
23
22#include <stdio.h> 24#include <stdio.h>
23 25
24/** 26/**
@@ -126,6 +128,8 @@ eina_array_data_set(const Eina_Array *array, unsigned int idx, const void *data)
126 * This function returns the number of elements in @p array. For 128 * This function returns the number of elements in @p array. For
127 * performance reasons, there is no check of @p array. If it is 129 * performance reasons, there is no check of @p array. If it is
128 * @c NULL or invalid, the program may crash. 130 * @c NULL or invalid, the program may crash.
131 *
132 * @deprecated use eina_array_count()
129 */ 133 */
130static inline unsigned int 134static inline unsigned int
131eina_array_count_get(const Eina_Array *array) 135eina_array_count_get(const Eina_Array *array)
@@ -133,6 +137,22 @@ eina_array_count_get(const Eina_Array *array)
133 return array->count; 137 return array->count;
134} 138}
135 139
140/**
141 * @brief Return the number of elements in an array.
142 *
143 * @param array The array.
144 * @return The number of elements.
145 *
146 * This function returns the number of elements in @p array. For
147 * performance reasons, there is no check of @p array. If it is
148 * @c NULL or invalid, the program may crash.
149 */
150static inline unsigned int
151eina_array_count(const Eina_Array *array)
152{
153 return array->count;
154}
155
136static inline Eina_Bool 156static inline Eina_Bool
137eina_array_foreach(Eina_Array *array, Eina_Each_Cb cb, void *fdata) 157eina_array_foreach(Eina_Array *array, Eina_Each_Cb cb, void *fdata)
138{ 158{
diff --git a/libraries/eina/src/include/eina_inline_clist.x b/libraries/eina/src/include/eina_inline_clist.x
new file mode 100644
index 0000000..66223fe
--- /dev/null
+++ b/libraries/eina/src/include/eina_inline_clist.x
@@ -0,0 +1,135 @@
1/*
2 * Linked lists support
3 *
4 * Copyright (C) 2002 Alexandre Julliard
5 * Copyright (C) 2011 Mike McCormack (adapted for Eina)
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#ifndef __EINA_CLIST_INLINE_H__
23#define __EINA_CLIST_INLINE_H__
24
25#include <stddef.h>
26
27static inline void eina_clist_add_after(Eina_Clist *elem, Eina_Clist *to_add)
28{
29 to_add->next = elem->next;
30 to_add->prev = elem;
31 elem->next->prev = to_add;
32 elem->next = to_add;
33}
34
35static inline void eina_clist_add_before(Eina_Clist *elem, Eina_Clist *to_add)
36{
37 to_add->next = elem;
38 to_add->prev = elem->prev;
39 elem->prev->next = to_add;
40 elem->prev = to_add;
41}
42
43static inline void eina_clist_add_head(Eina_Clist *list, Eina_Clist *elem)
44{
45 eina_clist_add_after(list, elem);
46}
47
48static inline void eina_clist_add_tail(Eina_Clist *list, Eina_Clist *elem)
49{
50 eina_clist_add_before(list, elem);
51}
52
53static inline void eina_clist_element_init(Eina_Clist *elem)
54{
55 elem->next = NULL;
56 elem->prev = NULL;
57}
58
59static inline int eina_clist_element_is_linked(Eina_Clist *elem)
60{
61 return (elem->next != NULL && elem->prev != NULL);
62}
63
64static inline void eina_clist_remove(Eina_Clist *elem)
65{
66 elem->next->prev = elem->prev;
67 elem->prev->next = elem->next;
68 eina_clist_element_init(elem);
69}
70
71static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Eina_Clist *elem)
72{
73 Eina_Clist *ret = elem->next;
74 if (elem->next == list) ret = NULL;
75 return ret;
76}
77
78static inline Eina_Clist *eina_clist_prev(const Eina_Clist *list, const Eina_Clist *elem)
79{
80 Eina_Clist *ret = elem->prev;
81 if (elem->prev == list) ret = NULL;
82 return ret;
83}
84
85static inline Eina_Clist *eina_clist_head(const Eina_Clist *list)
86{
87 return eina_clist_next(list, list);
88}
89
90static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list)
91{
92 return eina_clist_prev(list, list);
93}
94
95static inline int eina_clist_empty(const Eina_Clist *list)
96{
97 return list->next == list;
98}
99
100static inline void eina_clist_init(Eina_Clist *list)
101{
102 list->next = list->prev = list;
103}
104
105static inline unsigned int eina_clist_count(const Eina_Clist *list)
106{
107 unsigned count = 0;
108 const Eina_Clist *ptr;
109 for (ptr = list->next; ptr != list; ptr = ptr->next) count++;
110 return count;
111}
112
113static inline void eina_clist_move_tail(Eina_Clist *dst, Eina_Clist *src)
114{
115 if (eina_clist_empty(src)) return;
116
117 dst->prev->next = src->next;
118 src->next->prev = dst->prev;
119 dst->prev = src->prev;
120 src->prev->next = dst;
121 eina_clist_init(src);
122}
123
124static inline void eina_clist_move_head(Eina_Clist *dst, Eina_Clist *src)
125{
126 if (eina_clist_empty(src)) return;
127
128 dst->next->prev = src->prev;
129 src->prev->next = dst->next;
130 dst->next = src->next;
131 src->next->prev = dst;
132 eina_clist_init(src);
133}
134
135#endif
diff --git a/libraries/eina/src/include/eina_inline_hash.x b/libraries/eina/src/include/eina_inline_hash.x
index f27060f..be20e8f 100644
--- a/libraries/eina/src/include/eina_inline_hash.x
+++ b/libraries/eina/src/include/eina_inline_hash.x
@@ -101,7 +101,7 @@ static inline unsigned int _fmix32(unsigned int h)
101 return h; 101 return h;
102} 102}
103 103
104int 104static inline int
105eina_hash_murmur3(const char *key, int len) 105eina_hash_murmur3(const char *key, int len)
106{ 106{
107 const unsigned char * data = (const unsigned char*)key; 107 const unsigned char * data = (const unsigned char*)key;
diff --git a/libraries/eina/src/include/eina_inline_lock_posix.x b/libraries/eina/src/include/eina_inline_lock_posix.x
index 77f5b8b..64e049a 100644
--- a/libraries/eina/src/include/eina_inline_lock_posix.x
+++ b/libraries/eina/src/include/eina_inline_lock_posix.x
@@ -19,6 +19,15 @@
19#ifndef EINA_INLINE_LOCK_POSIX_X_ 19#ifndef EINA_INLINE_LOCK_POSIX_X_
20#define EINA_INLINE_LOCK_POSIX_X_ 20#define EINA_INLINE_LOCK_POSIX_X_
21 21
22#ifdef EINA_UNUSED
23# undef EINA_UNUSED
24#endif
25#ifdef __GNUC__
26# define EINA_UNUSED __attribute__((unused))
27#else
28# define EINA_UNUSED
29#endif
30
22#include <errno.h> 31#include <errno.h>
23#ifndef __USE_UNIX98 32#ifndef __USE_UNIX98
24# define __USE_UNIX98 33# define __USE_UNIX98
@@ -28,7 +37,10 @@
28# include <pthread.h> 37# include <pthread.h>
29#endif 38#endif
30 39
40#include <semaphore.h>
41
31#include <sys/time.h> 42#include <sys/time.h>
43#include <stdio.h>
32 44
33#ifdef EINA_HAVE_DEBUG_THREADS 45#ifdef EINA_HAVE_DEBUG_THREADS
34#include <stdlib.h> 46#include <stdlib.h>
@@ -45,6 +57,7 @@ typedef struct _Eina_Lock Eina_Lock;
45typedef struct _Eina_RWLock Eina_RWLock; 57typedef struct _Eina_RWLock Eina_RWLock;
46typedef struct _Eina_Condition Eina_Condition; 58typedef struct _Eina_Condition Eina_Condition;
47typedef pthread_key_t Eina_TLS; 59typedef pthread_key_t Eina_TLS;
60typedef sem_t Eina_Semaphore;
48 61
49struct _Eina_Lock 62struct _Eina_Lock
50{ 63{
@@ -77,8 +90,6 @@ struct _Eina_RWLock
77EAPI extern Eina_Bool _eina_threads_activated; 90EAPI extern Eina_Bool _eina_threads_activated;
78 91
79#ifdef EINA_HAVE_DEBUG_THREADS 92#ifdef EINA_HAVE_DEBUG_THREADS
80# include <sys/time.h>
81
82EAPI extern int _eina_threads_debug; 93EAPI extern int _eina_threads_debug;
83EAPI extern pthread_t _eina_main_loop; 94EAPI extern pthread_t _eina_main_loop;
84EAPI extern pthread_mutex_t _eina_tracking_lock; 95EAPI extern pthread_mutex_t _eina_tracking_lock;
@@ -506,4 +517,40 @@ eina_tls_set(Eina_TLS key, const void *data)
506 return EINA_TRUE; 517 return EINA_TRUE;
507} 518}
508 519
520static inline Eina_Bool
521eina_semaphore_new(Eina_Semaphore *sem, int count_init)
522{
523 if (!sem || (count_init <= 0))
524 return EINA_FALSE;
525
526 return (sem_init(sem, count_init, 1) == 0) ? EINA_TRUE : EINA_FALSE;
527}
528
529static inline Eina_Bool
530eina_semaphore_free(Eina_Semaphore *sem)
531{
532 if (!sem)
533 return EINA_FALSE;
534
535 return (sem_destroy(sem) == 0) ? EINA_TRUE : EINA_FALSE;
536}
537
538static inline Eina_Bool
539eina_semaphore_lock(Eina_Semaphore *sem)
540{
541 if (!sem)
542 return EINA_FALSE;
543
544 return (sem_wait(sem) == 0) ? EINA_TRUE : EINA_FALSE;
545}
546
547static inline Eina_Bool
548eina_semaphore_release(Eina_Semaphore *sem, int count_release EINA_UNUSED)
549{
550 if (!sem)
551 return EINA_FALSE;
552
553 return (sem_post(sem) == 0) ? EINA_TRUE : EINA_FALSE;
554}
555
509#endif 556#endif
diff --git a/libraries/eina/src/include/eina_inline_lock_void.x b/libraries/eina/src/include/eina_inline_lock_void.x
index 8cb9a49..2f5209f 100644
--- a/libraries/eina/src/include/eina_inline_lock_void.x
+++ b/libraries/eina/src/include/eina_inline_lock_void.x
@@ -47,6 +47,7 @@ typedef void *Eina_Lock;
47typedef void *Eina_RWLock; 47typedef void *Eina_RWLock;
48typedef void *Eina_Condition; 48typedef void *Eina_Condition;
49typedef void *Eina_TLS; 49typedef void *Eina_TLS;
50typedef void *Eina_Semaphore;
50 51
51/** 52/**
52 * @brief Create a new #Eina_Lock. 53 * @brief Create a new #Eina_Lock.
@@ -63,7 +64,7 @@ typedef void *Eina_TLS;
63static inline Eina_Bool 64static inline Eina_Bool
64eina_lock_new(Eina_Lock *mutex EINA_UNUSED) 65eina_lock_new(Eina_Lock *mutex EINA_UNUSED)
65{ 66{
66 return EINA_FALSE; 67 return EINA_TRUE;
67} 68}
68 69
69/** 70/**
@@ -94,7 +95,7 @@ eina_lock_free(Eina_Lock *mutex EINA_UNUSED)
94static inline Eina_Lock_Result 95static inline Eina_Lock_Result
95eina_lock_take(Eina_Lock *mutex EINA_UNUSED) 96eina_lock_take(Eina_Lock *mutex EINA_UNUSED)
96{ 97{
97 return EINA_LOCK_FAIL; 98 return EINA_LOCK_SUCCEED;
98} 99}
99 100
100/** 101/**
@@ -115,7 +116,7 @@ eina_lock_take(Eina_Lock *mutex EINA_UNUSED)
115static inline Eina_Lock_Result 116static inline Eina_Lock_Result
116eina_lock_take_try(Eina_Lock *mutex EINA_UNUSED) 117eina_lock_take_try(Eina_Lock *mutex EINA_UNUSED)
117{ 118{
118 return EINA_LOCK_FAIL; 119 return EINA_LOCK_SUCCEED;
119} 120}
120 121
121/** 122/**
@@ -132,7 +133,7 @@ eina_lock_take_try(Eina_Lock *mutex EINA_UNUSED)
132static inline Eina_Lock_Result 133static inline Eina_Lock_Result
133eina_lock_release(Eina_Lock *mutex EINA_UNUSED) 134eina_lock_release(Eina_Lock *mutex EINA_UNUSED)
134{ 135{
135 return EINA_LOCK_FAIL; 136 return EINA_LOCK_SUCCEED;
136} 137}
137 138
138static inline void 139static inline void
@@ -143,7 +144,7 @@ eina_lock_debug(const Eina_Lock *mutex EINA_UNUSED)
143static inline Eina_Bool 144static inline Eina_Bool
144eina_condition_new(Eina_Condition *cond EINA_UNUSED, Eina_Lock *mutex EINA_UNUSED) 145eina_condition_new(Eina_Condition *cond EINA_UNUSED, Eina_Lock *mutex EINA_UNUSED)
145{ 146{
146 return EINA_FALSE; 147 return EINA_TRUE;
147} 148}
148 149
149static inline void 150static inline void
@@ -154,72 +155,72 @@ eina_condition_free(Eina_Condition *cond EINA_UNUSED)
154static inline Eina_Bool 155static inline Eina_Bool
155eina_condition_wait(Eina_Condition *cond EINA_UNUSED) 156eina_condition_wait(Eina_Condition *cond EINA_UNUSED)
156{ 157{
157 return EINA_FALSE; 158 return EINA_TRUE;
158} 159}
159 160
160static inline Eina_Bool 161static inline Eina_Bool
161eina_condition_timedwait(Eina_Condition *cond EINA_UNUSED, double val EINA_UNUSED) 162eina_condition_timedwait(Eina_Condition *cond EINA_UNUSED, double val EINA_UNUSED)
162{ 163{
163 return EINA_FALSE; 164 return EINA_TRUE;
164} 165}
165 166
166static inline Eina_Bool 167static inline Eina_Bool
167eina_condition_broadcast(Eina_Condition *cond EINA_UNUSED) 168eina_condition_broadcast(Eina_Condition *cond EINA_UNUSED)
168{ 169{
169 return EINA_FALSE; 170 return EINA_TRUE;
170} 171}
171 172
172static inline Eina_Bool 173static inline Eina_Bool
173eina_condition_signal(Eina_Condition *cond EINA_UNUSED) 174eina_condition_signal(Eina_Condition *cond EINA_UNUSED)
174{ 175{
175 return EINA_FALSE; 176 return EINA_TRUE;
176} 177}
177 178
178static inline Eina_Bool 179static inline Eina_Bool
179eina_rwlock_new(Eina_RWLock *mutex EINA_UNUSED) 180eina_rwlock_new(Eina_RWLock *mutex EINA_UNUSED)
180{ 181{
181 return EINA_FALSE; 182 return EINA_TRUE;
182} 183}
183 184
184static inline void 185static inline void
185 eina_rwlock_free(Eina_RWLock *mutex EINA_UNUSED) 186eina_rwlock_free(Eina_RWLock *mutex EINA_UNUSED)
186{ 187{
187} 188}
188 189
189static inline Eina_Lock_Result 190static inline Eina_Lock_Result
190eina_rwlock_read_take(Eina_RWLock *mutex EINA_UNUSED) 191eina_rwlock_read_take(Eina_RWLock *mutex EINA_UNUSED)
191{ 192{
192 return EINA_LOCK_FAIL; 193 return EINA_LOCK_SUCCEED;
193} 194}
194 195
195static inline Eina_Lock_Result 196static inline Eina_Lock_Result
196eina_rwlock_write_take(Eina_RWLock *mutex EINA_UNUSED) 197eina_rwlock_write_take(Eina_RWLock *mutex EINA_UNUSED)
197{ 198{
198 return EINA_LOCK_FAIL; 199 return EINA_LOCK_SUCCEED;
199} 200}
200 201
201static inline Eina_Lock_Result 202static inline Eina_Lock_Result
202eina_rwlock_release(Eina_RWLock *mutex EINA_UNUSED) 203eina_rwlock_release(Eina_RWLock *mutex EINA_UNUSED)
203{ 204{
204 return EINA_LOCK_FAIL; 205 return EINA_LOCK_SUCCEED;
205} 206}
206 207
207static inline Eina_Lock_Result 208static inline Eina_Lock_Result
208eina_rwlock_take_read(Eina_RWLock *mutex EINA_UNUSED) 209eina_rwlock_take_read(Eina_RWLock *mutex EINA_UNUSED)
209{ 210{
210 return EINA_LOCK_FAIL; 211 return EINA_LOCK_SUCCEED;
211} 212}
212 213
213static inline Eina_Lock_Result 214static inline Eina_Lock_Result
214eina_rwlock_take_write(Eina_RWLock *mutex EINA_UNUSED) 215eina_rwlock_take_write(Eina_RWLock *mutex EINA_UNUSED)
215{ 216{
216 return EINA_LOCK_FAIL; 217 return EINA_LOCK_SUCCEED;
217} 218}
218 219
219static inline Eina_Bool 220static inline Eina_Bool
220eina_tls_new(Eina_TLS *key EINA_UNUSED) 221eina_tls_new(Eina_TLS *key EINA_UNUSED)
221{ 222{
222 return EINA_FALSE; 223 return EINA_TRUE;
223} 224}
224 225
225static inline void 226static inline void
@@ -236,9 +237,34 @@ eina_tls_get(Eina_TLS key EINA_UNUSED)
236static inline Eina_Bool 237static inline Eina_Bool
237eina_tls_set(Eina_TLS key EINA_UNUSED, const void *data EINA_UNUSED) 238eina_tls_set(Eina_TLS key EINA_UNUSED, const void *data EINA_UNUSED)
238{ 239{
239 return EINA_FALSE; 240 return EINA_TRUE;
240} 241}
241 242
243static inline Eina_Bool
244eina_semaphore_new(Eina_Semaphore *sem EINA_UNUSED,
245 int count_init EINA_UNUSED)
246{
247 return EINA_TRUE;
248}
249
250static inline Eina_Bool
251eina_semaphore_free(Eina_Semaphore *sem EINA_UNUSED)
252{
253 return EINA_TRUE;
254}
255
256static inline Eina_Bool
257eina_semaphore_lock(Eina_Semaphore *sem EINA_UNUSED)
258{
259 return EINA_TRUE;
260}
261
262static inline Eina_Bool
263eina_semaphore_release(Eina_Semaphore *sem EINA_UNUSED,
264 int count_release EINA_UNUSED)
265{
266 return EINA_TRUE;
267}
242 268
243/** 269/**
244 * @} 270 * @}
diff --git a/libraries/eina/src/include/eina_inline_lock_win32.x b/libraries/eina/src/include/eina_inline_lock_win32.x
index 072095c..e8363d5 100644
--- a/libraries/eina/src/include/eina_inline_lock_win32.x
+++ b/libraries/eina/src/include/eina_inline_lock_win32.x
@@ -58,6 +58,8 @@ struct _Eina_Win32_RWLock
58 58
59typedef DWORD Eina_TLS; 59typedef DWORD Eina_TLS;
60 60
61typedef HANDLE Eina_Semaphore;
62
61EAPI extern Eina_Bool _eina_threads_activated; 63EAPI extern Eina_Bool _eina_threads_activated;
62 64
63static inline Eina_Bool 65static inline Eina_Bool
@@ -463,4 +465,48 @@ eina_tls_set(Eina_TLS key, const void *data)
463 return EINA_TRUE; 465 return EINA_TRUE;
464} 466}
465 467
468static inline Eina_Bool
469eina_semaphore_new(Eina_Semaphore *sem, int count_init)
470{
471 if (!sem || (count_init <= 0))
472 return EINA_FALSE;
473
474 *sem = CreateSemaphore(NULL, count_init, 32767, NULL);
475 if (!*sem)
476 return EINA_FALSE;
477}
478
479static inline Eina_Bool
480eina_semaphore_free(Eina_Semaphore *sem)
481{
482 if (!sem)
483 return EINA_FALSE;
484
485 CloseHandle(*sem);
486}
487
488static inline Eina_Bool
489eina_semaphore_lock(Eina_Semaphore *sem)
490{
491 DWORD res;
492
493 if (!sem)
494 return EINA_FALSE;
495
496 res = WaitForSingleObject(*sem, 0L);
497 if (res == WAIT_OBJECT_0)
498 return EINA_TRUE;
499
500 return EINA_FALSE;
501}
502
503static inline Eina_Bool
504eina_semaphore_release(Eina_Semaphore *sem, int count_release)
505{
506 if (!sem)
507 return EINA_FALSE;
508
509 return ReleaseSemaphore(*sem, count_release, NULL) ? EINA_TRUE : EINA_FALSE;
510}
511
466#endif 512#endif
diff --git a/libraries/eina/src/include/eina_inline_lock_wince.x b/libraries/eina/src/include/eina_inline_lock_wince.x
index 965d475..1af1aac 100644
--- a/libraries/eina/src/include/eina_inline_lock_wince.x
+++ b/libraries/eina/src/include/eina_inline_lock_wince.x
@@ -19,6 +19,15 @@
19#ifndef EINA_INLINE_LOCK_WIN32_X_ 19#ifndef EINA_INLINE_LOCK_WIN32_X_
20#define EINA_INLINE_LOCK_WIN32_X_ 20#define EINA_INLINE_LOCK_WIN32_X_
21 21
22#ifdef EINA_UNUSED
23# undef EINA_UNUSED
24#endif
25#ifdef __GNUC__
26# define EINA_UNUSED __attribute__((unused))
27#else
28# define EINA_UNUSED
29#endif
30
22#include <windows.h> 31#include <windows.h>
23 32
24EAPI extern Eina_Bool _threads_activated; 33EAPI extern Eina_Bool _threads_activated;
@@ -26,6 +35,7 @@ EAPI extern Eina_Bool _threads_activated;
26typedef HANDLE Eina_Lock; 35typedef HANDLE Eina_Lock;
27typedef Eina_Lock Eina_RWLock; 36typedef Eina_Lock Eina_RWLock;
28typedef DWORD Eina_TLS; 37typedef DWORD Eina_TLS;
38typedef void * Eina_Semaphore;
29 39
30static inline Eina_Bool 40static inline Eina_Bool
31eina_lock_new(Eina_Lock *mutex) 41eina_lock_new(Eina_Lock *mutex)
@@ -173,6 +183,30 @@ eina_tls_set(Eina_TLS key, const void *data)
173 return EINA_TRUE; 183 return EINA_TRUE;
174} 184}
175 185
186static inline Eina_Bool
187eina_semaphore_new(Eina_Semaphore *sem EINA_UNUSED,
188 int count_init EINA_UNUSED)
189{
190 return EINA_FALSE;
191}
176 192
193static inline Eina_Bool
194eina_semaphore_free(Eina_Semaphore *sem EINA_UNUSED)
195{
196 return EINA_FALSE;
197}
198
199static inline Eina_Bool
200eina_semaphore_lock(Eina_Semaphore *sem EINA_UNUSED)
201{
202 return EINA_FALSE;
203}
204
205static inline Eina_Bool
206eina_semaphore_release(Eina_Semaphore *sem EINA_UNUSED,
207 int count_release EINA_UNUSED)
208{
209 return EINA_FALSE;
210}
177 211
178#endif 212#endif
diff --git a/libraries/eina/src/include/eina_inline_log.x b/libraries/eina/src/include/eina_inline_log.x
index 4cdd7d8..53d8afb 100644
--- a/libraries/eina/src/include/eina_inline_log.x
+++ b/libraries/eina/src/include/eina_inline_log.x
@@ -49,7 +49,7 @@
49static inline Eina_Bool 49static inline Eina_Bool
50eina_log_level_check(int level) 50eina_log_level_check(int level)
51{ 51{
52 return eina_log_level_get() <= level; 52 return eina_log_level_get() >= level;
53} 53}
54 54
55/** 55/**
@@ -81,7 +81,7 @@ eina_log_domain_level_check(int domain, int level)
81 int dom_level = eina_log_domain_registered_level_get(domain); 81 int dom_level = eina_log_domain_registered_level_get(domain);
82 if (EINA_UNLIKELY(dom_level == EINA_LOG_LEVEL_UNKNOWN)) 82 if (EINA_UNLIKELY(dom_level == EINA_LOG_LEVEL_UNKNOWN))
83 return EINA_FALSE; 83 return EINA_FALSE;
84 return dom_level <= level; 84 return dom_level >= level;
85} 85}
86 86
87/** 87/**
diff --git a/libraries/eina/src/include/eina_inline_mempool.x b/libraries/eina/src/include/eina_inline_mempool.x
index a67ec3d..729a669 100644
--- a/libraries/eina/src/include/eina_inline_mempool.x
+++ b/libraries/eina/src/include/eina_inline_mempool.x
@@ -19,6 +19,8 @@
19#ifndef EINA_INLINE_MEMPOOL_X_ 19#ifndef EINA_INLINE_MEMPOOL_X_
20#define EINA_INLINE_MEMPOOL_X_ 20#define EINA_INLINE_MEMPOOL_X_
21 21
22#include <string.h>
23
22/** 24/**
23 * @addtogroup Eina_Memory_Pool_Group Memory Pool 25 * @addtogroup Eina_Memory_Pool_Group Memory Pool
24 * 26 *
@@ -67,17 +69,16 @@ struct _Eina_Mempool
67}; 69};
68 70
69/** 71/**
70 * @brief Re-allocate a amount memory by the given mempool. 72 * @brief Re-allocate an amount memory by the given mempool.
71 * 73 *
72 * @param mp The mempool. 74 * @param mp The mempool.
73 * @param element The element to re-allocate. 75 * @param element The element to re-allocate.
74 * @param size The size in bytes to re-allocate. 76 * @param size The size in bytes to re-allocate.
75 * @return The newly re-allocated data. 77 * @return The newly re-allocated data.
76 * 78 *
77 * This function re-allocates @p element with @p size bytes, using the 79 * This function re-allocates and returns @p element with @p size bytes using the
78 * mempool @p mp and returns the allocated data. If not used anymore, 80 * mempool @p mp. If not used anymore, the data must be freed with eina_mempool_free().
79 * the data must be freed with eina_mempool_free(). No check is done 81 * @warning No checks are done for @p mp.
80 * on @p mp, so it must be a valid mempool.
81 */ 82 */
82static inline void * 83static inline void *
83eina_mempool_realloc(Eina_Mempool *mp, void *element, unsigned int size) 84eina_mempool_realloc(Eina_Mempool *mp, void *element, unsigned int size)
@@ -86,16 +87,15 @@ eina_mempool_realloc(Eina_Mempool *mp, void *element, unsigned int size)
86} 87}
87 88
88/** 89/**
89 * @brief Allocate a amount memory by the given mempool. 90 * @brief Allocate memory using the given mempool.
90 * 91 *
91 * @param mp The mempool. 92 * @param mp The mempool.
92 * @param size The size in bytes to allocate. 93 * @param size The size in bytes to allocate.
93 * @return The newly allocated data. 94 * @return The newly allocated data.
94 * 95 *
95 * This function allocates @p size bytes, using the mempool @p mp and 96 * This function allocates and returns @p size bytes using the mempool @p mp.
96 * returns the allocated data. If not used anymore, the data must be 97 * If not used anymore, the data must be freed with eina_mempool_free().
97 * freed with eina_mempool_free(). No check is done on @p mp, so it 98 * @warning No checks are done for @p mp.
98 * must be a valid mempool.
99 */ 99 */
100static inline void * 100static inline void *
101eina_mempool_malloc(Eina_Mempool *mp, unsigned int size) 101eina_mempool_malloc(Eina_Mempool *mp, unsigned int size)
@@ -104,15 +104,36 @@ eina_mempool_malloc(Eina_Mempool *mp, unsigned int size)
104} 104}
105 105
106/** 106/**
107 * @brief Free the allocated ressources by the given mempool. 107 * @brief Allocate and zero memory using the given mempool.
108 *
109 * @param mp The mempool.
110 * @param size The size in bytes to allocate.
111 * @return The newly allocated data.
112 *
113 * This function allocates, zeroes, and returns @p size bytes using the mempool @p mp.
114 * If not used anymore, the data must be freed with eina_mempool_free().
115 * @warning No checks are done for @p mp.
116 * @since 1.2
117 */
118static inline void *
119eina_mempool_calloc(Eina_Mempool *mp, unsigned int size)
120{
121 void *r = mp->backend.alloc(mp->backend_data, size);
122 if (!r) return NULL;
123 memset(r, 0, size);
124 return r;
125}
126
127/**
128 * @brief Free resources previously allocated by the given mempool.
108 * 129 *
109 * @param mp The mempool. 130 * @param mp The mempool.
110 * @param element The data to free. 131 * @param element The data to free.
111 * 132 *
112 * This function frees @p element allocated by @p mp. @p element must 133 * This function frees @p element allocated by @p mp. @p element must
113 * have been obtained by eina_mempool_malloc() or 134 * have been obtained from eina_mempool_malloc(), eina_mempool_calloc(), or
114 * eina_mempool_realloc(). No check is done on @p mp, so it must be a 135 * eina_mempool_realloc().
115 * valid mempool. 136 * @warning No checks are done for @p mp.
116 */ 137 */
117static inline void 138static inline void
118eina_mempool_free(Eina_Mempool *mp, void *element) 139eina_mempool_free(Eina_Mempool *mp, void *element)
diff --git a/libraries/eina/src/include/eina_inline_value.x b/libraries/eina/src/include/eina_inline_value.x
new file mode 100644
index 0000000..59ec315
--- /dev/null
+++ b/libraries/eina/src/include/eina_inline_value.x
@@ -0,0 +1,1705 @@
1/* Eina - EFL data type library
2 * Copyright (C) 2012 ProFUSION embedded systems
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef EINA_INLINE_VALUE_X_
20#define EINA_INLINE_VALUE_X_
21
22#include <string.h>
23#include <alloca.h>
24
25#include "eina_stringshare.h"
26
27/* NOTE: most of value is implemented here for performance reasons */
28
29//#define EINA_VALUE_NO_OPTIMIZE 1
30#ifdef EINA_VALUE_NO_OPTIMIZE
31#define EINA_VALUE_TYPE_DEFAULT(type) (0)
32#else
33
34/**
35 * @var _EINA_VALUE_TYPE_BASICS_START
36 * pointer to the first basic type.
37 * @since 1.2
38 * @private
39 */
40EAPI extern const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_START;
41
42/**
43 * @var _EINA_VALUE_TYPE_BASICS_END
44 * pointer to the last (inclusive) basic type.
45 * @since 1.2
46 * @private
47 */
48EAPI extern const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_END;
49#define EINA_VALUE_TYPE_DEFAULT(type) \
50 ((_EINA_VALUE_TYPE_BASICS_START <= type) && \
51 (type <= _EINA_VALUE_TYPE_BASICS_END))
52#endif
53
54#define EINA_VALUE_TYPE_CHECK_RETURN(value) \
55 EINA_SAFETY_ON_NULL_RETURN(value); \
56 EINA_SAFETY_ON_FALSE_RETURN(eina_value_type_check(value->type))
57
58#define EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, retval) \
59 EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \
60 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type), retval)
61
62#define EINA_VALUE_TYPE_DISPATCH(type, method, no_method_err, ...) \
63 do \
64 { \
65 if (type->method) \
66 type->method(type, ##__VA_ARGS__); \
67 else \
68 eina_error_set(no_method_err); \
69 } \
70 while (0)
71
72#define EINA_VALUE_TYPE_DISPATCH_RETURN(value, method, no_method_err, def_ret, ...) \
73 do \
74 { \
75 if (type->method) \
76 return type->method(type, ##__VA_ARGS__); \
77 eina_error_set(no_method_err); \
78 return def_ret; \
79 } \
80 while (0)
81
82/**
83 * @brief Get memory for given value (inline or allocated buffer).
84 * @since 1.2
85 * @private
86 */
87static inline void *
88eina_value_memory_get(const Eina_Value *value)
89{
90 if (value->type->value_size <= 8)
91 return (void *)value->value.buf;
92 return value->value.ptr;
93}
94
95/**
96 * @brief Allocate memory for internal value types.
97 * @since 1.2
98 * @private
99 */
100EAPI void *eina_value_inner_alloc(size_t size);
101/**
102 * @brief Releases memory for internal value types.
103 * @since 1.2
104 * @private
105 */
106EAPI void eina_value_inner_free(size_t size, void *mem);
107
108static inline Eina_Bool
109eina_value_setup(Eina_Value *value, const Eina_Value_Type *type)
110{
111 void *mem;
112
113 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
114 EINA_SAFETY_ON_FALSE_RETURN_VAL(type->value_size > 0, EINA_FALSE);
115
116 value->type = type;
117
118 if (type->value_size <= 8) mem = &value->value;
119 else
120 {
121 mem = value->value.ptr = eina_value_inner_alloc(type->value_size);
122 EINA_SAFETY_ON_NULL_RETURN_VAL(mem, EINA_FALSE);
123 }
124
125 memset(mem, 0, type->value_size);
126
127 if (EINA_VALUE_TYPE_DEFAULT(type))
128 {
129 eina_error_set(0);
130 return EINA_TRUE;
131 }
132
133 EINA_VALUE_TYPE_DISPATCH_RETURN(type, setup,
134 EINA_ERROR_VALUE_FAILED, EINA_FALSE, mem);
135}
136
137static inline void
138eina_value_flush(Eina_Value *value)
139{
140 const Eina_Value_Type *type;
141 void *mem;
142
143 EINA_VALUE_TYPE_CHECK_RETURN(value);
144
145 type = value->type;
146 mem = eina_value_memory_get(value);
147
148 if (EINA_VALUE_TYPE_DEFAULT(type))
149 {
150 if (type == EINA_VALUE_TYPE_STRINGSHARE)
151 {
152 if (value->value.ptr) eina_stringshare_del((const char*) value->value.ptr);
153 }
154 else if (type == EINA_VALUE_TYPE_STRING)
155 {
156 if (value->value.ptr) free(value->value.ptr);
157 }
158 else if (type->value_size > 8)
159 eina_value_inner_free(type->value_size, mem);
160 eina_error_set(0);
161 return;
162 }
163
164 EINA_VALUE_TYPE_DISPATCH(type, flush, EINA_ERROR_VALUE_FAILED, mem);
165 if (type->value_size > 8)
166 eina_value_inner_free(type->value_size, mem);
167 value->type = NULL;
168}
169
170static inline int
171eina_value_compare(const Eina_Value *a, const Eina_Value *b)
172{
173 const Eina_Value_Type *type;
174 void *pa, *pb;
175
176 EINA_VALUE_TYPE_CHECK_RETURN_VAL(a, -1);
177 EINA_SAFETY_ON_NULL_RETURN_VAL(b, -1);
178 EINA_SAFETY_ON_FALSE_RETURN_VAL(a->type == b->type, -1);
179
180 eina_error_set(0);
181 type = a->type;
182 pa = eina_value_memory_get(a);
183 pb = eina_value_memory_get(b);
184
185#ifndef EINA_VALUE_NO_OPTIMIZE
186 if (type == EINA_VALUE_TYPE_UCHAR)
187 {
188 unsigned char *ta = (unsigned char *) pa, *tb = (unsigned char *) pb;
189 if (*ta < *tb)
190 return -1;
191 else if (*ta > *tb)
192 return 1;
193 return 0;
194 }
195 else if (type == EINA_VALUE_TYPE_USHORT)
196 {
197 unsigned short *ta = (unsigned short *) pa, *tb = (unsigned short *) pb;
198 if (*ta < *tb)
199 return -1;
200 else if (*ta > *tb)
201 return 1;
202 return 0;
203 }
204 else if (type == EINA_VALUE_TYPE_UINT)
205 {
206 unsigned int *ta = (unsigned int *) pa, *tb = (unsigned int *) pb;
207 if (*ta < *tb)
208 return -1;
209 else if (*ta > *tb)
210 return 1;
211 return 0;
212 }
213 else if (type == EINA_VALUE_TYPE_ULONG)
214 {
215 unsigned long *ta = (unsigned long *) pa, *tb = (unsigned long *) pb;
216 if (*ta < *tb)
217 return -1;
218 else if (*ta > *tb)
219 return 1;
220 return 0;
221 }
222 else if (type == EINA_VALUE_TYPE_UINT64)
223 {
224 uint64_t *ta = (uint64_t *) pa, *tb = (uint64_t *) pb;
225 if (*ta < *tb)
226 return -1;
227 else if (*ta > *tb)
228 return 1;
229 return 0;
230 }
231 else if (type == EINA_VALUE_TYPE_CHAR)
232 {
233 char *ta = (char *) pa, *tb = (char *) pb;
234 if (*ta < *tb)
235 return -1;
236 else if (*ta > *tb)
237 return 1;
238 return 0;
239 }
240 else if (type == EINA_VALUE_TYPE_SHORT)
241 {
242 short *ta = (short *) pa, *tb = (short *) pb;
243 if (*ta < *tb)
244 return -1;
245 else if (*ta > *tb)
246 return 1;
247 return 0;
248 }
249 else if (type == EINA_VALUE_TYPE_INT)
250 {
251 int *ta = (int *) pa, *tb = (int *) pb;
252 if (*ta < *tb)
253 return -1;
254 else if (*ta > *tb)
255 return 1;
256 return 0;
257 }
258 else if (type == EINA_VALUE_TYPE_LONG)
259 {
260 long *ta = (long *) pa, *tb = (long *) pb;
261 if (*ta < *tb)
262 return -1;
263 else if (*ta > *tb)
264 return 1;
265 return 0;
266 }
267 else if (type == EINA_VALUE_TYPE_INT64)
268 {
269 int64_t *ta = (int64_t *) pa, *tb = (int64_t *) pb;
270 if (*ta < *tb)
271 return -1;
272 else if (*ta > *tb)
273 return 1;
274 return 0;
275 }
276 else if (type == EINA_VALUE_TYPE_FLOAT)
277 {
278 float *ta = (float *) pa, *tb = (float *) pb;
279 if (*ta < *tb)
280 return -1;
281 else if (*ta > *tb)
282 return 1;
283 return 0;
284 }
285 else if (type == EINA_VALUE_TYPE_DOUBLE)
286 {
287 double *ta = (double *) pa, *tb = (double *) pb;
288 if (*ta < *tb)
289 return -1;
290 else if (*ta > *tb)
291 return 1;
292 return 0;
293 }
294 else if (type == EINA_VALUE_TYPE_STRINGSHARE ||
295 type == EINA_VALUE_TYPE_STRING)
296 {
297 const char *sa = *(const char **)pa;
298 const char *sb = *(const char **)pb;
299 if (sa == sb)
300 return 0;
301 if (sa == NULL)
302 return -1;
303 if (sb == NULL)
304 return 1;
305 return strcmp(sa, sb);
306 }
307#endif
308
309 EINA_VALUE_TYPE_DISPATCH_RETURN(type, compare, EINA_ERROR_VALUE_FAILED,
310 EINA_FALSE, pa, pb);
311}
312
313static inline Eina_Bool
314eina_value_set(Eina_Value *value, ...)
315{
316 va_list args;
317 Eina_Bool ret;
318 va_start(args, value);
319 ret = eina_value_vset(value, args);
320 va_end(args);
321 return ret;
322}
323
324static inline Eina_Bool
325eina_value_get(const Eina_Value *value, ...)
326{
327 va_list args;
328 Eina_Bool ret;
329 va_start(args, value);
330 ret = eina_value_vget(value, args);
331 va_end(args);
332 return ret;
333}
334
335static inline Eina_Bool
336eina_value_vset(Eina_Value *value, va_list args)
337{
338 const Eina_Value_Type *type;
339 void *mem;
340
341 EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE);
342
343 type = value->type;
344 mem = eina_value_memory_get(value);
345 eina_error_set(0);
346#ifndef EINA_VALUE_NO_OPTIMIZE
347 if (type == EINA_VALUE_TYPE_UCHAR)
348 {
349 unsigned char *tmem = (unsigned char *) mem;
350 *tmem = va_arg(args, unsigned int); /* promoted by va_arg */
351 return EINA_TRUE;
352 }
353 else if (type == EINA_VALUE_TYPE_USHORT)
354 {
355 unsigned short *tmem = (unsigned short *) mem;
356 *tmem = va_arg(args, unsigned int); /* promoted by va_arg */
357 return EINA_TRUE;
358 }
359 else if (type == EINA_VALUE_TYPE_UINT)
360 {
361 unsigned int *tmem = (unsigned int *) mem;
362 *tmem = va_arg(args, unsigned int);
363 return EINA_TRUE;
364 }
365 else if (type == EINA_VALUE_TYPE_ULONG)
366 {
367 unsigned long *tmem = (unsigned long *) mem;
368 *tmem = va_arg(args, unsigned long);
369 return EINA_TRUE;
370 }
371 else if (type == EINA_VALUE_TYPE_UINT64)
372 {
373 uint64_t *tmem = (uint64_t *) mem;
374 *tmem = va_arg(args, uint64_t);
375 return EINA_TRUE;
376 }
377 else if (type == EINA_VALUE_TYPE_CHAR)
378 {
379 char *tmem = (char *) mem;
380 *tmem = va_arg(args, int); /* promoted by va_arg */
381 return EINA_TRUE;
382 }
383 else if (type == EINA_VALUE_TYPE_SHORT)
384 {
385 short *tmem = (short *) mem;
386 *tmem = va_arg(args, int); /* promoted by va_arg */
387 return EINA_TRUE;
388 }
389 else if (type == EINA_VALUE_TYPE_INT)
390 {
391 int *tmem = (int *) mem;
392 *tmem = va_arg(args, int);
393 return EINA_TRUE;
394 }
395 else if (type == EINA_VALUE_TYPE_LONG)
396 {
397 long *tmem = (long *) mem;
398 *tmem = va_arg(args, long);
399 return EINA_TRUE;
400 }
401 else if (type == EINA_VALUE_TYPE_INT64)
402 {
403 int64_t *tmem = (int64_t *) mem;
404 *tmem = va_arg(args, int64_t);
405 return EINA_TRUE;
406 }
407 else if (type == EINA_VALUE_TYPE_FLOAT)
408 {
409 float *tmem = (float *) mem;
410 *tmem = va_arg(args, double); /* promoted by va_arg */
411 return EINA_TRUE;
412 }
413 else if (type == EINA_VALUE_TYPE_DOUBLE)
414 {
415 double *tmem = (double *) mem;
416 *tmem = va_arg(args, double);
417 return EINA_TRUE;
418 }
419 else if (type == EINA_VALUE_TYPE_STRINGSHARE)
420 {
421 const char *str = (const char *) va_arg(args, const char *);
422 return eina_stringshare_replace((const char **)&value->value.ptr, str);
423 }
424 else if (type == EINA_VALUE_TYPE_STRING)
425 {
426 const char *str = (const char *) va_arg(args, const char *);
427 free(value->value.ptr);
428 if (!str)
429 value->value.ptr = NULL;
430 else
431 {
432 value->value.ptr = strdup(str);
433 if (!value->value.ptr)
434 {
435 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
436 return EINA_FALSE;
437 }
438 }
439 return EINA_TRUE;
440 }
441#endif
442
443 EINA_VALUE_TYPE_DISPATCH_RETURN(value, vset, EINA_ERROR_VALUE_FAILED,
444 EINA_FALSE, mem, args);
445}
446
447static inline Eina_Bool
448eina_value_vget(const Eina_Value *value, va_list args)
449{
450 const Eina_Value_Type *type;
451 const void *mem;
452 void *ptr;
453
454 EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE);
455
456 type = value->type;
457 mem = eina_value_memory_get(value);
458 ptr = va_arg(args, void *);
459 eina_error_set(0);
460 if (EINA_VALUE_TYPE_DEFAULT(type))
461 {
462 memcpy(ptr, mem, type->value_size);
463 return EINA_TRUE;
464 }
465
466 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pget, EINA_ERROR_VALUE_FAILED,
467 EINA_FALSE, mem, ptr);
468}
469
470static inline Eina_Bool
471eina_value_pset(Eina_Value *value, const void *ptr)
472{
473 const Eina_Value_Type *type;
474 void *mem;
475
476 EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE);
477 EINA_SAFETY_ON_NULL_RETURN_VAL(ptr, EINA_FALSE);
478
479 type = value->type;
480 mem = eina_value_memory_get(value);
481 eina_error_set(0);
482
483 if (EINA_VALUE_TYPE_DEFAULT(type))
484 {
485 if (type == EINA_VALUE_TYPE_STRINGSHARE)
486 {
487 const char * const *pstr = (const char * const *) ptr;
488 const char *str = *pstr;
489
490 return eina_stringshare_replace((const char **)&value->value.ptr,
491 str);
492 }
493 else if (type == EINA_VALUE_TYPE_STRING)
494 {
495 const char * const * pstr = (const char * const *) ptr;
496 const char *str = *pstr;
497
498 free(value->value.ptr);
499 if (!str)
500 value->value.ptr = NULL;
501 else
502 {
503 value->value.ptr = strdup(str);
504 if (!value->value.ptr)
505 {
506 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
507 return EINA_FALSE;
508 }
509 }
510 return EINA_TRUE;
511 }
512 else
513 memcpy(mem, ptr, type->value_size);
514 return EINA_TRUE;
515 }
516
517 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pset, EINA_ERROR_VALUE_FAILED,
518 EINA_FALSE, mem, ptr);
519}
520
521static inline Eina_Bool
522eina_value_pget(const Eina_Value *value, void *ptr)
523{
524 const Eina_Value_Type *type;
525 const void *mem;
526
527 EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE);
528 EINA_SAFETY_ON_NULL_RETURN_VAL(ptr, EINA_FALSE);
529
530 type = value->type;
531 mem = eina_value_memory_get(value);
532 eina_error_set(0);
533 if (EINA_VALUE_TYPE_DEFAULT(type))
534 {
535 memcpy(ptr, mem, type->value_size);
536 return EINA_TRUE;
537 }
538
539 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pget, EINA_ERROR_VALUE_FAILED,
540 EINA_FALSE, mem, ptr);
541}
542
543static inline const Eina_Value_Type *
544eina_value_type_get(const Eina_Value *value)
545{
546 EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, NULL);
547 return value->type;
548}
549
550#define EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, retval) \
551 EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \
552 EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type == EINA_VALUE_TYPE_ARRAY, retval)
553
554static inline Eina_Bool
555eina_value_array_setup(Eina_Value *value, const Eina_Value_Type *subtype, unsigned int step)
556{
557 Eina_Value_Array desc = { subtype, step, NULL };
558 if (!eina_value_setup(value, EINA_VALUE_TYPE_ARRAY))
559 return EINA_FALSE;
560 if (!eina_value_pset(value, &desc))
561 {
562 eina_value_flush(value);
563 return EINA_FALSE;
564 }
565 return EINA_TRUE;
566}
567
568static inline unsigned int
569eina_value_array_count(const Eina_Value *value)
570{
571 Eina_Value_Array desc;
572 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
573 if (!eina_value_pget(value, &desc))
574 return 0;
575 return eina_inarray_count(desc.array);
576}
577
578static inline Eina_Bool
579eina_value_array_remove(Eina_Value *value, unsigned int position)
580{
581 Eina_Value_Array desc;
582 void *mem;
583
584 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
585 if (!eina_value_pget(value, &desc))
586 return EINA_FALSE;
587
588 mem = eina_inarray_nth(desc.array, position);
589 if (!mem)
590 return EINA_FALSE;
591
592 eina_value_type_flush(desc.subtype, mem);
593 return eina_inarray_remove_at(desc.array, position);
594}
595
596static inline Eina_Bool
597eina_value_array_vset(Eina_Value *value, unsigned int position, va_list args)
598{
599 Eina_Value_Array desc;
600 void *mem;
601
602 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
603 if (!eina_value_pget(value, &desc))
604 return EINA_FALSE;
605
606 mem = eina_inarray_nth(desc.array, position);
607 if (!mem)
608 return EINA_FALSE;
609
610 eina_value_type_flush(desc.subtype, mem);
611
612 if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup;
613 if (!eina_value_type_vset(desc.subtype, mem, args)) goto error_set;
614 return EINA_TRUE;
615
616 error_set:
617 eina_value_type_flush(desc.subtype, mem);
618 error_setup:
619 return EINA_FALSE;
620}
621
622static inline Eina_Bool
623eina_value_array_vget(const Eina_Value *value, unsigned int position, va_list args)
624{
625 Eina_Value_Array desc;
626 const void *mem;
627 void *ptr;
628 Eina_Bool ret;
629
630 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
631 if (!eina_value_pget(value, &desc))
632 return EINA_FALSE;
633
634 mem = eina_inarray_nth(desc.array, position);
635 if (!mem)
636 return EINA_FALSE;
637
638 ptr = va_arg(args, void *);
639 ret = eina_value_type_pget(desc.subtype, mem, ptr);
640 return ret;
641}
642
643static inline Eina_Bool
644eina_value_array_vinsert(Eina_Value *value, unsigned int position, va_list args)
645{
646 Eina_Value_Array desc;
647 void *mem;
648
649 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
650 if (!eina_value_pget(value, &desc))
651 return EINA_FALSE;
652
653 mem = eina_inarray_alloc_at(desc.array, position, 1);
654 if (!mem)
655 return EINA_FALSE;
656
657 if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup;
658 if (!eina_value_type_vset(desc.subtype, mem, args)) goto error_set;
659 return EINA_TRUE;
660
661 error_set:
662 eina_value_type_flush(desc.subtype, mem);
663 error_setup:
664 eina_inarray_remove_at(desc.array, position);
665 return EINA_FALSE;
666}
667
668static inline Eina_Bool
669eina_value_array_vappend(Eina_Value *value, va_list args)
670{
671 Eina_Value_Array desc;
672 void *mem;
673 int position;
674
675 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
676 if (!eina_value_pget(value, &desc))
677 return EINA_FALSE;
678
679 position = eina_inarray_count(desc.array);
680 mem = eina_inarray_alloc_at(desc.array, position, 1);
681 if (!mem)
682 return EINA_FALSE;
683
684 if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup;
685 if (!eina_value_type_vset(desc.subtype, mem, args)) goto error_set;
686 return EINA_TRUE;
687
688 error_set:
689 eina_value_type_flush(desc.subtype, mem);
690 error_setup:
691 eina_inarray_remove_at(desc.array, position);
692 return EINA_FALSE;
693}
694
695static inline Eina_Bool
696eina_value_array_set(Eina_Value *value, unsigned int position, ...)
697{
698 va_list args;
699 Eina_Bool ret;
700 va_start(args, position);
701 ret = eina_value_array_vset(value, position, args);
702 va_end(args);
703 return ret;
704}
705
706static inline Eina_Bool
707eina_value_array_get(const Eina_Value *value, unsigned int position, ...)
708{
709 va_list args;
710 Eina_Bool ret;
711 va_start(args, position);
712 ret = eina_value_array_vget(value, position, args);
713 va_end(args);
714 return ret;
715}
716
717static inline Eina_Bool
718eina_value_array_insert(Eina_Value *value, unsigned int position, ...)
719{
720 va_list args;
721 Eina_Bool ret;
722 va_start(args, position);
723 ret = eina_value_array_vinsert(value, position, args);
724 va_end(args);
725 return ret;
726}
727
728static inline Eina_Bool eina_value_array_append(Eina_Value *value, ...)
729{
730 va_list args;
731 Eina_Bool ret;
732 va_start(args, value);
733 ret = eina_value_array_vappend(value, args);
734 va_end(args);
735 return ret;
736}
737
738static inline Eina_Bool
739eina_value_array_pset(Eina_Value *value, unsigned int position, const void *ptr)
740{
741 Eina_Value_Array desc;
742 void *mem;
743
744 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
745 if (!eina_value_pget(value, &desc))
746 return EINA_FALSE;
747
748 mem = eina_inarray_nth(desc.array, position);
749 if (!mem)
750 return EINA_FALSE;
751
752 eina_value_type_flush(desc.subtype, mem);
753
754 if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup;
755 if (!eina_value_type_pset(desc.subtype, mem, ptr)) goto error_set;
756 return EINA_TRUE;
757
758 error_set:
759 eina_value_type_flush(desc.subtype, mem);
760 error_setup:
761 return EINA_FALSE;
762}
763
764static inline Eina_Bool
765eina_value_array_pget(const Eina_Value *value, unsigned int position, void *ptr)
766{
767 Eina_Value_Array desc;
768 const void *mem;
769 Eina_Bool ret;
770
771 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
772 if (!eina_value_pget(value, &desc))
773 return EINA_FALSE;
774
775 mem = eina_inarray_nth(desc.array, position);
776 if (!mem)
777 return EINA_FALSE;
778
779 ret = eina_value_type_pget(desc.subtype, mem, ptr);
780 return ret;
781}
782
783static inline Eina_Bool
784eina_value_array_pinsert(Eina_Value *value, unsigned int position, const void *ptr)
785{
786 Eina_Value_Array desc;
787 void *mem;
788
789 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
790 if (!eina_value_pget(value, &desc))
791 return EINA_FALSE;
792
793 mem = eina_inarray_alloc_at(desc.array, position, 1);
794 if (!mem)
795 return EINA_FALSE;
796
797 if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup;
798 if (!eina_value_type_pset(desc.subtype, mem, ptr)) goto error_set;
799 return EINA_TRUE;
800
801 error_set:
802 eina_value_type_flush(desc.subtype, mem);
803 error_setup:
804 eina_inarray_remove_at(desc.array, position);
805 return EINA_FALSE;
806}
807
808static inline Eina_Bool
809eina_value_array_pappend(Eina_Value *value, const void *ptr)
810{
811 Eina_Value_Array desc;
812 void *mem;
813 int position;
814
815 EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0);
816 if (!eina_value_pget(value, &desc))
817 return EINA_FALSE;
818
819 position = eina_inarray_count(desc.array);
820 mem = eina_inarray_alloc_at(desc.array, position, 1);
821 if (!mem)
822 return EINA_FALSE;
823
824 if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup;
825 if (!eina_value_type_pset(desc.subtype, mem, ptr)) goto error_set;
826 return EINA_TRUE;
827
828 error_set:
829 eina_value_type_flush(desc.subtype, mem);
830 error_setup:
831 eina_inarray_remove_at(desc.array, position);
832 return EINA_FALSE;
833}
834
835#undef EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL
836
837#define EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, retval) \
838 EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \
839 EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type == EINA_VALUE_TYPE_LIST, retval)
840
841static inline void *
842eina_value_list_node_memory_get(const Eina_Value_Type *type, const Eina_List *node)
843{
844 if (node == NULL) return NULL;
845 if (type->value_size <= sizeof(void*))
846 return (void *)&(node->data);
847 return node->data;
848}
849
850static inline void *
851eina_value_list_node_memory_setup(const Eina_Value_Type *type, Eina_List *node)
852{
853 if (type->value_size <= sizeof(void*))
854 return (void *)&(node->data);
855 node->data = malloc(type->value_size);
856 return node->data;
857}
858
859static inline void
860eina_value_list_node_memory_flush(const Eina_Value_Type *type, Eina_List *node)
861{
862 if (type->value_size <= sizeof(void*))
863 return;
864 free(node->data);
865}
866
867static inline Eina_Bool
868eina_value_list_setup(Eina_Value *value, const Eina_Value_Type *subtype)
869{
870 Eina_Value_List desc = { subtype, NULL };
871 if (!eina_value_setup(value, EINA_VALUE_TYPE_LIST))
872 return EINA_FALSE;
873 if (!eina_value_pset(value, &desc))
874 {
875 eina_value_flush(value);
876 return EINA_FALSE;
877 }
878 return EINA_TRUE;
879}
880
881static inline unsigned int
882eina_value_list_count(const Eina_Value *value)
883{
884 Eina_Value_List *desc;
885 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
886 desc = (Eina_Value_List *)eina_value_memory_get(value);
887 if (!desc)
888 return 0;
889 return eina_list_count(desc->list);
890}
891
892static inline Eina_Bool
893eina_value_list_remove(Eina_Value *value, unsigned int position)
894{
895 Eina_Value_List *desc;
896 Eina_List *node;
897 void *mem;
898
899 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
900 desc = (Eina_Value_List *)eina_value_memory_get(value);
901 if (!desc)
902 return EINA_FALSE;
903
904 node = eina_list_nth_list(desc->list, position);
905 mem = eina_value_list_node_memory_get(desc->subtype, node);
906 if (!mem)
907 return EINA_FALSE;
908
909 eina_value_type_flush(desc->subtype, mem);
910 eina_value_list_node_memory_flush(desc->subtype, node);
911 desc->list = eina_list_remove_list(desc->list, node);
912 return EINA_TRUE;
913}
914
915static inline Eina_Bool
916eina_value_list_vset(Eina_Value *value, unsigned int position, va_list args)
917{
918 Eina_Value_List *desc;
919 Eina_List *node;
920 void *mem;
921
922 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
923 desc = (Eina_Value_List *)eina_value_memory_get(value);
924 if (!desc)
925 return EINA_FALSE;
926
927 node = eina_list_nth_list(desc->list, position);
928 mem = eina_value_list_node_memory_get(desc->subtype, node);
929 if (!mem)
930 return EINA_FALSE;
931
932 eina_value_type_flush(desc->subtype, mem);
933
934 if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup;
935 if (!eina_value_type_vset(desc->subtype, mem, args)) goto error_set;
936 return EINA_TRUE;
937
938 error_set:
939 eina_value_type_flush(desc->subtype, mem);
940 error_setup:
941 return EINA_FALSE;
942}
943
944static inline Eina_Bool
945eina_value_list_vget(const Eina_Value *value, unsigned int position, va_list args)
946{
947 const Eina_Value_List *desc;
948 const Eina_List *node;
949 const void *mem;
950 void *ptr;
951 Eina_Bool ret;
952
953 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
954 desc = (const Eina_Value_List *)eina_value_memory_get(value);
955 if (!desc)
956 return EINA_FALSE;
957
958 node = eina_list_nth_list(desc->list, position);
959 mem = eina_value_list_node_memory_get(desc->subtype, node);
960 if (!mem)
961 return EINA_FALSE;
962
963 ptr = va_arg(args, void *);
964 ret = eina_value_type_pget(desc->subtype, mem, ptr);
965 return ret;
966}
967
968static inline Eina_Bool
969eina_value_list_vinsert(Eina_Value *value, unsigned int position, va_list args)
970{
971 Eina_Value_List *desc;
972 Eina_List *node;
973 void *mem;
974
975 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
976 desc = (Eina_Value_List *)eina_value_memory_get(value);
977 if (!desc)
978 return EINA_FALSE;
979
980 if (!desc->list)
981 node = desc->list = eina_list_append(NULL, (void*)1L);
982 else if (position == 0)
983 node = desc->list = eina_list_prepend(desc->list, (void*)1L);
984 else
985 {
986 Eina_List *rel = eina_list_nth_list(desc->list, position - 1);
987 desc->list = eina_list_append_relative_list(desc->list, (void*)1L, rel);
988 node = rel->next;
989 }
990 EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE);
991 EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE);
992
993 mem = eina_value_list_node_memory_setup(desc->subtype, node);
994 if (!mem)
995 {
996 desc->list = eina_list_remove_list(desc->list, node);
997 return EINA_FALSE;
998 }
999
1000 if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup;
1001 if (!eina_value_type_vset(desc->subtype, mem, args)) goto error_set;
1002 return EINA_TRUE;
1003
1004 error_set:
1005 eina_value_type_flush(desc->subtype, mem);
1006 error_setup:
1007 eina_value_list_node_memory_flush(desc->subtype, node);
1008 desc->list = eina_list_remove_list(desc->list, node);
1009 return EINA_FALSE;
1010}
1011
1012static inline Eina_Bool
1013eina_value_list_vappend(Eina_Value *value, va_list args)
1014{
1015 Eina_Value_List *desc;
1016 Eina_List *node;
1017 void *mem;
1018
1019 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
1020 desc = (Eina_Value_List *)eina_value_memory_get(value);
1021 if (!desc)
1022 return EINA_FALSE;
1023
1024 desc->list = eina_list_append(desc->list, (void*)1L);
1025 node = eina_list_last(desc->list);
1026 EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE);
1027 EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE);
1028
1029 mem = eina_value_list_node_memory_setup(desc->subtype, node);
1030 if (!mem)
1031 {
1032 desc->list = eina_list_remove_list(desc->list, node);
1033 return EINA_FALSE;
1034 }
1035
1036 if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup;
1037 if (!eina_value_type_vset(desc->subtype, mem, args)) goto error_set;
1038 return EINA_TRUE;
1039
1040 error_set:
1041 eina_value_type_flush(desc->subtype, mem);
1042 error_setup:
1043 eina_value_list_node_memory_flush(desc->subtype, node);
1044 desc->list = eina_list_remove_list(desc->list, node);
1045 return EINA_FALSE;
1046}
1047
1048static inline Eina_Bool
1049eina_value_list_set(Eina_Value *value, unsigned int position, ...)
1050{
1051 va_list args;
1052 Eina_Bool ret;
1053 va_start(args, position);
1054 ret = eina_value_list_vset(value, position, args);
1055 va_end(args);
1056 return ret;
1057}
1058
1059static inline Eina_Bool
1060eina_value_list_get(const Eina_Value *value, unsigned int position, ...)
1061{
1062 va_list args;
1063 Eina_Bool ret;
1064 va_start(args, position);
1065 ret = eina_value_list_vget(value, position, args);
1066 va_end(args);
1067 return ret;
1068}
1069
1070static inline Eina_Bool
1071eina_value_list_insert(Eina_Value *value, unsigned int position, ...)
1072{
1073 va_list args;
1074 Eina_Bool ret;
1075 va_start(args, position);
1076 ret = eina_value_list_vinsert(value, position, args);
1077 va_end(args);
1078 return ret;
1079}
1080
1081static inline Eina_Bool eina_value_list_append(Eina_Value *value, ...)
1082{
1083 va_list args;
1084 Eina_Bool ret;
1085 va_start(args, value);
1086 ret = eina_value_list_vappend(value, args);
1087 va_end(args);
1088 return ret;
1089}
1090
1091static inline Eina_Bool
1092eina_value_list_pset(Eina_Value *value, unsigned int position, const void *ptr)
1093{
1094 Eina_Value_List *desc;
1095 Eina_List *node;
1096 void *mem;
1097
1098 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
1099 desc = (Eina_Value_List *)eina_value_memory_get(value);
1100 if (!desc)
1101 return EINA_FALSE;
1102
1103 node = eina_list_nth_list(desc->list, position);
1104 mem = eina_value_list_node_memory_get(desc->subtype, node);
1105 if (!mem)
1106 return EINA_FALSE;
1107
1108 eina_value_type_flush(desc->subtype, mem);
1109
1110 if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup;
1111 if (!eina_value_type_pset(desc->subtype, mem, ptr)) goto error_set;
1112 return EINA_TRUE;
1113
1114 error_set:
1115 eina_value_type_flush(desc->subtype, mem);
1116 error_setup:
1117 return EINA_FALSE;
1118}
1119
1120static inline Eina_Bool
1121eina_value_list_pget(const Eina_Value *value, unsigned int position, void *ptr)
1122{
1123 const Eina_Value_List *desc;
1124 const Eina_List *node;
1125 const void *mem;
1126 Eina_Bool ret;
1127
1128 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
1129 desc = (const Eina_Value_List *)eina_value_memory_get(value);
1130 if (!desc)
1131 return EINA_FALSE;
1132
1133 node = eina_list_nth_list(desc->list, position);
1134 mem = eina_value_list_node_memory_get(desc->subtype, node);
1135 if (!mem)
1136 return EINA_FALSE;
1137
1138 ret = eina_value_type_pget(desc->subtype, mem, ptr);
1139 return ret;
1140}
1141
1142static inline Eina_Bool
1143eina_value_list_pinsert(Eina_Value *value, unsigned int position, const void *ptr)
1144{
1145 Eina_Value_List *desc;
1146 Eina_List *node;
1147 void *mem;
1148
1149 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
1150 desc = (Eina_Value_List *)eina_value_memory_get(value);
1151 if (!desc)
1152 return EINA_FALSE;
1153
1154 if (!desc->list)
1155 node = desc->list = eina_list_append(NULL, (void*)1L);
1156 else if (position == 0)
1157 node = desc->list = eina_list_prepend(desc->list, (void*)1L);
1158 else
1159 {
1160 Eina_List *rel = eina_list_nth_list(desc->list, position - 1);
1161 desc->list = eina_list_append_relative_list(desc->list, (void*)1L, rel);
1162 node = rel->next;
1163 }
1164 EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE);
1165 EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE);
1166
1167 mem = eina_value_list_node_memory_setup(desc->subtype, node);
1168 if (!mem)
1169 {
1170 desc->list = eina_list_remove_list(desc->list, node);
1171 return EINA_FALSE;
1172 }
1173
1174 if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup;
1175 if (!eina_value_type_pset(desc->subtype, mem, ptr)) goto error_set;
1176 return EINA_TRUE;
1177
1178 error_set:
1179 eina_value_type_flush(desc->subtype, mem);
1180 error_setup:
1181 eina_value_list_node_memory_flush(desc->subtype, node);
1182 desc->list = eina_list_remove_list(desc->list, node);
1183 return EINA_FALSE;
1184}
1185
1186static inline Eina_Bool
1187eina_value_list_pappend(Eina_Value *value, const void *ptr)
1188{
1189 Eina_Value_List *desc;
1190 Eina_List *node;
1191 void *mem;
1192
1193 EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0);
1194 desc = (Eina_Value_List *)eina_value_memory_get(value);
1195 if (!desc)
1196 return EINA_FALSE;
1197
1198 desc->list = eina_list_append(desc->list, (void*)1L);
1199 node = eina_list_last(desc->list);
1200 EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE);
1201 EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE);
1202
1203 mem = eina_value_list_node_memory_setup(desc->subtype, node);
1204 if (!mem)
1205 {
1206 desc->list = eina_list_remove_list(desc->list, node);
1207 return EINA_FALSE;
1208 }
1209
1210 if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup;
1211 if (!eina_value_type_pset(desc->subtype, mem, ptr)) goto error_set;
1212 return EINA_TRUE;
1213
1214 error_set:
1215 eina_value_type_flush(desc->subtype, mem);
1216 error_setup:
1217 eina_value_list_node_memory_flush(desc->subtype, node);
1218 desc->list = eina_list_remove_list(desc->list, node);
1219 return EINA_FALSE;
1220}
1221#undef EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL
1222
1223#define EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, retval) \
1224 EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \
1225 EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type == EINA_VALUE_TYPE_HASH, retval)
1226
1227static inline Eina_Bool
1228eina_value_hash_setup(Eina_Value *value, const Eina_Value_Type *subtype, unsigned int buckets_power_size)
1229{
1230 Eina_Value_Hash desc = { subtype, buckets_power_size, NULL };
1231 if (!eina_value_setup(value, EINA_VALUE_TYPE_HASH))
1232 return EINA_FALSE;
1233 if (!eina_value_pset(value, &desc))
1234 {
1235 eina_value_flush(value);
1236 return EINA_FALSE;
1237 }
1238 return EINA_TRUE;
1239}
1240
1241static inline unsigned int
1242eina_value_hash_population(const Eina_Value *value)
1243{
1244 Eina_Value_Hash *desc;
1245 EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, 0);
1246 desc = (Eina_Value_Hash *)eina_value_memory_get(value);
1247 if (!desc)
1248 return 0;
1249 return eina_hash_population(desc->hash);
1250}
1251
1252static inline Eina_Bool
1253eina_value_hash_del(Eina_Value *value, const char *key)
1254{
1255 Eina_Value_Hash *desc;
1256 void *mem;
1257
1258 EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, EINA_FALSE);
1259 EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
1260 desc = (Eina_Value_Hash *)eina_value_memory_get(value);
1261 if (!desc)
1262 return EINA_FALSE;
1263
1264 mem = eina_hash_find(desc->hash, key);
1265 if (!mem)
1266 return EINA_FALSE;
1267
1268 eina_value_type_flush(desc->subtype, mem);
1269 free(mem);
1270 eina_hash_del_by_key(desc->hash, key);
1271 return EINA_TRUE;
1272}
1273
1274static inline Eina_Bool
1275eina_value_hash_vset(Eina_Value *value, const char *key, va_list args)
1276{
1277 Eina_Value_Hash *desc;
1278 void *mem;
1279
1280 EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, EINA_FALSE);
1281 EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
1282 desc = (Eina_Value_Hash *)eina_value_memory_get(value);
1283 if (!desc)
1284 return EINA_FALSE;
1285
1286 mem = eina_hash_find(desc->hash, key);
1287 if (mem)
1288 eina_value_type_flush(desc->subtype, mem);
1289 else
1290 {
1291 mem = malloc(desc->subtype->value_size);
1292 if (!mem)
1293 {
1294 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1295 return EINA_FALSE;
1296 }
1297 if (!eina_hash_add(desc->hash, key, mem))
1298 {
1299 free(mem);
1300 return EINA_FALSE;
1301 }
1302 }
1303
1304 if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup;
1305 if (!eina_value_type_vset(desc->subtype, mem, args)) goto error_set;
1306 return EINA_TRUE;
1307
1308 error_set:
1309 eina_value_type_flush(desc->subtype, mem);
1310 error_setup:
1311 eina_hash_del_by_key(desc->hash, key);
1312 free(mem);
1313 return EINA_FALSE;
1314}
1315
1316static inline Eina_Bool
1317eina_value_hash_vget(const Eina_Value *value, const char *key, va_list args)
1318{
1319 const Eina_Value_Hash *desc;
1320 const void *mem;
1321 void *ptr;
1322 Eina_Bool ret;
1323
1324 EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, EINA_FALSE);
1325 EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
1326 desc = (const Eina_Value_Hash *)eina_value_memory_get(value);
1327 if (!desc)
1328 return EINA_FALSE;
1329
1330 mem = eina_hash_find(desc->hash, key);
1331 if (!mem)
1332 return EINA_FALSE;
1333
1334 ptr = va_arg(args, void *);
1335 ret = eina_value_type_pget(desc->subtype, mem, ptr);
1336 return ret;
1337}
1338
1339static inline Eina_Bool
1340eina_value_hash_set(Eina_Value *value, const char *key, ...)
1341{
1342 va_list args;
1343 Eina_Bool ret;
1344 va_start(args, key);
1345 ret = eina_value_hash_vset(value, key, args);
1346 va_end(args);
1347 return ret;
1348}
1349
1350static inline Eina_Bool
1351eina_value_hash_get(const Eina_Value *value, const char *key, ...)
1352{
1353 va_list args;
1354 Eina_Bool ret;
1355 va_start(args, key);
1356 ret = eina_value_hash_vget(value, key, args);
1357 va_end(args);
1358 return ret;
1359}
1360
1361static inline Eina_Bool
1362eina_value_hash_pset(Eina_Value *value, const char *key, const void *ptr)
1363{
1364 Eina_Value_Hash *desc;
1365 void *mem;
1366
1367 EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, 0);
1368 EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
1369 desc = (Eina_Value_Hash *)eina_value_memory_get(value);
1370 if (!desc)
1371 return EINA_FALSE;
1372
1373 mem = eina_hash_find(desc->hash, key);
1374 if (mem)
1375 eina_value_type_flush(desc->subtype, mem);
1376 else
1377 {
1378 mem = malloc(desc->subtype->value_size);
1379 if (!mem)
1380 {
1381 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1382 return EINA_FALSE;
1383 }
1384 if (!eina_hash_add(desc->hash, key, mem))
1385 {
1386 free(mem);
1387 return EINA_FALSE;
1388 }
1389 }
1390
1391 if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup;
1392 if (!eina_value_type_pset(desc->subtype, mem, ptr)) goto error_set;
1393 return EINA_TRUE;
1394
1395 error_set:
1396 eina_value_type_flush(desc->subtype, mem);
1397 error_setup:
1398 eina_hash_del_by_key(desc->hash, key);
1399 free(mem);
1400 return EINA_FALSE;
1401}
1402
1403static inline Eina_Bool
1404eina_value_hash_pget(const Eina_Value *value, const char *key, void *ptr)
1405{
1406 const Eina_Value_Hash *desc;
1407 const void *mem;
1408 Eina_Bool ret;
1409
1410 EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, 0);
1411 EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
1412 desc = (const Eina_Value_Hash *)eina_value_memory_get(value);
1413 if (!desc)
1414 return EINA_FALSE;
1415
1416 mem = eina_hash_find(desc->hash, key);
1417 if (!mem)
1418 return EINA_FALSE;
1419
1420 ret = eina_value_type_pget(desc->subtype, mem, ptr);
1421 return ret;
1422}
1423#undef EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL
1424
1425#define EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, retval) \
1426 EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \
1427 EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type == EINA_VALUE_TYPE_STRUCT, retval)
1428
1429/**
1430 * @brief Find member of struct
1431 * @since 1.2
1432 * @internal
1433 */
1434EAPI const Eina_Value_Struct_Member *eina_value_struct_member_find(const Eina_Value_Struct *st, const char *name) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
1435
1436static inline Eina_Bool
1437eina_value_struct_setup(Eina_Value *value, const Eina_Value_Struct_Desc *sdesc)
1438{
1439 Eina_Value_Struct desc = {sdesc, NULL};
1440 if (!eina_value_setup(value, EINA_VALUE_TYPE_STRUCT))
1441 return EINA_FALSE;
1442 if (!eina_value_pset(value, &desc))
1443 {
1444 eina_value_flush(value);
1445 return EINA_FALSE;
1446 }
1447 return EINA_TRUE;
1448}
1449
1450static inline void *
1451eina_value_struct_member_memory_get(const Eina_Value_Struct *st, const Eina_Value_Struct_Member *member)
1452{
1453 unsigned char *base = (unsigned char *)st->memory;
1454 if (!base) return NULL;
1455 return base + member->offset;
1456}
1457
1458static inline Eina_Bool
1459eina_value_struct_vset(Eina_Value *value, const char *name, va_list args)
1460{
1461 const Eina_Value_Struct_Member *member;
1462 Eina_Value_Struct *st;
1463 void *mem;
1464
1465 EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, EINA_FALSE);
1466 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
1467 st = (Eina_Value_Struct *)eina_value_memory_get(value);
1468 if (!st)
1469 return EINA_FALSE;
1470 member = eina_value_struct_member_find(st, name);
1471 if (!member)
1472 return EINA_FALSE;
1473 mem = eina_value_struct_member_memory_get(st, member);
1474 if (!mem)
1475 return EINA_FALSE;
1476
1477 eina_value_type_flush(member->type, mem);
1478 if (!eina_value_type_setup(member->type, mem)) goto error_setup;
1479 if (!eina_value_type_vset(member->type, mem, args)) goto error_set;
1480 return EINA_TRUE;
1481
1482 error_set:
1483 eina_value_type_flush(member->type, mem);
1484 error_setup:
1485 return EINA_FALSE;
1486}
1487
1488static inline Eina_Bool
1489eina_value_struct_vget(const Eina_Value *value, const char *name, va_list args)
1490{
1491 const Eina_Value_Struct_Member *member;
1492 const Eina_Value_Struct *st;
1493 const void *mem;
1494 void *ptr;
1495 Eina_Bool ret;
1496
1497 EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, EINA_FALSE);
1498 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
1499 st = (const Eina_Value_Struct *)eina_value_memory_get(value);
1500 if (!st)
1501 return EINA_FALSE;
1502 member = eina_value_struct_member_find(st, name);
1503 if (!member)
1504 return EINA_FALSE;
1505 mem = eina_value_struct_member_memory_get(st, member);
1506 if (!mem)
1507 return EINA_FALSE;
1508
1509 ptr = va_arg(args, void *);
1510 ret = eina_value_type_pget(member->type, mem, ptr);
1511 return ret;
1512}
1513
1514static inline Eina_Bool
1515eina_value_struct_set(Eina_Value *value, const char *name, ...)
1516{
1517 va_list args;
1518 Eina_Bool ret;
1519 va_start(args, name);
1520 ret = eina_value_struct_vset(value, name, args);
1521 va_end(args);
1522 return ret;
1523}
1524
1525static inline Eina_Bool
1526eina_value_struct_get(const Eina_Value *value, const char *name, ...)
1527{
1528 va_list args;
1529 Eina_Bool ret;
1530 va_start(args, name);
1531 ret = eina_value_struct_vget(value, name, args);
1532 va_end(args);
1533 return ret;
1534}
1535
1536static inline Eina_Bool
1537eina_value_struct_pset(Eina_Value *value, const char *name, const void *ptr)
1538{
1539 const Eina_Value_Struct_Member *member;
1540 Eina_Value_Struct *st;
1541 void *mem;
1542
1543 EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, 0);
1544 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
1545 st = (Eina_Value_Struct *)eina_value_memory_get(value);
1546 if (!st)
1547 return EINA_FALSE;
1548 member = eina_value_struct_member_find(st, name);
1549 if (!member)
1550 return EINA_FALSE;
1551 mem = eina_value_struct_member_memory_get(st, member);
1552 if (!mem)
1553 return EINA_FALSE;
1554
1555 eina_value_type_flush(member->type, mem);
1556 if (!eina_value_type_setup(member->type, mem)) goto error_setup;
1557 if (!eina_value_type_pset(member->type, mem, ptr)) goto error_set;
1558 return EINA_TRUE;
1559
1560 error_set:
1561 eina_value_type_flush(member->type, mem);
1562 error_setup:
1563 return EINA_FALSE;
1564}
1565
1566static inline Eina_Bool
1567eina_value_struct_pget(const Eina_Value *value, const char *name, void *ptr)
1568{
1569 const Eina_Value_Struct_Member *member;
1570 const Eina_Value_Struct *st;
1571 const void *mem;
1572 Eina_Bool ret;
1573
1574 EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, 0);
1575 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
1576 st = (const Eina_Value_Struct *)eina_value_memory_get(value);
1577 if (!st)
1578 return EINA_FALSE;
1579 member = eina_value_struct_member_find(st, name);
1580 if (!member)
1581 return EINA_FALSE;
1582 mem = eina_value_struct_member_memory_get(st, member);
1583 if (!mem)
1584 return EINA_FALSE;
1585
1586 ret = eina_value_type_pget(member->type, mem, ptr);
1587 return ret;
1588}
1589#undef EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL
1590
1591
1592static inline Eina_Bool
1593eina_value_type_setup(const Eina_Value_Type *type, void *mem)
1594{
1595 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1596 if (!type->setup)
1597 {
1598 eina_error_set(EINA_ERROR_VALUE_FAILED);
1599 return EINA_FALSE;
1600 }
1601 return type->setup(type, mem);
1602}
1603
1604static inline Eina_Bool
1605eina_value_type_flush(const Eina_Value_Type *type, void *mem)
1606{
1607 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1608 if (!type->flush)
1609 {
1610 eina_error_set(EINA_ERROR_VALUE_FAILED);
1611 return EINA_FALSE;
1612 }
1613 return type->flush(type, mem);
1614}
1615
1616static inline Eina_Bool
1617eina_value_type_copy(const Eina_Value_Type *type, const void *src, void *dst)
1618{
1619 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1620 if (!type->copy)
1621 {
1622 eina_error_set(EINA_ERROR_VALUE_FAILED);
1623 return EINA_FALSE;
1624 }
1625 return type->copy(type, src, dst);
1626}
1627
1628static inline int
1629eina_value_type_compare(const Eina_Value_Type *type, const void *a, const void *b)
1630{
1631 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1632 if (!type->compare)
1633 {
1634 eina_error_set(EINA_ERROR_VALUE_FAILED);
1635 return EINA_FALSE;
1636 }
1637 return type->compare(type, a, b);
1638}
1639
1640static inline Eina_Bool
1641eina_value_type_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
1642{
1643 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1644 if (!type->convert_to)
1645 {
1646 eina_error_set(EINA_ERROR_VALUE_FAILED);
1647 return EINA_FALSE;
1648 }
1649 return type->convert_to(type, convert, type_mem, convert_mem);
1650}
1651
1652static inline Eina_Bool
1653eina_value_type_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem)
1654{
1655 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1656 if (!type->convert_from)
1657 {
1658 eina_error_set(EINA_ERROR_VALUE_FAILED);
1659 return EINA_FALSE;
1660 }
1661 return type->convert_from(type, convert, type_mem, convert_mem);
1662}
1663
1664static inline Eina_Bool
1665eina_value_type_vset(const Eina_Value_Type *type, void *mem, va_list args)
1666{
1667 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1668 if (!type->vset)
1669 {
1670 eina_error_set(EINA_ERROR_VALUE_FAILED);
1671 return EINA_FALSE;
1672 }
1673 return type->vset(type, mem, args);
1674}
1675
1676static inline Eina_Bool
1677eina_value_type_pset(const Eina_Value_Type *type, void *mem, const void *ptr)
1678{
1679 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1680 if (!type->pset)
1681 {
1682 eina_error_set(EINA_ERROR_VALUE_FAILED);
1683 return EINA_FALSE;
1684 }
1685 return type->pset(type, mem, ptr);
1686}
1687
1688static inline Eina_Bool
1689eina_value_type_pget(const Eina_Value_Type *type, const void *mem, void *ptr)
1690{
1691 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1692 if (!type->pget)
1693 {
1694 eina_error_set(EINA_ERROR_VALUE_FAILED);
1695 return EINA_FALSE;
1696 }
1697 return type->pget(type, mem, ptr);
1698}
1699
1700#undef EINA_VALUE_TYPE_DEFAULT
1701#undef EINA_VALUE_TYPE_CHECK_RETURN
1702#undef EINA_VALUE_TYPE_CHECK_RETURN_VAL
1703#undef EINA_VALUE_TYPE_DISPATCH
1704#undef EINA_VALUE_TYPE_DISPATCH_RETURN
1705#endif
diff --git a/libraries/eina/src/include/eina_inlist.h b/libraries/eina/src/include/eina_inlist.h
index 1b3ab27..cfb3159 100644
--- a/libraries/eina/src/include/eina_inlist.h
+++ b/libraries/eina/src/include/eina_inlist.h
@@ -25,7 +25,7 @@
25#include <stddef.h> 25#include <stddef.h>
26 26
27/** 27/**
28 * @page inlist_01_example_page Eina_Inlist basic usage 28 * @page eina_inlist_01_example_page Eina_Inlist basic usage
29 * @dontinclude eina_inlist_01.c 29 * @dontinclude eina_inlist_01.c
30 * 30 *
31 * To see the full source for this example, click here: @ref 31 * To see the full source for this example, click here: @ref
@@ -111,7 +111,7 @@
111 */ 111 */
112 112
113/** 113/**
114 * @page inlist_02_example_page Eina_Inlist advanced usage - lists and inlists 114 * @page eina_inlist_02_example_page Eina_Inlist advanced usage - lists and inlists
115 * @dontinclude eina_inlist_02.c 115 * @dontinclude eina_inlist_02.c
116 * 116 *
117 * This example describes the usage of @ref Eina_Inlist mixed with @ref 117 * This example describes the usage of @ref Eina_Inlist mixed with @ref
@@ -120,7 +120,7 @@
120 * from this normal list. 120 * from this normal list.
121 * 121 *
122 * The struct that is going to be used is the same used in @ref 122 * The struct that is going to be used is the same used in @ref
123 * inlist_01_example_page , since we still need the @ref EINA_INLIST macro to 123 * eina_inlist_01_example_page , since we still need the @ref EINA_INLIST macro to
124 * declare the inlist node info: 124 * declare the inlist node info:
125 * 125 *
126 * @skip struct 126 * @skip struct
@@ -184,7 +184,7 @@
184 */ 184 */
185 185
186/** 186/**
187 * @page inlist_03_example_page Eina_Inlist advanced usage - multi-inlists 187 * @page eina_inlist_03_example_page Eina_Inlist advanced usage - multi-inlists
188 * @dontinclude eina_inlist_03.c 188 * @dontinclude eina_inlist_03.c
189 * 189 *
190 * This example describes the usage of multiple inlists storing the same data. 190 * This example describes the usage of multiple inlists storing the same data.
@@ -315,7 +315,7 @@
315 * exactly what type this list is. 315 * exactly what type this list is.
316 * 316 *
317 * A simple example demonstrating the basic usage of an inlist can be found 317 * A simple example demonstrating the basic usage of an inlist can be found
318 * here: @ref inlist_01_example_page 318 * here: @ref eina_inlist_01_example_page
319 * 319 *
320 * @section inlist_algo Algorithm 320 * @section inlist_algo Algorithm
321 * 321 *
@@ -368,9 +368,9 @@
368 * @ref inlist_03_example_page 368 * @ref inlist_03_example_page
369 * 369 *
370 * List of examples: 370 * List of examples:
371 * @li @ref inlist_01_example_page 371 * @li @ref eina_inlist_01_example_page
372 * @li @ref inlist_02_example_page 372 * @li @ref eina_inlist_02_example_page
373 * @li @ref inlist_03_example_page 373 * @li @ref eina_inlist_03_example_page
374 */ 374 */
375 375
376/** 376/**
@@ -428,17 +428,17 @@ struct _Eina_Inlist
428 * Add a new node to end of a list. 428 * Add a new node to end of a list.
429 * 429 *
430 * @note this code is meant to be fast: appends are O(1) and do not 430 * @note this code is meant to be fast: appends are O(1) and do not
431 * walk @a list. 431 * walk @a in_list.
432 * 432 *
433 * @note @a new_l is considered to be in no list. If it was in another 433 * @note @a in_item is considered to be in no list. If it was in another
434 * list before, eina_inlist_remove() it before adding. No 434 * list before, eina_inlist_remove() it before adding. No
435 * check of @a new_l prev and next pointers is done, so it's safe 435 * check of @a new_l prev and next pointers is done, so it's safe
436 * to have them uninitialized. 436 * to have them uninitialized.
437 * 437 *
438 * @param list existing list head or NULL to create a new list. 438 * @param in_list existing list head or NULL to create a new list.
439 * @param new_l new list node, must not be NULL. 439 * @param in_item new list node, must not be NULL.
440 * 440 *
441 * @return the new list head. Use it and not @a list anymore. 441 * @return the new list head. Use it and not @a in_list anymore.
442 */ 442 */
443EAPI Eina_Inlist *eina_inlist_append(Eina_Inlist *in_list, 443EAPI Eina_Inlist *eina_inlist_append(Eina_Inlist *in_list,
444 Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; 444 Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT;
@@ -447,17 +447,17 @@ EAPI Eina_Inlist *eina_inlist_append(Eina_Inlist *in_list,
447 * Add a new node to beginning of list. 447 * Add a new node to beginning of list.
448 * 448 *
449 * @note this code is meant to be fast: appends are O(1) and do not 449 * @note this code is meant to be fast: appends are O(1) and do not
450 * walk @a list. 450 * walk @a in_list.
451 * 451 *
452 * @note @a new_l is considered to be in no list. If it was in another 452 * @note @a new_l is considered to be in no list. If it was in another
453 * list before, eina_inlist_remove() it before adding. No 453 * list before, eina_inlist_remove() it before adding. No
454 * check of @a new_l prev and next pointers is done, so it's safe 454 * check of @a new_l prev and next pointers is done, so it's safe
455 * to have them uninitialized. 455 * to have them uninitialized.
456 * 456 *
457 * @param list existing list head or NULL to create a new list. 457 * @param in_list existing list head or NULL to create a new list.
458 * @param new_l new list node, must not be NULL. 458 * @param in_item new list node, must not be NULL.
459 * 459 *
460 * @return the new list head. Use it and not @a list anymore. 460 * @return the new list head. Use it and not @a in_list anymore.
461 */ 461 */
462EAPI Eina_Inlist *eina_inlist_prepend(Eina_Inlist *in_list, 462EAPI Eina_Inlist *eina_inlist_prepend(Eina_Inlist *in_list,
463 Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; 463 Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT;
@@ -466,21 +466,21 @@ EAPI Eina_Inlist *eina_inlist_prepend(Eina_Inlist *in_list,
466 * Add a new node after the given relative item in list. 466 * Add a new node after the given relative item in list.
467 * 467 *
468 * @note this code is meant to be fast: appends are O(1) and do not 468 * @note this code is meant to be fast: appends are O(1) and do not
469 * walk @a list. 469 * walk @a in_list.
470 * 470 *
471 * @note @a new_l is considered to be in no list. If it was in another 471 * @note @a in_item_l is considered to be in no list. If it was in another
472 * list before, eina_inlist_remove() it before adding. No 472 * list before, eina_inlist_remove() it before adding. No
473 * check of @a new_l prev and next pointers is done, so it's safe 473 * check of @a in_item prev and next pointers is done, so it's safe
474 * to have them uninitialized. 474 * to have them uninitialized.
475 * 475 *
476 * @note @a relative is considered to be inside @a list, no checks are 476 * @note @a in_relative is considered to be inside @a in_list, no checks are
477 * done to confirm that and giving nodes from different lists 477 * done to confirm that and giving nodes from different lists
478 * will lead to problems. Giving NULL @a relative is the same as 478 * will lead to problems. Giving NULL @a in_relative is the same as
479 * eina_list_append(). 479 * eina_list_append().
480 * 480 *
481 * @param list existing list head or NULL to create a new list. 481 * @param in_list existing list head or NULL to create a new list.
482 * @param new_l new list node, must not be NULL. 482 * @param in_item new list node, must not be NULL.
483 * @param relative reference node, @a new_l will be added after it. 483 * @param in_relative reference node, @a in_item will be added after it.
484 * 484 *
485 * @return the new list head. Use it and not @a list anymore. 485 * @return the new list head. Use it and not @a list anymore.
486 */ 486 */
@@ -492,23 +492,23 @@ EAPI Eina_Inlist *eina_inlist_append_relative(Eina_Inlist *in_list,
492 * Add a new node before the given relative item in list. 492 * Add a new node before the given relative item in list.
493 * 493 *
494 * @note this code is meant to be fast: appends are O(1) and do not 494 * @note this code is meant to be fast: appends are O(1) and do not
495 * walk @a list. 495 * walk @a in_list.
496 * 496 *
497 * @note @a new_l is considered to be in no list. If it was in another 497 * @note @a in_item is considered to be in no list. If it was in another
498 * list before, eina_inlist_remove() it before adding. No 498 * list before, eina_inlist_remove() it before adding. No
499 * check of @a new_l prev and next pointers is done, so it's safe 499 * check of @a in_item prev and next pointers is done, so it's safe
500 * to have them uninitialized. 500 * to have them uninitialized.
501 * 501 *
502 * @note @a relative is considered to be inside @a list, no checks are 502 * @note @a in_relative is considered to be inside @a in_list, no checks are
503 * done to confirm that and giving nodes from different lists 503 * done to confirm that and giving nodes from different lists
504 * will lead to problems. Giving NULL @a relative is the same as 504 * will lead to problems. Giving NULL @a in_relative is the same as
505 * eina_list_prepend(). 505 * eina_list_prepend().
506 * 506 *
507 * @param list existing list head or NULL to create a new list. 507 * @param in_list existing list head or NULL to create a new list.
508 * @param new_l new list node, must not be NULL. 508 * @param in_item new list node, must not be NULL.
509 * @param relative reference node, @a new_l will be added before it. 509 * @param in_relative reference node, @a in_item will be added before it.
510 * 510 *
511 * @return the new list head. Use it and not @a list anymore. 511 * @return the new list head. Use it and not @a in_list anymore.
512 */ 512 */
513EAPI Eina_Inlist *eina_inlist_prepend_relative(Eina_Inlist *in_list, 513EAPI Eina_Inlist *eina_inlist_prepend_relative(Eina_Inlist *in_list,
514 Eina_Inlist *in_item, 514 Eina_Inlist *in_item,
@@ -520,14 +520,14 @@ EAPI Eina_Inlist *eina_inlist_prepend_relative(Eina_Inlist *in_list,
520 * @note this code is meant to be fast: appends are O(1) and do not 520 * @note this code is meant to be fast: appends are O(1) and do not
521 * walk @a list. 521 * walk @a list.
522 * 522 *
523 * @note @a item is considered to be inside @a list, no checks are 523 * @note @a in_item is considered to be inside @a in_list, no checks are
524 * done to confirm that and giving nodes from different lists 524 * done to confirm that and giving nodes from different lists
525 * will lead to problems, especially if @a item is the head since 525 * will lead to problems, especially if @a in_item is the head since
526 * it will be different from @a list and the wrong new head will 526 * it will be different from @a list and the wrong new head will
527 * be returned. 527 * be returned.
528 * 528 *
529 * @param list existing list head, must not be NULL. 529 * @param in_list existing list head, must not be NULL.
530 * @param item existing list node, must not be NULL. 530 * @param in_item existing list node, must not be NULL.
531 * 531 *
532 * @return the new list head. Use it and not @a list anymore. 532 * @return the new list head. Use it and not @a list anymore.
533 */ 533 */
@@ -540,10 +540,10 @@ EAPI Eina_Inlist *eina_inlist_remove(Eina_Inlist *in_list,
540 * @warning this is an expensive call and has O(n) cost, possibly 540 * @warning this is an expensive call and has O(n) cost, possibly
541 * walking the whole list. 541 * walking the whole list.
542 * 542 *
543 * @param list existing list to search @a item in, must not be NULL. 543 * @param in_list existing list to search @a in_item in, must not be NULL.
544 * @param item what to search for, must not be NULL. 544 * @param in_item what to search for, must not be NULL.
545 * 545 *
546 * @return @a item if found, NULL if not. 546 * @return @a in_item if found, NULL if not.
547 */ 547 */
548EAPI Eina_Inlist *eina_inlist_find(Eina_Inlist *in_list, 548EAPI Eina_Inlist *eina_inlist_find(Eina_Inlist *in_list,
549 Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; 549 Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT;
@@ -603,11 +603,11 @@ EAPI unsigned int eina_inlist_count(const Eina_Inlist *list) EINA_WARN_UNUSED_
603/** 603/**
604 * @brief Returns a new iterator associated to @a list. 604 * @brief Returns a new iterator associated to @a list.
605 * 605 *
606 * @param list The list. 606 * @param in_list The list.
607 * @return A new iterator. 607 * @return A new iterator.
608 * 608 *
609 * This function returns a newly allocated iterator associated to @p 609 * This function returns a newly allocated iterator associated to @p
610 * list. If @p list is @c NULL or the count member of @p list is less 610 * in_list. If @p in_list is @c NULL or the count member of @p in_list is less
611 * or equal than 0, this function still returns a valid iterator that 611 * or equal than 0, this function still returns a valid iterator that
612 * will always return false on eina_iterator_next(), thus keeping API 612 * will always return false on eina_iterator_next(), thus keeping API
613 * sane. 613 * sane.
@@ -625,13 +625,13 @@ EAPI Eina_Iterator *eina_inlist_iterator_new(const Eina_Inlist *in_list) EINA_MA
625/** 625/**
626 * @brief Returns a new accessor associated to a list. 626 * @brief Returns a new accessor associated to a list.
627 * 627 *
628 * @param list The list. 628 * @param in_list The list.
629 * @return A new accessor. 629 * @return A new accessor.
630 * 630 *
631 * This function returns a newly allocated accessor associated to 631 * This function returns a newly allocated accessor associated to
632 * @p list. If @p list is @c NULL or the count member of @p list is 632 * @p in_list. If @p in_list is @c NULL or the count member of @p in_list is
633 * less or equal than 0, this function returns NULL. If the memory can 633 * less or equal than 0, this function returns @c NULL. If the memory can
634 * not be allocated, NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is 634 * not be allocated, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is
635 * set. Otherwise, a valid accessor is returned. 635 * set. Otherwise, a valid accessor is returned.
636 */ 636 */
637EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MALLOC EINA_WARN_UNUSED_RESULT; 637EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
@@ -728,13 +728,13 @@ EAPI Eina_Inlist *eina_inlist_sorted_state_insert(Eina_Inlist *list,
728/** 728/**
729 * @brief Sort a list according to the ordering func will return. 729 * @brief Sort a list according to the ordering func will return.
730 * 730 *
731 * @param list The list handle to sort. 731 * @param head The list handle to sort.
732 * @param func A function pointer that can handle comparing the list data 732 * @param func A function pointer that can handle comparing the list data
733 * nodes. 733 * nodes.
734 * @return the new head of list. 734 * @return the new head of list.
735 * 735 *
736 * This function sorts all the elements of @p list. @p func is used to 736 * This function sorts all the elements of @p head. @p func is used to
737 * compare two elements of @p list. If @p list or @p func are @c NULL, 737 * compare two elements of @p head. If @p head or @p func are @c NULL,
738 * this function returns @c NULL. 738 * this function returns @c NULL.
739 * 739 *
740 * @note @b in-place: this will change the given list, so you should 740 * @note @b in-place: this will change the given list, so you should
@@ -787,6 +787,7 @@ EAPI Eina_Inlist *eina_inlist_sort(Eina_Inlist *head, Eina_Compare_Cb func);
787 _EINA_INLIST_OFFSET(ref)) 787 _EINA_INLIST_OFFSET(ref))
788#endif 788#endif
789 789
790/** Macro to iterate over an inlist */
790#define EINA_INLIST_FOREACH(list, l) \ 791#define EINA_INLIST_FOREACH(list, l) \
791 for (l = NULL, l = (list ? _EINA_INLIST_CONTAINER(l, list) : NULL); l; \ 792 for (l = NULL, l = (list ? _EINA_INLIST_CONTAINER(l, list) : NULL); l; \
792 l = (EINA_INLIST_GET(l)->next ? _EINA_INLIST_CONTAINER(l, EINA_INLIST_GET(l)->next) : NULL)) 793 l = (EINA_INLIST_GET(l)->next ? _EINA_INLIST_CONTAINER(l, EINA_INLIST_GET(l)->next) : NULL))
diff --git a/libraries/eina/src/include/eina_iterator.h b/libraries/eina/src/include/eina_iterator.h
index 1c8e6ce..10a9ece 100644
--- a/libraries/eina/src/include/eina_iterator.h
+++ b/libraries/eina/src/include/eina_iterator.h
@@ -25,7 +25,7 @@
25#include "eina_magic.h" 25#include "eina_magic.h"
26 26
27/** 27/**
28 * @page eina_iterator_example Eina_Iterator usage 28 * @page eina_iterator_example_page Eina_Iterator usage
29 * @dontinclude eina_iterator_01.c 29 * @dontinclude eina_iterator_01.c
30 * 30 *
31 * As always when using eina we need to include it: 31 * As always when using eina we need to include it:
@@ -48,7 +48,7 @@
48 * @until eina_init 48 * @until eina_init
49 * 49 *
50 * Next we populate both an array and a list with our strings, for more details 50 * Next we populate both an array and a list with our strings, for more details
51 * see @ref eina_list_01_example and @ref eina_array_01_example: 51 * see @ref eina_list_01_example_page and @ref eina_array_01_example_page :
52 * @until } 52 * @until }
53 * 53 *
54 * And now we create an array and because the first element of the container 54 * And now we create an array and because the first element of the container
@@ -63,7 +63,7 @@
63 * iterator itself: 63 * iterator itself:
64 * @until eina_iterator_free 64 * @until eina_iterator_free
65 * 65 *
66 * But so far you're not impressed in @ref eina_array_01_example an array is 66 * But so far you're not impressed in @ref eina_array_01_example_page an array is
67 * also printed, so now we go to the cool stuff and use an iterator to do same 67 * also printed, so now we go to the cool stuff and use an iterator to do same
68 * stuff to a list: 68 * stuff to a list:
69 * @until eina_iterator_free 69 * @until eina_iterator_free
@@ -99,7 +99,7 @@
99 * eina_iterator_next(). To call a function on all the elements of a 99 * eina_iterator_next(). To call a function on all the elements of a
100 * container, use eina_iterator_foreach(). 100 * container, use eina_iterator_foreach().
101 * 101 *
102 * Here an @ref eina_iterator_example "example" 102 * Here an @ref eina_iterator_example_page "example"
103 */ 103 */
104 104
105/** 105/**
diff --git a/libraries/eina/src/include/eina_list.h b/libraries/eina/src/include/eina_list.h
index 8a8f25e..db65e17 100644
--- a/libraries/eina/src/include/eina_list.h
+++ b/libraries/eina/src/include/eina_list.h
@@ -29,7 +29,7 @@
29#include "eina_magic.h" 29#include "eina_magic.h"
30 30
31/** 31/**
32 * @page list_01_example_page Adding elements to Eina_List 32 * @page eina_list_01_example_page Adding elements to Eina_List
33 * @dontinclude eina_list_01.c 33 * @dontinclude eina_list_01.c
34 * 34 *
35 * Creating an @ref Eina_List and adding elements to it is very easy and can be 35 * Creating an @ref Eina_List and adding elements to it is very easy and can be
@@ -99,11 +99,11 @@
99 */ 99 */
100 100
101/** 101/**
102 * @page list_02_example_page Sorting Eina_List elements 102 * @page eina_list_02_example_page Sorting Eina_List elements
103 * @dontinclude eina_list_02.c 103 * @dontinclude eina_list_02.c
104 * 104 *
105 * If you don't know how to create lists see 105 * If you don't know how to create lists see
106 * @ref list_01_example_page. 106 * @ref eina_list_01_example_page.
107 * 107 *
108 * @skip #include 108 * @skip #include
109 * @until boomer 109 * @until boomer
@@ -151,11 +151,11 @@
151 */ 151 */
152 152
153/** 153/**
154 * @page list_03_example_page Reordering Eina_List elments 154 * @page eina_list_03_example_page Reordering Eina_List elments
155 * @dontinclude eina_list_03.c 155 * @dontinclude eina_list_03.c
156 * 156 *
157 * If you don't know how to create lists see 157 * If you don't know how to create lists see
158 * @ref list_01_example_page. 158 * @ref eina_list_01_example_page.
159 * 159 *
160 * We start out with code that should be familiar by now: 160 * We start out with code that should be familiar by now:
161 * @skip #include 161 * @skip #include
@@ -197,12 +197,12 @@
197 */ 197 */
198 198
199/** 199/**
200 * @page list_04_example_page Eina_List and memory allocation 200 * @page eina_list_04_example_page Eina_List and memory allocation
201 * @dontinclude eina_list_04.c 201 * @dontinclude eina_list_04.c
202 * 202 *
203 * If you don't know how to create lists see 203 * If you don't know how to create lists see
204 * @ref list_01_example_page. In this example we also use 204 * @ref eina_list_01_example_page. In this example we also use
205 * @ref eina_stringshare, however it should be possible to understand the code 205 * @ref Eina_Stringshare_Group, however it should be possible to understand the code
206 * regardless of previous knowledge about it. 206 * regardless of previous knowledge about it.
207 * 207 *
208 * Here we have the usual list creation code with a twist, now we are using as 208 * Here we have the usual list creation code with a twist, now we are using as
@@ -276,10 +276,10 @@
276 * list as the list! 276 * list as the list!
277 * 277 *
278 * Here are some examples of @ref Eina_List usage: 278 * Here are some examples of @ref Eina_List usage:
279 * @li @ref list_01_example_page 279 * @li @ref eina_list_01_example_page
280 * @li @ref list_02_example_page 280 * @li @ref eina_list_02_example_page
281 * @li @ref list_03_example_page 281 * @li @ref eina_list_03_example_page
282 * @li @ref list_04_example_page 282 * @li @ref eina_list_04_example_page
283 */ 283 */
284 284
285/** 285/**
@@ -582,7 +582,7 @@ EAPI Eina_List *eina_list_remove(Eina_List *list, const void *data) E
582 582
583 583
584/** 584/**
585 * @brief Remove the specified data. 585 * @brief Remove the specified list node.
586 * 586 *
587 * @param list The given linked list. 587 * @param list The given linked list.
588 * @param remove_list The list node which is to be removed. 588 * @param remove_list The list node which is to be removed.
diff --git a/libraries/eina/src/include/eina_lock.h b/libraries/eina/src/include/eina_lock.h
index 7c26dc0..16f4314 100644
--- a/libraries/eina/src/include/eina_lock.h
+++ b/libraries/eina/src/include/eina_lock.h
@@ -81,6 +81,10 @@ static inline void eina_tls_free(Eina_TLS key);
81static inline void *eina_tls_get(Eina_TLS key); 81static inline void *eina_tls_get(Eina_TLS key);
82static inline Eina_Bool eina_tls_set(Eina_TLS key, const void *data); 82static inline Eina_Bool eina_tls_set(Eina_TLS key, const void *data);
83 83
84static inline Eina_Bool eina_semaphore_new(Eina_Semaphore *sem, int count_init);
85static inline Eina_Bool eina_semaphore_free(Eina_Semaphore *sem);
86static inline Eina_Bool eina_semaphore_lock(Eina_Semaphore *sem);
87static inline Eina_Bool eina_semaphore_release(Eina_Semaphore *sem, int count_release);
84 88
85#ifdef EINA_HAVE_DEBUG_THREADS 89#ifdef EINA_HAVE_DEBUG_THREADS
86# define EINA_MAIN_LOOP_CHECK_RETURN_VAL(val) \ 90# define EINA_MAIN_LOOP_CHECK_RETURN_VAL(val) \
diff --git a/libraries/eina/src/include/eina_log.h b/libraries/eina/src/include/eina_log.h
index 5cd7c59..186397d 100644
--- a/libraries/eina/src/include/eina_log.h
+++ b/libraries/eina/src/include/eina_log.h
@@ -21,6 +21,7 @@
21 21
22#include <stdlib.h> 22#include <stdlib.h>
23#include <stdarg.h> 23#include <stdarg.h>
24#include <sys/types.h>
24 25
25#include "eina_types.h" 26#include "eina_types.h"
26 27
@@ -297,22 +298,27 @@ EAPI extern int EINA_LOG_DOMAIN_GLOBAL;
297 * paths. Never define @c EINA_LOG_LEVEL_MAXIMUM on public 298 * paths. Never define @c EINA_LOG_LEVEL_MAXIMUM on public
298 * header files. 299 * header files.
299 */ 300 */
300#ifdef EINA_LOG_LEVEL_MAXIMUM 301#ifdef EINA_ENABLE_LOG
301#define EINA_LOG(DOM, LEVEL, fmt, ...) \ 302# ifdef EINA_LOG_LEVEL_MAXIMUM
302 do { \ 303# define EINA_LOG(DOM, LEVEL, fmt, ...) \
303 if (LEVEL <= EINA_LOG_LEVEL_MAXIMUM) { \ 304 do { \
304 eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, \ 305 if (LEVEL <= EINA_LOG_LEVEL_MAXIMUM) { \
305 fmt, ## __VA_ARGS__); } \ 306 eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, \
306 } while (0) 307 fmt, ## __VA_ARGS__); } \
307#else 308 } while (0)
308#define EINA_LOG(DOM, LEVEL, fmt, ...) \ 309# else
309 eina_log_print(DOM, \ 310# define EINA_LOG(DOM, LEVEL, fmt, ...) \
310 LEVEL, \ 311 eina_log_print(DOM, \
311 __FILE__, \ 312 LEVEL, \
312 __FUNCTION__, \ 313 __FILE__, \
313 __LINE__, \ 314 __FUNCTION__, \
314 fmt, \ 315 __LINE__, \
316 fmt, \
315 ## __VA_ARGS__) 317 ## __VA_ARGS__)
318# endif
319#else
320#define EINA_LOG(DOM, LEVEL, fmt, ...) \
321 do { (void) DOM; (void) LEVEL; (void) fmt; } while (0)
316#endif 322#endif
317 323
318/** 324/**
@@ -726,7 +732,7 @@ EAPI void eina_log_domain_unregister(int domain);
726 * specified value (eina_log_level_set() or environment 732 * specified value (eina_log_level_set() or environment
727 * variables EINA_LOG_LEVEL, EINA_LOG_LEVELS) will be ignored. 733 * variables EINA_LOG_LEVEL, EINA_LOG_LEVELS) will be ignored.
728 * @param file filename that originated the call, must @b not be @c NULL. 734 * @param file filename that originated the call, must @b not be @c NULL.
729 * @param fnc function that originated the call, must @b not be @c NULL. 735 * @param function function that originated the call, must @b not be @c NULL.
730 * @param line originating line in @a file. 736 * @param line originating line in @a file.
731 * @param fmt printf-like format to use. Should not provide trailing 737 * @param fmt printf-like format to use. Should not provide trailing
732 * '\n' as it is automatically included. 738 * '\n' as it is automatically included.
@@ -780,7 +786,7 @@ EAPI void eina_log_vprint(int domain,
780 */ 786 */
781 787
782/** 788/**
783 * Alternative logging method, this will output to standard output stream. 789 * @brief Alternative logging method, this will output to standard output stream.
784 * 790 *
785 * @param d The domain. 791 * @param d The domain.
786 * @param level The level. 792 * @param level The level.
@@ -815,7 +821,16 @@ EAPI void eina_log_print_cb_stdout(const Eina_Log_Domain *d,
815 va_list args); 821 va_list args);
816 822
817/** 823/**
818 * Default logging method, this will output to standard error stream. 824 * @brief Default logging method, this will output to standard error stream.
825 *
826 * @param d The domain.
827 * @param level The level.
828 * @param file The file which is logged.
829 * @param fnc The function which is logged.
830 * @param line The line which is logged.
831 * @param fmt The ouptut format to use.
832 * @param data Not used.
833 * @param args The arguments needed by the format.
819 * 834 *
820 * This method will colorize output based on domain provided color and 835 * This method will colorize output based on domain provided color and
821 * message logging level. 836 * message logging level.
diff --git a/libraries/eina/src/include/eina_magic.h b/libraries/eina/src/include/eina_magic.h
index 44cd4e9..d4909d8 100644
--- a/libraries/eina/src/include/eina_magic.h
+++ b/libraries/eina/src/include/eina_magic.h
@@ -21,6 +21,7 @@
21 21
22#include "eina_config.h" 22#include "eina_config.h"
23#include "eina_types.h" 23#include "eina_types.h"
24#include "eina_error.h"
24 25
25/** 26/**
26 * @page eina_magic_example_01_page 27 * @page eina_magic_example_01_page
@@ -200,6 +201,13 @@ EAPI Eina_Bool eina_magic_string_static_set(Eina_Magic magic,
200 */ 201 */
201#define EINA_MAGIC_NONE 0x1234fedc 202#define EINA_MAGIC_NONE 0x1234fedc
202 203
204/**
205 * @var EINA_ERROR_MAGIC_FAILED
206 * Error identifier corresponding to magic check failure.
207 */
208EAPI extern Eina_Error EINA_ERROR_MAGIC_FAILED;
209
210
203#ifdef EINA_MAGIC_DEBUG 211#ifdef EINA_MAGIC_DEBUG
204 212
205/** 213/**
diff --git a/libraries/eina/src/include/eina_main.h b/libraries/eina/src/include/eina_main.h
index fa34d59..4baf40e 100644
--- a/libraries/eina/src/include/eina_main.h
+++ b/libraries/eina/src/include/eina_main.h
@@ -50,7 +50,7 @@
50 * @def EINA_VERSION_MINOR 50 * @def EINA_VERSION_MINOR
51 * @brief Minor version of Eina 51 * @brief Minor version of Eina
52 */ 52 */
53#define EINA_VERSION_MINOR 0 53#define EINA_VERSION_MINOR 2
54 54
55/** 55/**
56 * @typedef Eina_Version 56 * @typedef Eina_Version
@@ -134,6 +134,9 @@ EAPI int eina_threads_shutdown(void);
134 134
135/** 135/**
136 * @brief Check if you are calling this function from the same thread Eina was initialized or not 136 * @brief Check if you are calling this function from the same thread Eina was initialized or not
137 *
138 * @return #EINA_TRUE is the calling function is the same thread, #EINA_FALSE otherwise.
139 *
137 * @since 1.1.0 140 * @since 1.1.0
138 * 141 *
139 * Most EFL function are not thread safe and all the call need to happen in 142 * Most EFL function are not thread safe and all the call need to happen in
diff --git a/libraries/eina/src/include/eina_module.h b/libraries/eina/src/include/eina_module.h
index 58e38f9..178fa9a 100644
--- a/libraries/eina/src/include/eina_module.h
+++ b/libraries/eina/src/include/eina_module.h
@@ -67,6 +67,10 @@
67 */ 67 */
68typedef struct _Eina_Module Eina_Module; 68typedef struct _Eina_Module Eina_Module;
69 69
70/**
71 * @typedef Eina_Module_Cb
72 * Dynamic module loader callback.
73 */
70typedef Eina_Bool (*Eina_Module_Cb)(Eina_Module *m, void *data); 74typedef Eina_Bool (*Eina_Module_Cb)(Eina_Module *m, void *data);
71 75
72/** 76/**
@@ -135,21 +139,21 @@ EAPI Eina_Module *
135/** 139/**
136 * @brief Delete a module. 140 * @brief Delete a module.
137 * 141 *
138 * @param m The module to delete. 142 * @param module The module to delete.
139 * @return EINA_TRUE on success, EINA_FALSE otherwise. 143 * @return EINA_TRUE on success, EINA_FALSE otherwise.
140 * 144 *
141 * This function calls eina_module_unload() if @p m has been previously 145 * This function calls eina_module_unload() if @p module has been previously
142 * loaded and frees the allocated memory. On success this function 146 * loaded and frees the allocated memory. On success this function
143 * returns EINA_TRUE and EINA_FALSE otherwise. If @p m is @c NULL, the 147 * returns EINA_TRUE and EINA_FALSE otherwise. If @p module is @c NULL, the
144 * function returns immediately. 148 * function returns immediately.
145 */ 149 */
146EAPI Eina_Bool 150EAPI Eina_Bool
147 eina_module_free(Eina_Module *m) EINA_ARG_NONNULL(1); 151 eina_module_free(Eina_Module *module) EINA_ARG_NONNULL(1);
148 152
149/** 153/**
150 * @brief Load a module. 154 * @brief Load a module.
151 * 155 *
152 * @param m The module to load. 156 * @param module The module to load.
153 * @return EINA_TRUE on success, EINA_FALSE otherwise. 157 * @return EINA_TRUE on success, EINA_FALSE otherwise.
154 * 158 *
155 * This function load the shared file object passed in 159 * This function load the shared file object passed in
@@ -160,7 +164,7 @@ EAPI Eina_Bool
160 * module can not be initialized, the error 164 * module can not be initialized, the error
161 * #EINA_ERROR_MODULE_INIT_FAILED is set and #EINA_FALSE is 165 * #EINA_ERROR_MODULE_INIT_FAILED is set and #EINA_FALSE is
162 * returned. If the module has already been loaded, it's refeence 166 * returned. If the module has already been loaded, it's refeence
163 * counter is increased by one and #EINA_TRUE is returned. If @p m is 167 * counter is increased by one and #EINA_TRUE is returned. If @p module is
164 * @c NULL, the function returns immediately #EINA_FALSE. 168 * @c NULL, the function returns immediately #EINA_FALSE.
165 * 169 *
166 * When the symbols of the shared file objetcts are not needed 170 * When the symbols of the shared file objetcts are not needed
@@ -172,29 +176,29 @@ EAPI Eina_Bool
172/** 176/**
173 * @brief Unload a module. 177 * @brief Unload a module.
174 * 178 *
175 * @param m The module to load. 179 * @param module The module to load.
176 * @return EINA_TRUE on success, EINA_FALSE otherwise. 180 * @return EINA_TRUE on success, EINA_FALSE otherwise.
177 * 181 *
178 * This function unload the module @p m that has been previously 182 * This function unload the module @p module that has been previously
179 * loaded by eina_module_load(). If the reference counter of @p m is 183 * loaded by eina_module_load(). If the reference counter of @p module is
180 * strictly greater than @c 1, #EINA_FALSE is returned. Otherwise, the 184 * strictly greater than @c 1, #EINA_FALSE is returned. Otherwise, the
181 * shared object file is closed and if it is a internal Eina module, it 185 * shared object file is closed and if it is a internal Eina module, it
182 * is shutted down just before. In that case, #EINA_TRUE is 186 * is shutted down just before. In that case, #EINA_TRUE is
183 * returned. In all case, the reference counter is decreased. If @p m 187 * returned. In all case, the reference counter is decreased. If @p module
184 * is @c NULL, the function returns immediately #EINA_FALSE. 188 * is @c NULL, the function returns immediately #EINA_FALSE.
185 */ 189 */
186EAPI Eina_Bool 190EAPI Eina_Bool
187 eina_module_unload(Eina_Module *m) EINA_ARG_NONNULL(1); 191 eina_module_unload(Eina_Module *module) EINA_ARG_NONNULL(1);
188 192
189/** 193/**
190 * @brief Retrive the data associated to a symbol. 194 * @brief Retrive the data associated to a symbol.
191 * 195 *
192 * @param m The module. 196 * @param module The module.
193 * @param symbol The symbol. 197 * @param symbol The symbol.
194 * @return The data associated to the symbol, or @c NULL on failure. 198 * @return The data associated to the symbol, or @c NULL on failure.
195 * 199 *
196 * This function returns the data associated to @p symbol of @p m. @p 200 * This function returns the data associated to @p symbol of @p module. @p
197 * m must have been loaded before with eina_module_load(). If @p m 201 * module must have been loaded before with eina_module_load(). If @p module
198 * is @c NULL, or if it has not been correctly loaded before, the 202 * is @c NULL, or if it has not been correctly loaded before, the
199 * function returns immediately @c NULL. 203 * function returns immediately @c NULL.
200 */ 204 */
@@ -204,15 +208,15 @@ EAPI void *
204/** 208/**
205 * @brief Return the file name associated to the module. 209 * @brief Return the file name associated to the module.
206 * 210 *
207 * @param m The module. 211 * @param module The module.
208 * @return The file name. 212 * @return The file name.
209 * 213 *
210 * This function returns the file name passed in eina_module_new(). If 214 * This function returns the file name passed in eina_module_new(). If
211 * @p m is @c NULL, the function returns immediately @c NULL. The 215 * @p module is @c NULL, the function returns immediately @c NULL. The
212 * returned value must no be freed. 216 * returned value must no be freed.
213 */ 217 */
214EAPI const char * 218EAPI const char *
215 eina_module_file_get(const Eina_Module *m) EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 219 eina_module_file_get(const Eina_Module *module) EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
216 220
217 221
218/** 222/**
@@ -256,6 +260,7 @@ EAPI char *
256 * @param array The array that stores the list of the modules. 260 * @param array The array that stores the list of the modules.
257 * @param path The directory's path to search for modules. 261 * @param path The directory's path to search for modules.
258 * @param arch The architecture string. 262 * @param arch The architecture string.
263 * @return The array of modules found in @p path matching @p arch.
259 * 264 *
260 * This function adds to @p array the module names found in @p path 265 * This function adds to @p array the module names found in @p path
261 * which match the cpu architecture @p arch. If @p path or @p arch is 266 * which match the cpu architecture @p arch. If @p path or @p arch is
@@ -273,6 +278,7 @@ EAPI Eina_Array *
273 * @param recursive Iterate recursively on the path. 278 * @param recursive Iterate recursively on the path.
274 * @param cb Callback function to call on each module. 279 * @param cb Callback function to call on each module.
275 * @param data Data passed to the callback function. 280 * @param data Data passed to the callback function.
281 * @return The array of modules found in @p path.
276 * 282 *
277 * This function adds to @p array the list of modules found in 283 * This function adds to @p array the list of modules found in
278 * @p path. If @p recursive is #EINA_TRUE, then recursive search is 284 * @p path. If @p recursive is #EINA_TRUE, then recursive search is
@@ -295,7 +301,7 @@ EAPI Eina_Array *
295 * @p array. If @p array is @c NULL, this function does nothing. 301 * @p array. If @p array is @c NULL, this function does nothing.
296 */ 302 */
297EAPI void 303EAPI void
298 eina_module_list_load(Eina_Array *list) EINA_ARG_NONNULL(1); 304 eina_module_list_load(Eina_Array *array) EINA_ARG_NONNULL(1);
299 305
300/** 306/**
301 * @brief Unload every module on the list of modules. 307 * @brief Unload every module on the list of modules.
@@ -306,7 +312,7 @@ EAPI void
306 * @p array. If @p array is @c NULL, this function does nothing. 312 * @p array. If @p array is @c NULL, this function does nothing.
307 */ 313 */
308EAPI void 314EAPI void
309 eina_module_list_unload(Eina_Array *list) EINA_ARG_NONNULL(1); 315 eina_module_list_unload(Eina_Array *array) EINA_ARG_NONNULL(1);
310 316
311/** 317/**
312 * @p Free every module on the list of modules. 318 * @p Free every module on the list of modules.
@@ -317,13 +323,14 @@ EAPI void
317 * @p array. If @p array is @c NULL, this function does nothing. 323 * @p array. If @p array is @c NULL, this function does nothing.
318 */ 324 */
319EAPI void 325EAPI void
320 eina_module_list_free(Eina_Array *list) EINA_ARG_NONNULL(1); 326 eina_module_list_free(Eina_Array *array) EINA_ARG_NONNULL(1);
321 327
322/** 328/**
323 * @brief Find an module in array. 329 * @brief Find an module in array.
324 * 330 *
325 * @param array The array to find the module. 331 * @param array The array to find the module.
326 * @param module The name of module to be searched. 332 * @param module The name of module to be searched.
333 * @return The module to find on success, @c NULL otherwise.
327 * 334 *
328 * This function finds an @p module in @p array. 335 * This function finds an @p module in @p array.
329 * If the element is found the function returns the module, else 336 * If the element is found the function returns the module, else
diff --git a/libraries/eina/src/include/eina_simple_xml_parser.h b/libraries/eina/src/include/eina_simple_xml_parser.h
index db9a4e1..78660ef 100644
--- a/libraries/eina/src/include/eina_simple_xml_parser.h
+++ b/libraries/eina/src/include/eina_simple_xml_parser.h
@@ -119,16 +119,16 @@ struct _Eina_Simple_XML_Node_Data
119 119
120typedef enum _Eina_Simple_XML_Type 120typedef enum _Eina_Simple_XML_Type
121{ 121{
122 EINA_SIMPLE_XML_OPEN = 0, /* <tag attribute="value"> */ 122 EINA_SIMPLE_XML_OPEN = 0, /*!< <tag attribute="value"> */
123 EINA_SIMPLE_XML_OPEN_EMPTY, /* <tag attribute="value" /> */ 123 EINA_SIMPLE_XML_OPEN_EMPTY, /*!< <tag attribute="value" /> */
124 EINA_SIMPLE_XML_CLOSE, /* </tag> */ 124 EINA_SIMPLE_XML_CLOSE, /*!< </tag> */
125 EINA_SIMPLE_XML_DATA, /* tag text data */ 125 EINA_SIMPLE_XML_DATA, /*!< tag text data */
126 EINA_SIMPLE_XML_CDATA, /* <![CDATA[something]]> */ 126 EINA_SIMPLE_XML_CDATA, /*!< <![CDATA[something]]> */
127 EINA_SIMPLE_XML_ERROR, /* error contents */ 127 EINA_SIMPLE_XML_ERROR, /*!< error contents */
128 EINA_SIMPLE_XML_PROCESSING, /* <?xml ... ?> <?php .. ?> */ 128 EINA_SIMPLE_XML_PROCESSING, /*!< <?xml ... ?> <?php .. ?> */
129 EINA_SIMPLE_XML_DOCTYPE, /* <!DOCTYPE html */ 129 EINA_SIMPLE_XML_DOCTYPE, /*!< <!DOCTYPE html */
130 EINA_SIMPLE_XML_COMMENT, /* <!-- something --> */ 130 EINA_SIMPLE_XML_COMMENT, /*!< <!-- something --> */
131 EINA_SIMPLE_XML_IGNORED /* whatever is ignored by parser, like whitespace */ 131 EINA_SIMPLE_XML_IGNORED /*!< whatever is ignored by parser, like whitespace */
132} Eina_Simple_XML_Type; 132} Eina_Simple_XML_Type;
133 133
134typedef Eina_Bool (*Eina_Simple_XML_Cb)(void *data, Eina_Simple_XML_Type type, const char *content, unsigned offset, unsigned length); 134typedef Eina_Bool (*Eina_Simple_XML_Cb)(void *data, Eina_Simple_XML_Type type, const char *content, unsigned offset, unsigned length);
@@ -137,7 +137,7 @@ typedef Eina_Bool (*Eina_Simple_XML_Attribute_Cb)(void *data, const char *key, c
137 137
138/** 138/**
139 * Parse a section of XML string text 139 * Parse a section of XML string text
140 * 140 *
141 * @param buf the input string. May not contain \0 terminator. 141 * @param buf the input string. May not contain \0 terminator.
142 * @param buflen the input string size. 142 * @param buflen the input string size.
143 * @param strip whenever this parser should strip leading and trailing 143 * @param strip whenever this parser should strip leading and trailing
@@ -164,12 +164,15 @@ EAPI Eina_Bool eina_simple_xml_parse(const char *buf, unsigned buflen,
164/** 164/**
165 * Given the contents of a tag, find where the attributes start. 165 * Given the contents of a tag, find where the attributes start.
166 * 166 *
167 * The tag contents is returned by eina_simple_xml_parse() when 167 * @param buf the input string. May not contain \0 terminator.
168 * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY. 168 * @param buflen the input string size.
169 *
170 * @return pointer to the start of attributes, it can be used 169 * @return pointer to the start of attributes, it can be used
171 * to feed eina_simple_xml_attributes_parse(). NULL is returned 170 * to feed eina_simple_xml_attributes_parse(). NULL is returned
172 * if no attributes were found. 171 * if no attributes were found.
172 *
173 * The tag contents is returned by eina_simple_xml_parse() when
174 * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY.
175 *
173 */ 176 */
174EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsigned buflen); 177EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsigned buflen);
175 178
@@ -183,6 +186,7 @@ EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsigned
183 * key (null-terminated) and the last is the value (null 186 * key (null-terminated) and the last is the value (null
184 * terminated). These strings should not be modified and 187 * terminated). These strings should not be modified and
185 * reference is just valid until the function return. 188 * reference is just valid until the function return.
189 * @param data data to pass to the callback function.
186 * 190 *
187 * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or 191 * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or
188 * parsing error. 192 * parsing error.
@@ -238,8 +242,8 @@ EAPI void eina_simple_xml_node_tag_free(Eina_Simple_XML_Node_Tag *tag);
238 * 242 *
239 * @param parent if provided, will be set in the resulting structure 243 * @param parent if provided, will be set in the resulting structure
240 * as well as the data will be appended to children list. 244 * as well as the data will be appended to children list.
241 * @param content string to be used. Must not be NULL. 245 * @param contents string to be used. Must not be NULL.
242 * @param length size in bytes of @a content. 246 * @param length size in bytes of @a contents.
243 * 247 *
244 * @return newly allocated memory or NULL on error. This memory should be 248 * @return newly allocated memory or NULL on error. This memory should be
245 * released with eina_simple_xml_node_data_free() or indirectly 249 * released with eina_simple_xml_node_data_free() or indirectly
@@ -250,7 +254,7 @@ EAPI Eina_Simple_XML_Node_Data * eina_simple_xml_node_data_new(Eina_Simple_XML_N
250/** 254/**
251 * Remove data from parent and delete it. 255 * Remove data from parent and delete it.
252 * 256 *
253 * @param data to release memory. 257 * @param node to release memory.
254 */ 258 */
255EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node); 259EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node);
256 260
@@ -260,7 +264,7 @@ EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node);
260 * 264 *
261 * @param parent if provided, will be set in the resulting structure 265 * @param parent if provided, will be set in the resulting structure
262 * as well as the cdata will be appended to children list. 266 * as well as the cdata will be appended to children list.
263 * @param content string to be used. Must not be NULL. 267 * @param contents string to be used. Must not be NULL.
264 * @param length size in bytes of @a content. 268 * @param length size in bytes of @a content.
265 * 269 *
266 * @return newly allocated memory or NULL on error. This memory should be 270 * @return newly allocated memory or NULL on error. This memory should be
@@ -272,7 +276,7 @@ EAPI Eina_Simple_XML_Node_CData * eina_simple_xml_node_cdata_new(Eina_Simple_XML
272/** 276/**
273 * Remove cdata from parent and delete it. 277 * Remove cdata from parent and delete it.
274 * 278 *
275 * @param cdata to release memory. 279 * @param node to release memory.
276 */ 280 */
277EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node); 281EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node);
278 282
@@ -282,8 +286,8 @@ EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node);
282 * 286 *
283 * @param parent if provided, will be set in the resulting structure 287 * @param parent if provided, will be set in the resulting structure
284 * as well as the processing will be appended to children list. 288 * as well as the processing will be appended to children list.
285 * @param content string to be used. Must not be NULL. 289 * @param contents string to be used. Must not be NULL.
286 * @param length size in bytes of @a content. 290 * @param length size in bytes of @a contents.
287 * 291 *
288 * @return newly allocated memory or NULL on error. This memory should be 292 * @return newly allocated memory or NULL on error. This memory should be
289 * released with eina_simple_xml_node_processing_free() or indirectly 293 * released with eina_simple_xml_node_processing_free() or indirectly
@@ -294,7 +298,7 @@ EAPI Eina_Simple_XML_Node_Processing * eina_simple_xml_node_processing_new(Eina_
294/** 298/**
295 * Remove processing from parent and delete it. 299 * Remove processing from parent and delete it.
296 * 300 *
297 * @param processing to release memory. 301 * @param node processing to release memory.
298 */ 302 */
299EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *node); 303EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *node);
300 304
@@ -304,8 +308,8 @@ EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *node);
304 * 308 *
305 * @param parent if provided, will be set in the resulting structure 309 * @param parent if provided, will be set in the resulting structure
306 * as well as the doctype will be appended to children list. 310 * as well as the doctype will be appended to children list.
307 * @param content string to be used. Must not be NULL. 311 * @param contents string to be used. Must not be NULL.
308 * @param length size in bytes of @a content. 312 * @param length size in bytes of @a contents.
309 * 313 *
310 * @return newly allocated memory or NULL on error. This memory should be 314 * @return newly allocated memory or NULL on error. This memory should be
311 * released with eina_simple_xml_node_doctype_free() or indirectly 315 * released with eina_simple_xml_node_doctype_free() or indirectly
@@ -316,7 +320,7 @@ EAPI Eina_Simple_XML_Node_Doctype * eina_simple_xml_node_doctype_new(Eina_Simple
316/** 320/**
317 * Remove doctype from parent and delete it. 321 * Remove doctype from parent and delete it.
318 * 322 *
319 * @param doctype to release memory. 323 * @param node doctype to release memory.
320 */ 324 */
321EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node); 325EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node);
322 326
@@ -326,8 +330,8 @@ EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node);
326 * 330 *
327 * @param parent if provided, will be set in the resulting structure 331 * @param parent if provided, will be set in the resulting structure
328 * as well as the comment will be appended to children list. 332 * as well as the comment will be appended to children list.
329 * @param content string to be used. Must not be NULL. 333 * @param contents string to be used. Must not be NULL.
330 * @param length size in bytes of @a content. 334 * @param length size in bytes of @a contents.
331 * 335 *
332 * @return newly allocated memory or NULL on error. This memory should be 336 * @return newly allocated memory or NULL on error. This memory should be
333 * released with eina_simple_xml_node_comment_free() or indirectly 337 * released with eina_simple_xml_node_comment_free() or indirectly
@@ -338,7 +342,7 @@ EAPI Eina_Simple_XML_Node_Comment * eina_simple_xml_node_comment_new(Eina_Simple
338/** 342/**
339 * Remove comment from parent and delete it. 343 * Remove comment from parent and delete it.
340 * 344 *
341 * @param comment to release memory. 345 * @param node comment to release memory.
342 */ 346 */
343EAPI void eina_simple_xml_node_comment_free(Eina_Simple_XML_Node_Data *node); 347EAPI void eina_simple_xml_node_comment_free(Eina_Simple_XML_Node_Data *node);
344 348
@@ -370,7 +374,7 @@ EAPI void eina_simple_xml_node_root_free(Eina_Simple_XML_Node_Root *root);
370 * @param node the base node to convert. 374 * @param node the base node to convert.
371 * @param indent indentation string, or NULL to disable it. 375 * @param indent indentation string, or NULL to disable it.
372 * 376 *
373 * @param NULL on errors or a newly allocated string on success. 377 * @return NULL on errors or a newly allocated string on success.
374 */ 378 */
375EAPI char * eina_simple_xml_node_dump(Eina_Simple_XML_Node *node, const char *indent); 379EAPI char * eina_simple_xml_node_dump(Eina_Simple_XML_Node *node, const char *indent);
376 380
diff --git a/libraries/eina/src/include/eina_str.h b/libraries/eina/src/include/eina_str.h
index 8b52ab2..2913fbf 100644
--- a/libraries/eina/src/include/eina_str.h
+++ b/libraries/eina/src/include/eina_str.h
@@ -161,14 +161,14 @@ EAPI Eina_Bool eina_str_has_extension(const char *str, const char *ext) EI
161/** 161/**
162 * @brief Split a string using a delimiter. 162 * @brief Split a string using a delimiter.
163 * 163 *
164 * @param str The string to split. 164 * @param string The string to split.
165 * @param delim The string which specifies the places at which to split the string. 165 * @param delimiter The string which specifies the places at which to split the string.
166 * @param max_tokens The maximum number of strings to split string into. 166 * @param max_tokens The maximum number of strings to split string into.
167 * @return A newly-allocated NULL-terminated array of strings or NULL if it 167 * @return A newly-allocated NULL-terminated array of strings or NULL if it
168 * fails to allocate the array. 168 * fails to allocate the array.
169 * 169 *
170 * This functin splits @p str into a maximum of @p max_tokens pieces, 170 * This functin splits @p string into a maximum of @p max_tokens pieces,
171 * using the given delimiter @p delim. @p delim is not included in any 171 * using the given delimiter @p delimiter. @p delimiter is not included in any
172 * of the resulting strings, unless @p max_tokens is reached. If 172 * of the resulting strings, unless @p max_tokens is reached. If
173 * @p max_tokens is less than @c 1, the string is splitted completely. If 173 * @p max_tokens is less than @c 1, the string is splitted completely. If
174 * @p max_tokens is reached, the last string in the returned string 174 * @p max_tokens is reached, the last string in the returned string
@@ -185,16 +185,16 @@ EAPI char **eina_str_split(const char *string, const char *delimiter, i
185/** 185/**
186 * @brief Split a string using a delimiter and returns number of elements. 186 * @brief Split a string using a delimiter and returns number of elements.
187 * 187 *
188 * @param str The string to split. 188 * @param string The string to split.
189 * @param delim The string which specifies the places at which to split the string. 189 * @param delimiter The string which specifies the places at which to split the string.
190 * @param max_tokens The maximum number of strings to split string into. 190 * @param max_tokens The maximum number of strings to split string into.
191 * @param elements Where to return the number of elements in returned 191 * @param elements Where to return the number of elements in returned
192 * array (not counting the terminating @c NULL). May be @c NULL. 192 * array (not counting the terminating @c NULL). May be @c NULL.
193 * @return A newly-allocated NULL-terminated array of strings or NULL if it 193 * @return A newly-allocated NULL-terminated array of strings or NULL if it
194 * fails to allocate the array. 194 * fails to allocate the array.
195 * 195 *
196 * This functin splits @p str into a maximum of @p max_tokens pieces, 196 * This function splits @p string into a maximum of @p max_tokens pieces,
197 * using the given delimiter @p delim. @p delim is not included in any 197 * using the given delimiter @p delimiter. @p delimiter is not included in any
198 * of the resulting strings, unless @p max_tokens is reached. If 198 * of the resulting strings, unless @p max_tokens is reached. If
199 * @p max_tokens is less than @c 1, the string is splitted completely. If 199 * @p max_tokens is less than @c 1, the string is splitted completely. If
200 * @p max_tokens is reached, the last string in the returned string 200 * @p max_tokens is reached, the last string in the returned string
diff --git a/libraries/eina/src/include/eina_strbuf.h b/libraries/eina/src/include/eina_strbuf.h
index 7043575..34c200f 100644
--- a/libraries/eina/src/include/eina_strbuf.h
+++ b/libraries/eina/src/include/eina_strbuf.h
@@ -99,6 +99,24 @@ EAPI Eina_Strbuf *eina_strbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
99EAPI Eina_Strbuf *eina_strbuf_manage_new(char *str) EINA_MALLOC EINA_WARN_UNUSED_RESULT; 99EAPI Eina_Strbuf *eina_strbuf_manage_new(char *str) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
100 100
101/** 101/**
102 * @brief Create a new string buffer using the passed string. The passed
103 * string is used directly as the buffer, it's somehow the opposite function of
104 * @ref eina_strbuf_string_steal . The passed string must be malloced.
105 *
106 * @param str the string to manage
107 * @param length the length of the string.
108 * @return Newly allocated string buffer instance.
109 *
110 * This function creates a new string buffer. On error, @c NULL is
111 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To
112 * free the resources, use eina_strbuf_free().
113 *
114 * @see eina_strbuf_manage_new()
115 * @since 1.2.0
116 */
117EAPI Eina_Strbuf *eina_strbuf_manage_new_length(char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
118
119/**
102 * @brief Free a string buffer. 120 * @brief Free a string buffer.
103 * 121 *
104 * @param buf The string buffer to free. 122 * @param buf The string buffer to free.
diff --git a/libraries/eina/src/include/eina_stringshare.h b/libraries/eina/src/include/eina_stringshare.h
index af58add..862b2b2 100644
--- a/libraries/eina/src/include/eina_stringshare.h
+++ b/libraries/eina/src/include/eina_stringshare.h
@@ -289,6 +289,7 @@ EAPI void eina_stringshare_del(const char *str);
289 * 289 *
290 * @param str the shared string to know the length. It is safe to 290 * @param str the shared string to know the length. It is safe to
291 * give NULL, in that case -1 is returned. 291 * give NULL, in that case -1 is returned.
292 * @return The length of a shared string.
292 * 293 *
293 * This function is a cheap way to known the length of a shared 294 * This function is a cheap way to known the length of a shared
294 * string. Note that if the given pointer is not shared, bad 295 * string. Note that if the given pointer is not shared, bad
diff --git a/libraries/eina/src/include/eina_types.h b/libraries/eina/src/include/eina_types.h
index 8c77cdf..1653949 100644
--- a/libraries/eina/src/include/eina_types.h
+++ b/libraries/eina/src/include/eina_types.h
@@ -251,6 +251,10 @@ typedef int (*Eina_Compare_Cb)(const void *data1, const void *data2);
251 */ 251 */
252#define EINA_COMPARE_CB(function) ((Eina_Compare_Cb)function) 252#define EINA_COMPARE_CB(function) ((Eina_Compare_Cb)function)
253 253
254/**
255 * @typedef Eina_Each_Cb
256 * A callback type used when iterating over a container.
257 */
254typedef Eina_Bool (*Eina_Each_Cb)(const void *container, void *data, void *fdata); 258typedef Eina_Bool (*Eina_Each_Cb)(const void *container, void *data, void *fdata);
255 259
256/** 260/**
diff --git a/libraries/eina/src/include/eina_unicode.h b/libraries/eina/src/include/eina_unicode.h
index aed59af..2bbfe45 100644
--- a/libraries/eina/src/include/eina_unicode.h
+++ b/libraries/eina/src/include/eina_unicode.h
@@ -68,7 +68,16 @@ EAPI Eina_Unicode *eina_unicode_strdup(const Eina_Unicode *text) EINA_WARN_UNUSE
68 68
69 69
70/** 70/**
71 * @brief Same as strdup but cuts on n. Assumes n < len 71 * @brief Same as strdup but cuts on the given size. Assumes n < len
72 *
73 * @param text The text to duplicate.
74 * @param n The maximum size of the text to duplicate.
75 * @return The duplicated string.
76 *
77 * This function duplicates @p text. The resuting string is cut on @p
78 * n. @p n is assumed to be lesser (<) than the length of @p
79 * text. When not needed anymore, the returned string must be freed.
80 *
72 * @since 1.1.0 81 * @since 1.1.0
73 */ 82 */
74EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 83EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
@@ -107,9 +116,9 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL
107 116
108 117
109/** 118/**
110 * Reads UTF8 bytes from @buf, starting at *@index and returns 119 * Reads UTF8 bytes from @p buf, starting at @p iindex and returns
111 * the decoded code point at iindex offset, and advances iindex 120 * the decoded code point at @p iindex offset, and advances @p iindex
112 * to the next code point after this. iindex is always advanced, 121 * to the next code point after this. @p iindex is always advanced,
113 * unless if the advancement is after the NULL. 122 * unless if the advancement is after the NULL.
114 * On error: return a codepoint between DC80 to DCFF where the low 8 bits 123 * On error: return a codepoint between DC80 to DCFF where the low 8 bits
115 * are the byte's value. 124 * are the byte's value.
@@ -122,9 +131,9 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL
122EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2); 131EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2);
123 132
124/** 133/**
125 * Reads UTF8 bytes from @buf, starting at *@iindex and returns 134 * Reads UTF8 bytes from @p buf, starting at @p iindex and returns
126 * the decoded code point at iindex offset, and moves iindex 135 * the decoded code point at @p iindex offset, and moves àp iindex
127 * to the previous code point. iindex is always moved, as long 136 * to the previous code point. @p iindex is always moved, as long
128 * as it's not past the start of the string. 137 * as it's not past the start of the string.
129 * On error: return a codepoint between DC80 to DCFF where the low 8 bits 138 * On error: return a codepoint between DC80 to DCFF where the low 8 bits
130 * are the byte's value. 139 * are the byte's value.
diff --git a/libraries/eina/src/include/eina_ustrbuf.h b/libraries/eina/src/include/eina_ustrbuf.h
index f68cb7b..9710c42 100644
--- a/libraries/eina/src/include/eina_ustrbuf.h
+++ b/libraries/eina/src/include/eina_ustrbuf.h
@@ -65,7 +65,25 @@ EAPI Eina_UStrbuf *eina_ustrbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
65 * @see eina_ustrbuf_string_get() 65 * @see eina_ustrbuf_string_get()
66 * @since 1.1.0 66 * @since 1.1.0
67 */ 67 */
68EAPI Eina_Strbuf *eina_ustrbuf_manage_new(Eina_Unicode *str) EINA_MALLOC EINA_WARN_UNUSED_RESULT; 68EAPI Eina_UStrbuf *eina_ustrbuf_manage_new(Eina_Unicode *str) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
69
70/**
71 * @brief Create a new string buffer using the passed string. The passed
72 * string is used directly as the buffer, it's somehow the opposite function of
73 * @ref eina_ustrbuf_string_steal . The passed string must be malloced.
74 *
75 * @param str the string to manage
76 * @param length the length of the string.
77 * @return Newly allocated string buffer instance.
78 *
79 * This function creates a new string buffer. On error, @c NULL is
80 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To
81 * free the resources, use eina_ustrbuf_free().
82 *
83 * @see eina_ustrbuf_manage_new()
84 * @since 1.2.0
85 */
86EAPI Eina_UStrbuf *eina_ustrbuf_manage_new_length(Eina_Unicode *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
69 87
70/** 88/**
71 * @brief Free a string buffer. 89 * @brief Free a string buffer.
diff --git a/libraries/eina/src/include/eina_value.h b/libraries/eina/src/include/eina_value.h
new file mode 100644
index 0000000..846c4ef
--- /dev/null
+++ b/libraries/eina/src/include/eina_value.h
@@ -0,0 +1,3114 @@
1/* EINA - EFL data type library
2 * Copyright (C) 2012 ProFUSION embedded systems
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef EINA_VALUE_H_
20#define EINA_VALUE_H_
21
22#include "eina_types.h"
23#include "eina_fp.h" /* defines int64_t and uint64_t */
24#include "eina_inarray.h"
25#include "eina_list.h"
26#include "eina_hash.h"
27#include <stdarg.h>
28
29/**
30 * @addtogroup Eina_Data_Types_Group Data Types
31 *
32 * @since 1.2
33 *
34 * @{
35 */
36
37/**
38 * @addtogroup Eina_Containers_Group Containers
39 *
40 * @{
41 */
42
43/**
44 * @defgroup Eina_Value_Group Generic Value Storage
45 *
46 * @{
47 */
48
49
50/**
51 * @typedef Eina_Value
52 * Store generic values.
53 *
54 * @since 1.2
55 */
56typedef struct _Eina_Value Eina_Value;
57
58/**
59 * @typedef Eina_Value_Type
60 * Describes the data contained by the value
61 *
62 * @since 1.2
63 */
64typedef struct _Eina_Value_Type Eina_Value_Type;
65
66/**
67 * @typedef Eina_Value_Union
68 * Union of all known value types.
69 *
70 * @since 1.2
71 */
72typedef union _Eina_Value_Union Eina_Value_Union;
73
74/**
75 * @union _Eina_Value_Union
76 * All possible value types.
77 *
78 * @since 1.2
79 */
80union _Eina_Value_Union
81{
82 unsigned char buf[8]; /**< just hold 8-bytes, more goes into ptr */
83 void *ptr; /**< used as generic pointer */
84 uint64_t _guarantee; /**< guarantees 8-byte alignment */
85};
86
87/**
88 * @var EINA_VALUE_TYPE_UCHAR
89 * manages unsigned char type.
90 *
91 * @since 1.2
92 */
93EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_UCHAR;
94
95/**
96 * @var EINA_VALUE_TYPE_USHORT
97 * manages unsigned short type.
98 *
99 * @since 1.2
100 */
101EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_USHORT;
102
103/**
104 * @var EINA_VALUE_TYPE_UINT
105 * manages unsigned int type.
106 *
107 * @since 1.2
108 */
109EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_UINT;
110
111/**
112 * @var EINA_VALUE_TYPE_ULONG
113 * manages unsigned long type.
114 *
115 * @since 1.2
116 */
117EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_ULONG;
118
119/**
120 * @var EINA_VALUE_TYPE_UINT64
121 * manages unsigned integer of 64 bits type.
122 *
123 * @since 1.2
124 */
125EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_UINT64;
126
127/**
128 * @var EINA_VALUE_TYPE_CHAR
129 * manages char type.
130 *
131 * @since 1.2
132 */
133EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_CHAR;
134
135/**
136 * @var EINA_VALUE_TYPE_SHORT
137 * manages short type.
138 *
139 * @since 1.2
140 */
141EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_SHORT;
142
143/**
144 * @var EINA_VALUE_TYPE_INT
145 * manages int type.
146 *
147 * @since 1.2
148 */
149EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_INT;
150
151/**
152 * @var EINA_VALUE_TYPE_LONG
153 * manages long type.
154 *
155 * @since 1.2
156 */
157EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_LONG;
158
159/**
160 * @var EINA_VALUE_TYPE_INT64
161 * manages integer of 64 bits type.
162 *
163 * @since 1.2
164 */
165EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_INT64;
166
167/**
168 * @var EINA_VALUE_TYPE_FLOAT
169 * manages float type.
170 *
171 * @since 1.2
172 */
173EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_FLOAT;
174
175/**
176 * @var EINA_VALUE_TYPE_DOUBLE
177 * manages double type.
178 *
179 * @since 1.2
180 */
181EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_DOUBLE;
182
183/**
184 * @var EINA_VALUE_TYPE_STRINGSHARE
185 * manages stringshared string type.
186 *
187 * @since 1.2
188 */
189EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRINGSHARE;
190
191/**
192 * @var EINA_VALUE_TYPE_STRING
193 * manages string type.
194 *
195 * @since 1.2
196 */
197EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRING;
198
199
200/**
201 * @var EINA_VALUE_TYPE_ARRAY
202 *
203 * manages array type. Use the value get/set for arrays:
204 * @li eina_value_array_get() and eina_value_array_set()
205 * @li eina_value_array_vget() and eina_value_array_vset()
206 * @li eina_value_array_pget() and eina_value_array_pset()
207 *
208 * eina_value_set() takes an #Eina_Value_Array where just @c subtype
209 * and @c step are used. If there is an @c array, it will be adopted
210 * and its contents must be properly configurable as @c subtype
211 * expects. eina_value_pset() takes a pointer to an #Eina_Value_Array.
212 * For your convenience, use eina_value_array_setup().
213 *
214 * eina_value_get() and eina_value_pget() takes a pointer to
215 * #Eina_Value_Array, it's an exact copy of the current structure in
216 * use by value, no copies are done.
217 *
218 * @since 1.2
219 */
220EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_ARRAY;
221
222/**
223 * @var EINA_VALUE_TYPE_LIST
224 *
225 * manages list type. Use the value get/set for lists:
226 * @li eina_value_list_get() and eina_value_list_set()
227 * @li eina_value_list_vget() and eina_value_list_vset()
228 * @li eina_value_list_pget() and eina_value_list_pset()
229 *
230 * eina_value_set() takes an #Eina_Value_List where just @c subtype is
231 * used. If there is an @c list, it will be adopted and its contents
232 * must be properly configurable as @c subtype
233 * expects. eina_value_pset() takes a pointer to an #Eina_Value_List.
234 * For your convenience, use eina_value_list_setup().
235 *
236 * eina_value_get() and eina_value_pget() takes a pointer to
237 * #Eina_Value_List, it's an exact copy of the current structure in
238 * use by value, no copies are done.
239 *
240 * @since 1.2
241 */
242EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_LIST;
243
244/**
245 * @var EINA_VALUE_TYPE_HASH
246 *
247 * manages hash type. Use the value get/set for hashes:
248 * @li eina_value_hash_get() and eina_value_hash_set()
249 * @li eina_value_hash_vget() and eina_value_hash_vset()
250 * @li eina_value_hash_pget() and eina_value_hash_pset()
251 *
252 * eina_value_set() takes an #Eina_Value_Hash where just @c subtype
253 * and @c buckets_power_size are used. If there is an @c hash, it will
254 * be adopted and its contents must be properly configurable as @c
255 * subtype expects. eina_value_pset() takes a pointer to an
256 * #Eina_Value_Hash. For your convenience, use
257 * eina_value_hash_setup().
258 *
259 * eina_value_get() and eina_value_pget() takes a pointer to
260 * #Eina_Value_Hash, it's an exact copy of the current structure in
261 * use by value, no copies are done.
262 *
263 * @note be aware that hash data is always an allocated memory of size
264 * defined by @c subtype->value_size. If your @c subtype is an
265 * integer, add as data malloc(sizeof(int)). If your @c subtype
266 * is an string, add as data malloc(sizeof(char*)) and this data
267 * value must point to strdup(string)!
268 *
269 * @since 1.2
270 */
271EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_HASH;
272
273/**
274 * @var EINA_VALUE_TYPE_TIMEVAL
275 * manages 'struct timeval' type
276 *
277 * eina_value_set() takes a "struct timeval" from sys/time.h.
278 * eina_value_pset() takes a pointer to "struct timeval".
279 *
280 * eina_value_get() and eina_value_pget() takes a pointer to "struct
281 * timeval" and it's an exact copy of value.
282 *
283 * @since 1.2
284 */
285EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_TIMEVAL;
286
287/**
288 * @var EINA_VALUE_TYPE_BLOB
289 * manages blob of bytes type, see @ref Eina_Value_Blob
290 *
291 * eina_value_set() takes an #Eina_Value_Blob
292 * eina_value_pset() takes a pointer to #Eina_Value_Blob.
293 *
294 * eina_value_get() and eina_value_pget() takes a pointer to
295 * #Eina_Value_Blob and it's an exact copy of value, no allocations
296 * are made.
297 *
298 * Memory is untouched unless you provide @c ops (operations) pointer.
299 *
300 * @since 1.2
301 */
302EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_BLOB;
303
304/**
305 * @var EINA_VALUE_TYPE_STRUCT
306 *
307 * manages struct type. Use the value get/set for structs:
308 * @li eina_value_struct_get() and eina_value_struct_set()
309 * @li eina_value_struct_vget() and eina_value_struct_vset()
310 * @li eina_value_struct_pget() and eina_value_struct_pset()
311 *
312 * eina_value_set() takes an #Eina_Value_Struct where just @c desc is
313 * used. If there is an @c memory, it will be adopted and its contents
314 * must be properly configurable as @c desc expects. eina_value_pset()
315 * takes a pointer to an #Eina_Value_Struct. For your convenience, use
316 * eina_value_struct_setup().
317 *
318 * eina_value_get() and eina_value_pget() takes a pointer to
319 * #Eina_Value_Struct, it's an exact copy of the current structure in
320 * use by value, no copies are done.
321 *
322 * @since 1.2
323 */
324EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT;
325
326/**
327 * @var EINA_ERROR_VALUE_FAILED
328 * Error identifier corresponding to value check failure.
329 *
330 * @since 1.2
331 */
332EAPI extern int EINA_ERROR_VALUE_FAILED;
333
334/**
335 * @defgroup Eina_Value_Value_Group Generic Value management
336 *
337 * @{
338 */
339
340/**
341 * @struct _Eina_Value
342 * defines the contents of a value
343 *
344 * @since 1.2
345 */
346struct _Eina_Value
347{
348 const Eina_Value_Type *type; /**< how to access values */
349 Eina_Value_Union value; /**< to be accessed with type descriptor */
350};
351
352/**
353 * @brief Create generic value storage.
354 * @param type how to manage this value.
355 * @return The new value or @c NULL on failure.
356 *
357 * Create a new generic value storage. The members are managed using
358 * the description specified by @a type.
359 *
360 * Some types may specify more operations:
361 * eg. #EINA_VALUE_TYPE_ARRAY uses eina_value_array_set(),
362 * eina_value_array_get() and so on.
363 *
364 * On failure, @c NULL is returned and either #EINA_ERROR_OUT_OF_MEMORY or
365 * #EINA_ERROR_VALUE_FAILED is set.
366 *
367 * @note this calls creates from mempool and then uses
368 * eina_value_setup(). Consider using eina_value_flush() and
369 * eina_value_setup() instead to avoid memory allocations.
370 *
371 * @see eina_value_free()
372 *
373 * @since 1.2
374 */
375EAPI Eina_Value *eina_value_new(const Eina_Value_Type *type) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
376
377/**
378 * @brief Free value and its data.
379 * @param value value object
380 *
381 * @see eina_value_flush()
382 *
383 * @since 1.2
384 */
385EAPI void eina_value_free(Eina_Value *value) EINA_ARG_NONNULL(1);
386
387
388/**
389 * @brief Initialize generic value storage.
390 * @param value value object
391 * @param type how to manage this value.
392 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
393 *
394 * Initializes existing generic value storage. The members are managed using the
395 * description specified by @a type.
396 *
397 * Some types may specify more operations, as an example
398 * #EINA_VALUE_TYPE_ARRAY uses eina_value_array_set(),
399 * eina_value_array_get() and so on.
400 *
401 * @note Existing contents are ignored! If the value was previously used, then
402 * use eina_value_flush() first.
403 *
404 * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY
405 * or #EINA_ERROR_VALUE_FAILED is set.
406 *
407 * @see eina_value_flush()
408 *
409 * @since 1.2
410 */
411static inline Eina_Bool eina_value_setup(Eina_Value *value,
412 const Eina_Value_Type *type) EINA_ARG_NONNULL(1, 2);
413
414/**
415 * @brief Create generic value storage.
416 * @param value value object
417 *
418 * Releases all the resources associated with an #Eina_Value. The
419 * value must be already set with eina_value_setup() or
420 * eina_value_new().
421 *
422 * After this call returns, the contents of the value are undefined,
423 * but the value can be reused by calling eina_value_setup() again.
424 *
425 * @see eina_value_setup()
426 * @see eina_value_free()
427 *
428 * @since 1.2
429 */
430static inline void eina_value_flush(Eina_Value *value) EINA_ARG_NONNULL(1);
431
432/**
433 * @brief Copy generic value storage.
434 * @param value source value object
435 * @param copy destination value object
436 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
437 *
438 * The @a copy object is considered internalized and its existing
439 * contents are overwritten (just as if eina_value_flush() was called on
440 * it).
441 *
442 * The copy happens by calling eina_value_setup() on @a copy, followed
443 * by getting the contents of @a value and setting it to @a copy.
444 *
445 * @since 1.2
446 */
447EAPI Eina_Bool eina_value_copy(const Eina_Value *value,
448 Eina_Value *copy) EINA_ARG_NONNULL(1, 2);
449
450/**
451 * @brief Compare generic value storage.
452 * @param a left side of comparison
453 * @param b right side of comparison
454 * @return less than zero if a < b, greater than zero if a > b, zero
455 * if a == b
456 *
457 * @since 1.2
458 */
459static inline int eina_value_compare(const Eina_Value *a,
460 const Eina_Value *b) EINA_ARG_NONNULL(1, 2);
461
462/**
463 * @brief Set the generic value.
464 * @param value source value object
465 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
466 *
467 * The variable argument is dependent on chosen type. The list for
468 * basic types:
469 *
470 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
471 * @li EINA_VALUE_TYPE_USHORT: unsigned short
472 * @li EINA_VALUE_TYPE_UINT: unsigned int
473 * @li EINA_VALUE_TYPE_ULONG: unsigned long
474 * @li EINA_VALUE_TYPE_UINT64: uint64_t
475 * @li EINA_VALUE_TYPE_CHAR: char
476 * @li EINA_VALUE_TYPE_SHORT: short
477 * @li EINA_VALUE_TYPE_INT: int
478 * @li EINA_VALUE_TYPE_LONG: long
479 * @li EINA_VALUE_TYPE_INT64: int64_t
480 * @li EINA_VALUE_TYPE_FLOAT: float
481 * @li EINA_VALUE_TYPE_DOUBLE: double
482 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
483 * @li EINA_VALUE_TYPE_STRING: const char *
484 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array
485 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List
486 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
487 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
488 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
489 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
490 *
491 * @code
492 * Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
493 * int x = 567;
494 * eina_value_set(value, 1234);
495 * eina_value_set(value, x);
496 *
497 * eina_value_flush(value);
498 *
499 * eina_value_setup(value, EINA_VALUE_TYPE_STRING);
500 * eina_value_set(value, "hello world!");
501 *
502 * eina_value_free(value);
503 * @endcode
504 *
505 * @note for array member see eina_value_array_set()
506 * @note for list member see eina_value_list_set()
507 * @note for hash member see eina_value_hash_set()
508 *
509 * @see eina_value_get()
510 * @see eina_value_vset()
511 * @see eina_value_pset()
512 *
513 * @since 1.2
514 */
515static inline Eina_Bool eina_value_set(Eina_Value *value,
516 ...) EINA_ARG_NONNULL(1);
517
518/**
519 * @brief Get the generic value.
520 * @param value source value object
521 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
522 *
523 * The value is returned in the variable argument parameter, the
524 * actual value is type-dependent, but usually it will be what is
525 * stored inside the object. There shouldn't be any memory allocation,
526 * thus the contents should @b not be freed.
527 *
528 * The variable argument is dependent on chosen type. The list for
529 * basic types:
530 *
531 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
532 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
533 * @li EINA_VALUE_TYPE_UINT: unsigned int*
534 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
535 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
536 * @li EINA_VALUE_TYPE_CHAR: char*
537 * @li EINA_VALUE_TYPE_SHORT: short*
538 * @li EINA_VALUE_TYPE_INT: int*
539 * @li EINA_VALUE_TYPE_LONG: long*
540 * @li EINA_VALUE_TYPE_INT64: int64_t*
541 * @li EINA_VALUE_TYPE_FLOAT: float*
542 * @li EINA_VALUE_TYPE_DOUBLE: double*
543 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
544 * @li EINA_VALUE_TYPE_STRING: const char **
545 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array*
546 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
547 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
548 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
549 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
550 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
551 *
552 * @code
553 * Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
554 * int x;
555 * const char *s;
556 *
557 * eina_value_set(value, 1234);
558 * eina_value_get(value, &x);
559 *
560 * eina_value_flush(value);
561 *
562 * eina_value_setup(value, EINA_VALUE_TYPE_STRING);
563 * eina_value_set(value, "hello world!");
564 * eina_value_get(value, &s);
565 *
566 * eina_value_free(value);
567 * @endcode
568 *
569 * @note for array member see eina_value_array_get()
570 * @note for list member see eina_value_list_get()
571 * @note for hash member see eina_value_hash_get()
572 *
573 * @see eina_value_set()
574 * @see eina_value_vset()
575 * @see eina_value_pset()
576 *
577 * @since 1.2
578 */
579static inline Eina_Bool eina_value_get(const Eina_Value *value,
580 ...) EINA_ARG_NONNULL(1);
581
582/**
583 * @brief Set the generic value.
584 * @param value source value object
585 * @param args variable argument
586 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
587 *
588 * @note for array member see eina_value_array_vset()
589 * @note for list member see eina_value_list_vset()
590 * @note for hash member see eina_value_hash_vset()
591 *
592 * @see eina_value_vget()
593 * @see eina_value_set()
594 * @see eina_value_pset()
595 *
596 * @since 1.2
597 */
598static inline Eina_Bool eina_value_vset(Eina_Value *value,
599 va_list args) EINA_ARG_NONNULL(1);
600
601/**
602 * @brief Get the generic value.
603 * @param value source value object
604 * @param args variable argument
605 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
606 *
607 * The value is returned in the variable argument parameter, the
608 * actual value is type-dependent, but usually it will be what is
609 * stored inside the object. There shouldn't be any memory allocation,
610 * thus the contents should @b not be freed.
611 *
612 * @note for array member see eina_value_array_vget()
613 * @note for list member see eina_value_list_vget()
614 * @note for hash member see eina_value_hash_vget()
615 *
616 * @see eina_value_vset()
617 * @see eina_value_get()
618 * @see eina_value_pget()
619 *
620 * @since 1.2
621 */
622static inline Eina_Bool eina_value_vget(const Eina_Value *value,
623 va_list args) EINA_ARG_NONNULL(1);
624
625/**
626 * @brief Set the generic value from pointer.
627 * @param value source value object
628 * @param ptr pointer to specify the contents.
629 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
630 *
631 * The pointer type is dependent on chosen value type. The list for
632 * basic types:
633 *
634 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
635 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
636 * @li EINA_VALUE_TYPE_UINT: unsigned int*
637 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
638 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
639 * @li EINA_VALUE_TYPE_CHAR: char*
640 * @li EINA_VALUE_TYPE_SHORT: short*
641 * @li EINA_VALUE_TYPE_INT: int*
642 * @li EINA_VALUE_TYPE_LONG: long*
643 * @li EINA_VALUE_TYPE_INT64: int64_t*
644 * @li EINA_VALUE_TYPE_FLOAT: float*
645 * @li EINA_VALUE_TYPE_DOUBLE: double*
646 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
647 * @li EINA_VALUE_TYPE_STRING: const char **
648 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array*
649 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
650 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
651 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
652 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
653 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
654 *
655 * @note the pointer contents are written using the size defined by
656 * type. It can be larger than void* or uint64_t.
657 *
658 * @code
659 * Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
660 * int x = 567;
661 * const char *s = "hello world!";
662 *
663 * eina_value_pset(value, &x);
664 *
665 * eina_value_flush(value);
666 *
667 * eina_value_setup(value, EINA_VALUE_TYPE_STRING);
668 * eina_value_pset(value, &s);
669 *
670 * eina_value_free(value);
671 * @endcode
672 *
673 * @note for array member see eina_value_array_pset()
674 * @note for list member see eina_value_list_pset()
675 * @note for hash member see eina_value_hash_pset()
676 *
677 * @see eina_value_pget()
678 * @see eina_value_set()
679 * @see eina_value_vset()
680 *
681 * @since 1.2
682 */
683static inline Eina_Bool eina_value_pset(Eina_Value *value,
684 const void *ptr) EINA_ARG_NONNULL(1, 2);
685
686/**
687 * @brief Get the generic value to pointer.
688 * @param value source value object
689 * @param ptr pointer to receive the contents.
690 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
691 *
692 * The value is returned in pointer contents, the actual value is
693 * type-dependent, but usually it will be what is stored inside the
694 * object. There shouldn't be any memory allocation, thus the contents
695 * should @b not be freed.
696 *
697 * The pointer type is dependent on chosen value type. The list for
698 * basic types:
699 *
700 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
701 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
702 * @li EINA_VALUE_TYPE_UINT: unsigned int*
703 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
704 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
705 * @li EINA_VALUE_TYPE_CHAR: char*
706 * @li EINA_VALUE_TYPE_SHORT: short*
707 * @li EINA_VALUE_TYPE_INT: int*
708 * @li EINA_VALUE_TYPE_LONG: long*
709 * @li EINA_VALUE_TYPE_INT64: int64_t*
710 * @li EINA_VALUE_TYPE_FLOAT: float*
711 * @li EINA_VALUE_TYPE_DOUBLE: double*
712 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
713 * @li EINA_VALUE_TYPE_STRING: const char **
714 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array*
715 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
716 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
717 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
718 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
719 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
720 *
721 * @code
722 * Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
723 * int x;
724 * const char *s;
725 *
726 * eina_value_set(value, 1234);
727 * eina_value_pget(value, &x);
728 *
729 * eina_value_flush(value);
730 *
731 * eina_value_setup(value, EINA_VALUE_TYPE_STRING);
732 * eina_value_set(value, "hello world!");
733 * eina_value_pget(value, &s);
734 *
735 * eina_value_free(value);
736 * @endcode
737 *
738 * @note for array member see eina_value_array_get()
739 * @note for list member see eina_value_list_get()
740 * @note for hash member see eina_value_hash_get()
741 *
742 * @see eina_value_set()
743 * @see eina_value_vset()
744 * @see eina_value_pset()
745 *
746 * @since 1.2
747 */
748static inline Eina_Bool eina_value_pget(const Eina_Value *value,
749 void *ptr) EINA_ARG_NONNULL(1, 2);
750
751/**
752 * @brief Convert one value to another type.
753 * @param value source value object.
754 * @param convert destination value object.
755 * @return #EINA_TRUE if converted, #EINA_FALSE otherwise.
756 *
757 * Converts one value to another trying first @a value type
758 * @c convert_to() function. If unsuccessful, tries using @c convert_from()
759 * function in @a convert.
760 *
761 * Conversion functions are type defined, and the basic types can convert
762 * between themselves, but conversion is strict! That is, if
763 * converting from negative value to unsigned type, it will fail. It
764 * also fails on value overflow.
765 *
766 * It is recommended that all types implement at least convert to
767 * string, used by eina_value_to_string().
768 *
769 * @note Both objects must have eina_value_setup() called on them beforehand!
770 *
771 * @since 1.2
772 */
773EAPI Eina_Bool eina_value_convert(const Eina_Value *value,
774 Eina_Value *convert) EINA_ARG_NONNULL(1, 2);
775
776
777/**
778 * @brief Convert value to string.
779 * @param value value object.
780 * @return newly allocated memory or @c NULL on failure.
781 *
782 * @see eina_value_convert()
783 * @since 1.2
784 */
785EAPI char *eina_value_to_string(const Eina_Value *value) EINA_ARG_NONNULL(1);
786
787/**
788 * @brief Query value type.
789 * @param value value object.
790 * @return type instance or @c NULL if type is invalid.
791 *
792 * Check if value type is valid and returns it. A type is invalid if
793 * it does not exist or if it is using a different version field.
794 *
795 * @see eina_value_type_check()
796 *
797 * @since 1.2
798 */
799static inline const Eina_Value_Type *eina_value_type_get(const Eina_Value *value) EINA_PURE EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
800
801/**
802 * @}
803 */
804
805
806/**
807 * @defgroup Eina_Value_Array_Group Generic Value Array management
808 *
809 * @{
810 */
811
812
813/**
814 * @typedef Eina_Value_Array
815 * Value type for #EINA_VALUE_TYPE_ARRAY
816 *
817 * @since 1.2
818 */
819typedef struct _Eina_Value_Array Eina_Value_Array;
820
821/**
822 * @struct _Eina_Value_Array
823 * Used to store the array and its subtype.
824 */
825struct _Eina_Value_Array
826{
827 const Eina_Value_Type *subtype; /**< how to allocate and access items */
828 unsigned int step; /**< how to grow the members array */
829 Eina_Inarray *array; /**< the array that holds data, members are of subtype->value_size bytes. */
830};
831
832/**
833 * @brief Create generic value storage of type array.
834 * @param subtype how to manage this array members.
835 * @param step how to grow the members array.
836 * @return The new value or @c NULL on failure.
837 *
838 * Create a new generic value storage of type array. The members are
839 * managed using the description specified by @a subtype.
840 *
841 * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or
842 * #EINA_ERROR_VALUE_FAILED is set.
843 *
844 * @note this creates from mempool and then uses
845 * eina_value_array_setup(). @see eina_value_free() @see
846 * eina_value_array_setup()
847 *
848 * @since 1.2
849 */
850EAPI Eina_Value *eina_value_array_new(const Eina_Value_Type *subtype,
851 unsigned int step) EINA_ARG_NONNULL(1);
852
853/**
854 * @brief Initialize generic value storage of type array.
855 * @param value value object
856 * @param subtype how to manage array members.
857 * @param step how to grow the members array.
858 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
859 *
860 * Initializes new generic value storage of type array with the given
861 * @a subtype.
862 *
863 * This is the same as calling eina_value_set() with
864 * #EINA_VALUE_TYPE_ARRAY followed by eina_value_pset() with the
865 * #Eina_Value_Array description configured.
866 *
867 * @note Existing contents are ignored! If the value was previously used, then
868 * use eina_value_flush() first.
869 *
870 * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY
871 * or #EINA_ERROR_VALUE_FAILED is set.
872 *
873 * @see eina_value_flush()
874 *
875 * @since 1.2
876 */
877static inline Eina_Bool eina_value_array_setup(Eina_Value *value,
878 const Eina_Value_Type *subtype,
879 unsigned int step) EINA_ARG_NONNULL(1, 2);
880
881/**
882 * @brief Query number of elements in value of array type.
883 * @param value value object.
884 * @return number of child elements.
885 * @since 1.2
886 */
887static inline unsigned int eina_value_array_count(const Eina_Value *value);
888
889/**
890 * @brief Remove element at given position in value of array type.
891 * @param value value object.
892 * @param position index of the member
893 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
894 * @since 1.2
895 */
896static inline Eina_Bool eina_value_array_remove(Eina_Value *value,
897 unsigned int position) EINA_ARG_NONNULL(1);
898
899/**
900 * @brief Set the generic value in an array member.
901 * @param value source value object
902 * @param position index of the member
903 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
904 *
905 * The variable argument is dependent on chosen subtype. The list for
906 * basic types:
907 *
908 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
909 * @li EINA_VALUE_TYPE_USHORT: unsigned short
910 * @li EINA_VALUE_TYPE_UINT: unsigned int
911 * @li EINA_VALUE_TYPE_ULONG: unsigned long
912 * @li EINA_VALUE_TYPE_UINT64: uint64_t
913 * @li EINA_VALUE_TYPE_CHAR: char
914 * @li EINA_VALUE_TYPE_SHORT: short
915 * @li EINA_VALUE_TYPE_INT: int
916 * @li EINA_VALUE_TYPE_LONG: long
917 * @li EINA_VALUE_TYPE_INT64: int64_t
918 * @li EINA_VALUE_TYPE_FLOAT: float
919 * @li EINA_VALUE_TYPE_DOUBLE: double
920 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
921 * @li EINA_VALUE_TYPE_STRING: const char *
922 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array
923 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List
924 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
925 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
926 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
927 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
928 *
929 * @code
930 * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
931 * int x;
932 *
933 * eina_value_array_append(value, 1234);
934 * eina_value_array_set(value, 0, 5678);
935 * eina_value_array_get(value, 0, &x);
936 * eina_value_free(value);
937 * @endcode
938 *
939 * @see eina_value_array_get()
940 * @see eina_value_array_vset()
941 * @see eina_value_array_pset()
942 * @see eina_value_array_insert()
943 * @see eina_value_array_vinsert()
944 * @see eina_value_array_pinsert()
945 * @see eina_value_array_append()
946 * @see eina_value_array_vappend()
947 * @see eina_value_array_pappend()
948 *
949 * @since 1.2
950 */
951static inline Eina_Bool eina_value_array_set(Eina_Value *value,
952 unsigned int position,
953 ...) EINA_ARG_NONNULL(1);
954
955/**
956 * @brief Get the generic value from an array member.
957 * @param value source value object
958 * @param position index of the member
959 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
960 *
961 * The value is returned in the variable argument parameter, and the
962 * actual value is type-dependent, but usually it will be what is
963 * stored inside the object. There shouldn't be any memory allocation;
964 * thus the contents should @b not be freed.
965 *
966 * The variable argument is dependent on chosen subtype. The list for
967 * basic types:
968 *
969 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
970 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
971 * @li EINA_VALUE_TYPE_UINT: unsigned int*
972 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
973 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
974 * @li EINA_VALUE_TYPE_CHAR: char*
975 * @li EINA_VALUE_TYPE_SHORT: short*
976 * @li EINA_VALUE_TYPE_INT: int*
977 * @li EINA_VALUE_TYPE_LONG: long*
978 * @li EINA_VALUE_TYPE_INT64: int64_t*
979 * @li EINA_VALUE_TYPE_FLOAT: float*
980 * @li EINA_VALUE_TYPE_DOUBLE: double*
981 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
982 * @li EINA_VALUE_TYPE_STRING: const char **
983 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array*
984 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
985 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
986 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
987 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
988 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
989 *
990 * @code
991 * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
992 * int x;
993 *
994 * eina_value_array_append(value, 1234);
995 * eina_value_array_get(value, 0, &x);
996 * eina_value_free(value);
997 * @endcode
998 *
999 * @see eina_value_array_set()
1000 * @see eina_value_array_vset()
1001 * @see eina_value_array_pset()
1002 *
1003 * @since 1.2
1004 */
1005static inline Eina_Bool eina_value_array_get(const Eina_Value *value,
1006 unsigned int position,
1007 ...) EINA_ARG_NONNULL(1);
1008
1009/**
1010 * @brief Insert a generic value in an array member position.
1011 * @param value source value object
1012 * @param position index of the member
1013 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1014 *
1015 * The variable argument is dependent on chosen subtype. The list for
1016 * basic types:
1017 *
1018 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
1019 * @li EINA_VALUE_TYPE_USHORT: unsigned short
1020 * @li EINA_VALUE_TYPE_UINT: unsigned int
1021 * @li EINA_VALUE_TYPE_ULONG: unsigned long
1022 * @li EINA_VALUE_TYPE_UINT64: uint64_t
1023 * @li EINA_VALUE_TYPE_CHAR: char
1024 * @li EINA_VALUE_TYPE_SHORT: short
1025 * @li EINA_VALUE_TYPE_INT: int
1026 * @li EINA_VALUE_TYPE_LONG: long
1027 * @li EINA_VALUE_TYPE_INT64: int64_t
1028 * @li EINA_VALUE_TYPE_FLOAT: float
1029 * @li EINA_VALUE_TYPE_DOUBLE: double
1030 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
1031 * @li EINA_VALUE_TYPE_STRING: const char *
1032 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array
1033 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List
1034 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
1035 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
1036 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
1037 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
1038 *
1039 * @code
1040 * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
1041 * int x;
1042 *
1043 * eina_value_array_insert(value, 0, 1234);
1044 * eina_value_array_get(value, 0, &x);
1045 * eina_value_free(value);
1046 * @endcode
1047 *
1048 * @see eina_value_array_set()
1049 * @see eina_value_array_get()
1050 * @see eina_value_array_vset()
1051 * @see eina_value_array_pset()
1052 * @see eina_value_array_vinsert()
1053 * @see eina_value_array_pinsert()
1054 * @see eina_value_array_append()
1055 * @see eina_value_array_vappend()
1056 * @see eina_value_array_pappend()
1057 *
1058 * @since 1.2
1059 */
1060static inline Eina_Bool eina_value_array_insert(Eina_Value *value,
1061 unsigned int position,
1062 ...) EINA_ARG_NONNULL(1);
1063
1064
1065/**
1066 * @brief Append a generic value in an array.
1067 * @param value source value object
1068 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1069 *
1070 * The variable argument is dependent on chosen subtype. The list for
1071 * basic types:
1072 *
1073 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
1074 * @li EINA_VALUE_TYPE_USHORT: unsigned short
1075 * @li EINA_VALUE_TYPE_UINT: unsigned int
1076 * @li EINA_VALUE_TYPE_ULONG: unsigned long
1077 * @li EINA_VALUE_TYPE_UINT64: uint64_t
1078 * @li EINA_VALUE_TYPE_CHAR: char
1079 * @li EINA_VALUE_TYPE_SHORT: short
1080 * @li EINA_VALUE_TYPE_INT: int
1081 * @li EINA_VALUE_TYPE_LONG: long
1082 * @li EINA_VALUE_TYPE_INT64: int64_t
1083 * @li EINA_VALUE_TYPE_FLOAT: float
1084 * @li EINA_VALUE_TYPE_DOUBLE: double
1085 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
1086 * @li EINA_VALUE_TYPE_STRING: const char *
1087 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array
1088 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List
1089 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
1090 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
1091 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
1092 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
1093 *
1094 * @code
1095 * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
1096 * int x;
1097 *
1098 * eina_value_array_append(value, 1234);
1099 * eina_value_array_get(value, 0, &x);
1100 * eina_value_free(value);
1101 * @endcode
1102 *
1103 * @see eina_value_array_set()
1104 * @see eina_value_array_get()
1105 * @see eina_value_array_vset()
1106 * @see eina_value_array_pset()
1107 * @see eina_value_array_vinsert()
1108 * @see eina_value_array_pinsert()
1109 * @see eina_value_array_append()
1110 * @see eina_value_array_vappend()
1111 * @see eina_value_array_pappend()
1112 *
1113 * @since 1.2
1114 */
1115static inline Eina_Bool eina_value_array_append(Eina_Value *value,
1116 ...) EINA_ARG_NONNULL(1);
1117
1118/**
1119 * @brief Set a generic value to an array member.
1120 * @param value source value object
1121 * @param position index of the member
1122 * @param args variable argument
1123 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1124 * @see eina_value_array_set()
1125 * @see eina_value_array_get()
1126 * @see eina_value_array_pset()
1127 * @see eina_value_array_insert()
1128 * @see eina_value_array_vinsert()
1129 * @see eina_value_array_pinsert()
1130 * @see eina_value_array_append()
1131 * @see eina_value_array_vappend()
1132 * @see eina_value_array_pappend()
1133 *
1134 * @since 1.2
1135 */
1136static inline Eina_Bool eina_value_array_vset(Eina_Value *value,
1137 unsigned int position,
1138 va_list args) EINA_ARG_NONNULL(1);
1139
1140/**
1141 * @brief Get the generic value from an array member.
1142 * @param value source value object
1143 * @param position index of the member
1144 * @param args variable argument
1145 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1146 *
1147 * The value is returned in the variable argument parameter, the
1148 * actual value is type-dependent, but usually it will be what is
1149 * stored inside the object. There shouldn't be any memory allocation,
1150 * thus the contents should @b not be freed.
1151 *
1152 * @see eina_value_array_vset()
1153 * @see eina_value_array_get()
1154 * @see eina_value_array_pget()
1155 *
1156 * @since 1.2
1157 */
1158static inline Eina_Bool eina_value_array_vget(const Eina_Value *value,
1159 unsigned int position,
1160 va_list args) EINA_ARG_NONNULL(1);
1161/**
1162 * @brief Insert a generic value to an array member position.
1163 * @param value source value object
1164 * @param position index of the member
1165 * @param args variable argument
1166 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1167 * @see eina_value_array_set()
1168 * @see eina_value_array_get()
1169 * @see eina_value_array_vset()
1170 * @see eina_value_array_pset()
1171 * @see eina_value_array_insert()
1172 * @see eina_value_array_pinsert()
1173 * @see eina_value_array_append()
1174 * @see eina_value_array_vappend()
1175 * @see eina_value_array_pappend()
1176 *
1177 * @since 1.2
1178 */
1179static inline Eina_Bool eina_value_array_vinsert(Eina_Value *value,
1180 unsigned int position,
1181 va_list args) EINA_ARG_NONNULL(1);
1182
1183/**
1184 * @brief Append a generic value to an array.
1185 * @param value source value object
1186 * @param args variable argument
1187 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1188 * @see eina_value_array_set()
1189 * @see eina_value_array_get()
1190 * @see eina_value_array_vget()
1191 * @see eina_value_array_pset()
1192 * @see eina_value_array_insert()
1193 * @see eina_value_array_vinsert()
1194 * @see eina_value_array_pinsert()
1195 * @see eina_value_array_append()
1196 * @see eina_value_array_pappend()
1197 *
1198 * @since 1.2
1199 */
1200static inline Eina_Bool eina_value_array_vappend(Eina_Value *value,
1201 va_list args) EINA_ARG_NONNULL(1);
1202
1203
1204/**
1205 * @brief Set a generic value to an array member from a pointer.
1206 * @param value source value object
1207 * @param position index of the member
1208 * @param ptr pointer to specify the contents.
1209 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1210 *
1211 * The pointer type is dependent on chosen value type. The list for
1212 * basic types:
1213 *
1214 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
1215 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
1216 * @li EINA_VALUE_TYPE_UINT: unsigned int*
1217 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
1218 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
1219 * @li EINA_VALUE_TYPE_CHAR: char*
1220 * @li EINA_VALUE_TYPE_SHORT: short*
1221 * @li EINA_VALUE_TYPE_INT: int*
1222 * @li EINA_VALUE_TYPE_LONG: long*
1223 * @li EINA_VALUE_TYPE_INT64: int64_t*
1224 * @li EINA_VALUE_TYPE_FLOAT: float*
1225 * @li EINA_VALUE_TYPE_DOUBLE: double*
1226 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
1227 * @li EINA_VALUE_TYPE_STRING: const char **
1228 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array*
1229 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
1230 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
1231 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
1232 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
1233 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
1234 *
1235 * @note the pointer contents are written using the size defined by
1236 * type. It can be larger than void* or uint64_t.
1237 *
1238 * @code
1239 * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
1240 * int x = 1234;
1241 *
1242 * eina_value_array_append(value, 1234);
1243 * eina_value_array_pset(value, 0, &x);
1244 * eina_value_array_pget(value, 0, &x);
1245 * eina_value_free(value);
1246 * @endcode
1247 *
1248 * @see eina_value_array_set()
1249 * @see eina_value_array_get()
1250 * @see eina_value_array_vset()
1251 * @see eina_value_array_insert()
1252 * @see eina_value_array_vinsert()
1253 * @see eina_value_array_pinsert()
1254 * @see eina_value_array_append()
1255 * @see eina_value_array_vappend()
1256 * @see eina_value_array_pappend()
1257 *
1258 * @since 1.2
1259 */
1260static inline Eina_Bool eina_value_array_pset(Eina_Value *value,
1261 unsigned int position,
1262 const void *ptr) EINA_ARG_NONNULL(1, 3);
1263
1264/**
1265 * @brief Retrieve a generic value into a pointer from an array member.
1266 * @param value source value object
1267 * @param position index of the member
1268 * @param ptr pointer to receive the contents.
1269 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1270 *
1271 * The value is returned in pointer contents, the actual value is
1272 * type-dependent, but usually it will be what is stored inside the
1273 * object. There shouldn't be any memory allocation, thus the contents
1274 * should @b not be freed.
1275 *
1276 * The pointer type is dependent on chosen value type. The list for
1277 * basic types:
1278 *
1279 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
1280 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
1281 * @li EINA_VALUE_TYPE_UINT: unsigned int*
1282 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
1283 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
1284 * @li EINA_VALUE_TYPE_CHAR: char*
1285 * @li EINA_VALUE_TYPE_SHORT: short*
1286 * @li EINA_VALUE_TYPE_INT: int*
1287 * @li EINA_VALUE_TYPE_LONG: long*
1288 * @li EINA_VALUE_TYPE_INT64: int64_t*
1289 * @li EINA_VALUE_TYPE_FLOAT: float*
1290 * @li EINA_VALUE_TYPE_DOUBLE: double*
1291 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
1292 * @li EINA_VALUE_TYPE_STRING: const char **
1293 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array*
1294 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
1295 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
1296 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
1297 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
1298 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
1299 *
1300 * @code
1301 * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
1302 * int x;
1303 *
1304 * eina_value_array_append(value, 1234);
1305 * eina_value_array_pget(value, 0, &x);
1306 * eina_value_free(value);
1307 * @endcode
1308 *
1309 * @see eina_value_array_set()
1310 * @see eina_value_array_vset()
1311 * @see eina_value_array_pset()
1312 *
1313 * @since 1.2
1314 */
1315static inline Eina_Bool eina_value_array_pget(const Eina_Value *value,
1316 unsigned int position,
1317 void *ptr) EINA_ARG_NONNULL(1, 3);
1318
1319/**
1320 * @brief Insert a generic value to an array member position from a pointer.
1321 * @param value source value object
1322 * @param position index of the member
1323 * @param ptr pointer to specify the contents.
1324 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1325 *
1326 * The pointer type is dependent on chosen value type. The list for
1327 * basic types:
1328 *
1329 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
1330 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
1331 * @li EINA_VALUE_TYPE_UINT: unsigned int*
1332 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
1333 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
1334 * @li EINA_VALUE_TYPE_CHAR: char*
1335 * @li EINA_VALUE_TYPE_SHORT: short*
1336 * @li EINA_VALUE_TYPE_INT: int*
1337 * @li EINA_VALUE_TYPE_LONG: long*
1338 * @li EINA_VALUE_TYPE_INT64: int64_t*
1339 * @li EINA_VALUE_TYPE_FLOAT: float*
1340 * @li EINA_VALUE_TYPE_DOUBLE: double*
1341 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
1342 * @li EINA_VALUE_TYPE_STRING: const char **
1343 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array*
1344 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
1345 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
1346 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
1347 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
1348 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
1349 *
1350 * @note the pointer contents are written using the size defined by
1351 * type. It can be larger than void* or uint64_t.
1352 *
1353 * @code
1354 * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
1355 * int x = 1234;
1356 *
1357 * eina_value_array_pinsert(value, 0, &x);
1358 * eina_value_array_pget(value, 0, &x);
1359 * eina_value_free(value);
1360 * @endcode
1361 *
1362 * @see eina_value_array_set()
1363 * @see eina_value_array_get()
1364 * @see eina_value_array_vset()
1365 * @see eina_value_array_insert()
1366 * @see eina_value_array_vinsert()
1367 * @see eina_value_array_pinsert()
1368 * @see eina_value_array_append()
1369 * @see eina_value_array_vappend()
1370 * @see eina_value_array_pappend()
1371 *
1372 * @since 1.2
1373 */
1374static inline Eina_Bool eina_value_array_pinsert(Eina_Value *value,
1375 unsigned int position,
1376 const void *ptr) EINA_ARG_NONNULL(1);
1377
1378/**
1379 * @brief Append a generic value to an array from a pointer.
1380 * @param value source value object
1381 * @param ptr pointer to specify the contents.
1382 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1383 *
1384 * The pointer type is dependent on chosen value type. The list for
1385 * basic types:
1386 *
1387 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
1388 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
1389 * @li EINA_VALUE_TYPE_UINT: unsigned int*
1390 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
1391 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
1392 * @li EINA_VALUE_TYPE_CHAR: char*
1393 * @li EINA_VALUE_TYPE_SHORT: short*
1394 * @li EINA_VALUE_TYPE_INT: int*
1395 * @li EINA_VALUE_TYPE_LONG: long*
1396 * @li EINA_VALUE_TYPE_INT64: int64_t*
1397 * @li EINA_VALUE_TYPE_FLOAT: float*
1398 * @li EINA_VALUE_TYPE_DOUBLE: double*
1399 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
1400 * @li EINA_VALUE_TYPE_STRING: const char **
1401 * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array*
1402 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
1403 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
1404 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
1405 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
1406 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
1407 *
1408 * @note the pointer contents are written using the size defined by
1409 * type. It can be larger than void* or uint64_t.
1410 *
1411 * @code
1412 * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
1413 * int x = 1234;
1414 *
1415 * eina_value_array_pappend(value, &x);
1416 * eina_value_array_pget(value, 0, &x);
1417 * eina_value_free(value);
1418 * @endcode
1419 *
1420 * @see eina_value_array_set()
1421 * @see eina_value_array_get()
1422 * @see eina_value_array_vset()
1423 * @see eina_value_array_insert()
1424 * @see eina_value_array_vinsert()
1425 * @see eina_value_array_pinsert()
1426 * @see eina_value_array_append()
1427 * @see eina_value_array_vappend()
1428 * @see eina_value_array_pappend()
1429 *
1430 * @since 1.2
1431 */
1432static inline Eina_Bool eina_value_array_pappend(Eina_Value *value,
1433 const void *ptr) EINA_ARG_NONNULL(1);
1434
1435/**
1436 * @}
1437 */
1438
1439
1440/**
1441 * @defgroup Eina_Value_List_Group Generic Value List management
1442 *
1443 * @{
1444 */
1445
1446
1447/**
1448 * @typedef Eina_Value_List
1449 * Value type for #EINA_VALUE_TYPE_LIST
1450 *
1451 * @since 1.2
1452 */
1453typedef struct _Eina_Value_List Eina_Value_List;
1454
1455/**
1456 * @struct _Eina_Value_List
1457 * Used to store the list and its subtype.
1458 */
1459struct _Eina_Value_List
1460{
1461 const Eina_Value_Type *subtype; /**< how to allocate and access items */
1462 Eina_List *list; /**< the list that holds data, members are of subtype->value_size bytes. */
1463};
1464
1465/**
1466 * @brief Create generic value storage of type list.
1467 * @param subtype how to manage this list members.
1468 * @return The new value or @c NULL on failure.
1469 *
1470 * Create a new generic value storage of type list. The members are
1471 * managed using the description specified by @a subtype.
1472 *
1473 * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or
1474 * #EINA_ERROR_VALUE_FAILED is set.
1475 *
1476 * @note this creates from mempool and then uses
1477 * eina_value_list_setup().
1478 *
1479 * @see eina_value_free()
1480 * @see eina_value_list_setup()
1481 *
1482 * @since 1.2
1483 */
1484EAPI Eina_Value *eina_value_list_new(const Eina_Value_Type *subtype) EINA_ARG_NONNULL(1);
1485
1486/**
1487 * @brief Initialize generic value storage of type list.
1488 * @param value value object
1489 * @param subtype how to manage this list members.
1490 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1491 *
1492 * Initializes new generic value storage of type list with the given
1493 * @a subtype.
1494 *
1495 * This is the same as calling eina_value_set() with
1496 * #EINA_VALUE_TYPE_LIST followed by eina_value_pset() with the
1497 * #Eina_Value_List description configured.
1498 *
1499 * @note Existing contents are ignored! If the value was previously used, then
1500 * use eina_value_flush() first.
1501 *
1502 * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY
1503 * or #EINA_ERROR_VALUE_FAILED is set.
1504 *
1505 * @see eina_value_flush()
1506 *
1507 * @since 1.2
1508 */
1509static inline Eina_Bool eina_value_list_setup(Eina_Value *value,
1510 const Eina_Value_Type *subtype) EINA_ARG_NONNULL(1, 2);
1511
1512/**
1513 * @brief Query number of elements in value of list type.
1514 * @param value value object.
1515 * @return number of child elements.
1516 * @since 1.2
1517 */
1518static inline unsigned int eina_value_list_count(const Eina_Value *value);
1519
1520/**
1521 * @brief Remove element at given position in value of list type.
1522 * @param value value object.
1523 * @param position index of the member
1524 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1525 * @since 1.2
1526 */
1527static inline Eina_Bool eina_value_list_remove(Eina_Value *value,
1528 unsigned int position) EINA_ARG_NONNULL(1);
1529
1530/**
1531 * @brief Set the generic value in an list member.
1532 * @param value source value object
1533 * @param position index of the member
1534 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1535 *
1536 * The variable argument is dependent on chosen subtype. The list for
1537 * basic types:
1538 *
1539 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
1540 * @li EINA_VALUE_TYPE_USHORT: unsigned short
1541 * @li EINA_VALUE_TYPE_UINT: unsigned int
1542 * @li EINA_VALUE_TYPE_ULONG: unsigned long
1543 * @li EINA_VALUE_TYPE_UINT64: uint64_t
1544 * @li EINA_VALUE_TYPE_CHAR: char
1545 * @li EINA_VALUE_TYPE_SHORT: short
1546 * @li EINA_VALUE_TYPE_INT: int
1547 * @li EINA_VALUE_TYPE_LONG: long
1548 * @li EINA_VALUE_TYPE_INT64: int64_t
1549 * @li EINA_VALUE_TYPE_FLOAT: float
1550 * @li EINA_VALUE_TYPE_DOUBLE: double
1551 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
1552 * @li EINA_VALUE_TYPE_STRING: const char *
1553 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List
1554 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
1555 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
1556 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
1557 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
1558 *
1559 * @code
1560 * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
1561 * int x;
1562 *
1563 * eina_value_list_append(value, 1234);
1564 * eina_value_list_set(value, 0, 5678);
1565 * eina_value_list_get(value, 0, &x);
1566 * eina_value_free(value);
1567 * @endcode
1568 *
1569 * @see eina_value_list_get()
1570 * @see eina_value_list_vset()
1571 * @see eina_value_list_pset()
1572 * @see eina_value_list_insert()
1573 * @see eina_value_list_vinsert()
1574 * @see eina_value_list_pinsert()
1575 * @see eina_value_list_append()
1576 * @see eina_value_list_vappend()
1577 * @see eina_value_list_pappend()
1578 *
1579 * @since 1.2
1580 */
1581static inline Eina_Bool eina_value_list_set(Eina_Value *value,
1582 unsigned int position,
1583 ...) EINA_ARG_NONNULL(1);
1584
1585/**
1586 * @brief Get the generic value from an list member.
1587 * @param value source value object
1588 * @param position index of the member
1589 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1590 *
1591 * The value is returned in the variable argument parameter, the
1592 * actual value is type-dependent, but usually it will be what is
1593 * stored inside the object. There shouldn't be any memory allocation,
1594 * thus the contents should @b not be freed.
1595 *
1596 * The variable argument is dependent on chosen subtype. The list for
1597 * basic types:
1598 *
1599 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
1600 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
1601 * @li EINA_VALUE_TYPE_UINT: unsigned int*
1602 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
1603 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
1604 * @li EINA_VALUE_TYPE_CHAR: char*
1605 * @li EINA_VALUE_TYPE_SHORT: short*
1606 * @li EINA_VALUE_TYPE_INT: int*
1607 * @li EINA_VALUE_TYPE_LONG: long*
1608 * @li EINA_VALUE_TYPE_INT64: int64_t*
1609 * @li EINA_VALUE_TYPE_FLOAT: float*
1610 * @li EINA_VALUE_TYPE_DOUBLE: double*
1611 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
1612 * @li EINA_VALUE_TYPE_STRING: const char **
1613 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
1614 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
1615 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
1616 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
1617 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
1618 *
1619 * @code
1620 * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
1621 * int x;
1622 *
1623 * eina_value_list_append(value, 1234);
1624 * eina_value_list_get(value, 0, &x);
1625 * eina_value_free(value);
1626 * @endcode
1627 *
1628 * @see eina_value_list_set()
1629 * @see eina_value_list_vset()
1630 * @see eina_value_list_pset()
1631 *
1632 * @since 1.2
1633 */
1634static inline Eina_Bool eina_value_list_get(const Eina_Value *value,
1635 unsigned int position,
1636 ...) EINA_ARG_NONNULL(1);
1637
1638/**
1639 * @brief Insert the generic value in an list member position.
1640 * @param value source value object
1641 * @param position index of the member
1642 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1643 *
1644 * The variable argument is dependent on chosen subtype. The list for
1645 * basic types:
1646 *
1647 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
1648 * @li EINA_VALUE_TYPE_USHORT: unsigned short
1649 * @li EINA_VALUE_TYPE_UINT: unsigned int
1650 * @li EINA_VALUE_TYPE_ULONG: unsigned long
1651 * @li EINA_VALUE_TYPE_UINT64: uint64_t
1652 * @li EINA_VALUE_TYPE_CHAR: char
1653 * @li EINA_VALUE_TYPE_SHORT: short
1654 * @li EINA_VALUE_TYPE_INT: int
1655 * @li EINA_VALUE_TYPE_LONG: long
1656 * @li EINA_VALUE_TYPE_INT64: int64_t
1657 * @li EINA_VALUE_TYPE_FLOAT: float
1658 * @li EINA_VALUE_TYPE_DOUBLE: double
1659 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
1660 * @li EINA_VALUE_TYPE_STRING: const char *
1661 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List
1662 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
1663 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
1664 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
1665 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
1666 *
1667 * @code
1668 * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
1669 * int x;
1670 *
1671 * eina_value_list_insert(value, 0, 1234);
1672 * eina_value_list_get(value, 0, &x);
1673 * eina_value_free(value);
1674 * @endcode
1675 *
1676 * @see eina_value_list_set()
1677 * @see eina_value_list_get()
1678 * @see eina_value_list_vset()
1679 * @see eina_value_list_pset()
1680 * @see eina_value_list_vinsert()
1681 * @see eina_value_list_pinsert()
1682 * @see eina_value_list_append()
1683 * @see eina_value_list_vappend()
1684 * @see eina_value_list_pappend()
1685 *
1686 * @since 1.2
1687 */
1688static inline Eina_Bool eina_value_list_insert(Eina_Value *value,
1689 unsigned int position,
1690 ...) EINA_ARG_NONNULL(1);
1691
1692
1693/**
1694 * @brief Append the generic value in an list.
1695 * @param value source value object
1696 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1697 *
1698 * The variable argument is dependent on chosen subtype. The list for
1699 * basic types:
1700 *
1701 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
1702 * @li EINA_VALUE_TYPE_USHORT: unsigned short
1703 * @li EINA_VALUE_TYPE_UINT: unsigned int
1704 * @li EINA_VALUE_TYPE_ULONG: unsigned long
1705 * @li EINA_VALUE_TYPE_UINT64: uint64_t
1706 * @li EINA_VALUE_TYPE_CHAR: char
1707 * @li EINA_VALUE_TYPE_SHORT: short
1708 * @li EINA_VALUE_TYPE_INT: int
1709 * @li EINA_VALUE_TYPE_LONG: long
1710 * @li EINA_VALUE_TYPE_INT64: int64_t
1711 * @li EINA_VALUE_TYPE_FLOAT: float
1712 * @li EINA_VALUE_TYPE_DOUBLE: double
1713 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
1714 * @li EINA_VALUE_TYPE_STRING: const char *
1715 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List
1716 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
1717 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
1718 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
1719 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
1720 *
1721 * @code
1722 * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
1723 * int x;
1724 *
1725 * eina_value_list_append(value, 1234);
1726 * eina_value_list_get(value, 0, &x);
1727 * eina_value_free(value);
1728 * @endcode
1729 *
1730 * @see eina_value_list_set()
1731 * @see eina_value_list_get()
1732 * @see eina_value_list_vset()
1733 * @see eina_value_list_pset()
1734 * @see eina_value_list_vinsert()
1735 * @see eina_value_list_pinsert()
1736 * @see eina_value_list_append()
1737 * @see eina_value_list_vappend()
1738 * @see eina_value_list_pappend()
1739 *
1740 * @since 1.2
1741 */
1742static inline Eina_Bool eina_value_list_append(Eina_Value *value,
1743 ...) EINA_ARG_NONNULL(1);
1744
1745/**
1746 * @brief Set the generic value in an list member.
1747 * @param value source value object
1748 * @param position index of the member
1749 * @param args variable argument
1750 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1751 * @see eina_value_list_set()
1752 * @see eina_value_list_get()
1753 * @see eina_value_list_pset()
1754 * @see eina_value_list_insert()
1755 * @see eina_value_list_vinsert()
1756 * @see eina_value_list_pinsert()
1757 * @see eina_value_list_append()
1758 * @see eina_value_list_vappend()
1759 * @see eina_value_list_pappend()
1760 *
1761 * @since 1.2
1762 */
1763static inline Eina_Bool eina_value_list_vset(Eina_Value *value,
1764 unsigned int position,
1765 va_list args) EINA_ARG_NONNULL(1);
1766
1767/**
1768 * @brief Get the generic value from an list member.
1769 * @param value source value object
1770 * @param position index of the member
1771 * @param args variable argument
1772 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1773 *
1774 * The value is returned in the variable argument parameter, the
1775 * actual value is type-dependent, but usually it will be what is
1776 * stored inside the object. There shouldn't be any memory allocation,
1777 * thus the contents should @b not be freed.
1778 *
1779 * @see eina_value_list_vset()
1780 * @see eina_value_list_get()
1781 * @see eina_value_list_pget()
1782 *
1783 * @since 1.2
1784 */
1785static inline Eina_Bool eina_value_list_vget(const Eina_Value *value,
1786 unsigned int position,
1787 va_list args) EINA_ARG_NONNULL(1);
1788/**
1789 * @brief Insert the generic value in an list member position.
1790 * @param value source value object
1791 * @param position index of the member
1792 * @param args variable argument
1793 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1794 * @see eina_value_list_set()
1795 * @see eina_value_list_get()
1796 * @see eina_value_list_vset()
1797 * @see eina_value_list_pset()
1798 * @see eina_value_list_insert()
1799 * @see eina_value_list_pinsert()
1800 * @see eina_value_list_append()
1801 * @see eina_value_list_vappend()
1802 * @see eina_value_list_pappend()
1803 *
1804 * @since 1.2
1805 */
1806static inline Eina_Bool eina_value_list_vinsert(Eina_Value *value,
1807 unsigned int position,
1808 va_list args) EINA_ARG_NONNULL(1);
1809
1810/**
1811 * @brief Append the generic value in an list.
1812 * @param value source value object
1813 * @param args variable argument
1814 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1815 * @see eina_value_list_set()
1816 * @see eina_value_list_get()
1817 * @see eina_value_list_vget()
1818 * @see eina_value_list_pset()
1819 * @see eina_value_list_insert()
1820 * @see eina_value_list_vinsert()
1821 * @see eina_value_list_pinsert()
1822 * @see eina_value_list_append()
1823 * @see eina_value_list_pappend()
1824 *
1825 * @since 1.2
1826 */
1827static inline Eina_Bool eina_value_list_vappend(Eina_Value *value,
1828 va_list args) EINA_ARG_NONNULL(1);
1829
1830
1831/**
1832 * @brief Set the generic value in an list member from pointer.
1833 * @param value source value object
1834 * @param position index of the member
1835 * @param ptr pointer to specify the contents.
1836 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1837 *
1838 * The pointer type is dependent on chosen value type. The list for
1839 * basic types:
1840 *
1841 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
1842 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
1843 * @li EINA_VALUE_TYPE_UINT: unsigned int*
1844 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
1845 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
1846 * @li EINA_VALUE_TYPE_CHAR: char*
1847 * @li EINA_VALUE_TYPE_SHORT: short*
1848 * @li EINA_VALUE_TYPE_INT: int*
1849 * @li EINA_VALUE_TYPE_LONG: long*
1850 * @li EINA_VALUE_TYPE_INT64: int64_t*
1851 * @li EINA_VALUE_TYPE_FLOAT: float*
1852 * @li EINA_VALUE_TYPE_DOUBLE: double*
1853 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
1854 * @li EINA_VALUE_TYPE_STRING: const char **
1855 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
1856 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
1857 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
1858 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
1859 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
1860 *
1861 * @note the pointer contents are written using the size defined by
1862 * type. It can be larger than void* or uint64_t.
1863 *
1864 * @code
1865 * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
1866 * int x = 1234;
1867 *
1868 * eina_value_list_append(value, 1234);
1869 * eina_value_list_pset(value, 0, &x);
1870 * eina_value_list_pget(value, 0, &x);
1871 * eina_value_free(value);
1872 * @endcode
1873 *
1874 * @see eina_value_list_set()
1875 * @see eina_value_list_get()
1876 * @see eina_value_list_vset()
1877 * @see eina_value_list_insert()
1878 * @see eina_value_list_vinsert()
1879 * @see eina_value_list_pinsert()
1880 * @see eina_value_list_append()
1881 * @see eina_value_list_vappend()
1882 * @see eina_value_list_pappend()
1883 *
1884 * @since 1.2
1885 */
1886static inline Eina_Bool eina_value_list_pset(Eina_Value *value,
1887 unsigned int position,
1888 const void *ptr) EINA_ARG_NONNULL(1, 3);
1889
1890/**
1891 * @brief Get the generic value to pointer from an list member.
1892 * @param value source value object
1893 * @param position index of the member
1894 * @param ptr pointer to receive the contents.
1895 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1896 *
1897 * The value is returned in pointer contents, the actual value is
1898 * type-dependent, but usually it will be what is stored inside the
1899 * object. There shouldn't be any memory allocation, thus the contents
1900 * should @b not be freed.
1901 *
1902 * The pointer type is dependent on chosen value type. The list for
1903 * basic types:
1904 *
1905 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
1906 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
1907 * @li EINA_VALUE_TYPE_UINT: unsigned int*
1908 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
1909 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
1910 * @li EINA_VALUE_TYPE_CHAR: char*
1911 * @li EINA_VALUE_TYPE_SHORT: short*
1912 * @li EINA_VALUE_TYPE_INT: int*
1913 * @li EINA_VALUE_TYPE_LONG: long*
1914 * @li EINA_VALUE_TYPE_INT64: int64_t*
1915 * @li EINA_VALUE_TYPE_FLOAT: float*
1916 * @li EINA_VALUE_TYPE_DOUBLE: double*
1917 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
1918 * @li EINA_VALUE_TYPE_STRING: const char **
1919 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
1920 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
1921 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
1922 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
1923 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
1924 *
1925 * @code
1926 * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
1927 * int x;
1928 *
1929 * eina_value_list_append(value, 1234);
1930 * eina_value_list_pget(value, 0, &x);
1931 * eina_value_free(value);
1932 * @endcode
1933 *
1934 * @see eina_value_list_set()
1935 * @see eina_value_list_vset()
1936 * @see eina_value_list_pset()
1937 *
1938 * @since 1.2
1939 */
1940static inline Eina_Bool eina_value_list_pget(const Eina_Value *value,
1941 unsigned int position,
1942 void *ptr) EINA_ARG_NONNULL(1, 3);
1943
1944/**
1945 * @brief Insert the generic value in an list member position from pointer.
1946 * @param value source value object
1947 * @param position index of the member
1948 * @param ptr pointer to specify the contents.
1949 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
1950 *
1951 * The pointer type is dependent on chosen value type. The list for
1952 * basic types:
1953 *
1954 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
1955 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
1956 * @li EINA_VALUE_TYPE_UINT: unsigned int*
1957 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
1958 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
1959 * @li EINA_VALUE_TYPE_CHAR: char*
1960 * @li EINA_VALUE_TYPE_SHORT: short*
1961 * @li EINA_VALUE_TYPE_INT: int*
1962 * @li EINA_VALUE_TYPE_LONG: long*
1963 * @li EINA_VALUE_TYPE_INT64: int64_t*
1964 * @li EINA_VALUE_TYPE_FLOAT: float*
1965 * @li EINA_VALUE_TYPE_DOUBLE: double*
1966 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
1967 * @li EINA_VALUE_TYPE_STRING: const char **
1968 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
1969 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
1970 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
1971 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
1972 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
1973 *
1974 * @note the pointer contents are written using the size defined by
1975 * type. It can be larger than void* or uint64_t.
1976 *
1977 * @code
1978 * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
1979 * int x = 1234;
1980 *
1981 * eina_value_list_pinsert(value, 0, &x);
1982 * eina_value_list_pget(value, 0, &x);
1983 * eina_value_free(value);
1984 * @endcode
1985 *
1986 * @see eina_value_list_set()
1987 * @see eina_value_list_get()
1988 * @see eina_value_list_vset()
1989 * @see eina_value_list_insert()
1990 * @see eina_value_list_vinsert()
1991 * @see eina_value_list_pinsert()
1992 * @see eina_value_list_append()
1993 * @see eina_value_list_vappend()
1994 * @see eina_value_list_pappend()
1995 *
1996 * @since 1.2
1997 */
1998static inline Eina_Bool eina_value_list_pinsert(Eina_Value *value,
1999 unsigned int position,
2000 const void *ptr) EINA_ARG_NONNULL(1);
2001
2002/**
2003 * @brief Append the generic value in an list from pointer.
2004 * @param value source value object
2005 * @param ptr pointer to specify the contents.
2006 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2007 *
2008 * The pointer type is dependent on chosen value type. The list for
2009 * basic types:
2010 *
2011 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
2012 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
2013 * @li EINA_VALUE_TYPE_UINT: unsigned int*
2014 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
2015 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
2016 * @li EINA_VALUE_TYPE_CHAR: char*
2017 * @li EINA_VALUE_TYPE_SHORT: short*
2018 * @li EINA_VALUE_TYPE_INT: int*
2019 * @li EINA_VALUE_TYPE_LONG: long*
2020 * @li EINA_VALUE_TYPE_INT64: int64_t*
2021 * @li EINA_VALUE_TYPE_FLOAT: float*
2022 * @li EINA_VALUE_TYPE_DOUBLE: double*
2023 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
2024 * @li EINA_VALUE_TYPE_STRING: const char **
2025 * @li EINA_VALUE_TYPE_LIST: Eina_Value_List*
2026 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
2027 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2028 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2029 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2030 *
2031 * @note the pointer contents are written using the size defined by
2032 * type. It can be larger than void* or uint64_t.
2033 *
2034 * @code
2035 * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
2036 * int x = 1234;
2037 *
2038 * eina_value_list_pappend(value, &x);
2039 * eina_value_list_pget(value, 0, &x);
2040 * eina_value_free(value);
2041 * @endcode
2042 *
2043 * @see eina_value_list_set()
2044 * @see eina_value_list_get()
2045 * @see eina_value_list_vset()
2046 * @see eina_value_list_insert()
2047 * @see eina_value_list_vinsert()
2048 * @see eina_value_list_pinsert()
2049 * @see eina_value_list_append()
2050 * @see eina_value_list_vappend()
2051 * @see eina_value_list_pappend()
2052 *
2053 * @since 1.2
2054 */
2055static inline Eina_Bool eina_value_list_pappend(Eina_Value *value,
2056 const void *ptr) EINA_ARG_NONNULL(1);
2057
2058/**
2059 * @}
2060 */
2061
2062/**
2063 * @defgroup Eina_Value_Hash_Group Generic Value Hash management
2064 *
2065 * @{
2066 */
2067
2068/**
2069 * @typedef Eina_Value_Hash
2070 * Value type for #EINA_VALUE_TYPE_HASH
2071 *
2072 * @since 1.2
2073 */
2074typedef struct _Eina_Value_Hash Eina_Value_Hash;
2075
2076/**
2077 * @struct _Eina_Value_Hash
2078 * Used to store the hash and its subtype.
2079 */
2080struct _Eina_Value_Hash
2081{
2082 const Eina_Value_Type *subtype; /**< how to allocate and access items */
2083 unsigned int buckets_power_size; /**< how to allocate hash buckets, if zero a sane default is chosen. */
2084 Eina_Hash *hash; /**< the hash that holds data, members are of subtype->value_size bytes. */
2085};
2086
2087/**
2088 * @brief Create generic value storage of type hash.
2089 * @param subtype how to manage this hash members.
2090 * @param buckets_power_size how to allocate hash buckets (2 ^
2091 * buckets_power_size), if zero then a sane value is chosen.
2092 * @return The new value or @c NULL on failure.
2093 *
2094 * Create a new generic value storage of type hash. The members are
2095 * managed using the description specified by @a subtype.
2096 *
2097 * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or
2098 * #EINA_ERROR_VALUE_FAILED is set.
2099 *
2100 * @note this creates from mempool and then uses
2101 * eina_value_hash_setup().
2102 *
2103 * @see eina_value_free()
2104 * @see eina_value_hash_setup()
2105 *
2106 * @since 1.2
2107 */
2108EAPI Eina_Value *eina_value_hash_new(const Eina_Value_Type *subtype, unsigned int buckets_power_size) EINA_ARG_NONNULL(1);
2109
2110/**
2111 * @brief Initialize generic value storage of type hash.
2112 * @param value value object
2113 * @param subtype how to manage this hash members.
2114 * @param buckets_power_size how to allocate hash buckets (2 ^
2115 * buckets_power_size), if zero then a sane value is chosen.
2116 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2117 *
2118 * Initializes new generic value storage of type hash with the given
2119 * @a subtype.
2120 *
2121 * This is the same as calling eina_value_set() with
2122 * #EINA_VALUE_TYPE_HASH followed by eina_value_pset() with the
2123 * #Eina_Value_Hash description configured.
2124 *
2125 * @note Existing contents are ignored! If the value was previously used, then
2126 * use eina_value_flush() first.
2127 *
2128 * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY
2129 * or #EINA_ERROR_VALUE_FAILED is set.
2130 *
2131 * @see eina_value_flush()
2132 *
2133 * @since 1.2
2134 */
2135static inline Eina_Bool eina_value_hash_setup(Eina_Value *value,
2136 const Eina_Value_Type *subtype,
2137 unsigned int buckets_power_size) EINA_ARG_NONNULL(1, 2);
2138
2139/**
2140 * @brief Query number of elements in value of hash type.
2141 * @param value value object.
2142 * @return number of child elements.
2143 * @since 1.2
2144 */
2145static inline unsigned int eina_value_hash_population(const Eina_Value *value);
2146
2147/**
2148 * @brief Remove element at given position in value of hash type.
2149 * @param value value object.
2150 * @param key key to find the member
2151 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2152 * @since 1.2
2153 */
2154static inline Eina_Bool eina_value_hash_del(Eina_Value *value,
2155 const char *key) EINA_ARG_NONNULL(1);
2156
2157/**
2158 * @brief Set the generic value in an hash member.
2159 * @param value source value object
2160 * @param key key to find the member
2161 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2162 *
2163 * The variable argument is dependent on chosen subtype. The list for
2164 * basic types:
2165 *
2166 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
2167 * @li EINA_VALUE_TYPE_USHORT: unsigned short
2168 * @li EINA_VALUE_TYPE_UINT: unsigned int
2169 * @li EINA_VALUE_TYPE_ULONG: unsigned long
2170 * @li EINA_VALUE_TYPE_UINT64: uint64_t
2171 * @li EINA_VALUE_TYPE_CHAR: char
2172 * @li EINA_VALUE_TYPE_SHORT: short
2173 * @li EINA_VALUE_TYPE_INT: int
2174 * @li EINA_VALUE_TYPE_LONG: long
2175 * @li EINA_VALUE_TYPE_INT64: int64_t
2176 * @li EINA_VALUE_TYPE_FLOAT: float
2177 * @li EINA_VALUE_TYPE_DOUBLE: double
2178 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
2179 * @li EINA_VALUE_TYPE_STRING: const char *
2180 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
2181 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2182 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2183 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2184 *
2185 * @code
2186 * Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
2187 * int x;
2188 *
2189 * eina_value_hash_set(value, "abc", 5678);
2190 * eina_value_hash_get(value, "abc", &x);
2191 * eina_value_free(value);
2192 * @endcode
2193 *
2194 * @see eina_value_hash_get()
2195 * @see eina_value_hash_vset()
2196 * @see eina_value_hash_pset()
2197 * @see eina_value_hash_del()
2198 *
2199 * @since 1.2
2200 */
2201static inline Eina_Bool eina_value_hash_set(Eina_Value *value,
2202 const char *key,
2203 ...) EINA_ARG_NONNULL(1);
2204
2205/**
2206 * @brief Get the generic value from an hash member.
2207 * @param value source value object
2208 * @param key key to find the member
2209 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2210 *
2211 * The value is returned in the variable argument parameter, the
2212 * actual value is type-dependent, but usually it will be what is
2213 * stored inside the object. There shouldn't be any memory allocation,
2214 * thus the contents should @b not be freed.
2215 *
2216 * The variable argument is dependent on chosen subtype. The list for
2217 * basic types:
2218 *
2219 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
2220 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
2221 * @li EINA_VALUE_TYPE_UINT: unsigned int*
2222 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
2223 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
2224 * @li EINA_VALUE_TYPE_CHAR: char*
2225 * @li EINA_VALUE_TYPE_SHORT: short*
2226 * @li EINA_VALUE_TYPE_INT: int*
2227 * @li EINA_VALUE_TYPE_LONG: long*
2228 * @li EINA_VALUE_TYPE_INT64: int64_t*
2229 * @li EINA_VALUE_TYPE_FLOAT: float*
2230 * @li EINA_VALUE_TYPE_DOUBLE: double*
2231 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
2232 * @li EINA_VALUE_TYPE_STRING: const char **
2233 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
2234 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2235 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2236 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2237 *
2238 * @code
2239 * Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
2240 * int x;
2241 *
2242 * eina_value_hash_set(value, "abc", 1234);
2243 * eina_value_hash_get(value, "abc", &x);
2244 * eina_value_free(value);
2245 * @endcode
2246 *
2247 * @see eina_value_hash_set()
2248 * @see eina_value_hash_vset()
2249 * @see eina_value_hash_pset()
2250 *
2251 * @since 1.2
2252 */
2253static inline Eina_Bool eina_value_hash_get(const Eina_Value *value,
2254 const char *key,
2255 ...) EINA_ARG_NONNULL(1);
2256
2257/**
2258 * @brief Set the generic value in an hash member.
2259 * @param value source value object
2260 * @param key key to find the member
2261 * @param args variable argument
2262 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2263 * @see eina_value_hash_set()
2264 * @see eina_value_hash_get()
2265 * @see eina_value_hash_pset()
2266 *
2267 * @since 1.2
2268 */
2269static inline Eina_Bool eina_value_hash_vset(Eina_Value *value,
2270 const char *key,
2271 va_list args) EINA_ARG_NONNULL(1);
2272
2273/**
2274 * @brief Get the generic value from an hash member.
2275 * @param value source value object
2276 * @param key key to find the member
2277 * @param args variable argument
2278 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2279 *
2280 * The value is returned in the variable argument parameter, the
2281 * actual value is type-dependent, but usually it will be what is
2282 * stored inside the object. There shouldn't be any memory allocation,
2283 * thus the contents should @b not be freed.
2284 *
2285 * @see eina_value_hash_vset()
2286 * @see eina_value_hash_get()
2287 * @see eina_value_hash_pget()
2288 *
2289 * @since 1.2
2290 */
2291static inline Eina_Bool eina_value_hash_vget(const Eina_Value *value,
2292 const char *key,
2293 va_list args) EINA_ARG_NONNULL(1);
2294
2295/**
2296 * @brief Set the generic value in an hash member from pointer.
2297 * @param value source value object
2298 * @param key key to find the member
2299 * @param ptr pointer to specify the contents.
2300 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2301 *
2302 * The pointer type is dependent on chosen value type. The list for
2303 * basic types:
2304 *
2305 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
2306 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
2307 * @li EINA_VALUE_TYPE_UINT: unsigned int*
2308 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
2309 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
2310 * @li EINA_VALUE_TYPE_CHAR: char*
2311 * @li EINA_VALUE_TYPE_SHORT: short*
2312 * @li EINA_VALUE_TYPE_INT: int*
2313 * @li EINA_VALUE_TYPE_LONG: long*
2314 * @li EINA_VALUE_TYPE_INT64: int64_t*
2315 * @li EINA_VALUE_TYPE_FLOAT: float*
2316 * @li EINA_VALUE_TYPE_DOUBLE: double*
2317 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
2318 * @li EINA_VALUE_TYPE_STRING: const char **
2319 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
2320 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2321 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2322 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2323 *
2324 * @note the pointer contents are written using the size defined by
2325 * type. It can be larger than void* or uint64_t.
2326 *
2327 * @code
2328 * Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
2329 * int x = 1234;
2330 *
2331 * eina_value_hash_pset(value, "abc", &x);
2332 * eina_value_hash_pget(value, "abc", &x);
2333 * eina_value_free(value);
2334 * @endcode
2335 *
2336 * @see eina_value_hash_set()
2337 * @see eina_value_hash_get()
2338 * @see eina_value_hash_vset()
2339 *
2340 * @since 1.2
2341 */
2342static inline Eina_Bool eina_value_hash_pset(Eina_Value *value,
2343 const char *key,
2344 const void *ptr) EINA_ARG_NONNULL(1, 3);
2345
2346/**
2347 * @brief Get the generic value to pointer from an hash member.
2348 * @param value source value object
2349 * @param key key to find the member
2350 * @param ptr pointer to receive the contents.
2351 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2352 *
2353 * The value is returned in pointer contents, the actual value is
2354 * type-dependent, but usually it will be what is stored inside the
2355 * object. There shouldn't be any memory allocation, thus the contents
2356 * should @b not be freed.
2357 *
2358 * The pointer type is dependent on chosen value type. The list for
2359 * basic types:
2360 *
2361 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
2362 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
2363 * @li EINA_VALUE_TYPE_UINT: unsigned int*
2364 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
2365 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
2366 * @li EINA_VALUE_TYPE_CHAR: char*
2367 * @li EINA_VALUE_TYPE_SHORT: short*
2368 * @li EINA_VALUE_TYPE_INT: int*
2369 * @li EINA_VALUE_TYPE_LONG: long*
2370 * @li EINA_VALUE_TYPE_INT64: int64_t*
2371 * @li EINA_VALUE_TYPE_FLOAT: float*
2372 * @li EINA_VALUE_TYPE_DOUBLE: double*
2373 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
2374 * @li EINA_VALUE_TYPE_STRING: const char **
2375 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
2376 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2377 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2378 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2379 *
2380 * @code
2381 * Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
2382 * int x;
2383 *
2384 * eina_value_hash_set(value, "abc", 1234);
2385 * eina_value_hash_pget(value, "abc", &x);
2386 * eina_value_free(value);
2387 * @endcode
2388 *
2389 * @see eina_value_hash_set()
2390 * @see eina_value_hash_vset()
2391 * @see eina_value_hash_pset()
2392 *
2393 * @since 1.2
2394 */
2395static inline Eina_Bool eina_value_hash_pget(const Eina_Value *value,
2396 const char *key,
2397 void *ptr) EINA_ARG_NONNULL(1, 3);
2398
2399/**
2400 * @}
2401 */
2402
2403/**
2404 * @defgroup Eina_Value_Blob_Group Generic Value Blob management
2405 *
2406 * @{
2407 */
2408
2409/**
2410 * @typedef Eina_Value_Blob_Operations
2411 * How to manage blob. Any @c NULL callback is ignored.
2412 * @since 1.2
2413 */
2414typedef struct _Eina_Value_Blob_Operations Eina_Value_Blob_Operations;
2415
2416/**
2417 * @struct _Eina_Value_Blob_Operations
2418 * How to manage blob. Any @c NULL callback is ignored.
2419 * @since 1.2
2420 */
2421struct _Eina_Value_Blob_Operations
2422{
2423#define EINA_VALUE_BLOB_OPERATIONS_VERSION (1)
2424 unsigned int version; /**< must be EINA_VALUE_BLOB_OPERATIONS_VERSION */
2425 void (*free)(const Eina_Value_Blob_Operations *ops, void *memory, size_t size);
2426 void *(*copy)(const Eina_Value_Blob_Operations *ops, const void *memory, size_t size);
2427 int (*compare)(const Eina_Value_Blob_Operations *ops, const void *data1, size_t size_data1, const void *data2, size_t size_data2);
2428 char *(*to_string)(const Eina_Value_Blob_Operations *ops, const void *memory, size_t size);
2429};
2430
2431/**
2432 * @var EINA_VALUE_BLOB_OPERATIONS_MALLOC
2433 *
2434 * Assumes @c memory was create with malloc() and applies free() to it
2435 * during flush (Eina_Value_Blob_Operations::free). Copy is done with
2436 * malloc() as well.
2437 *
2438 * No compare or to_string are provided, defaults will be used.
2439 */
2440EAPI extern const Eina_Value_Blob_Operations *EINA_VALUE_BLOB_OPERATIONS_MALLOC;
2441
2442/**
2443 * @typedef Eina_Value_Blob
2444 * @since 1.2
2445 */
2446typedef struct _Eina_Value_Blob Eina_Value_Blob;
2447
2448/**
2449 * @struct _Eina_Value_Blob
2450 * @since 1.2
2451 */
2452struct _Eina_Value_Blob
2453{
2454 const Eina_Value_Blob_Operations *ops; /**< if @c NULL, nothing is freed, copy will just copy the memory pointer, not its value. */
2455 const void *memory;
2456 unsigned int size;
2457};
2458
2459/**
2460 * @}
2461 */
2462
2463/**
2464 * @defgroup Eina_Value_Struct_Group Generic Value Struct management
2465 *
2466 * @{
2467 */
2468
2469/**
2470 * @typedef Eina_Value_Struct_Operations
2471 * How to manage struct. Any @c NULL callback is ignored.
2472 * @since 1.2
2473 */
2474typedef struct _Eina_Value_Struct_Operations Eina_Value_Struct_Operations;
2475
2476/**
2477 * @typedef Eina_Value_Struct_Member
2478 * Describes a single member of struct.
2479 * @since 1.2
2480 */
2481typedef struct _Eina_Value_Struct_Member Eina_Value_Struct_Member;
2482
2483/**
2484 * @typedef Eina_Value_Struct_Desc
2485 * Describes the struct by listing its size, members and operations.
2486 * @since 1.2
2487 */
2488typedef struct _Eina_Value_Struct_Desc Eina_Value_Struct_Desc;
2489
2490/**
2491 * @typedef Eina_Value_Struct
2492 * @since 1.2
2493 */
2494typedef struct _Eina_Value_Struct Eina_Value_Struct;
2495
2496/**
2497 * @struct _Eina_Value_Struct_Operations
2498 * How to manage struct. Any @c NULL callback is ignored.
2499 * @since 1.2
2500 */
2501struct _Eina_Value_Struct_Operations
2502{
2503#define EINA_VALUE_STRUCT_OPERATIONS_VERSION (1)
2504 unsigned int version; /**< must be EINA_VALUE_STRUCT_OPERATIONS_VERSION */
2505 void *(*alloc)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc);
2506 void (*free)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, void *memory);
2507 void *(*copy)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const void *memory);
2508 int (*compare)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const void *data1, const void *data2);
2509 const Eina_Value_Struct_Member *(*find_member)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const char *name); /**< replace the function to find description for member. For huge structures consider using binary search, stringshared, hash or gperf. The default function does linear search using strcmp(). */
2510};
2511
2512/**
2513 * @var EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH
2514 *
2515 * Assumes @c members is sorted by name and applies binary search for
2516 * names.
2517 *
2518 * Ideally the @c member_count field is set to speed it up.
2519 *
2520 * No other methods are set (alloc, free, copy, compare), then it uses
2521 * the default operations.
2522 */
2523EAPI extern const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH;
2524
2525/**
2526 * @var EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE
2527 *
2528 * Assumes @c members name are stringshared and can be compared for
2529 * equality without using its contents (simple pointer comparison).
2530 *
2531 * Ideally the search @c name will be stringshared as well, but it
2532 * will do a second loop with a forced stringshare if it did not find
2533 * the member.
2534 *
2535 * No other methods are set (alloc, free, copy, compare), then it uses
2536 * the default operations.
2537 */
2538EAPI extern const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE;
2539
2540/**
2541 * @struct _Eina_Value_Struct_Member
2542 * @since 1.2
2543 */
2544struct _Eina_Value_Struct_Member
2545{
2546 const char *name;
2547 const Eina_Value_Type *type;
2548 unsigned int offset;
2549};
2550
2551/**
2552 * @struct _Eina_Value_Struct_Desc
2553 * @since 1.2
2554 */
2555struct _Eina_Value_Struct_Desc
2556{
2557#define EINA_VALUE_STRUCT_DESC_VERSION (1)
2558 unsigned int version; /**< must be EINA_VALUE_STRUCT_DESC_VERSION */
2559 const Eina_Value_Struct_Operations *ops; /**< operations, if @c NULL defaults will be used. You may use operations to optimize member lookup using binary search or gperf hash. */
2560 const Eina_Value_Struct_Member *members; /**< array of member descriptions, if @c member_count is zero, then it must be @c NULL terminated. */
2561 unsigned int member_count; /**< if > 0, specifies number of members. If zero then @c members must be NULL terminated. */
2562 unsigned int size; /**< byte size to allocate, may be bigger than sum of members */
2563};
2564
2565/**
2566 * @def EINA_VALUE_STRUCT_MEMBER
2567 *
2568 * Helper to define Eina_Value_Struct_Member fields, uses offsetof()
2569 * with type and member.
2570 *
2571 * @since 1.2
2572 */
2573#define EINA_VALUE_STRUCT_MEMBER(eina_value_type, type, member) \
2574 {#member, eina_value_type, offsetof(type, member)}
2575
2576/**
2577 * @def EINA_VALUE_STRUCT_MEMBER_SENTINEL
2578 *
2579 * Helper to define Eina_Value_Struct_Member fields for sentinel (last
2580 * item), useful if you did not define @c member_count.
2581 *
2582 * @since 1.2
2583 */
2584#define EINA_VALUE_STRUCT_MEMBER_SENTINEL {NULL, NULL, 0}
2585
2586
2587/**
2588 * @struct _Eina_Value_Struct
2589 * @since 1.2
2590 */
2591struct _Eina_Value_Struct
2592{
2593 const Eina_Value_Struct_Desc *desc;
2594 void *memory;
2595};
2596
2597/**
2598 * @brief Create generic value storage of type struct.
2599 * @param desc how to manage this struct members.
2600 * @return The new value or @c NULL on failure.
2601 *
2602 * Create a new generic value storage of type struct. The members are
2603 * managed using the description specified by @a desc.
2604 *
2605 * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or
2606 * #EINA_ERROR_VALUE_FAILED is set.
2607 *
2608 * @note this creates from mempool and then uses
2609 * eina_value_struct_setup().
2610 *
2611 * @see eina_value_free()
2612 * @see eina_value_struct_setup()
2613 *
2614 * @since 1.2
2615 */
2616EAPI Eina_Value *eina_value_struct_new(const Eina_Value_Struct_Desc *desc) EINA_ARG_NONNULL(1);
2617
2618/**
2619 * @brief Initialize generic value storage of type struct.
2620 * @param value value object
2621 * @param desc how to manage this struct members.
2622 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2623 *
2624 * Initializes new generic value storage of type struct with the given
2625 * @a desc.
2626 *
2627 * This is the same as calling eina_value_set() with
2628 * #EINA_VALUE_TYPE_STRUCT followed by eina_value_pset() with the
2629 * #Eina_Value_Struct description configured.
2630 *
2631 * @note Existing contents are ignored! If the value was previously used, then
2632 * use eina_value_flush() first.
2633 *
2634 * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY
2635 * or #EINA_ERROR_VALUE_FAILED is set.
2636 *
2637 * @see eina_value_flush()
2638 *
2639 * @since 1.2
2640 */
2641static inline Eina_Bool eina_value_struct_setup(Eina_Value *value,
2642 const Eina_Value_Struct_Desc *desc) EINA_ARG_NONNULL(1, 2);
2643
2644/**
2645 * @brief Set the generic value in an struct member.
2646 * @param value source value object
2647 * @param name name to find the member
2648 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2649 *
2650 * The variable argument is dependent on chosen member type. The list
2651 * for basic types:
2652 *
2653 * @li EINA_VALUE_TYPE_UCHAR: unsigned char
2654 * @li EINA_VALUE_TYPE_USHORT: unsigned short
2655 * @li EINA_VALUE_TYPE_UINT: unsigned int
2656 * @li EINA_VALUE_TYPE_ULONG: unsigned long
2657 * @li EINA_VALUE_TYPE_UINT64: uint64_t
2658 * @li EINA_VALUE_TYPE_CHAR: char
2659 * @li EINA_VALUE_TYPE_SHORT: short
2660 * @li EINA_VALUE_TYPE_INT: int
2661 * @li EINA_VALUE_TYPE_LONG: long
2662 * @li EINA_VALUE_TYPE_INT64: int64_t
2663 * @li EINA_VALUE_TYPE_FLOAT: float
2664 * @li EINA_VALUE_TYPE_DOUBLE: double
2665 * @li EINA_VALUE_TYPE_STRINGSHARE: const char *
2666 * @li EINA_VALUE_TYPE_STRING: const char *
2667 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash
2668 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2669 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2670 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2671 *
2672 * @code
2673 * struct myst {
2674 * int i;
2675 * char c;
2676 * };
2677 * const Eina_Value_Struct_Member myst_members[] = {
2678 * {"i", EINA_VALUE_TYPE_INT, 0},
2679 * {"c", EINA_VALUE_TYPE_CHAR, 4},
2680 * {NULL, NULL, 0}
2681 * };
2682 * const Eina_Value_Struct_Desc myst_desc = {
2683 * EINA_VALUE_STRUCT_DESC_VERSION,
2684 * NULL, myst_members, 2, sizeof(struct myst)
2685 * };
2686 * Eina_Value *value = eina_value_struct_new(&my_desc);
2687 * int x;
2688 * char y;
2689 *
2690 * eina_value_struct_set(value, "i", 5678);
2691 * eina_value_struct_get(value, "i", &x);
2692 * eina_value_struct_set(value, "c", 0xf);
2693 * eina_value_struct_get(value, "c", &y);
2694 * eina_value_free(value);
2695 * @endcode
2696 *
2697 * @see eina_value_struct_get()
2698 * @see eina_value_struct_vset()
2699 * @see eina_value_struct_pset()
2700 *
2701 * @since 1.2
2702 */
2703static inline Eina_Bool eina_value_struct_set(Eina_Value *value,
2704 const char *name,
2705 ...) EINA_ARG_NONNULL(1);
2706
2707/**
2708 * @brief Get the generic value from an struct member.
2709 * @param value source value object
2710 * @param name name to find the member
2711 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2712 *
2713 * The value is returned in the variable argument parameter, the
2714 * actual value is type-dependent, but usually it will be what is
2715 * stored inside the object. There shouldn't be any memory allocation,
2716 * thus the contents should @b not be freed.
2717 *
2718 * The variable argument is dependent on chosen member type. The list
2719 * for basic types:
2720 *
2721 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
2722 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
2723 * @li EINA_VALUE_TYPE_UINT: unsigned int*
2724 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
2725 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
2726 * @li EINA_VALUE_TYPE_CHAR: char*
2727 * @li EINA_VALUE_TYPE_SHORT: short*
2728 * @li EINA_VALUE_TYPE_INT: int*
2729 * @li EINA_VALUE_TYPE_LONG: long*
2730 * @li EINA_VALUE_TYPE_INT64: int64_t*
2731 * @li EINA_VALUE_TYPE_FLOAT: float*
2732 * @li EINA_VALUE_TYPE_DOUBLE: double*
2733 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
2734 * @li EINA_VALUE_TYPE_STRING: const char **
2735 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
2736 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2737 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2738 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2739 *
2740 * @code
2741 * struct myst {
2742 * int i;
2743 * char c;
2744 * };
2745 * const Eina_Value_Struct_Member myst_members[] = {
2746 * {"i", EINA_VALUE_TYPE_INT, 0},
2747 * {"c", EINA_VALUE_TYPE_CHAR, 4},
2748 * {NULL, NULL, 0}
2749 * };
2750 * const Eina_Value_Struct_Desc myst_desc = {
2751 * EINA_VALUE_STRUCT_DESC_VERSION,
2752 * NULL, myst_members, 2, sizeof(struct myst)
2753 * };
2754 * Eina_Value *value = eina_value_struct_new(&my_desc);
2755 * int x;
2756 * char y;
2757 *
2758 * eina_value_struct_set(value, "i", 5678);
2759 * eina_value_struct_get(value, "i", &x);
2760 * eina_value_struct_set(value, "c", 0xf);
2761 * eina_value_struct_get(value, "c", &y);
2762 * eina_value_free(value);
2763 * @endcode
2764 *
2765 * @see eina_value_struct_set()
2766 * @see eina_value_struct_vset()
2767 * @see eina_value_struct_pset()
2768 *
2769 * @since 1.2
2770 */
2771static inline Eina_Bool eina_value_struct_get(const Eina_Value *value,
2772 const char *name,
2773 ...) EINA_ARG_NONNULL(1);
2774
2775/**
2776 * @brief Set the generic value in an struct member.
2777 * @param value source value object
2778 * @param name name to find the member
2779 * @param args variable argument
2780 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2781 * @see eina_value_struct_set()
2782 * @see eina_value_struct_get()
2783 * @see eina_value_struct_pset()
2784 *
2785 * @since 1.2
2786 */
2787static inline Eina_Bool eina_value_struct_vset(Eina_Value *value,
2788 const char *name,
2789 va_list args) EINA_ARG_NONNULL(1);
2790
2791/**
2792 * @brief Get the generic value from an struct member.
2793 * @param value source value object
2794 * @param name name to find the member
2795 * @param args variable argument
2796 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2797 *
2798 * The value is returned in the variable argument parameter, the
2799 * actual value is type-dependent, but usually it will be what is
2800 * stored inside the object. There shouldn't be any memory allocation,
2801 * thus the contents should @b not be freed.
2802 *
2803 * @see eina_value_struct_vset()
2804 * @see eina_value_struct_get()
2805 * @see eina_value_struct_pget()
2806 *
2807 * @since 1.2
2808 */
2809static inline Eina_Bool eina_value_struct_vget(const Eina_Value *value,
2810 const char *name,
2811 va_list args) EINA_ARG_NONNULL(1);
2812
2813/**
2814 * @brief Set the generic value in an struct member from pointer.
2815 * @param value source value object
2816 * @param name name to find the member
2817 * @param ptr pointer to specify the contents.
2818 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2819 *
2820 * The pointer type is dependent on chosen value type. The list for
2821 * basic types:
2822 *
2823 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
2824 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
2825 * @li EINA_VALUE_TYPE_UINT: unsigned int*
2826 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
2827 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
2828 * @li EINA_VALUE_TYPE_CHAR: char*
2829 * @li EINA_VALUE_TYPE_SHORT: short*
2830 * @li EINA_VALUE_TYPE_INT: int*
2831 * @li EINA_VALUE_TYPE_LONG: long*
2832 * @li EINA_VALUE_TYPE_INT64: int64_t*
2833 * @li EINA_VALUE_TYPE_FLOAT: float*
2834 * @li EINA_VALUE_TYPE_DOUBLE: double*
2835 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
2836 * @li EINA_VALUE_TYPE_STRING: const char **
2837 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
2838 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2839 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2840 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2841 *
2842 * @note the pointer contents are written using the size defined by
2843 * type. It can be larger than void* or uint64_t.
2844 *
2845 * @code
2846 * struct myst {
2847 * int i;
2848 * char c;
2849 * };
2850 * const Eina_Value_Struct_Member myst_members[] = {
2851 * {"i", EINA_VALUE_TYPE_INT, 0},
2852 * {"c", EINA_VALUE_TYPE_CHAR, 4},
2853 * {NULL, NULL, 0}
2854 * };
2855 * const Eina_Value_Struct_Desc myst_desc = {
2856 * EINA_VALUE_STRUCT_DESC_VERSION,
2857 * NULL, myst_members, 2, sizeof(struct myst)
2858 * };
2859 * Eina_Value *value = eina_value_struct_new(&my_desc);
2860 * int x = 5678;
2861 * char y = 0xf;
2862 *
2863 * eina_value_struct_pset(value, "i", &);
2864 * eina_value_struct_pget(value, "i", &x);
2865 * eina_value_struct_pset(value, "c", &y);
2866 * eina_value_struct_pget(value, "c", &y);
2867 * eina_value_free(value);
2868 * @endcode
2869 *
2870 * @see eina_value_struct_set()
2871 * @see eina_value_struct_get()
2872 * @see eina_value_struct_vset()
2873 *
2874 * @since 1.2
2875 */
2876static inline Eina_Bool eina_value_struct_pset(Eina_Value *value,
2877 const char *name,
2878 const void *ptr) EINA_ARG_NONNULL(1, 3);
2879
2880/**
2881 * @brief Get the generic value to pointer from an struct member.
2882 * @param value source value object
2883 * @param name name to find the member
2884 * @param ptr pointer to receive the contents.
2885 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
2886 *
2887 * The value is returned in pointer contents, the actual value is
2888 * type-dependent, but usually it will be what is stored inside the
2889 * object. There shouldn't be any memory allocation, thus the contents
2890 * should @b not be freed.
2891 *
2892 * The pointer type is dependent on chosen value type. The list for
2893 * basic types:
2894 *
2895 * @li EINA_VALUE_TYPE_UCHAR: unsigned char*
2896 * @li EINA_VALUE_TYPE_USHORT: unsigned short*
2897 * @li EINA_VALUE_TYPE_UINT: unsigned int*
2898 * @li EINA_VALUE_TYPE_ULONG: unsigned long*
2899 * @li EINA_VALUE_TYPE_UINT64: uint64_t*
2900 * @li EINA_VALUE_TYPE_CHAR: char*
2901 * @li EINA_VALUE_TYPE_SHORT: short*
2902 * @li EINA_VALUE_TYPE_INT: int*
2903 * @li EINA_VALUE_TYPE_LONG: long*
2904 * @li EINA_VALUE_TYPE_INT64: int64_t*
2905 * @li EINA_VALUE_TYPE_FLOAT: float*
2906 * @li EINA_VALUE_TYPE_DOUBLE: double*
2907 * @li EINA_VALUE_TYPE_STRINGSHARE: const char **
2908 * @li EINA_VALUE_TYPE_STRING: const char **
2909 * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
2910 * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
2911 * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
2912 * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
2913 *
2914 * @code
2915 * struct myst {
2916 * int i;
2917 * char c;
2918 * };
2919 * const Eina_Value_Struct_Member myst_members[] = {
2920 * {"i", EINA_VALUE_TYPE_INT, 0},
2921 * {"c", EINA_VALUE_TYPE_CHAR, 4},
2922 * {NULL, NULL, 0}
2923 * };
2924 * const Eina_Value_Struct_Desc myst_desc = {
2925 * EINA_VALUE_STRUCT_DESC_VERSION,
2926 * NULL, myst_members, 2, sizeof(struct myst)
2927 * };
2928 * Eina_Value *value = eina_value_struct_new(&my_desc);
2929 * int x = 5678;
2930 * char y = 0xf;
2931 *
2932 * eina_value_struct_pset(value, "i", &);
2933 * eina_value_struct_pget(value, "i", &x);
2934 * eina_value_struct_pset(value, "c", &y);
2935 * eina_value_struct_pget(value, "c", &y);
2936 * eina_value_free(value);
2937 * @endcode
2938 *
2939 * @see eina_value_struct_set()
2940 * @see eina_value_struct_vset()
2941 * @see eina_value_struct_pset()
2942 *
2943 * @since 1.2
2944 */
2945static inline Eina_Bool eina_value_struct_pget(const Eina_Value *value,
2946 const char *name,
2947 void *ptr) EINA_ARG_NONNULL(1, 3);
2948
2949/**
2950 * @}
2951 */
2952
2953
2954/**
2955 * @defgroup Eina_Value_Type_Group Generic Value Type management
2956 *
2957 * @{
2958 */
2959
2960/**
2961 * @struct _Eina_Value_Type
2962 * API to access values.
2963 *
2964 * @since 1.2
2965 */
2966struct _Eina_Value_Type
2967{
2968 /**
2969 * @def EINA_VALUE_TYPE_VERSION
2970 * Current API version, used to validate type.
2971 */
2972#define EINA_VALUE_TYPE_VERSION (1)
2973 unsigned int version; /**< must be #EINA_VALUE_TYPE_VERSION */
2974 unsigned int value_size; /**< byte size of value */
2975 const char *name; /**< name for debug and introspection */
2976 Eina_Bool (*setup)(const Eina_Value_Type *type, void *mem); /**< mem will be malloc(value_size) and should be configured */
2977 Eina_Bool (*flush)(const Eina_Value_Type *type, void *mem); /**< clear any values from mem */
2978 Eina_Bool (*copy)(const Eina_Value_Type *type, const void *src, void *dst); /**< how to copy values, both memory are @c value_size */
2979 int (*compare)(const Eina_Value_Type *type, const void *a, const void *b); /**< how to compare values, both memory are @c value_size */
2980 Eina_Bool (*convert_to)(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem); /**< how to convert values, both memory are @c value_size */
2981 Eina_Bool (*convert_from)(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem); /**< how to convert values, both memory are @c value_size */
2982 Eina_Bool (*vset)(const Eina_Value_Type *type, void *mem, va_list args); /**< how to set memory from variable argument */
2983 Eina_Bool (*pset)(const Eina_Value_Type *type, void *mem, const void *ptr); /**< how to set memory from pointer */
2984 Eina_Bool (*pget)(const Eina_Value_Type *type, const void *mem, void *ptr); /**< how to read memory */
2985};
2986
2987/**
2988 * @brief Query type name.
2989 * @param type type reference.
2990 * @return string or @c NULL if type is invalid.
2991 * @since 1.2
2992 */
2993EAPI const char *eina_value_type_name_get(const Eina_Value_Type *type) EINA_PURE EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
2994
2995/**
2996 * @brief Check if type is valid.
2997 * @param type type reference.
2998 * @return #EINA_TRUE if valid, #EINA_FALSE otherwise.
2999 *
3000 * A type is invalid if it's NULL or if version field is not the same
3001 * as runtime #EINA_VALUE_TYPE_VERSION.
3002 *
3003 * @since 1.2
3004 */
3005EAPI Eina_Bool eina_value_type_check(const Eina_Value_Type *type) EINA_PURE EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
3006
3007/**
3008 * @brief Initialize memory using type descriptor.
3009 * @param type type reference.
3010 * @param mem memory to operate, must be of size @c type->value_size.
3011 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
3012 * @since 1.2
3013 */
3014static inline Eina_Bool eina_value_type_setup(const Eina_Value_Type *type, void *mem);
3015
3016/**
3017 * @brief Flush (clear) memory using type descriptor.
3018 * @param type type reference.
3019 * @param mem memory to operate, must be of size @c type->value_size.
3020 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
3021 * @since 1.2
3022 */
3023static inline Eina_Bool eina_value_type_flush(const Eina_Value_Type *type, void *mem);
3024
3025/**
3026 * @brief Copy memory using type descriptor.
3027 * @param type type reference.
3028 * @param src memory to operate, must be of size @c type->value_size.
3029 * @param dst memory to operate, must be of size @c type->value_size.
3030 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
3031 * @since 1.2
3032 */
3033static inline Eina_Bool eina_value_type_copy(const Eina_Value_Type *type, const void *src, void *dst);
3034
3035/**
3036 * @brief Compare memory using type descriptor.
3037 * @param type type reference.
3038 * @param a memory to operate, must be of size @c type->value_size.
3039 * @param b memory to operate, must be of size @c type->value_size.
3040 * @return less than zero if a < b, greater than zero if a > b, zero if equal.
3041 * @since 1.2
3042 */
3043static inline int eina_value_type_compare(const Eina_Value_Type *type, const void *a, const void *b);
3044
3045/**
3046 * @brief Convert memory using type descriptor.
3047 * @param type type reference of the source.
3048 * @param convert type reference of the destination.
3049 * @param type_mem memory to operate, must be of size @c type->value_size.
3050 * @param convert_mem memory to operate, must be of size @c convert->value_size.
3051 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
3052 * @since 1.2
3053 */
3054static inline Eina_Bool eina_value_type_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem);
3055
3056/**
3057 * @brief Convert memory using type descriptor.
3058 * @param type type reference of the destination.
3059 * @param convert type reference of the source.
3060 * @param type_mem memory to operate, must be of size @c type->value_size.
3061 * @param convert_mem memory to operate, must be of size @c convert->value_size.
3062 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
3063 * @since 1.2
3064 */
3065static inline Eina_Bool eina_value_type_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem);
3066
3067/**
3068 * @brief Set memory using type descriptor and variable argument.
3069 * @param type type reference of the source.
3070 * @param mem memory to operate, must be of size @c type->value_size.
3071 * @param args input value.
3072 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
3073 * @since 1.2
3074 */
3075static inline Eina_Bool eina_value_type_vset(const Eina_Value_Type *type, void *mem, va_list args);
3076
3077/**
3078 * @brief Set memory using type descriptor and pointer.
3079 * @param type type reference of the source.
3080 * @param mem memory to operate, must be of size @c type->value_size.
3081 * @param ptr pointer to input value.
3082 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
3083 * @since 1.2
3084 */
3085static inline Eina_Bool eina_value_type_pset(const Eina_Value_Type *type, void *mem, const void *ptr);
3086
3087/**
3088 * @brief Get memory using type descriptor.
3089 * @param type type reference of the source.
3090 * @param mem memory to operate, must be of size @c type->value_size.
3091 * @param ptr pointer to output.
3092 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
3093 * @since 1.2
3094 */
3095static inline Eina_Bool eina_value_type_pget(const Eina_Value_Type *type, const void *mem, void *ptr);
3096
3097/**
3098 * @}
3099 */
3100
3101#include "eina_inline_value.x"
3102
3103/**
3104 * @}
3105 */
3106
3107/**
3108 * @}
3109 */
3110
3111/**
3112 * @}
3113 */
3114#endif
diff --git a/libraries/eina/src/include/eina_xattr.h b/libraries/eina/src/include/eina_xattr.h
index 8ddb30a..0f89cc3 100644
--- a/libraries/eina/src/include/eina_xattr.h
+++ b/libraries/eina/src/include/eina_xattr.h
@@ -39,6 +39,14 @@ typedef enum {
39 EINA_XATTR_CREATED /**< This will only succeed if the extended attribute wasn't previously set */ 39 EINA_XATTR_CREATED /**< This will only succeed if the extended attribute wasn't previously set */
40} Eina_Xattr_Flags; 40} Eina_Xattr_Flags;
41 41
42typedef struct _Eina_Xattr Eina_Xattr;
43struct _Eina_Xattr
44{
45 const char *name; /**< The eXtended attribute name @since 1.2 */
46 const char *value; /**< The eXtended attribute value @since 1.2 */
47
48 size_t length; /**< The length of the eXtended attribute value @since 1.2 */
49};
42 50
43/** 51/**
44 * @brief Get an iterator that list all extended attribute of a file. 52 * @brief Get an iterator that list all extended attribute of a file.
@@ -54,10 +62,49 @@ typedef enum {
54EAPI Eina_Iterator *eina_xattr_ls(const char *file); 62EAPI Eina_Iterator *eina_xattr_ls(const char *file);
55 63
56/** 64/**
65 * @brief Get an iterator that list all extended attribute value related to a fd.
66 *
67 * @param file The filename to retrieve the extended attribute list from.
68 * @return an iterator.
69 *
70 * The iterator will not allocate any data during the iteration step, so you need to copy them yourself
71 * if you need. The iterator will provide an Eina_Xattr structure.
72 *
73 * @since 1.2
74 */
75EAPI Eina_Iterator *eina_xattr_value_ls(const char *file);
76
77/**
78 * @brief Get an iterator that list all extended attribute related to a fd.
79 *
80 * @param fd The file descriptor to retrieve the extended attribute list from.
81 * @return an iterator.
82 *
83 * The iterator will not allocate any data during the iteration step, so you need to copy them yourself
84 * if you need.
85 *
86 * @since 1.2
87 */
88EAPI Eina_Iterator *eina_xattr_fd_ls(int fd);
89
90/**
91 * @brief Get an iterator that list all extended attribute value related to a fd.
92 *
93 * @param fd The file descriptor to retrieve the extended attribute list from.
94 * @return an iterator.
95 *
96 * The iterator will not allocate any data during the iteration step, so you need to copy them yourself
97 * if you need. The iterator will provide an Eina_Xattr structure.
98 *
99 * @since 1.2
100 */
101EAPI Eina_Iterator *eina_xattr_value_fd_ls(int fd);
102
103/**
57 * @brief Retrieve an extended attribute from a file. 104 * @brief Retrieve an extended attribute from a file.
58 * 105 *
59 * @param file The file to retrieve the extended attribute from. 106 * @param file The file to retrieve the extended attribute from.
60 * @param atttribute The extended attribute name to retrieve. 107 * @param attribute The extended attribute name to retrieve.
61 * @param size The size of the retrieved extended attribute. 108 * @param size The size of the retrieved extended attribute.
62 * @return the allocated data that hold the extended attribute value. 109 * @return the allocated data that hold the extended attribute value.
63 * 110 *
@@ -112,7 +159,7 @@ EAPI char *eina_xattr_string_get(const char *file, const char *attribute);
112 * 159 *
113 * @param file The file to set the double to. 160 * @param file The file to set the double to.
114 * @param attribute The attribute to set. 161 * @param attribute The attribute to set.
115 * @param data The NULL terminated double to set. 162 * @param value The NULL terminated double to set.
116 * @param flags Define the set policy. 163 * @param flags Define the set policy.
117 * @return EINA_TRUE on success, EINA_FALSE otherwise. 164 * @return EINA_TRUE on success, EINA_FALSE otherwise.
118 * 165 *
@@ -139,7 +186,7 @@ EAPI Eina_Bool eina_xattr_double_get(const char *file, const char *attribute, do
139 * 186 *
140 * @param file The file to set the int to. 187 * @param file The file to set the int to.
141 * @param attribute The attribute to set. 188 * @param attribute The attribute to set.
142 * @param data The NULL terminated int to set. 189 * @param value The NULL terminated int to set.
143 * @param flags Define the set policy. 190 * @param flags Define the set policy.
144 * @return EINA_TRUE on success, EINA_FALSE otherwise. 191 * @return EINA_TRUE on success, EINA_FALSE otherwise.
145 * 192 *
diff --git a/libraries/eina/src/lib/Makefile.am b/libraries/eina/src/lib/Makefile.am
index 0537a61..d8c9d20 100644
--- a/libraries/eina/src/lib/Makefile.am
+++ b/libraries/eina/src/lib/Makefile.am
@@ -22,6 +22,7 @@ eina_error.c \
22eina_fp.c \ 22eina_fp.c \
23eina_hamster.c \ 23eina_hamster.c \
24eina_hash.c \ 24eina_hash.c \
25eina_inarray.c \
25eina_inlist.c \ 26eina_inlist.c \
26eina_iterator.c \ 27eina_iterator.c \
27eina_lalloc.c \ 28eina_lalloc.c \
@@ -130,12 +131,17 @@ eina_amalgamation.c: $(base_sources) Makefile
130 @echo "#include <stdio.h>" >> eina_amalgamation.c 131 @echo "#include <stdio.h>" >> eina_amalgamation.c
131 @echo "#include <stdlib.h>" >> eina_amalgamation.c 132 @echo "#include <stdlib.h>" >> eina_amalgamation.c
132 @echo "#include <string.h>" >> eina_amalgamation.c 133 @echo "#include <string.h>" >> eina_amalgamation.c
133 @echo "#include <dlfcn.h>" >> eina_amalgamation.c 134 @echo "#ifdef HAVE_DLOPEN" >> eina_amalgamation.c
135 @echo "# include <dlfcn.h>" >> eina_amalgamation.c
136 @echo "#endif" >> eina_amalgamation.c
134 @echo "#include <sys/types.h>" >> eina_amalgamation.c 137 @echo "#include <sys/types.h>" >> eina_amalgamation.c
135 @echo "#include <dirent.h>" >> eina_amalgamation.c 138 @echo "#ifdef HAVE_DIRENT_H" >> eina_amalgamation.c
139 @echo "# include <dirent.h>" >> eina_amalgamation.c
140 @echo "#endif" >> eina_amalgamation.c
136 @echo "#include <assert.h>" >> eina_amalgamation.c 141 @echo "#include <assert.h>" >> eina_amalgamation.c
137 @echo "#include <errno.h>" >> eina_amalgamation.c 142 @echo "#include <errno.h>" >> eina_amalgamation.c
138 @echo "#include <fnmatch.h>" >> eina_amalgamation.c 143 @echo "#include <fnmatch.h>" >> eina_amalgamation.c
144 @echo "#include <fcntl.h>" >> eina_amalgamation.c
139 145
140 @echo "#ifdef HAVE_EVIL" >> eina_amalgamation.c 146 @echo "#ifdef HAVE_EVIL" >> eina_amalgamation.c
141 @echo "# include <Evil.h>" >> eina_amalgamation.c 147 @echo "# include <Evil.h>" >> eina_amalgamation.c
diff --git a/libraries/eina/src/lib/Makefile.in b/libraries/eina/src/lib/Makefile.in
index 359aba0..878bcbe 100644
--- a/libraries/eina/src/lib/Makefile.in
+++ b/libraries/eina/src/lib/Makefile.in
@@ -96,15 +96,16 @@ libeina_la_DEPENDENCIES =
96am__libeina_la_SOURCES_DIST = eina_accessor.c eina_array.c \ 96am__libeina_la_SOURCES_DIST = eina_accessor.c eina_array.c \
97 eina_benchmark.c eina_binbuf.c eina_binshare.c eina_convert.c \ 97 eina_benchmark.c eina_binbuf.c eina_binshare.c eina_convert.c \
98 eina_counter.c eina_cpu.c eina_error.c eina_fp.c \ 98 eina_counter.c eina_cpu.c eina_error.c eina_fp.c \
99 eina_hamster.c eina_hash.c eina_inlist.c eina_iterator.c \ 99 eina_hamster.c eina_hash.c eina_inarray.c eina_inlist.c \
100 eina_lalloc.c eina_list.c eina_log.c eina_magic.c eina_main.c \ 100 eina_iterator.c eina_lalloc.c eina_list.c eina_log.c \
101 eina_matrixsparse.c eina_mempool.c eina_mmap.c eina_module.c \ 101 eina_magic.c eina_main.c eina_matrixsparse.c eina_mempool.c \
102 eina_prefix.c eina_quadtree.c eina_rbtree.c eina_rectangle.c \ 102 eina_mmap.c eina_module.c eina_prefix.c eina_quadtree.c \
103 eina_safety_checks.c eina_sched.c eina_share_common.c \ 103 eina_rbtree.c eina_rectangle.c eina_safety_checks.c \
104 eina_simple_xml_parser.c eina_str.c eina_strbuf.c \ 104 eina_sched.c eina_share_common.c eina_simple_xml_parser.c \
105 eina_strbuf_common.c eina_stringshare.c eina_tiler.c \ 105 eina_str.c eina_strbuf.c eina_strbuf_common.c \
106 eina_unicode.c eina_ustrbuf.c eina_ustringshare.c eina_value.c \ 106 eina_stringshare.c eina_tiler.c eina_unicode.c eina_ustrbuf.c \
107 eina_xattr.c eina_file_win32.c eina_file.c \ 107 eina_ustringshare.c eina_value.c eina_xattr.c \
108 eina_file_win32.c eina_file.c \
108 $(top_srcdir)/src/modules/mp/buddy/eina_buddy.c \ 109 $(top_srcdir)/src/modules/mp/buddy/eina_buddy.c \
109 $(top_srcdir)/src/modules/mp/chained_pool/eina_chained_mempool.c \ 110 $(top_srcdir)/src/modules/mp/chained_pool/eina_chained_mempool.c \
110 $(top_srcdir)/src/modules/mp/ememoa_fixed/eina_ememoa_fixed.c \ 111 $(top_srcdir)/src/modules/mp/ememoa_fixed/eina_ememoa_fixed.c \
@@ -129,15 +130,16 @@ am__objects_10 = libeina_la-eina_accessor.lo libeina_la-eina_array.lo \
129 libeina_la-eina_counter.lo libeina_la-eina_cpu.lo \ 130 libeina_la-eina_counter.lo libeina_la-eina_cpu.lo \
130 libeina_la-eina_error.lo libeina_la-eina_fp.lo \ 131 libeina_la-eina_error.lo libeina_la-eina_fp.lo \
131 libeina_la-eina_hamster.lo libeina_la-eina_hash.lo \ 132 libeina_la-eina_hamster.lo libeina_la-eina_hash.lo \
132 libeina_la-eina_inlist.lo libeina_la-eina_iterator.lo \ 133 libeina_la-eina_inarray.lo libeina_la-eina_inlist.lo \
133 libeina_la-eina_lalloc.lo libeina_la-eina_list.lo \ 134 libeina_la-eina_iterator.lo libeina_la-eina_lalloc.lo \
134 libeina_la-eina_log.lo libeina_la-eina_magic.lo \ 135 libeina_la-eina_list.lo libeina_la-eina_log.lo \
135 libeina_la-eina_main.lo libeina_la-eina_matrixsparse.lo \ 136 libeina_la-eina_magic.lo libeina_la-eina_main.lo \
136 libeina_la-eina_mempool.lo libeina_la-eina_mmap.lo \ 137 libeina_la-eina_matrixsparse.lo libeina_la-eina_mempool.lo \
137 libeina_la-eina_module.lo libeina_la-eina_prefix.lo \ 138 libeina_la-eina_mmap.lo libeina_la-eina_module.lo \
138 libeina_la-eina_quadtree.lo libeina_la-eina_rbtree.lo \ 139 libeina_la-eina_prefix.lo libeina_la-eina_quadtree.lo \
139 libeina_la-eina_rectangle.lo libeina_la-eina_safety_checks.lo \ 140 libeina_la-eina_rbtree.lo libeina_la-eina_rectangle.lo \
140 libeina_la-eina_sched.lo libeina_la-eina_share_common.lo \ 141 libeina_la-eina_safety_checks.lo libeina_la-eina_sched.lo \
142 libeina_la-eina_share_common.lo \
141 libeina_la-eina_simple_xml_parser.lo libeina_la-eina_str.lo \ 143 libeina_la-eina_simple_xml_parser.lo libeina_la-eina_str.lo \
142 libeina_la-eina_strbuf.lo libeina_la-eina_strbuf_common.lo \ 144 libeina_la-eina_strbuf.lo libeina_la-eina_strbuf_common.lo \
143 libeina_la-eina_stringshare.lo libeina_la-eina_tiler.lo \ 145 libeina_la-eina_stringshare.lo libeina_la-eina_tiler.lo \
@@ -231,7 +233,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
231EGREP = @EGREP@ 233EGREP = @EGREP@
232EINA_CFLAGS = @EINA_CFLAGS@ 234EINA_CFLAGS = @EINA_CFLAGS@
233EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 235EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
236EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
234EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 237EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
238EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
235EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 239EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
236EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 240EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
237EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 241EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -283,8 +287,6 @@ PACKAGE_URL = @PACKAGE_URL@
283PACKAGE_VERSION = @PACKAGE_VERSION@ 287PACKAGE_VERSION = @PACKAGE_VERSION@
284PATH_SEPARATOR = @PATH_SEPARATOR@ 288PATH_SEPARATOR = @PATH_SEPARATOR@
285PKG_CONFIG = @PKG_CONFIG@ 289PKG_CONFIG = @PKG_CONFIG@
286PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
287PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
288RANLIB = @RANLIB@ 290RANLIB = @RANLIB@
289SED = @SED@ 291SED = @SED@
290SET_MAKE = @SET_MAKE@ 292SET_MAKE = @SET_MAKE@
@@ -371,10 +373,10 @@ AM_CPPFLAGS = \
371base_sources = eina_accessor.c eina_array.c eina_benchmark.c \ 373base_sources = eina_accessor.c eina_array.c eina_benchmark.c \
372 eina_binbuf.c eina_binshare.c eina_convert.c eina_counter.c \ 374 eina_binbuf.c eina_binshare.c eina_convert.c eina_counter.c \
373 eina_cpu.c eina_error.c eina_fp.c eina_hamster.c eina_hash.c \ 375 eina_cpu.c eina_error.c eina_fp.c eina_hamster.c eina_hash.c \
374 eina_inlist.c eina_iterator.c eina_lalloc.c eina_list.c \ 376 eina_inarray.c eina_inlist.c eina_iterator.c eina_lalloc.c \
375 eina_log.c eina_magic.c eina_main.c eina_matrixsparse.c \ 377 eina_list.c eina_log.c eina_magic.c eina_main.c \
376 eina_mempool.c eina_mmap.c eina_module.c eina_prefix.c \ 378 eina_matrixsparse.c eina_mempool.c eina_mmap.c eina_module.c \
377 eina_quadtree.c eina_rbtree.c eina_rectangle.c \ 379 eina_prefix.c eina_quadtree.c eina_rbtree.c eina_rectangle.c \
378 eina_safety_checks.c eina_sched.c eina_share_common.c \ 380 eina_safety_checks.c eina_sched.c eina_share_common.c \
379 eina_simple_xml_parser.c eina_str.c eina_strbuf.c \ 381 eina_simple_xml_parser.c eina_str.c eina_strbuf.c \
380 eina_strbuf_common.c eina_stringshare.c eina_tiler.c \ 382 eina_strbuf_common.c eina_stringshare.c eina_tiler.c \
@@ -489,6 +491,7 @@ distclean-compile:
489@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_fp.Plo@am__quote@ 491@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_fp.Plo@am__quote@
490@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_hamster.Plo@am__quote@ 492@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_hamster.Plo@am__quote@
491@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_hash.Plo@am__quote@ 493@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_hash.Plo@am__quote@
494@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_inarray.Plo@am__quote@
492@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_inlist.Plo@am__quote@ 495@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_inlist.Plo@am__quote@
493@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_iterator.Plo@am__quote@ 496@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_iterator.Plo@am__quote@
494@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_lalloc.Plo@am__quote@ 497@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_lalloc.Plo@am__quote@
@@ -641,6 +644,14 @@ libeina_la-eina_hash.lo: eina_hash.c
641@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 644@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
642@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -c -o libeina_la-eina_hash.lo `test -f 'eina_hash.c' || echo '$(srcdir)/'`eina_hash.c 645@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -c -o libeina_la-eina_hash.lo `test -f 'eina_hash.c' || echo '$(srcdir)/'`eina_hash.c
643 646
647libeina_la-eina_inarray.lo: eina_inarray.c
648@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -MT libeina_la-eina_inarray.lo -MD -MP -MF $(DEPDIR)/libeina_la-eina_inarray.Tpo -c -o libeina_la-eina_inarray.lo `test -f 'eina_inarray.c' || echo '$(srcdir)/'`eina_inarray.c
649@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeina_la-eina_inarray.Tpo $(DEPDIR)/libeina_la-eina_inarray.Plo
650@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
651@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eina_inarray.c' object='libeina_la-eina_inarray.lo' libtool=yes @AMDEPBACKSLASH@
652@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
653@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -c -o libeina_la-eina_inarray.lo `test -f 'eina_inarray.c' || echo '$(srcdir)/'`eina_inarray.c
654
644libeina_la-eina_inlist.lo: eina_inlist.c 655libeina_la-eina_inlist.lo: eina_inlist.c
645@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -MT libeina_la-eina_inlist.lo -MD -MP -MF $(DEPDIR)/libeina_la-eina_inlist.Tpo -c -o libeina_la-eina_inlist.lo `test -f 'eina_inlist.c' || echo '$(srcdir)/'`eina_inlist.c 656@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -MT libeina_la-eina_inlist.lo -MD -MP -MF $(DEPDIR)/libeina_la-eina_inlist.Tpo -c -o libeina_la-eina_inlist.lo `test -f 'eina_inlist.c' || echo '$(srcdir)/'`eina_inlist.c
646@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeina_la-eina_inlist.Tpo $(DEPDIR)/libeina_la-eina_inlist.Plo 657@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeina_la-eina_inlist.Tpo $(DEPDIR)/libeina_la-eina_inlist.Plo
@@ -1189,12 +1200,17 @@ uninstall-am: uninstall-libLTLIBRARIES
1189@EINA_AMALGAMATION_TRUE@ @echo "#include <stdio.h>" >> eina_amalgamation.c 1200@EINA_AMALGAMATION_TRUE@ @echo "#include <stdio.h>" >> eina_amalgamation.c
1190@EINA_AMALGAMATION_TRUE@ @echo "#include <stdlib.h>" >> eina_amalgamation.c 1201@EINA_AMALGAMATION_TRUE@ @echo "#include <stdlib.h>" >> eina_amalgamation.c
1191@EINA_AMALGAMATION_TRUE@ @echo "#include <string.h>" >> eina_amalgamation.c 1202@EINA_AMALGAMATION_TRUE@ @echo "#include <string.h>" >> eina_amalgamation.c
1192@EINA_AMALGAMATION_TRUE@ @echo "#include <dlfcn.h>" >> eina_amalgamation.c 1203@EINA_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_DLOPEN" >> eina_amalgamation.c
1204@EINA_AMALGAMATION_TRUE@ @echo "# include <dlfcn.h>" >> eina_amalgamation.c
1205@EINA_AMALGAMATION_TRUE@ @echo "#endif" >> eina_amalgamation.c
1193@EINA_AMALGAMATION_TRUE@ @echo "#include <sys/types.h>" >> eina_amalgamation.c 1206@EINA_AMALGAMATION_TRUE@ @echo "#include <sys/types.h>" >> eina_amalgamation.c
1194@EINA_AMALGAMATION_TRUE@ @echo "#include <dirent.h>" >> eina_amalgamation.c 1207@EINA_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_DIRENT_H" >> eina_amalgamation.c
1208@EINA_AMALGAMATION_TRUE@ @echo "# include <dirent.h>" >> eina_amalgamation.c
1209@EINA_AMALGAMATION_TRUE@ @echo "#endif" >> eina_amalgamation.c
1195@EINA_AMALGAMATION_TRUE@ @echo "#include <assert.h>" >> eina_amalgamation.c 1210@EINA_AMALGAMATION_TRUE@ @echo "#include <assert.h>" >> eina_amalgamation.c
1196@EINA_AMALGAMATION_TRUE@ @echo "#include <errno.h>" >> eina_amalgamation.c 1211@EINA_AMALGAMATION_TRUE@ @echo "#include <errno.h>" >> eina_amalgamation.c
1197@EINA_AMALGAMATION_TRUE@ @echo "#include <fnmatch.h>" >> eina_amalgamation.c 1212@EINA_AMALGAMATION_TRUE@ @echo "#include <fnmatch.h>" >> eina_amalgamation.c
1213@EINA_AMALGAMATION_TRUE@ @echo "#include <fcntl.h>" >> eina_amalgamation.c
1198 1214
1199@EINA_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_EVIL" >> eina_amalgamation.c 1215@EINA_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_EVIL" >> eina_amalgamation.c
1200@EINA_AMALGAMATION_TRUE@ @echo "# include <Evil.h>" >> eina_amalgamation.c 1216@EINA_AMALGAMATION_TRUE@ @echo "# include <Evil.h>" >> eina_amalgamation.c
diff --git a/libraries/eina/src/lib/eina_array.c b/libraries/eina/src/lib/eina_array.c
index 5a850ac..4bcab61 100644
--- a/libraries/eina/src/lib/eina_array.c
+++ b/libraries/eina/src/lib/eina_array.c
@@ -119,7 +119,7 @@ eina_array_iterator_next(Eina_Iterator_Array *it, void **data)
119{ 119{
120 EINA_MAGIC_CHECK_ARRAY_ITERATOR(it, EINA_FALSE); 120 EINA_MAGIC_CHECK_ARRAY_ITERATOR(it, EINA_FALSE);
121 121
122 if (!(it->index < eina_array_count_get(it->array))) 122 if (!(it->index < eina_array_count(it->array)))
123 return EINA_FALSE; 123 return EINA_FALSE;
124 124
125 if (data) 125 if (data)
@@ -150,7 +150,7 @@ eina_array_accessor_get_at(Eina_Accessor_Array *it,
150{ 150{
151 EINA_MAGIC_CHECK_ARRAY_ACCESSOR(it, EINA_FALSE); 151 EINA_MAGIC_CHECK_ARRAY_ACCESSOR(it, EINA_FALSE);
152 152
153 if (!(idx < eina_array_count_get(it->array))) 153 if (!(idx < eina_array_count(it->array)))
154 return EINA_FALSE; 154 return EINA_FALSE;
155 155
156 if (data) 156 if (data)
diff --git a/libraries/eina/src/lib/eina_binbuf_template_c.x b/libraries/eina/src/lib/eina_binbuf_template_c.x
index 613a715..7e0c539 100644
--- a/libraries/eina/src/lib/eina_binbuf_template_c.x
+++ b/libraries/eina/src/lib/eina_binbuf_template_c.x
@@ -65,6 +65,15 @@ _FUNC_EXPAND(new)(void)
65 return buf; 65 return buf;
66} 66}
67 67
68EAPI _STRBUF_STRUCT_NAME *
69_FUNC_EXPAND(manage_new_length)(_STRBUF_DATA_TYPE *str, size_t length)
70{
71 _STRBUF_STRUCT_NAME *buf =
72 eina_strbuf_common_manage_new(_STRBUF_CSIZE, (void *) str, length);
73 EINA_MAGIC_SET(buf, _STRBUF_MAGIC);
74 return buf;
75}
76
68EAPI void 77EAPI void
69_FUNC_EXPAND(free)(_STRBUF_STRUCT_NAME *buf) 78_FUNC_EXPAND(free)(_STRBUF_STRUCT_NAME *buf)
70{ 79{
diff --git a/libraries/eina/src/lib/eina_cpu.c b/libraries/eina/src/lib/eina_cpu.c
index 8af550d..5b190e4 100644
--- a/libraries/eina/src/lib/eina_cpu.c
+++ b/libraries/eina/src/lib/eina_cpu.c
@@ -24,7 +24,7 @@
24# ifdef _WIN32 24# ifdef _WIN32
25# define WIN32_LEAN_AND_MEAN 25# define WIN32_LEAN_AND_MEAN
26# include <windows.h> 26# include <windows.h>
27# elif defined (__SUNPRO_C) || defined(__GNU__) 27# elif defined (__sun) || defined(__GNU__)
28# include <unistd.h> 28# include <unistd.h>
29# elif defined (__FreeBSD__) || defined (__OpenBSD__) || \ 29# elif defined (__FreeBSD__) || defined (__OpenBSD__) || \
30 defined (__NetBSD__) || defined (__DragonFly__) || defined (__MacOSX__) || \ 30 defined (__NetBSD__) || defined (__DragonFly__) || defined (__MacOSX__) || \
@@ -140,7 +140,7 @@ EAPI int eina_cpu_count(void)
140 GetSystemInfo(&sysinfo); 140 GetSystemInfo(&sysinfo);
141 return sysinfo.dwNumberOfProcessors; 141 return sysinfo.dwNumberOfProcessors;
142 142
143# elif defined (__SUNPRO_C) || defined(__GNU__) 143# elif defined (__sun) || defined(__GNU__)
144 /* 144 /*
145 * _SC_NPROCESSORS_ONLN: number of processors that are online, that 145 * _SC_NPROCESSORS_ONLN: number of processors that are online, that
146 is available when sysconf is called. The number 146 is available when sysconf is called. The number
diff --git a/libraries/eina/src/lib/eina_file.c b/libraries/eina/src/lib/eina_file.c
index 84b9e78..0b836b3 100644
--- a/libraries/eina/src/lib/eina_file.c
+++ b/libraries/eina/src/lib/eina_file.c
@@ -38,13 +38,18 @@ extern "C"
38void *alloca (size_t); 38void *alloca (size_t);
39#endif 39#endif
40 40
41#include <stdlib.h>
41#include <string.h> 42#include <string.h>
42#include <stddef.h> 43#include <stddef.h>
43#include <dirent.h> 44#ifdef HAVE_DIRENT_H
45# include <dirent.h>
46#endif
44#include <sys/types.h> 47#include <sys/types.h>
45#include <sys/stat.h> 48#include <sys/stat.h>
46#include <unistd.h> 49#include <unistd.h>
47#include <sys/mman.h> 50#ifdef HAVE_SYS_MMAN_H
51# include <sys/mman.h>
52#endif
48#include <fcntl.h> 53#include <fcntl.h>
49 54
50#define PATH_DELIM '/' 55#define PATH_DELIM '/'
@@ -60,6 +65,8 @@ void *alloca (size_t);
60#include "eina_list.h" 65#include "eina_list.h"
61#include "eina_lock.h" 66#include "eina_lock.h"
62#include "eina_mmap.h" 67#include "eina_mmap.h"
68#include "eina_log.h"
69#include "eina_xattr.h"
63 70
64#ifdef HAVE_ESCAPE_H 71#ifdef HAVE_ESCAPE_H
65# include <Escape.h> 72# include <Escape.h>
@@ -95,9 +102,8 @@ void *alloca (size_t);
95#define EINA_SMALL_PAGE 4096 102#define EINA_SMALL_PAGE 4096
96# define EINA_HUGE_PAGE 16 * 1024 * 1024 103# define EINA_HUGE_PAGE 16 * 1024 * 1024
97 104
105#ifdef HAVE_DIRENT_H
98typedef struct _Eina_File_Iterator Eina_File_Iterator; 106typedef struct _Eina_File_Iterator Eina_File_Iterator;
99typedef struct _Eina_File_Map Eina_File_Map;
100
101struct _Eina_File_Iterator 107struct _Eina_File_Iterator
102{ 108{
103 Eina_Iterator iterator; 109 Eina_Iterator iterator;
@@ -107,6 +113,7 @@ struct _Eina_File_Iterator
107 113
108 char dir[1]; 114 char dir[1];
109}; 115};
116#endif
110 117
111struct _Eina_File 118struct _Eina_File
112{ 119{
@@ -132,8 +139,10 @@ struct _Eina_File
132 139
133 Eina_Bool shared : 1; 140 Eina_Bool shared : 1;
134 Eina_Bool delete_me : 1; 141 Eina_Bool delete_me : 1;
142 Eina_Bool global_faulty : 1;
135}; 143};
136 144
145typedef struct _Eina_File_Map Eina_File_Map;
137struct _Eina_File_Map 146struct _Eina_File_Map
138{ 147{
139 void *map; 148 void *map;
@@ -144,6 +153,7 @@ struct _Eina_File_Map
144 int refcount; 153 int refcount;
145 154
146 Eina_Bool hugetlb : 1; 155 Eina_Bool hugetlb : 1;
156 Eina_Bool faulty : 1;
147}; 157};
148 158
149static Eina_Hash *_eina_file_cache = NULL; 159static Eina_Hash *_eina_file_cache = NULL;
@@ -156,6 +166,7 @@ static int _eina_file_log_dom = -1;
156 * The code and description of the issue can be found at : 166 * The code and description of the issue can be found at :
157 * http://womble.decadent.org.uk/readdir_r-advisory.html 167 * http://womble.decadent.org.uk/readdir_r-advisory.html
158 */ 168 */
169#ifdef HAVE_DIRENT_H
159static long 170static long
160_eina_name_max(DIR *dirp) 171_eina_name_max(DIR *dirp)
161{ 172{
@@ -390,6 +401,7 @@ _eina_file_stat_ls_iterator_next(Eina_File_Direct_Iterator *it, void **data)
390 401
391 return EINA_TRUE; 402 return EINA_TRUE;
392} 403}
404#endif
393 405
394static void 406static void
395_eina_file_real_close(Eina_File *file) 407_eina_file_real_close(Eina_File *file)
@@ -511,8 +523,8 @@ slprintf(char *str, size_t size, const char *format, ...)
511 va_end(ap); 523 va_end(ap);
512} 524}
513 525
514static char* 526static char *
515_eina_file_escape(const char* path, int* length) 527_eina_file_escape(const char *path, int *length)
516{ 528{
517 char *result = strdup(path ? path : ""); 529 char *result = strdup(path ? path : "");
518 char *p = result; 530 char *p = result;
@@ -738,6 +750,7 @@ eina_file_split(char *path)
738EAPI Eina_Iterator * 750EAPI Eina_Iterator *
739eina_file_ls(const char *dir) 751eina_file_ls(const char *dir)
740{ 752{
753#ifdef HAVE_DIRENT_H
741 Eina_File_Iterator *it; 754 Eina_File_Iterator *it;
742 size_t length; 755 size_t length;
743 756
@@ -773,11 +786,16 @@ eina_file_ls(const char *dir)
773 it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_ls_iterator_free); 786 it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_ls_iterator_free);
774 787
775 return &it->iterator; 788 return &it->iterator;
789#else
790 (void) dir;
791 return NULL;
792#endif
776} 793}
777 794
778EAPI Eina_Iterator * 795EAPI Eina_Iterator *
779eina_file_direct_ls(const char *dir) 796eina_file_direct_ls(const char *dir)
780{ 797{
798#ifdef HAVE_DIRENT_H
781 Eina_File_Direct_Iterator *it; 799 Eina_File_Direct_Iterator *it;
782 size_t length; 800 size_t length;
783 801
@@ -825,11 +843,16 @@ eina_file_direct_ls(const char *dir)
825 it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_direct_ls_iterator_free); 843 it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_direct_ls_iterator_free);
826 844
827 return &it->iterator; 845 return &it->iterator;
846#else
847 (void) dir;
848 return NULL;
849#endif
828} 850}
829 851
830EAPI Eina_Iterator * 852EAPI Eina_Iterator *
831eina_file_stat_ls(const char *dir) 853eina_file_stat_ls(const char *dir)
832{ 854{
855#ifdef HAVE_DIRENT_H
833 Eina_File_Direct_Iterator *it; 856 Eina_File_Direct_Iterator *it;
834 size_t length; 857 size_t length;
835 858
@@ -877,6 +900,10 @@ eina_file_stat_ls(const char *dir)
877 it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_direct_ls_iterator_free); 900 it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_direct_ls_iterator_free);
878 901
879 return &it->iterator; 902 return &it->iterator;
903#else
904 (void) dir;
905 return NULL;
906#endif
880} 907}
881 908
882EAPI Eina_File * 909EAPI Eina_File *
@@ -887,7 +914,9 @@ eina_file_open(const char *path, Eina_Bool shared)
887 char *filename; 914 char *filename;
888 struct stat file_stat; 915 struct stat file_stat;
889 int fd = -1; 916 int fd = -1;
917#ifdef HAVE_EXECVP
890 int flags; 918 int flags;
919#endif
891 920
892 EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL); 921 EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
893 922
@@ -1184,4 +1213,91 @@ eina_file_map_free(Eina_File *file, void *map)
1184 eina_lock_release(&file->lock); 1213 eina_lock_release(&file->lock);
1185} 1214}
1186 1215
1216EAPI Eina_Bool
1217eina_file_map_faulted(Eina_File *file, void *map)
1218{
1219 Eina_File_Map *em;
1220
1221 EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
1222
1223 eina_lock_take(&file->lock);
1224
1225 if (file->global_map == map) return file->global_faulty;
1226
1227 em = eina_hash_find(file->rmap, &map);
1228 if (!em) return EINA_FALSE;
1229
1230 return em->faulty;
1231}
1232
1233EAPI Eina_Iterator *
1234eina_file_xattr_get(Eina_File *file)
1235{
1236 EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
1237
1238 return eina_xattr_fd_ls(file->fd);
1239}
1240
1241EAPI Eina_Iterator *
1242eina_file_xattr_value_get(Eina_File *file)
1243{
1244 EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
1245
1246 return eina_xattr_value_fd_ls(file->fd);
1247}
1248
1249void
1250eina_file_mmap_faulty(void *addr, long page_size)
1251{
1252 Eina_File_Map *m;
1253 Eina_File *f;
1254 Eina_Iterator *itf;
1255 Eina_Iterator *itm;
1256
1257 /* NOTE: I actually don't know if other thread are running, I will try to take the lock.
1258 It may be possible that if other thread are not running and they were in the middle of
1259 accessing an Eina_File this lock are still taken and we will result as a deadlock. */
1260 eina_lock_take(&_eina_file_lock_cache);
1261
1262 itf = eina_hash_iterator_data_new(_eina_file_cache);
1263 EINA_ITERATOR_FOREACH(itf, f)
1264 {
1265 Eina_Bool faulty = EINA_FALSE;
1266
1267 eina_lock_take(&f->lock);
1268
1269 if (f->global_map)
1270 {
1271 if ((unsigned char *) addr < (((unsigned char *)f->global_map) + f->length) &&
1272 (((unsigned char *) addr) + page_size) >= (unsigned char *) f->global_map)
1273 {
1274 f->global_faulty = EINA_TRUE;
1275 faulty = EINA_TRUE;
1276 }
1277 }
1278
1279 if (!faulty)
1280 {
1281 itm = eina_hash_iterator_data_new(f->map);
1282 EINA_ITERATOR_FOREACH(itm, m)
1283 {
1284 if ((unsigned char *) addr < (((unsigned char *)m->map) + m->length) &&
1285 (((unsigned char *) addr) + page_size) >= (unsigned char *) m->map)
1286 {
1287 m->faulty = EINA_TRUE;
1288 faulty = EINA_TRUE;
1289 break;
1290 }
1291 }
1292 eina_iterator_free(itm);
1293 }
1294
1295 eina_lock_release(&f->lock);
1296
1297 if (faulty) break;
1298 }
1299 eina_iterator_free(itf);
1300
1301 eina_lock_release(&_eina_file_lock_cache);
1302}
1187 1303
diff --git a/libraries/eina/src/lib/eina_hash.c b/libraries/eina/src/lib/eina_hash.c
index 5df20aa..5196894 100644
--- a/libraries/eina/src/lib/eina_hash.c
+++ b/libraries/eina/src/lib/eina_hash.c
@@ -854,8 +854,9 @@ eina_hash_free(Eina_Hash *hash)
854{ 854{
855 int i; 855 int i;
856 856
857 if (!hash) return ;
858
857 EINA_MAGIC_CHECK_HASH(hash); 859 EINA_MAGIC_CHECK_HASH(hash);
858 EINA_SAFETY_ON_NULL_RETURN(hash);
859 860
860 if (hash->buckets) 861 if (hash->buckets)
861 { 862 {
@@ -871,8 +872,9 @@ eina_hash_free_buckets(Eina_Hash *hash)
871{ 872{
872 int i; 873 int i;
873 874
875 if (!hash) return ;
876
874 EINA_MAGIC_CHECK_HASH(hash); 877 EINA_MAGIC_CHECK_HASH(hash);
875 EINA_SAFETY_ON_NULL_RETURN(hash);
876 878
877 if (hash->buckets) 879 if (hash->buckets)
878 { 880 {
diff --git a/libraries/eina/src/lib/eina_inarray.c b/libraries/eina/src/lib/eina_inarray.c
new file mode 100644
index 0000000..dc95bc6
--- /dev/null
+++ b/libraries/eina/src/lib/eina_inarray.c
@@ -0,0 +1,777 @@
1/* EINA - EFL data type library
2 * Copyright (C) 2012 - ProFUSION embedded systems
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifdef HAVE_CONFIG_H
20# include "config.h"
21#endif
22
23#include <stdlib.h>
24#include <string.h>
25
26#include "eina_config.h"
27#include "eina_private.h"
28#include "eina_error.h"
29#include "eina_log.h"
30
31/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
32#include "eina_safety_checks.h"
33#include "eina_inarray.h"
34
35/*============================================================================*
36* Local *
37*============================================================================*/
38
39/**
40 * @cond LOCAL
41 */
42
43static const char EINA_MAGIC_INARRAY_STR[] = "Eina Inline Array";
44static const char EINA_MAGIC_INARRAY_ITERATOR_STR[] = "Eina Inline Array Iterator";
45static const char EINA_MAGIC_INARRAY_ACCESSOR_STR[] = "Eina Inline Array Accessor";
46
47typedef struct _Eina_Iterator_Inarray Eina_Iterator_Inarray;
48typedef struct _Eina_Accessor_Inarray Eina_Accessor_Inarray;
49
50struct _Eina_Iterator_Inarray
51{
52 Eina_Iterator iterator;
53 const Eina_Inarray *array;
54 unsigned int pos;
55 EINA_MAGIC
56};
57
58struct _Eina_Accessor_Inarray
59{
60 Eina_Accessor accessor;
61 const Eina_Inarray *array;
62 EINA_MAGIC
63};
64
65static int _eina_inarray_log_dom = -1;
66
67#ifdef ERR
68#undef ERR
69#endif
70#define ERR(...) EINA_LOG_DOM_ERR(_eina_inarray_log_dom, __VA_ARGS__)
71
72#ifdef DBG
73#undef DBG
74#endif
75#define DBG(...) EINA_LOG_DOM_DBG(_eina_inarray_log_dom, __VA_ARGS__)
76
77#define EINA_MAGIC_CHECK_INARRAY(d, ...) \
78 do \
79 { \
80 if (!EINA_MAGIC_CHECK(d, EINA_MAGIC_INARRAY)) \
81 { \
82 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY); \
83 return __VA_ARGS__; \
84 } \
85 eina_error_set(0); \
86 } \
87 while(0)
88
89#define EINA_MAGIC_CHECK_INARRAY_ITERATOR(d, ...) \
90 do \
91 { \
92 if (!EINA_MAGIC_CHECK(d, EINA_MAGIC_INARRAY_ITERATOR)) \
93 { \
94 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY_ITERATOR); \
95 return __VA_ARGS__; \
96 } \
97 eina_error_set(0); \
98 } \
99 while(0)
100
101#define EINA_MAGIC_CHECK_INARRAY_ACCESSOR(d, ...) \
102 do \
103 { \
104 if (!EINA_MAGIC_CHECK(d, EINA_MAGIC_INARRAY_ACCESSOR)) \
105 { \
106 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY_ACCESSOR); \
107 return __VA_ARGS__; \
108 } \
109 eina_error_set(0); \
110 } \
111 while(0)
112
113static void
114_eina_inarray_setup(Eina_Inarray *array, unsigned int member_size, unsigned int step)
115{
116 EINA_MAGIC_SET(array, EINA_MAGIC_INARRAY);
117 array->member_size = member_size;
118 array->len = 0;
119 array->max = 0;
120 array->step = (step > 0) ? step : 32;
121 array->members = NULL;
122}
123
124static Eina_Bool
125_eina_inarray_resize(Eina_Inarray *array, unsigned int new_size)
126{
127 unsigned int new_max;
128 void *tmp;
129
130 if (new_size < array->max)
131 return EINA_TRUE;
132
133 if (new_size % array->step == 0)
134 new_max = new_size;
135 else
136 new_max = ((new_size / array->step) + 1) * array->step;
137
138 tmp = realloc(array->members, new_max * array->member_size);
139 if ((!tmp) && (new_max > 0))
140 {
141 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
142 return EINA_FALSE;
143 }
144
145 array->members = tmp;
146 array->max = new_max;
147 return EINA_TRUE;
148}
149
150static inline void *
151_eina_inarray_get(const Eina_Inarray *array, unsigned int position)
152{
153 unsigned int offset = position * array->member_size;
154 return (unsigned char *)array->members + offset;
155}
156
157static int
158_eina_inarray_search(const Eina_Inarray *array, const void *data, Eina_Compare_Cb compare)
159{
160 const unsigned char *start, *found;
161 start = array->members;
162 found = bsearch(data, start, array->len, array->member_size, compare);
163 if (!found)
164 return -1;
165 return (found - start) / array->member_size;
166}
167
168static unsigned int
169_eina_inarray_search_sorted_near(const Eina_Inarray *array, const void *data, Eina_Compare_Cb compare, int *cmp)
170{
171 unsigned int start, last, middle;
172
173 if (array->len == 0)
174 {
175 *cmp = -1;
176 return 0;
177 }
178 else if (array->len == 1)
179 {
180 *cmp = compare(data, array->members);
181 return 0;
182 }
183
184 start = 0;
185 last = array->len - 1; /* inclusive */
186 do
187 {
188 void *p;
189 middle = start + (last - start) / 2; /* avoid overflow */
190 p = _eina_inarray_get(array, middle);
191 *cmp = compare(data, p);
192 if (*cmp == 0)
193 return middle;
194 else if (*cmp > 0)
195 start = middle + 1;
196 else if (middle > 0)
197 last = middle - 1;
198 else
199 break;
200 }
201 while (start <= last);
202 return middle;
203}
204
205
206static Eina_Bool
207_eina_inarray_iterator_next(Eina_Iterator_Inarray *it, void **data)
208{
209 EINA_MAGIC_CHECK_INARRAY_ITERATOR(it, EINA_FALSE);
210
211 if (it->pos >= it->array->len)
212 return EINA_FALSE;
213
214 *data = _eina_inarray_get(it->array, it->pos);
215 it->pos++;
216
217 return EINA_TRUE;
218}
219
220static Eina_Bool
221_eina_inarray_iterator_prev(Eina_Iterator_Inarray *it, void **data)
222{
223 EINA_MAGIC_CHECK_INARRAY_ITERATOR(it, EINA_FALSE);
224
225 if (it->pos == 0)
226 return EINA_FALSE;
227
228 it->pos--;
229 *data = _eina_inarray_get(it->array, it->pos);
230
231 return EINA_TRUE;
232}
233
234static Eina_Inarray *
235_eina_inarray_iterator_get_container(Eina_Iterator_Inarray *it)
236{
237 EINA_MAGIC_CHECK_INARRAY_ITERATOR(it, NULL);
238 return (Eina_Inarray *)it->array;
239}
240
241static void
242_eina_inarray_iterator_free(Eina_Iterator_Inarray *it)
243{
244 EINA_MAGIC_CHECK_INARRAY_ITERATOR(it);
245 MAGIC_FREE(it);
246}
247
248static Eina_Bool
249_eina_inarray_accessor_get_at(Eina_Accessor_Inarray *it, unsigned int pos, void **data)
250{
251 EINA_MAGIC_CHECK_INARRAY_ACCESSOR(it, EINA_FALSE);
252
253 if (pos >= it->array->len)
254 return EINA_FALSE;
255
256 *data = _eina_inarray_get(it->array, pos);
257 return EINA_TRUE;
258}
259
260static Eina_Inarray *
261_eina_inarray_accessor_get_container(Eina_Accessor_Inarray *it)
262{
263 EINA_MAGIC_CHECK_INARRAY_ACCESSOR(it, NULL);
264 return (Eina_Inarray *)it->array;
265}
266
267static void
268_eina_inarray_accessor_free(Eina_Accessor_Inarray *it)
269{
270 EINA_MAGIC_CHECK_INARRAY_ACCESSOR(it);
271 MAGIC_FREE(it);
272}
273
274/**
275 * @endcond
276 */
277
278
279/*============================================================================*
280* Global *
281*============================================================================*/
282
283/**
284 * @internal
285 * @brief Initialize the inline array module.
286 *
287 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
288 *
289 * This function sets up the inline array module of Eina. It is called
290 * by eina_init().
291 *
292 * @see eina_init()
293 */
294Eina_Bool
295eina_inarray_init(void)
296{
297 _eina_inarray_log_dom = eina_log_domain_register("eina_inarray",
298 EINA_LOG_COLOR_DEFAULT);
299 if (_eina_inarray_log_dom < 0)
300 {
301 EINA_LOG_ERR("Could not register log domain: eina_inarray");
302 return EINA_FALSE;
303 }
304
305#define EMS(n) eina_magic_string_static_set(n, n ## _STR)
306 EMS(EINA_MAGIC_INARRAY);
307 EMS(EINA_MAGIC_INARRAY_ITERATOR);
308 EMS(EINA_MAGIC_INARRAY_ACCESSOR);
309#undef EMS
310
311 return EINA_TRUE;
312}
313
314/**
315 * @internal
316 * @brief Shut down the inline array module.
317 *
318 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
319 *
320 * This function shuts down the inline array module set up by
321 * eina_inarray_init(). It is called by eina_shutdown().
322 *
323 * @see eina_shutdown()
324 */
325Eina_Bool
326eina_inarray_shutdown(void)
327{
328 eina_log_domain_unregister(_eina_inarray_log_dom);
329 _eina_inarray_log_dom = -1;
330 return EINA_TRUE;
331}
332
333/*============================================================================*
334* API *
335*============================================================================*/
336EAPI Eina_Inarray *
337eina_inarray_new(unsigned int member_size, unsigned int step)
338{
339 Eina_Inarray *ret;
340
341 EINA_SAFETY_ON_TRUE_RETURN_VAL(member_size == 0, NULL);
342
343 ret = malloc(sizeof(*ret));
344 if (!ret)
345 {
346 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
347 return NULL;
348 }
349 eina_error_set(0);
350 _eina_inarray_setup(ret, member_size, step);
351 return ret;
352}
353
354EAPI void
355eina_inarray_free(Eina_Inarray *array)
356{
357 EINA_MAGIC_CHECK_INARRAY(array);
358 free(array->members);
359 free(array);
360}
361
362EAPI void
363eina_inarray_setup(Eina_Inarray *array, unsigned int member_size, unsigned int step)
364{
365 EINA_SAFETY_ON_NULL_RETURN(array);
366 EINA_SAFETY_ON_TRUE_RETURN(member_size == 0);
367 _eina_inarray_setup(array, member_size, step);
368}
369
370EAPI void
371eina_inarray_flush(Eina_Inarray *array)
372{
373 EINA_MAGIC_CHECK_INARRAY(array);
374 free(array->members);
375 array->len = 0;
376 array->max = 0;
377 array->members = NULL;
378}
379
380EAPI int
381eina_inarray_append(Eina_Inarray *array, const void *data)
382{
383 void *p;
384
385 EINA_MAGIC_CHECK_INARRAY(array, -1);
386 EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1);
387
388 if (!_eina_inarray_resize(array, array->len + 1))
389 return -1;
390
391 p = _eina_inarray_get(array, array->len);
392 memcpy(p, data, array->member_size);
393
394 array->len++;
395 return array->len - 1;
396}
397
398EAPI int
399eina_inarray_insert(Eina_Inarray *array, const void *data, Eina_Compare_Cb compare)
400{
401 const unsigned char *itr, *itr_end;
402 unsigned int sz;
403
404 EINA_MAGIC_CHECK_INARRAY(array, -1);
405 EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1);
406 EINA_SAFETY_ON_NULL_RETURN_VAL(compare, -1);
407
408 sz = array->member_size;
409 itr = array->members;
410 itr_end = itr + array->len * sz;
411 for (; itr < itr_end; itr += sz)
412 {
413 unsigned int offset, position;
414 int cmp = compare(itr, data);
415 if (cmp <= 0)
416 continue;
417
418 offset = itr - (unsigned char *)array->members;
419 position = offset / sz;
420 if (!eina_inarray_insert_at(array, position, data))
421 return -1;
422 return position;
423 }
424 return eina_inarray_append(array, data);
425}
426
427EAPI int
428eina_inarray_insert_sorted(Eina_Inarray *array, const void *data, Eina_Compare_Cb compare)
429{
430 unsigned int pos;
431 int cmp;
432
433 EINA_MAGIC_CHECK_INARRAY(array, -1);
434 EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1);
435 EINA_SAFETY_ON_NULL_RETURN_VAL(compare, -1);
436
437 pos = _eina_inarray_search_sorted_near(array, data, compare, &cmp);
438 if (cmp > 0)
439 pos++;
440
441 if (!eina_inarray_insert_at(array, pos, data))
442 return -1;
443 return pos;
444}
445
446EAPI int
447eina_inarray_remove(Eina_Inarray *array, const void *data)
448{
449 const unsigned char *itr, *itr_end;
450 unsigned int position, sz;
451
452 EINA_MAGIC_CHECK_INARRAY(array, -1);
453 EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1);
454
455 sz = array->member_size;
456 if ((data >= array->members) &&
457 (data < _eina_inarray_get(array, array->len)))
458 {
459 unsigned int offset = ((unsigned char *)data -
460 (unsigned char *)array->members);
461 position = offset / sz;
462 goto found;
463 }
464
465 itr = array->members;
466 itr_end = itr + array->len * sz;
467 for (; itr < itr_end; itr += sz)
468 {
469 if (memcmp(data, itr, sz) == 0)
470 {
471 unsigned int offset = itr - (unsigned char *)array->members;
472 position = offset / sz;
473 goto found;
474 }
475 }
476 return -1;
477
478found:
479 if (!eina_inarray_remove_at(array, position))
480 return -1;
481 return position;
482}
483
484EAPI int
485eina_inarray_pop(Eina_Inarray *array)
486{
487 EINA_MAGIC_CHECK_INARRAY(array, -1);
488 EINA_SAFETY_ON_TRUE_RETURN_VAL(array->len == 0, -1);
489 if (!_eina_inarray_resize(array, array->len - 1))
490 return -1;
491 array->len--;
492 return array->len + 1;
493}
494
495EAPI void *
496eina_inarray_nth(const Eina_Inarray *array, unsigned int position)
497{
498 EINA_MAGIC_CHECK_INARRAY(array, NULL);
499 EINA_SAFETY_ON_TRUE_RETURN_VAL(position >= array->len, NULL);
500 return _eina_inarray_get(array, position);
501}
502
503EAPI Eina_Bool
504eina_inarray_insert_at(Eina_Inarray *array, unsigned int position, const void *data)
505{
506 unsigned int sz;
507 unsigned char *p;
508
509 EINA_MAGIC_CHECK_INARRAY(array, EINA_FALSE);
510 EINA_SAFETY_ON_TRUE_RETURN_VAL(position > array->len, EINA_FALSE);
511
512 if (!_eina_inarray_resize(array, array->len + 1))
513 return EINA_FALSE;
514
515 p = _eina_inarray_get(array, position);
516 sz = array->member_size;
517 if (array->len > position)
518 memmove(p + sz, p, (array->len - position) * sz);
519 memcpy(p, data, sz);
520
521 array->len++;
522 return EINA_TRUE;
523}
524
525EAPI void *
526eina_inarray_alloc_at(Eina_Inarray *array, unsigned int position, unsigned int member_count)
527{
528 unsigned int sz;
529 unsigned char *p;
530
531 EINA_MAGIC_CHECK_INARRAY(array, NULL);
532 EINA_SAFETY_ON_TRUE_RETURN_VAL(position > array->len, NULL);
533 EINA_SAFETY_ON_TRUE_RETURN_VAL(member_count == 0, NULL);
534
535 if (!_eina_inarray_resize(array, array->len + member_count))
536 return NULL;
537
538 p = _eina_inarray_get(array, position);
539 sz = array->member_size;
540 if (array->len > position)
541 memmove(p + member_count * sz, p, (array->len - position) * sz);
542
543 array->len += member_count;
544 return p;
545}
546
547EAPI Eina_Bool
548eina_inarray_replace_at(Eina_Inarray *array, unsigned int position, const void *data)
549{
550 unsigned char *p;
551
552 EINA_MAGIC_CHECK_INARRAY(array, EINA_FALSE);
553 EINA_SAFETY_ON_TRUE_RETURN_VAL(position >= array->len, EINA_FALSE);
554
555 p = _eina_inarray_get(array, position);
556 memcpy(p, data, array->member_size);
557
558 return EINA_TRUE;
559}
560
561EAPI Eina_Bool
562eina_inarray_remove_at(Eina_Inarray *array, unsigned int position)
563{
564 EINA_MAGIC_CHECK_INARRAY(array, EINA_FALSE);
565 EINA_SAFETY_ON_TRUE_RETURN_VAL(position >= array->len, EINA_FALSE);
566
567 if (position + 1 < array->len)
568 {
569 unsigned int sz = array->member_size;
570 unsigned char *p = _eina_inarray_get(array, position);
571 memmove(p, p + sz, (array->len - position - 1) * sz);
572 }
573
574 _eina_inarray_resize(array, array->len - 1);
575 array->len--;
576 return EINA_TRUE;
577}
578
579EAPI void
580eina_inarray_reverse(Eina_Inarray *array)
581{
582 size_t sz;
583 unsigned char *fwd, *rev, *fwd_end;
584 void *tmp;
585
586 EINA_MAGIC_CHECK_INARRAY(array);
587
588 if (array->len < 2)
589 return;
590
591 sz = array->member_size;
592
593 tmp = alloca(sz);
594 EINA_SAFETY_ON_NULL_RETURN(tmp);
595
596 fwd = array->members;
597 fwd_end = fwd + (array->len / 2) * sz;
598
599 rev = fwd + (array->len - 1) * sz;
600
601 for (; fwd < fwd_end; fwd += sz, rev -= sz)
602 {
603 memcpy(tmp, fwd, sz);
604 memcpy(fwd, rev, sz);
605 memcpy(rev, tmp, sz);
606 }
607}
608
609EAPI void
610eina_inarray_sort(Eina_Inarray *array, Eina_Compare_Cb compare)
611{
612 EINA_MAGIC_CHECK_INARRAY(array);
613 EINA_SAFETY_ON_NULL_RETURN(compare);
614 qsort(array->members, array->len, array->member_size, compare);
615}
616
617EAPI int
618eina_inarray_search(const Eina_Inarray *array, const void *data, Eina_Compare_Cb compare)
619{
620 EINA_MAGIC_CHECK_INARRAY(array, -1);
621 EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1);
622 EINA_SAFETY_ON_NULL_RETURN_VAL(compare, -1);
623 return _eina_inarray_search(array, data, compare);
624}
625
626EAPI int
627eina_inarray_search_sorted(const Eina_Inarray *array, const void *data, Eina_Compare_Cb compare)
628{
629 unsigned int pos;
630 int cmp;
631
632 EINA_MAGIC_CHECK_INARRAY(array, -1);
633 EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1);
634 EINA_SAFETY_ON_NULL_RETURN_VAL(compare, -1);
635
636 pos = _eina_inarray_search_sorted_near(array, data, compare, &cmp);
637 if (cmp == 0)
638 return pos;
639 return -1;
640}
641
642EAPI Eina_Bool
643eina_inarray_foreach(const Eina_Inarray *array, Eina_Each_Cb function, const void *user_data)
644{
645 unsigned char *itr, *itr_end;
646 unsigned int sz;
647 Eina_Bool ret = EINA_TRUE;
648
649 EINA_MAGIC_CHECK_INARRAY(array, EINA_FALSE);
650 EINA_SAFETY_ON_NULL_RETURN_VAL(function, EINA_FALSE);
651
652 sz = array->member_size;
653 itr = array->members;
654 itr_end = itr + array->len * sz;
655 for (; (itr < itr_end) && (ret); itr += sz)
656 ret = function(array, itr, (void *)user_data);
657 return ret;
658}
659
660EAPI int
661eina_inarray_foreach_remove(Eina_Inarray *array, Eina_Each_Cb match, const void *user_data)
662{
663 unsigned int i = 0, count = 0;
664
665 EINA_MAGIC_CHECK_INARRAY(array, -1);
666 EINA_SAFETY_ON_NULL_RETURN_VAL(match, -1);
667
668 while (i < array->len)
669 {
670 void *p = _eina_inarray_get(array, i);
671 if (match(array, p, (void *)user_data) == EINA_FALSE)
672 {
673 i++;
674 continue;
675 }
676
677 eina_inarray_remove_at(array, i);
678 count++;
679 }
680
681 return count;
682}
683
684EAPI unsigned int
685eina_inarray_count(const Eina_Inarray *array)
686{
687 EINA_MAGIC_CHECK_INARRAY(array, 0);
688 return array->len;
689}
690
691EAPI Eina_Iterator *
692eina_inarray_iterator_new(const Eina_Inarray *array)
693{
694 Eina_Iterator_Inarray *it;
695
696 EINA_MAGIC_CHECK_INARRAY(array, NULL);
697
698 eina_error_set(0);
699 it = calloc(1, sizeof(Eina_Iterator_Inarray));
700 if (!it)
701 {
702 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
703 return NULL;
704 }
705
706 EINA_MAGIC_SET(it, EINA_MAGIC_INARRAY_ITERATOR);
707 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
708
709 it->array = array;
710
711 it->iterator.version = EINA_ITERATOR_VERSION;
712 it->iterator.next = FUNC_ITERATOR_NEXT(_eina_inarray_iterator_next);
713 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER
714 (_eina_inarray_iterator_get_container);
715 it->iterator.free = FUNC_ITERATOR_FREE(_eina_inarray_iterator_free);
716
717 return &it->iterator;
718}
719
720EAPI Eina_Iterator *
721eina_inarray_iterator_reversed_new(const Eina_Inarray *array)
722{
723 Eina_Iterator_Inarray *it;
724
725 EINA_MAGIC_CHECK_INARRAY(array, NULL);
726
727 eina_error_set(0);
728 it = calloc(1, sizeof(Eina_Iterator_Inarray));
729 if (!it)
730 {
731 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
732 return NULL;
733 }
734
735 EINA_MAGIC_SET(it, EINA_MAGIC_INARRAY_ITERATOR);
736 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
737
738 it->array = array;
739 it->pos = array->len;
740
741 it->iterator.version = EINA_ITERATOR_VERSION;
742 it->iterator.next = FUNC_ITERATOR_NEXT(_eina_inarray_iterator_prev);
743 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER
744 (_eina_inarray_iterator_get_container);
745 it->iterator.free = FUNC_ITERATOR_FREE(_eina_inarray_iterator_free);
746
747 return &it->iterator;
748}
749
750EAPI Eina_Accessor *
751eina_inarray_accessor_new(const Eina_Inarray *array)
752{
753 Eina_Accessor_Inarray *ac;
754
755 EINA_MAGIC_CHECK_INARRAY(array, NULL);
756
757 eina_error_set(0);
758 ac = calloc(1, sizeof(Eina_Accessor_Inarray));
759 if (!ac)
760 {
761 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
762 return NULL;
763 }
764
765 EINA_MAGIC_SET(ac, EINA_MAGIC_INARRAY_ACCESSOR);
766 EINA_MAGIC_SET(&ac->accessor, EINA_MAGIC_ACCESSOR);
767
768 ac->array = array;
769
770 ac->accessor.version = EINA_ACCESSOR_VERSION;
771 ac->accessor.get_at = FUNC_ACCESSOR_GET_AT(_eina_inarray_accessor_get_at);
772 ac->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER
773 (_eina_inarray_accessor_get_container);
774 ac->accessor.free = FUNC_ACCESSOR_FREE(_eina_inarray_accessor_free);
775
776 return &ac->accessor;
777}
diff --git a/libraries/eina/src/lib/eina_log.c b/libraries/eina/src/lib/eina_log.c
index dd772d2..4e2bb6d 100644
--- a/libraries/eina/src/lib/eina_log.c
+++ b/libraries/eina/src/lib/eina_log.c
@@ -71,6 +71,7 @@
71#define EINA_LOG_ENV_FILE_DISABLE "EINA_LOG_FILE_DISABLE" 71#define EINA_LOG_ENV_FILE_DISABLE "EINA_LOG_FILE_DISABLE"
72#define EINA_LOG_ENV_FUNCTION_DISABLE "EINA_LOG_FUNCTION_DISABLE" 72#define EINA_LOG_ENV_FUNCTION_DISABLE "EINA_LOG_FUNCTION_DISABLE"
73 73
74#ifdef EINA_ENABLE_LOG
74 75
75// Structure for storing domain level settings passed from the command line 76// Structure for storing domain level settings passed from the command line
76// that will be matched with application-defined domains. 77// that will be matched with application-defined domains.
@@ -1294,6 +1295,8 @@ eina_log_print_unlocked(int domain,
1294 abort(); 1295 abort();
1295} 1296}
1296 1297
1298#endif
1299
1297/** 1300/**
1298 * @endcond 1301 * @endcond
1299 */ 1302 */
@@ -1321,6 +1324,7 @@ eina_log_print_unlocked(int domain,
1321Eina_Bool 1324Eina_Bool
1322eina_log_init(void) 1325eina_log_init(void)
1323{ 1326{
1327#ifdef EINA_ENABLE_LOG
1324 const char *level, *tmp; 1328 const char *level, *tmp;
1325 int color_disable; 1329 int color_disable;
1326 1330
@@ -1392,6 +1396,7 @@ eina_log_init(void)
1392 // Parse pending domains passed through EINA_LOG_LEVELS 1396 // Parse pending domains passed through EINA_LOG_LEVELS
1393 eina_log_domain_parse_pendings(); 1397 eina_log_domain_parse_pendings();
1394 1398
1399#endif
1395 return EINA_TRUE; 1400 return EINA_TRUE;
1396} 1401}
1397 1402
@@ -1413,6 +1418,7 @@ eina_log_init(void)
1413Eina_Bool 1418Eina_Bool
1414eina_log_shutdown(void) 1419eina_log_shutdown(void)
1415{ 1420{
1421#ifdef EINA_ENABLE_LOG
1416 Eina_Inlist *tmp; 1422 Eina_Inlist *tmp;
1417 1423
1418 while (_log_domains_count--) 1424 while (_log_domains_count--)
@@ -1443,6 +1449,7 @@ eina_log_shutdown(void)
1443 free(tmp); 1449 free(tmp);
1444 } 1450 }
1445 1451
1452#endif
1446 return EINA_TRUE; 1453 return EINA_TRUE;
1447} 1454}
1448 1455
@@ -1460,10 +1467,12 @@ eina_log_shutdown(void)
1460void 1467void
1461eina_log_threads_init(void) 1468eina_log_threads_init(void)
1462{ 1469{
1470#ifdef EINA_ENABLE_LOG
1463 if (_threads_inited) return; 1471 if (_threads_inited) return;
1464 _main_thread = SELF(); 1472 _main_thread = SELF();
1465 if (!INIT()) return; 1473 if (!INIT()) return;
1466 _threads_inited = EINA_TRUE; 1474 _threads_inited = EINA_TRUE;
1475#endif
1467} 1476}
1468 1477
1469/** 1478/**
@@ -1478,11 +1487,13 @@ eina_log_threads_init(void)
1478void 1487void
1479eina_log_threads_shutdown(void) 1488eina_log_threads_shutdown(void)
1480{ 1489{
1490#ifdef EINA_ENABLE_LOG
1481 if (!_threads_inited) return; 1491 if (!_threads_inited) return;
1482 CHECK_MAIN(); 1492 CHECK_MAIN();
1483 SHUTDOWN(); 1493 SHUTDOWN();
1484 _threads_enabled = EINA_FALSE; 1494 _threads_enabled = EINA_FALSE;
1485 _threads_inited = EINA_FALSE; 1495 _threads_inited = EINA_FALSE;
1496#endif
1486} 1497}
1487 1498
1488#endif 1499#endif
@@ -1504,7 +1515,7 @@ EAPI int EINA_LOG_DOMAIN_GLOBAL = 0;
1504EAPI void 1515EAPI void
1505eina_log_threads_enable(void) 1516eina_log_threads_enable(void)
1506{ 1517{
1507#ifdef EFL_HAVE_THREADS 1518#if defined (EFL_HAVE_THREADS) && defined (EINA_ENABLE_LOG)
1508 if (_threads_enabled) return; 1519 if (_threads_enabled) return;
1509 if (!_threads_inited) eina_log_threads_init(); 1520 if (!_threads_inited) eina_log_threads_init();
1510 _threads_enabled = EINA_TRUE; 1521 _threads_enabled = EINA_TRUE;
@@ -1515,32 +1526,45 @@ eina_log_threads_enable(void)
1515EAPI void 1526EAPI void
1516eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data) 1527eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data)
1517{ 1528{
1529#ifdef EINA_ENABLE_LOG
1518 LOG_LOCK(); 1530 LOG_LOCK();
1519 _print_cb = cb; 1531 _print_cb = cb;
1520 _print_cb_data = data; 1532 _print_cb_data = data;
1521 eina_log_print_prefix_update(); 1533 eina_log_print_prefix_update();
1522 LOG_UNLOCK(); 1534 LOG_UNLOCK();
1535#else
1536 (void) cb;
1537 (void) data;
1538#endif
1523} 1539}
1524 1540
1525EAPI void 1541EAPI void
1526eina_log_level_set(int level) 1542eina_log_level_set(int level)
1527{ 1543{
1544#ifdef EINA_ENABLE_LOG
1528 _log_level = level; 1545 _log_level = level;
1529 if (EINA_LIKELY((EINA_LOG_DOMAIN_GLOBAL >= 0) && 1546 if (EINA_LIKELY((EINA_LOG_DOMAIN_GLOBAL >= 0) &&
1530 ((unsigned int)EINA_LOG_DOMAIN_GLOBAL < _log_domains_count))) 1547 ((unsigned int)EINA_LOG_DOMAIN_GLOBAL < _log_domains_count)))
1531 _log_domains[EINA_LOG_DOMAIN_GLOBAL].level = level; 1548 _log_domains[EINA_LOG_DOMAIN_GLOBAL].level = level;
1549#else
1550 (void) level;
1551#endif
1532} 1552}
1533 1553
1534EAPI int 1554EAPI int
1535eina_log_level_get(void) 1555eina_log_level_get(void)
1536{ 1556{
1557#ifdef EINA_ENABLE_LOG
1537 return _log_level; 1558 return _log_level;
1559#else
1560 return 0;
1561#endif
1538} 1562}
1539 1563
1540EAPI Eina_Bool 1564EAPI Eina_Bool
1541eina_log_main_thread_check(void) 1565eina_log_main_thread_check(void)
1542{ 1566{
1543#ifdef EFL_HAVE_THREADS 1567#if defined (EFL_HAVE_THREADS) && defined (EINA_ENABLE_LOG)
1544 return ((!_threads_enabled) || IS_MAIN(SELF())); 1568 return ((!_threads_enabled) || IS_MAIN(SELF()));
1545#else 1569#else
1546 return EINA_TRUE; 1570 return EINA_TRUE;
@@ -1550,66 +1574,107 @@ eina_log_main_thread_check(void)
1550EAPI void 1574EAPI void
1551eina_log_color_disable_set(Eina_Bool disabled) 1575eina_log_color_disable_set(Eina_Bool disabled)
1552{ 1576{
1577#ifdef EINA_ENABLE_LOG
1553 _disable_color = disabled; 1578 _disable_color = disabled;
1579#else
1580 (void) disabled;
1581#endif
1554} 1582}
1555 1583
1556EAPI Eina_Bool 1584EAPI Eina_Bool
1557eina_log_color_disable_get(void) 1585eina_log_color_disable_get(void)
1558{ 1586{
1587#ifdef EINA_ENABLE_LOG
1559 return _disable_color; 1588 return _disable_color;
1589#else
1590 return EINA_TRUE;
1591#endif
1560} 1592}
1561 1593
1562EAPI void 1594EAPI void
1563eina_log_file_disable_set(Eina_Bool disabled) 1595eina_log_file_disable_set(Eina_Bool disabled)
1564{ 1596{
1597#ifdef EINA_ENABLE_LOG
1565 _disable_file = disabled; 1598 _disable_file = disabled;
1599#else
1600 (void) disabled;
1601#endif
1566} 1602}
1567 1603
1568EAPI Eina_Bool 1604EAPI Eina_Bool
1569eina_log_file_disable_get(void) 1605eina_log_file_disable_get(void)
1570{ 1606{
1607#ifdef EINA_ENABLE_LOG
1571 return _disable_file; 1608 return _disable_file;
1609#else
1610 return EINA_TRUE;
1611#endif
1572} 1612}
1573 1613
1574EAPI void 1614EAPI void
1575eina_log_function_disable_set(Eina_Bool disabled) 1615eina_log_function_disable_set(Eina_Bool disabled)
1576{ 1616{
1617#ifdef EINA_ENABLE_LOG
1577 _disable_function = disabled; 1618 _disable_function = disabled;
1619#else
1620 (void) disabled;
1621#endif
1578} 1622}
1579 1623
1580EAPI Eina_Bool 1624EAPI Eina_Bool
1581eina_log_function_disable_get(void) 1625eina_log_function_disable_get(void)
1582{ 1626{
1627#ifdef EINA_ENABLE_LOG
1583 return _disable_function; 1628 return _disable_function;
1629#else
1630 return EINA_TRUE;
1631#endif
1584} 1632}
1585 1633
1586EAPI void 1634EAPI void
1587eina_log_abort_on_critical_set(Eina_Bool abort_on_critical) 1635eina_log_abort_on_critical_set(Eina_Bool abort_on_critical)
1588{ 1636{
1637#ifdef EINA_ENABLE_LOG
1589 _abort_on_critical = abort_on_critical; 1638 _abort_on_critical = abort_on_critical;
1639#else
1640 (void) abort_on_critical;
1641#endif
1590} 1642}
1591 1643
1592EAPI Eina_Bool 1644EAPI Eina_Bool
1593eina_log_abort_on_critical_get(void) 1645eina_log_abort_on_critical_get(void)
1594{ 1646{
1647#ifdef EINA_ENABLE_LOG
1595 return _abort_on_critical; 1648 return _abort_on_critical;
1649#else
1650 return EINA_FALSE;
1651#endif
1596} 1652}
1597 1653
1598EAPI void 1654EAPI void
1599eina_log_abort_on_critical_level_set(int critical_level) 1655eina_log_abort_on_critical_level_set(int critical_level)
1600{ 1656{
1657#ifdef EINA_ENABLE_LOG
1601 _abort_level_on_critical = critical_level; 1658 _abort_level_on_critical = critical_level;
1659#else
1660 (void) critical_level;
1661#endif
1602} 1662}
1603 1663
1604EAPI int 1664EAPI int
1605eina_log_abort_on_critical_level_get(void) 1665eina_log_abort_on_critical_level_get(void)
1606{ 1666{
1667#ifdef EINA_ENABLE_LOG
1607 return _abort_level_on_critical; 1668 return _abort_level_on_critical;
1669#else
1670 return 0;
1671#endif
1608} 1672}
1609 1673
1610EAPI int 1674EAPI int
1611eina_log_domain_register(const char *name, const char *color) 1675eina_log_domain_register(const char *name, const char *color)
1612{ 1676{
1677#ifdef EINA_ENABLE_LOG
1613 int r; 1678 int r;
1614 1679
1615 EINA_SAFETY_ON_NULL_RETURN_VAL(name, -1); 1680 EINA_SAFETY_ON_NULL_RETURN_VAL(name, -1);
@@ -1618,20 +1683,30 @@ eina_log_domain_register(const char *name, const char *color)
1618 r = eina_log_domain_register_unlocked(name, color); 1683 r = eina_log_domain_register_unlocked(name, color);
1619 LOG_UNLOCK(); 1684 LOG_UNLOCK();
1620 return r; 1685 return r;
1686#else
1687 (void) name;
1688 (void) color;
1689 return 0;
1690#endif
1621} 1691}
1622 1692
1623EAPI void 1693EAPI void
1624eina_log_domain_unregister(int domain) 1694eina_log_domain_unregister(int domain)
1625{ 1695{
1696#ifdef EINA_ENABLE_LOG
1626 EINA_SAFETY_ON_FALSE_RETURN(domain >= 0); 1697 EINA_SAFETY_ON_FALSE_RETURN(domain >= 0);
1627 LOG_LOCK(); 1698 LOG_LOCK();
1628 eina_log_domain_unregister_unlocked(domain); 1699 eina_log_domain_unregister_unlocked(domain);
1629 LOG_UNLOCK(); 1700 LOG_UNLOCK();
1701#else
1702 (void) domain;
1703#endif
1630} 1704}
1631 1705
1632EAPI void 1706EAPI void
1633eina_log_domain_level_set(const char *domain_name, int level) 1707eina_log_domain_level_set(const char *domain_name, int level)
1634{ 1708{
1709#ifdef EINA_ENABLE_LOG
1635 Eina_Log_Domain_Level_Pending *pending; 1710 Eina_Log_Domain_Level_Pending *pending;
1636 size_t namelen; 1711 size_t namelen;
1637 unsigned int i; 1712 unsigned int i;
@@ -1672,11 +1747,16 @@ eina_log_domain_level_set(const char *domain_name, int level)
1672 memcpy(pending->name, domain_name, namelen + 1); 1747 memcpy(pending->name, domain_name, namelen + 1);
1673 1748
1674 _pending_list = eina_inlist_append(_pending_list, EINA_INLIST_GET(pending)); 1749 _pending_list = eina_inlist_append(_pending_list, EINA_INLIST_GET(pending));
1750#else
1751 (void) domain_name;
1752 (void) level;
1753#endif
1675} 1754}
1676 1755
1677EAPI int 1756EAPI int
1678eina_log_domain_level_get(const char *domain_name) 1757eina_log_domain_level_get(const char *domain_name)
1679{ 1758{
1759#ifdef EINA_ENABLE_LOG
1680 Eina_Log_Domain_Level_Pending *pending; 1760 Eina_Log_Domain_Level_Pending *pending;
1681 size_t namelen; 1761 size_t namelen;
1682 unsigned int i; 1762 unsigned int i;
@@ -1711,17 +1791,26 @@ eina_log_domain_level_get(const char *domain_name)
1711 } 1791 }
1712 1792
1713 return _log_level; 1793 return _log_level;
1794#else
1795 (void) domain_name;
1796 return 0;
1797#endif
1714} 1798}
1715 1799
1716EAPI int 1800EAPI int
1717eina_log_domain_registered_level_get(int domain) 1801eina_log_domain_registered_level_get(int domain)
1718{ 1802{
1803#ifdef EINA_ENABLE_LOG
1719 EINA_SAFETY_ON_FALSE_RETURN_VAL(domain >= 0, EINA_LOG_LEVEL_UNKNOWN); 1804 EINA_SAFETY_ON_FALSE_RETURN_VAL(domain >= 0, EINA_LOG_LEVEL_UNKNOWN);
1720 EINA_SAFETY_ON_FALSE_RETURN_VAL((unsigned int)domain < _log_domains_count, 1805 EINA_SAFETY_ON_FALSE_RETURN_VAL((unsigned int)domain < _log_domains_count,
1721 EINA_LOG_LEVEL_UNKNOWN); 1806 EINA_LOG_LEVEL_UNKNOWN);
1722 EINA_SAFETY_ON_TRUE_RETURN_VAL(_log_domains[domain].deleted, 1807 EINA_SAFETY_ON_TRUE_RETURN_VAL(_log_domains[domain].deleted,
1723 EINA_LOG_LEVEL_UNKNOWN); 1808 EINA_LOG_LEVEL_UNKNOWN);
1724 return _log_domains[domain].level; 1809 return _log_domains[domain].level;
1810#else
1811 (void) domain;
1812 return 0;
1813#endif
1725} 1814}
1726 1815
1727EAPI void 1816EAPI void
@@ -1734,9 +1823,20 @@ eina_log_print_cb_stderr(const Eina_Log_Domain *d,
1734 __UNUSED__ void *data, 1823 __UNUSED__ void *data,
1735 va_list args) 1824 va_list args)
1736{ 1825{
1826#ifdef EINA_ENABLE_LOG
1737 _eina_log_print_prefix(stderr, d, level, file, fnc, line); 1827 _eina_log_print_prefix(stderr, d, level, file, fnc, line);
1738 vfprintf(stderr, fmt, args); 1828 vfprintf(stderr, fmt, args);
1739 putc('\n', stderr); 1829 putc('\n', stderr);
1830#else
1831 (void) d;
1832 (void) level;
1833 (void) file;
1834 (void) fnc;
1835 (void) line;
1836 (void) fmt;
1837 (void) data;
1838 (void) args;
1839#endif
1740} 1840}
1741 1841
1742EAPI void 1842EAPI void
@@ -1749,9 +1849,20 @@ eina_log_print_cb_stdout(const Eina_Log_Domain *d,
1749 __UNUSED__ void *data, 1849 __UNUSED__ void *data,
1750 va_list args) 1850 va_list args)
1751{ 1851{
1852#ifdef EINA_ENABLE_LOG
1752 _eina_log_print_prefix(stdout, d, level, file, fnc, line); 1853 _eina_log_print_prefix(stdout, d, level, file, fnc, line);
1753 vprintf(fmt, args); 1854 vprintf(fmt, args);
1754 putchar('\n'); 1855 putchar('\n');
1856#else
1857 (void) d;
1858 (void) level;
1859 (void) file;
1860 (void) fnc;
1861 (void) line;
1862 (void) fmt;
1863 (void) data;
1864 (void) args;
1865#endif
1755} 1866}
1756 1867
1757EAPI void 1868EAPI void
@@ -1764,6 +1875,7 @@ eina_log_print_cb_file(const Eina_Log_Domain *d,
1764 void *data, 1875 void *data,
1765 va_list args) 1876 va_list args)
1766{ 1877{
1878#ifdef EINA_ENABLE_LOG
1767 FILE *f = data; 1879 FILE *f = data;
1768#ifdef EFL_HAVE_THREADS 1880#ifdef EFL_HAVE_THREADS
1769 if (_threads_enabled) 1881 if (_threads_enabled)
@@ -1787,12 +1899,22 @@ end:
1787#endif 1899#endif
1788 vfprintf(f, fmt, args); 1900 vfprintf(f, fmt, args);
1789 putc('\n', f); 1901 putc('\n', f);
1902#else
1903 (void) d;
1904 (void) file;
1905 (void) fnc;
1906 (void) line;
1907 (void) fmt;
1908 (void) data;
1909 (void) args;
1910#endif
1790} 1911}
1791 1912
1792EAPI void 1913EAPI void
1793eina_log_print(int domain, Eina_Log_Level level, const char *file, 1914eina_log_print(int domain, Eina_Log_Level level, const char *file,
1794 const char *fnc, int line, const char *fmt, ...) 1915 const char *fnc, int line, const char *fmt, ...)
1795{ 1916{
1917#ifdef EINA_ENABLE_LOG
1796 va_list args; 1918 va_list args;
1797 1919
1798#ifdef EINA_SAFETY_CHECKS 1920#ifdef EINA_SAFETY_CHECKS
@@ -1820,12 +1942,22 @@ eina_log_print(int domain, Eina_Log_Level level, const char *file,
1820 eina_log_print_unlocked(domain, level, file, fnc, line, fmt, args); 1942 eina_log_print_unlocked(domain, level, file, fnc, line, fmt, args);
1821 LOG_UNLOCK(); 1943 LOG_UNLOCK();
1822 va_end(args); 1944 va_end(args);
1945#else
1946 (void) domain;
1947 (void) level;
1948 (void) file;
1949 (void) fnc;
1950 (void) line;
1951 (void) fmt;
1952#endif
1823} 1953}
1824 1954
1825EAPI void 1955EAPI void
1826eina_log_vprint(int domain, Eina_Log_Level level, const char *file, 1956eina_log_vprint(int domain, Eina_Log_Level level, const char *file,
1827 const char *fnc, int line, const char *fmt, va_list args) 1957 const char *fnc, int line, const char *fmt, va_list args)
1828{ 1958{
1959#ifdef EINA_ENABLE_LOG
1960
1829#ifdef EINA_SAFETY_CHECKS 1961#ifdef EINA_SAFETY_CHECKS
1830 if (EINA_UNLIKELY(!file)) 1962 if (EINA_UNLIKELY(!file))
1831 { 1963 {
@@ -1849,4 +1981,13 @@ eina_log_vprint(int domain, Eina_Log_Level level, const char *file,
1849 LOG_LOCK(); 1981 LOG_LOCK();
1850 eina_log_print_unlocked(domain, level, file, fnc, line, fmt, args); 1982 eina_log_print_unlocked(domain, level, file, fnc, line, fmt, args);
1851 LOG_UNLOCK(); 1983 LOG_UNLOCK();
1984#else
1985 (void) domain;
1986 (void) level;
1987 (void) file;
1988 (void) fnc;
1989 (void) line;
1990 (void) fmt;
1991 (void) args;
1992#endif
1852} 1993}
diff --git a/libraries/eina/src/lib/eina_magic.c b/libraries/eina/src/lib/eina_magic.c
index 1adde92..d1f71cc 100644
--- a/libraries/eina/src/lib/eina_magic.c
+++ b/libraries/eina/src/lib/eina_magic.c
@@ -79,7 +79,7 @@ _eina_magic_strings_sort_cmp(const void *p1, const void *p2)
79static int 79static int
80_eina_magic_strings_find_cmp(const void *p1, const void *p2) 80_eina_magic_strings_find_cmp(const void *p1, const void *p2)
81{ 81{
82 Eina_Magic a = (Eina_Magic)p1; 82 Eina_Magic a = (Eina_Magic)(size_t)p1;
83 const Eina_Magic_String *b = p2; 83 const Eina_Magic_String *b = p2;
84 return a - b->magic; 84 return a - b->magic;
85} 85}
@@ -129,6 +129,10 @@ _eina_magic_strings_alloc(void)
129* Global * 129* Global *
130*============================================================================*/ 130*============================================================================*/
131 131
132EAPI Eina_Error EINA_ERROR_MAGIC_FAILED = 0;
133
134static const char EINA_ERROR_MAGIC_FAILED_STR[] = "Magic check failed.";
135
132/** 136/**
133 * @internal 137 * @internal
134 * @brief Initialize the magic string module. 138 * @brief Initialize the magic string module.
@@ -150,6 +154,8 @@ eina_magic_string_init(void)
150 EINA_LOG_ERR("Could not register log domain: eina_magic_string"); 154 EINA_LOG_ERR("Could not register log domain: eina_magic_string");
151 return EINA_FALSE; 155 return EINA_FALSE;
152 } 156 }
157 EINA_ERROR_MAGIC_FAILED = eina_error_msg_static_register(
158 EINA_ERROR_MAGIC_FAILED_STR);
153 159
154 return EINA_TRUE; 160 return EINA_TRUE;
155} 161}
@@ -206,7 +212,7 @@ eina_magic_string_get(Eina_Magic magic)
206 _eina_magic_strings_dirty = 0; 212 _eina_magic_strings_dirty = 0;
207 } 213 }
208 214
209 ems = bsearch((void *)magic, _eina_magic_strings, 215 ems = bsearch((void *)(size_t)magic, _eina_magic_strings,
210 _eina_magic_strings_count, sizeof(Eina_Magic_String), 216 _eina_magic_strings_count, sizeof(Eina_Magic_String),
211 _eina_magic_strings_find_cmp); 217 _eina_magic_strings_find_cmp);
212 if (ems) 218 if (ems)
@@ -271,6 +277,7 @@ eina_magic_fail(void *d,
271 const char *fnc, 277 const char *fnc,
272 int line) 278 int line)
273{ 279{
280 eina_error_set(EINA_ERROR_MAGIC_FAILED);
274 if (!d) 281 if (!d)
275 eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_CRITICAL, 282 eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_CRITICAL,
276 file, fnc, line, 283 file, fnc, line,
diff --git a/libraries/eina/src/lib/eina_main.c b/libraries/eina/src/lib/eina_main.c
index 8727f83..79f8a36 100644
--- a/libraries/eina/src/lib/eina_main.c
+++ b/libraries/eina/src/lib/eina_main.c
@@ -67,6 +67,8 @@
67#include "eina_rectangle.h" 67#include "eina_rectangle.h"
68#include "eina_safety_checks.h" 68#include "eina_safety_checks.h"
69#include "eina_inlist.h" 69#include "eina_inlist.h"
70#include "eina_inarray.h"
71#include "eina_value.h"
70 72
71/*============================================================================* 73/*============================================================================*
72* Local * 74* Local *
@@ -131,6 +133,7 @@ EAPI Eina_Inlist *_eina_tracking = NULL;
131 S(magic_string); 133 S(magic_string);
132 S(iterator); 134 S(iterator);
133 S(accessor); 135 S(accessor);
136 S(inarray);
134 S(array); 137 S(array);
135 S(module); 138 S(module);
136 S(mempool); 139 S(mempool);
@@ -149,6 +152,7 @@ EAPI Eina_Inlist *_eina_tracking = NULL;
149 S(simple_xml); 152 S(simple_xml);
150 S(file); 153 S(file);
151 S(prefix); 154 S(prefix);
155 S(value);
152#undef S 156#undef S
153 157
154struct eina_desc_setup 158struct eina_desc_setup
@@ -161,17 +165,18 @@ struct eina_desc_setup
161static const struct eina_desc_setup _eina_desc_setup[] = { 165static const struct eina_desc_setup _eina_desc_setup[] = {
162#define S(x) {# x, eina_ ## x ## _init, eina_ ## x ## _shutdown} 166#define S(x) {# x, eina_ ## x ## _init, eina_ ## x ## _shutdown}
163 /* log is a special case as it needs printf */ 167 /* log is a special case as it needs printf */
168 S(stringshare),
164 S(error), 169 S(error),
165 S(safety_checks), 170 S(safety_checks),
166 S(magic_string), 171 S(magic_string),
167 S(iterator), 172 S(iterator),
168 S(accessor), 173 S(accessor),
174 S(inarray),
169 S(array), 175 S(array),
170 S(module), 176 S(module),
171 S(mempool), 177 S(mempool),
172 S(list), 178 S(list),
173 S(binshare), 179 S(binshare),
174 S(stringshare),
175 S(ustringshare), 180 S(ustringshare),
176 S(matrixsparse), 181 S(matrixsparse),
177 S(convert), 182 S(convert),
@@ -183,7 +188,8 @@ static const struct eina_desc_setup _eina_desc_setup[] = {
183 S(quadtree), 188 S(quadtree),
184 S(simple_xml), 189 S(simple_xml),
185 S(file), 190 S(file),
186 S(prefix) 191 S(prefix),
192 S(value)
187#undef S 193#undef S
188}; 194};
189static const size_t _eina_desc_setup_len = sizeof(_eina_desc_setup) / 195static const size_t _eina_desc_setup_len = sizeof(_eina_desc_setup) /
@@ -236,8 +242,8 @@ eina_init(void)
236 _mt_enabled = 1; 242 _mt_enabled = 1;
237 mtrace(); 243 mtrace();
238 } 244 }
239#endif 245#endif
240 246
241 if (!eina_log_init()) 247 if (!eina_log_init())
242 { 248 {
243 fprintf(stderr, "Could not initialize eina logging system.\n"); 249 fprintf(stderr, "Could not initialize eina logging system.\n");
@@ -304,7 +310,7 @@ eina_shutdown(void)
304 muntrace(); 310 muntrace();
305 _mt_enabled = 0; 311 _mt_enabled = 0;
306 } 312 }
307#endif 313#endif
308 } 314 }
309 315
310 return _eina_main_count; 316 return _eina_main_count;
diff --git a/libraries/eina/src/lib/eina_mmap.c b/libraries/eina/src/lib/eina_mmap.c
index fb27bd7..7929f0e 100644
--- a/libraries/eina/src/lib/eina_mmap.c
+++ b/libraries/eina/src/lib/eina_mmap.c
@@ -110,6 +110,8 @@ _eina_mmap_safe_sigbus(int sig __UNUSED__,
110 errno = perrno; 110 errno = perrno;
111 abort(); 111 abort();
112 } 112 }
113 /* Look into mmaped Eina_File if it was one of them, just to remember for later request */
114 eina_file_mmap_faulty(addr, _eina_mmap_pagesize);
113 /* restore previous errno */ 115 /* restore previous errno */
114 errno = perrno; 116 errno = perrno;
115} 117}
@@ -162,6 +164,9 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
162 sa.sa_sigaction = _eina_mmap_safe_sigbus; 164 sa.sa_sigaction = _eina_mmap_safe_sigbus;
163 sa.sa_flags = SA_RESTART | SA_SIGINFO; 165 sa.sa_flags = SA_RESTART | SA_SIGINFO;
164 sigemptyset(&sa.sa_mask); 166 sigemptyset(&sa.sa_mask);
167 /* FIXME: This is rubbish. We return EINA_FALSE whether sigaction
168 * fails or not. And we never set mmap_safe, so we always hit this
169 * code path. */
165 if (sigaction(SIGBUS, &sa, NULL) == 0) return EINA_FALSE; 170 if (sigaction(SIGBUS, &sa, NULL) == 0) return EINA_FALSE;
166 /* setup of SIGBUS handler failed, lets close zero page dev and fail */ 171 /* setup of SIGBUS handler failed, lets close zero page dev and fail */
167 close(_eina_mmap_zero_fd); 172 close(_eina_mmap_zero_fd);
diff --git a/libraries/eina/src/lib/eina_module.c b/libraries/eina/src/lib/eina_module.c
index 0dd19a6..26df980 100644
--- a/libraries/eina/src/lib/eina_module.c
+++ b/libraries/eina/src/lib/eina_module.c
@@ -37,6 +37,7 @@ extern "C"
37void *alloca (size_t); 37void *alloca (size_t);
38#endif 38#endif
39 39
40#include <stdlib.h>
40#include <stdio.h> 41#include <stdio.h>
41#include <sys/types.h> 42#include <sys/types.h>
42#include <string.h> 43#include <string.h>
diff --git a/libraries/eina/src/lib/eina_prefix.c b/libraries/eina/src/lib/eina_prefix.c
index 9445222..5b4b0c0 100644
--- a/libraries/eina/src/lib/eina_prefix.c
+++ b/libraries/eina/src/lib/eina_prefix.c
@@ -150,25 +150,24 @@ _fallback(Eina_Prefix *pfx, const char *pkg_bin, const char *pkg_lib,
150 STRDUP_REP(pfx->prefix_path_lib, pkg_lib); 150 STRDUP_REP(pfx->prefix_path_lib, pkg_lib);
151 STRDUP_REP(pfx->prefix_path_data, pkg_data); 151 STRDUP_REP(pfx->prefix_path_data, pkg_data);
152 STRDUP_REP(pfx->prefix_path_locale, pkg_locale); 152 STRDUP_REP(pfx->prefix_path_locale, pkg_locale);
153 fprintf(stderr, 153 WRN("Could not determine its installed prefix for '%s'\n"
154 "WARNING: Could not determine its installed prefix for '%s'\n" 154 " so am falling back on the compiled in default:\n"
155 " so am falling back on the compiled in default:\n" 155 " %s\n"
156 " %s\n" 156 " implied by the following:\n"
157 " implied by the following:\n" 157 " bindir = %s\n"
158 " bindir = %s\n" 158 " libdir = %s\n"
159 " libdir = %s\n" 159 " datadir = %s\n"
160 " datadir = %s\n" 160 " localedir = %s\n"
161 " localedir = %s\n" 161 " Try setting the following environment variables:\n"
162 " Try setting the following environment variables:\n" 162 " %s_PREFIX - points to the base prefix of install\n"
163 " %s_PREFIX - points to the base prefix of install\n" 163 " or the next 4 variables\n"
164 " or the next 4 variables\n" 164 " %s_BIN_DIR - provide a specific binary directory\n"
165 " %s_BIN_DIR - provide a specific binary directory\n" 165 " %s_LIB_DIR - provide a specific library directory\n"
166 " %s_LIB_DIR - provide a specific library directory\n" 166 " %s_DATA_DIR - provide a specific data directory\n"
167 " %s_DATA_DIR - provide a specific data directory\n" 167 " %s_LOCALE_DIR - provide a specific locale directory",
168 " %s_LOCALE_DIR - provide a specific locale directory\n" 168 envprefix,
169 , envprefix, 169 pfx->prefix_path, pkg_bin, pkg_lib, pkg_data, pkg_locale,
170 pfx->prefix_path, pkg_bin, pkg_lib, pkg_data, pkg_locale, 170 envprefix, envprefix, envprefix, envprefix, envprefix);
171 envprefix, envprefix, envprefix, envprefix, envprefix);
172 pfx->fallback = 1; 171 pfx->fallback = 1;
173 return 1; 172 return 1;
174} 173}
diff --git a/libraries/eina/src/lib/eina_private.h b/libraries/eina/src/lib/eina_private.h
index d390397..e31ab47 100644
--- a/libraries/eina/src/lib/eina_private.h
+++ b/libraries/eina/src/lib/eina_private.h
@@ -91,6 +91,10 @@
91#define EINA_MAGIC_SIMPLE_XML_DATA 0x98761261 91#define EINA_MAGIC_SIMPLE_XML_DATA 0x98761261
92#define EINA_MAGIC_SIMPLE_XML_ATTRIBUTE 0x98761262 92#define EINA_MAGIC_SIMPLE_XML_ATTRIBUTE 0x98761262
93 93
94#define EINA_MAGIC_INARRAY 0x98761270
95#define EINA_MAGIC_INARRAY_ITERATOR 0x98761271
96#define EINA_MAGIC_INARRAY_ACCESSOR 0x98761272
97
94#define EINA_MAGIC_CLASS 0x9877CB30 98#define EINA_MAGIC_CLASS 0x9877CB30
95 99
96/* undef the following, we want out version */ 100/* undef the following, we want out version */
@@ -136,5 +140,7 @@ void eina_log_threads_init(void);
136void eina_log_threads_shutdown(void); 140void eina_log_threads_shutdown(void);
137#endif 141#endif
138 142
143void eina_file_mmap_faulty(void *addr, long page_size);
144
139#endif /* EINA_PRIVATE_H_ */ 145#endif /* EINA_PRIVATE_H_ */
140 146
diff --git a/libraries/eina/src/lib/eina_rbtree.c b/libraries/eina/src/lib/eina_rbtree.c
index c0c9f9e..5f1232c 100644
--- a/libraries/eina/src/lib/eina_rbtree.c
+++ b/libraries/eina/src/lib/eina_rbtree.c
@@ -83,7 +83,7 @@ _eina_rbtree_iterator_list_new(const Eina_Rbtree *tree)
83static Eina_Rbtree * 83static Eina_Rbtree *
84_eina_rbtree_iterator_get_content(Eina_Iterator_Rbtree *it) 84_eina_rbtree_iterator_get_content(Eina_Iterator_Rbtree *it)
85{ 85{
86 if (eina_array_count_get(it->stack) <= 0) 86 if (eina_array_count(it->stack) <= 0)
87 return NULL; 87 return NULL;
88 88
89 return eina_array_data_get(it->stack, 0); 89 return eina_array_data_get(it->stack, 0);
@@ -110,10 +110,10 @@ _eina_rbtree_iterator_next(Eina_Iterator_Rbtree *it, void **data)
110 Eina_Iterator_Rbtree_List *new; 110 Eina_Iterator_Rbtree_List *new;
111 Eina_Rbtree *tree; 111 Eina_Rbtree *tree;
112 112
113 if (eina_array_count_get(it->stack) <= 0) 113 if (eina_array_count(it->stack) <= 0)
114 return EINA_FALSE; 114 return EINA_FALSE;
115 115
116 last = eina_array_data_get(it->stack, eina_array_count_get(it->stack) - 1); 116 last = eina_array_data_get(it->stack, eina_array_count(it->stack) - 1);
117 tree = last->tree; 117 tree = last->tree;
118 118
119 if (!last->tree || last->up == EINA_TRUE) 119 if (!last->tree || last->up == EINA_TRUE)
@@ -128,10 +128,10 @@ _eina_rbtree_iterator_next(Eina_Iterator_Rbtree *it, void **data)
128 { 128 {
129 free(last); 129 free(last);
130 130
131 if (eina_array_count_get(it->stack) > 0) 131 if (eina_array_count(it->stack) > 0)
132 { 132 {
133 last = eina_array_data_get(it->stack, 133 last = eina_array_data_get(it->stack,
134 eina_array_count_get( 134 eina_array_count(
135 it-> 135 it->
136 stack) 136 stack)
137 - 1); 137 - 1);
diff --git a/libraries/eina/src/lib/eina_simple_xml_parser.c b/libraries/eina/src/lib/eina_simple_xml_parser.c
index 08a8259..4e357ba 100644
--- a/libraries/eina/src/lib/eina_simple_xml_parser.c
+++ b/libraries/eina/src/lib/eina_simple_xml_parser.c
@@ -38,7 +38,10 @@ extern "C"
38void *alloca (size_t); 38void *alloca (size_t);
39#endif 39#endif
40 40
41#include <strings.h> 41#ifdef HAVE_STRINGS_H
42# include <strings.h>
43#endif
44#include <stdlib.h>
42#include <string.h> 45#include <string.h>
43#include <ctype.h> 46#include <ctype.h>
44 47
@@ -121,7 +124,7 @@ static inline const char *
121_eina_simple_xml_whitespace_find(const char *itr, const char *itr_end) 124_eina_simple_xml_whitespace_find(const char *itr, const char *itr_end)
122{ 125{
123 for (; itr < itr_end; itr++) 126 for (; itr < itr_end; itr++)
124 if (isspace(*itr)) break; 127 if (isspace((unsigned char)*itr)) break;
125 return itr; 128 return itr;
126} 129}
127 130
@@ -129,7 +132,7 @@ static inline const char *
129_eina_simple_xml_whitespace_skip(const char *itr, const char *itr_end) 132_eina_simple_xml_whitespace_skip(const char *itr, const char *itr_end)
130{ 133{
131 for (; itr < itr_end; itr++) 134 for (; itr < itr_end; itr++)
132 if (!isspace(*itr)) break; 135 if (!isspace((unsigned char)*itr)) break;
133 return itr; 136 return itr;
134} 137}
135 138
@@ -137,7 +140,7 @@ static inline const char *
137_eina_simple_xml_whitespace_unskip(const char *itr, const char *itr_start) 140_eina_simple_xml_whitespace_unskip(const char *itr, const char *itr_start)
138{ 141{
139 for (itr--; itr > itr_start; itr--) 142 for (itr--; itr > itr_start; itr--)
140 if (!isspace(*itr)) break; 143 if (!isspace((unsigned char)*itr)) break;
141 return itr + 1; 144 return itr + 1;
142} 145}
143 146
@@ -309,7 +312,7 @@ eina_simple_xml_parse(const char *buf, unsigned buflen, Eina_Bool strip, Eina_Si
309 (!memcmp(itr + 2, "DOCTYPE", 312 (!memcmp(itr + 2, "DOCTYPE",
310 sizeof("DOCTYPE") - 1)) && 313 sizeof("DOCTYPE") - 1)) &&
311 ((itr[2 + sizeof("DOCTYPE") - 1] == '>') || 314 ((itr[2 + sizeof("DOCTYPE") - 1] == '>') ||
312 (isspace(itr[2 + sizeof("DOCTYPE") - 1])))) 315 (isspace((unsigned char)itr[2 + sizeof("DOCTYPE") - 1]))))
313 { 316 {
314 type = EINA_SIMPLE_XML_DOCTYPE; 317 type = EINA_SIMPLE_XML_DOCTYPE;
315 toff = sizeof("!DOCTYPE") - 1; 318 toff = sizeof("!DOCTYPE") - 1;
@@ -455,7 +458,7 @@ eina_simple_xml_tag_attributes_find(const char *buf, unsigned buflen)
455 458
456 for (; itr < itr_end; itr++) 459 for (; itr < itr_end; itr++)
457 { 460 {
458 if (!isspace(*itr)) 461 if (!isspace((unsigned char)*itr))
459 { 462 {
460 /* user skip tagname and already gave it the attributes */ 463 /* user skip tagname and already gave it the attributes */
461 if (*itr == '=') 464 if (*itr == '=')
@@ -492,7 +495,7 @@ eina_simple_xml_attributes_parse(const char *buf, unsigned buflen, Eina_Simple_X
492 495
493 key = p; 496 key = p;
494 for (key_end = key; key_end < itr_end; key_end++) 497 for (key_end = key; key_end < itr_end; key_end++)
495 if ((*key_end == '=') || (isspace(*key_end))) break; 498 if ((*key_end == '=') || (isspace((unsigned char)*key_end))) break;
496 if (key_end == itr_end) return EINA_FALSE; 499 if (key_end == itr_end) return EINA_FALSE;
497 if (key_end == key) continue; 500 if (key_end == key) continue;
498 501
@@ -504,7 +507,7 @@ eina_simple_xml_attributes_parse(const char *buf, unsigned buflen, Eina_Simple_X
504 value++; 507 value++;
505 } 508 }
506 for (; value < itr_end; value++) 509 for (; value < itr_end; value++)
507 if (!isspace(*value)) break; 510 if (!isspace((unsigned char)*value)) break;
508 if (value == itr_end) return EINA_FALSE; 511 if (value == itr_end) return EINA_FALSE;
509 512
510 if ((*value == '"') || (*value == '\'')) 513 if ((*value == '"') || (*value == '\''))
diff --git a/libraries/eina/src/lib/eina_strbuf.c b/libraries/eina/src/lib/eina_strbuf.c
index 74b1eb9..828d842 100644
--- a/libraries/eina/src/lib/eina_strbuf.c
+++ b/libraries/eina/src/lib/eina_strbuf.c
@@ -162,9 +162,9 @@ eina_strbuf_insert_vprintf(Eina_Strbuf *buf,
162EAPI void 162EAPI void
163eina_strbuf_trim(Eina_Strbuf *buf) 163eina_strbuf_trim(Eina_Strbuf *buf)
164{ 164{
165 char *c = buf->buf; 165 unsigned char *c = buf->buf;
166 166
167 while (buf->len > 0 && isspace(((unsigned char*)(buf->buf))[buf->len - 1])) 167 while (buf->len > 0 && isspace(c[buf->len - 1]))
168 buf->len--; 168 buf->len--;
169 while (buf->len > 0 && isspace(*c)) 169 while (buf->len > 0 && isspace(*c))
170 { 170 {
@@ -178,7 +178,7 @@ eina_strbuf_trim(Eina_Strbuf *buf)
178EAPI void 178EAPI void
179eina_strbuf_ltrim(Eina_Strbuf *buf) 179eina_strbuf_ltrim(Eina_Strbuf *buf)
180{ 180{
181 char *c = buf->buf; 181 unsigned char *c = buf->buf;
182 182
183 while (buf->len > 0 && isspace(*c)) 183 while (buf->len > 0 && isspace(*c))
184 { 184 {
diff --git a/libraries/eina/src/lib/eina_value.c b/libraries/eina/src/lib/eina_value.c
index 554f907..ba8af52 100644
--- a/libraries/eina/src/lib/eina_value.c
+++ b/libraries/eina/src/lib/eina_value.c
@@ -28,8 +28,4762 @@
28# include "config.h" 28# include "config.h"
29#endif 29#endif
30 30
31#ifdef HAVE_ALLOCA_H
32# include <alloca.h>
33#elif defined __GNUC__
34# define alloca __builtin_alloca
35#elif defined _AIX
36# define alloca __alloca
37#elif defined _MSC_VER
38# include <malloc.h>
39# define alloca _alloca
40#else
41# include <stddef.h>
42# ifdef __cplusplus
43extern "C"
44# endif
45void *alloca (size_t);
46#endif
47
48#include <stdio.h> /* asprintf() */
49#include <inttypes.h> /* PRId64 and PRIu64 */
50#include <sys/time.h> /* struct timeval */
51
31#include "eina_config.h" 52#include "eina_config.h"
32#include "eina_private.h" 53#include "eina_private.h"
54#include "eina_error.h"
55#include "eina_log.h"
56#include "eina_strbuf.h"
57#include "eina_mempool.h"
58#include "eina_lock.h"
59
60/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
61#include "eina_safety_checks.h"
62#include "eina_value.h"
63
64/*============================================================================*
65* Local *
66*============================================================================*/
67
68/**
69 * @cond LOCAL
70 */
71
72static Eina_Mempool *_eina_value_mp = NULL;
73static Eina_Hash *_eina_value_inner_mps = NULL;
74static Eina_Lock _eina_value_inner_mps_lock;
75static char *_eina_value_mp_choice = NULL;
76static int _eina_value_log_dom = -1;
77
78#ifdef ERR
79#undef ERR
80#endif
81#define ERR(...) EINA_LOG_DOM_ERR(_eina_value_log_dom, __VA_ARGS__)
82
83#ifdef DBG
84#undef DBG
85#endif
86#define DBG(...) EINA_LOG_DOM_DBG(_eina_value_log_dom, __VA_ARGS__)
87
88static const unsigned char eina_value_uchar_max = 255U;
89static const char eina_value_char_max = 127;
90static const char eina_value_char_min = -127 - 1;
91
92static const unsigned short eina_value_ushort_max = 65535U;
93static const short eina_value_short_max = 32767;
94static const short eina_value_short_min = -32767 - 1;
95
96static const unsigned int eina_value_uint_max = 4294967295U;
97static const int eina_value_int_max = 2147483647;
98static const int eina_value_int_min = -2147483647 - 1;
99
100static const uint64_t eina_value_uint64_max = 18446744073709551615ULL;
101static const int64_t eina_value_int64_max = 9223372036854775807LL;
102static const int64_t eina_value_int64_min = -9223372036854775807LL - 1LL;
103
104#if __WORDSIZE == 64
105static const unsigned long eina_value_ulong_max = 18446744073709551615ULL;
106static const long eina_value_long_max = 9223372036854775807LL;
107static const long eina_value_long_min = -9223372036854775807LL - 1LL;
108#else
109static const unsigned long eina_value_ulong_max = 4294967295U;
110static const long eina_value_long_max = 2147483647;
111static const long eina_value_long_min = -2147483647 - 1;
112#endif
113
114
115static Eina_Bool
116_eina_value_type_uchar_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
117{
118 unsigned char *tmem = mem;
119 *tmem = 0;
120 return EINA_TRUE;
121}
122
123static Eina_Bool
124_eina_value_type_uchar_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
125{
126 return EINA_TRUE;
127}
128
129static Eina_Bool
130_eina_value_type_uchar_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
131{
132 const unsigned char *s = src;
133 unsigned char *d = dst;
134 *d = *s;
135 return EINA_TRUE;
136}
137
138static int
139_eina_value_type_uchar_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
140{
141 const unsigned char *ta = a, *tb = b;
142 if (*ta < *tb)
143 return -1;
144 else if (*ta > *tb)
145 return 1;
146 return 0;
147}
148
149static Eina_Bool
150_eina_value_type_uchar_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
151{
152 const unsigned char v = *(const unsigned char *)type_mem;
153
154 eina_error_set(0);
155
156 if (convert == EINA_VALUE_TYPE_UCHAR)
157 {
158 unsigned char other_mem = v;
159 return eina_value_type_pset(convert, convert_mem, &other_mem);
160 }
161 else if (convert == EINA_VALUE_TYPE_USHORT)
162 {
163 unsigned short other_mem = v;
164 return eina_value_type_pset(convert, convert_mem, &other_mem);
165 }
166 else if (convert == EINA_VALUE_TYPE_UINT)
167 {
168 unsigned int other_mem = v;
169 return eina_value_type_pset(convert, convert_mem, &other_mem);
170 }
171 else if (convert == EINA_VALUE_TYPE_ULONG)
172 {
173 unsigned long other_mem = v;
174 return eina_value_type_pset(convert, convert_mem, &other_mem);
175 }
176 else if (convert == EINA_VALUE_TYPE_UINT64)
177 {
178 uint64_t other_mem = v;
179 return eina_value_type_pset(convert, convert_mem, &other_mem);
180 }
181 else if (convert == EINA_VALUE_TYPE_CHAR)
182 {
183 char other_mem = v;
184 if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max))
185 return EINA_FALSE;
186 return eina_value_type_pset(convert, convert_mem, &other_mem);
187 }
188 else if (convert == EINA_VALUE_TYPE_SHORT)
189 {
190 short other_mem = v;
191 return eina_value_type_pset(convert, convert_mem, &other_mem);
192 }
193 else if (convert == EINA_VALUE_TYPE_INT)
194 {
195 int other_mem = v;
196 return eina_value_type_pset(convert, convert_mem, &other_mem);
197 }
198 else if (convert == EINA_VALUE_TYPE_LONG)
199 {
200 long other_mem = v;
201 return eina_value_type_pset(convert, convert_mem, &other_mem);
202 }
203 else if (convert == EINA_VALUE_TYPE_INT64)
204 {
205 int64_t other_mem = v;
206 return eina_value_type_pset(convert, convert_mem, &other_mem);
207 }
208 else if (convert == EINA_VALUE_TYPE_FLOAT)
209 {
210 float other_mem = v;
211 return eina_value_type_pset(convert, convert_mem, &other_mem);
212 }
213 else if (convert == EINA_VALUE_TYPE_DOUBLE)
214 {
215 double other_mem = v;
216 return eina_value_type_pset(convert, convert_mem, &other_mem);
217 }
218 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
219 convert == EINA_VALUE_TYPE_STRING)
220 {
221 const char *other_mem;
222 char buf[64];
223 snprintf(buf, sizeof(buf), "%hhu", v);
224 other_mem = buf; /* required due &buf == buf */
225 return eina_value_type_pset(convert, convert_mem, &other_mem);
226 }
227 else
228 {
229 eina_error_set(EINA_ERROR_VALUE_FAILED);
230 return EINA_FALSE;
231 }
232
233 return EINA_TRUE;
234}
235
236static Eina_Bool
237_eina_value_type_uchar_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
238{
239 unsigned char *tmem = mem;
240 *tmem = va_arg(args, unsigned int); /* char is promoted to int for va_arg */
241 return EINA_TRUE;
242}
243
244static Eina_Bool
245_eina_value_type_uchar_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
246{
247 unsigned char *tmem = mem;
248 const unsigned char *p = ptr;
249 *tmem = *p;
250 return EINA_TRUE;
251}
252
253static Eina_Bool
254_eina_value_type_uchar_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
255{
256 const unsigned char *tmem = mem;
257 unsigned char *p = ptr;
258 *p = *tmem;
259 return EINA_TRUE;
260}
261
262static Eina_Bool
263_eina_value_type_ushort_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
264{
265 unsigned short *tmem = mem;
266 *tmem = 0;
267 return EINA_TRUE;
268}
269
270static Eina_Bool
271_eina_value_type_ushort_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
272{
273 return EINA_TRUE;
274}
275
276static Eina_Bool
277_eina_value_type_ushort_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
278{
279 const unsigned short *s = src;
280 unsigned short *d = dst;
281 *d = *s;
282 return EINA_TRUE;
283}
284
285static int
286_eina_value_type_ushort_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
287{
288 const unsigned short *ta = a, *tb = b;
289 if (*ta < *tb)
290 return -1;
291 else if (*ta > *tb)
292 return 1;
293 return 0;
294}
295
296static Eina_Bool
297_eina_value_type_ushort_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
298{
299 const unsigned short v = *(const unsigned short *)type_mem;
300
301 eina_error_set(0);
302
303 if (convert == EINA_VALUE_TYPE_UCHAR)
304 {
305 unsigned char other_mem = v;
306 if (EINA_UNLIKELY(v > eina_value_uchar_max))
307 return EINA_FALSE;
308 return eina_value_type_pset(convert, convert_mem, &other_mem);
309 }
310 else if (convert == EINA_VALUE_TYPE_USHORT)
311 {
312 unsigned short other_mem = v;
313 return eina_value_type_pset(convert, convert_mem, &other_mem);
314 }
315 else if (convert == EINA_VALUE_TYPE_UINT)
316 {
317 unsigned int other_mem = v;
318 return eina_value_type_pset(convert, convert_mem, &other_mem);
319 }
320 else if (convert == EINA_VALUE_TYPE_ULONG)
321 {
322 unsigned long other_mem = v;
323 return eina_value_type_pset(convert, convert_mem, &other_mem);
324 }
325 else if (convert == EINA_VALUE_TYPE_UINT64)
326 {
327 uint64_t other_mem = v;
328 return eina_value_type_pset(convert, convert_mem, &other_mem);
329 }
330 else if (convert == EINA_VALUE_TYPE_CHAR)
331 {
332 char other_mem = v;
333 if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max))
334 return EINA_FALSE;
335 return eina_value_type_pset(convert, convert_mem, &other_mem);
336 }
337 else if (convert == EINA_VALUE_TYPE_SHORT)
338 {
339 short other_mem = v;
340 if (EINA_UNLIKELY(v > (unsigned short)eina_value_short_max))
341 return EINA_FALSE;
342 return eina_value_type_pset(convert, convert_mem, &other_mem);
343 }
344 else if (convert == EINA_VALUE_TYPE_INT)
345 {
346 int other_mem = v;
347 return eina_value_type_pset(convert, convert_mem, &other_mem);
348 }
349 else if (convert == EINA_VALUE_TYPE_LONG)
350 {
351 long other_mem = v;
352 return eina_value_type_pset(convert, convert_mem, &other_mem);
353 }
354 else if (convert == EINA_VALUE_TYPE_INT64)
355 {
356 int64_t other_mem = v;
357 return eina_value_type_pset(convert, convert_mem, &other_mem);
358 }
359 else if (convert == EINA_VALUE_TYPE_FLOAT)
360 {
361 float other_mem = v;
362 return eina_value_type_pset(convert, convert_mem, &other_mem);
363 }
364 else if (convert == EINA_VALUE_TYPE_DOUBLE)
365 {
366 double other_mem = v;
367 return eina_value_type_pset(convert, convert_mem, &other_mem);
368 }
369 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
370 convert == EINA_VALUE_TYPE_STRING)
371 {
372 const char *other_mem;
373 char buf[64];
374 snprintf(buf, sizeof(buf), "%hu", v);
375 other_mem = buf; /* required due &buf == buf */
376 return eina_value_type_pset(convert, convert_mem, &other_mem);
377 }
378 else
379 {
380 eina_error_set(EINA_ERROR_VALUE_FAILED);
381 return EINA_FALSE;
382 }
383
384 return EINA_TRUE;
385}
386
387static Eina_Bool
388_eina_value_type_ushort_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
389{
390 unsigned short *tmem = mem;
391 *tmem = va_arg(args, unsigned int); /* short is promoted to int for va_arg */
392 return EINA_TRUE;
393}
394
395static Eina_Bool
396_eina_value_type_ushort_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
397{
398 unsigned short *tmem = mem;
399 const unsigned short *p = ptr;
400 *tmem = *p;
401 return EINA_TRUE;
402}
403
404static Eina_Bool
405_eina_value_type_ushort_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
406{
407 const unsigned short *tmem = mem;
408 unsigned short *p = ptr;
409 *p = *tmem;
410 return EINA_TRUE;
411}
412
413static Eina_Bool
414_eina_value_type_uint_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
415{
416 unsigned int *tmem = mem;
417 *tmem = 0;
418 return EINA_TRUE;
419}
420
421static Eina_Bool
422_eina_value_type_uint_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
423{
424 return EINA_TRUE;
425}
426
427static Eina_Bool
428_eina_value_type_uint_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
429{
430 const unsigned int *s = src;
431 unsigned int *d = dst;
432 *d = *s;
433 return EINA_TRUE;
434}
435
436static int
437_eina_value_type_uint_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
438{
439 const unsigned int *ta = a, *tb = b;
440 if (*ta < *tb)
441 return -1;
442 else if (*ta > *tb)
443 return 1;
444 return 0;
445}
446
447static Eina_Bool
448_eina_value_type_uint_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
449{
450 const unsigned int v = *(const unsigned int *)type_mem;
451
452 eina_error_set(0);
453
454 if (convert == EINA_VALUE_TYPE_UCHAR)
455 {
456 unsigned char other_mem = v;
457 if (EINA_UNLIKELY(v > eina_value_uchar_max))
458 return EINA_FALSE;
459 return eina_value_type_pset(convert, convert_mem, &other_mem);
460 }
461 else if (convert == EINA_VALUE_TYPE_USHORT)
462 {
463 unsigned short other_mem = v;
464 if (EINA_UNLIKELY(v > eina_value_ushort_max))
465 return EINA_FALSE;
466 return eina_value_type_pset(convert, convert_mem, &other_mem);
467 }
468 else if (convert == EINA_VALUE_TYPE_UINT)
469 {
470 unsigned int other_mem = v;
471 return eina_value_type_pset(convert, convert_mem, &other_mem);
472 }
473 else if (convert == EINA_VALUE_TYPE_ULONG)
474 {
475 unsigned long other_mem = v;
476 return eina_value_type_pset(convert, convert_mem, &other_mem);
477 }
478 else if (convert == EINA_VALUE_TYPE_UINT64)
479 {
480 uint64_t other_mem = v;
481 return eina_value_type_pset(convert, convert_mem, &other_mem);
482 }
483 else if (convert == EINA_VALUE_TYPE_CHAR)
484 {
485 char other_mem = v;
486 if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max))
487 return EINA_FALSE;
488 return eina_value_type_pset(convert, convert_mem, &other_mem);
489 }
490 else if (convert == EINA_VALUE_TYPE_SHORT)
491 {
492 short other_mem = v;
493 if (EINA_UNLIKELY(v > (unsigned short)eina_value_short_max))
494 return EINA_FALSE;
495 return eina_value_type_pset(convert, convert_mem, &other_mem);
496 }
497 else if (convert == EINA_VALUE_TYPE_INT)
498 {
499 int other_mem = v;
500 if (EINA_UNLIKELY(v > (unsigned int)eina_value_int_max))
501 return EINA_FALSE;
502 return eina_value_type_pset(convert, convert_mem, &other_mem);
503 }
504 else if (convert == EINA_VALUE_TYPE_LONG)
505 {
506 long other_mem = v;
507 return eina_value_type_pset(convert, convert_mem, &other_mem);
508 }
509 else if (convert == EINA_VALUE_TYPE_INT64)
510 {
511 int64_t other_mem = v;
512 return eina_value_type_pset(convert, convert_mem, &other_mem);
513 }
514 else if (convert == EINA_VALUE_TYPE_FLOAT)
515 {
516 float other_mem = v;
517 return eina_value_type_pset(convert, convert_mem, &other_mem);
518 }
519 else if (convert == EINA_VALUE_TYPE_DOUBLE)
520 {
521 double other_mem = v;
522 return eina_value_type_pset(convert, convert_mem, &other_mem);
523 }
524 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
525 convert == EINA_VALUE_TYPE_STRING)
526 {
527 const char *other_mem;
528 char buf[64];
529 snprintf(buf, sizeof(buf), "%u", v);
530 other_mem = buf; /* required due &buf == buf */
531 return eina_value_type_pset(convert, convert_mem, &other_mem);
532 }
533 else
534 {
535 eina_error_set(EINA_ERROR_VALUE_FAILED);
536 return EINA_FALSE;
537 }
538
539 return EINA_TRUE;
540}
541
542static Eina_Bool
543_eina_value_type_uint_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
544{
545 unsigned int *tmem = mem;
546 *tmem = va_arg(args, unsigned int);
547 return EINA_TRUE;
548}
549
550static Eina_Bool
551_eina_value_type_uint_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
552{
553 unsigned int *tmem = mem;
554 const unsigned int *p = ptr;
555 *tmem = *p;
556 return EINA_TRUE;
557}
558
559static Eina_Bool
560_eina_value_type_uint_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
561{
562 const unsigned int *tmem = mem;
563 unsigned int *p = ptr;
564 *p = *tmem;
565 return EINA_TRUE;
566}
567
568static Eina_Bool
569_eina_value_type_ulong_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
570{
571 unsigned long *tmem = mem;
572 *tmem = 0;
573 return EINA_TRUE;
574}
575
576static Eina_Bool
577_eina_value_type_ulong_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
578{
579 return EINA_TRUE;
580}
581
582static Eina_Bool
583_eina_value_type_ulong_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
584{
585 const unsigned long *s = src;
586 unsigned long *d = dst;
587 *d = *s;
588 return EINA_TRUE;
589}
590
591static int
592_eina_value_type_ulong_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
593{
594 const unsigned long *ta = a, *tb = b;
595 if (*ta < *tb)
596 return -1;
597 else if (*ta > *tb)
598 return 1;
599 return 0;
600}
601
602static Eina_Bool
603_eina_value_type_ulong_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
604{
605 const unsigned long v = *(const unsigned long *)type_mem;
606
607 eina_error_set(0);
608
609 if (convert == EINA_VALUE_TYPE_UCHAR)
610 {
611 unsigned char other_mem = v;
612 if (EINA_UNLIKELY(v > eina_value_uchar_max))
613 return EINA_FALSE;
614 return eina_value_type_pset(convert, convert_mem, &other_mem);
615 }
616 else if (convert == EINA_VALUE_TYPE_USHORT)
617 {
618 unsigned short other_mem = v;
619 if (EINA_UNLIKELY(v > eina_value_ushort_max))
620 return EINA_FALSE;
621 return eina_value_type_pset(convert, convert_mem, &other_mem);
622 }
623 else if (convert == EINA_VALUE_TYPE_UINT)
624 {
625 unsigned int other_mem = v;
626 if (EINA_UNLIKELY(v > eina_value_uint_max))
627 return EINA_FALSE;
628 return eina_value_type_pset(convert, convert_mem, &other_mem);
629 }
630 else if (convert == EINA_VALUE_TYPE_ULONG)
631 {
632 unsigned long other_mem = v;
633 return eina_value_type_pset(convert, convert_mem, &other_mem);
634 }
635 else if (convert == EINA_VALUE_TYPE_UINT64)
636 {
637 uint64_t other_mem = v;
638 return eina_value_type_pset(convert, convert_mem, &other_mem);
639 }
640 else if (convert == EINA_VALUE_TYPE_CHAR)
641 {
642 char other_mem = v;
643 if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max))
644 return EINA_FALSE;
645 return eina_value_type_pset(convert, convert_mem, &other_mem);
646 }
647 else if (convert == EINA_VALUE_TYPE_SHORT)
648 {
649 short other_mem = v;
650 if (EINA_UNLIKELY(v > (unsigned short)eina_value_short_max))
651 return EINA_FALSE;
652 return eina_value_type_pset(convert, convert_mem, &other_mem);
653 }
654 else if (convert == EINA_VALUE_TYPE_INT)
655 {
656 int other_mem = v;
657 if (EINA_UNLIKELY(v > (unsigned int)eina_value_int_max))
658 return EINA_FALSE;
659 return eina_value_type_pset(convert, convert_mem, &other_mem);
660 }
661 else if (convert == EINA_VALUE_TYPE_LONG)
662 {
663 long other_mem = v;
664 if (EINA_UNLIKELY(v > (unsigned long)eina_value_long_max))
665 return EINA_FALSE;
666 return eina_value_type_pset(convert, convert_mem, &other_mem);
667 }
668 else if (convert == EINA_VALUE_TYPE_INT64)
669 {
670 int64_t other_mem = v;
671 return eina_value_type_pset(convert, convert_mem, &other_mem);
672 }
673 else if (convert == EINA_VALUE_TYPE_FLOAT)
674 {
675 float other_mem = v;
676 return eina_value_type_pset(convert, convert_mem, &other_mem);
677 }
678 else if (convert == EINA_VALUE_TYPE_DOUBLE)
679 {
680 double other_mem = v;
681 return eina_value_type_pset(convert, convert_mem, &other_mem);
682 }
683 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
684 convert == EINA_VALUE_TYPE_STRING)
685 {
686 const char *other_mem;
687 char buf[64];
688 snprintf(buf, sizeof(buf), "%lu", v);
689 other_mem = buf; /* required due &buf == buf */
690 return eina_value_type_pset(convert, convert_mem, &other_mem);
691 }
692 else
693 {
694 eina_error_set(EINA_ERROR_VALUE_FAILED);
695 return EINA_FALSE;
696 }
697
698 return EINA_TRUE;
699}
700
701static Eina_Bool
702_eina_value_type_ulong_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
703{
704 unsigned long *tmem = mem;
705 *tmem = va_arg(args, unsigned long);
706 return EINA_TRUE;
707}
708
709static Eina_Bool
710_eina_value_type_ulong_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
711{
712 unsigned long *tmem = mem;
713 const unsigned long *p = ptr;
714 *tmem = *p;
715 return EINA_TRUE;
716}
717
718static Eina_Bool
719_eina_value_type_ulong_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
720{
721 const unsigned long *tmem = mem;
722 unsigned long *p = ptr;
723 *p = *tmem;
724 return EINA_TRUE;
725}
726
727static Eina_Bool
728_eina_value_type_uint64_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
729{
730 uint64_t *tmem = mem;
731 *tmem = 0;
732 return EINA_TRUE;
733}
734
735static Eina_Bool
736_eina_value_type_uint64_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
737{
738 return EINA_TRUE;
739}
740
741static Eina_Bool
742_eina_value_type_uint64_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
743{
744 const uint64_t *s = src;
745 uint64_t *d = dst;
746 *d = *s;
747 return EINA_TRUE;
748}
749
750static int
751_eina_value_type_uint64_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
752{
753 const uint64_t *ta = a, *tb = b;
754 if (*ta < *tb)
755 return -1;
756 else if (*ta > *tb)
757 return 1;
758 return 0;
759}
760
761static Eina_Bool
762_eina_value_type_uint64_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
763{
764 const uint64_t v = *(const uint64_t *)type_mem;
765
766 eina_error_set(0);
767
768 if (convert == EINA_VALUE_TYPE_UCHAR)
769 {
770 unsigned char other_mem = v;
771 if (EINA_UNLIKELY(v > eina_value_uchar_max))
772 return EINA_FALSE;
773 return eina_value_type_pset(convert, convert_mem, &other_mem);
774 }
775 else if (convert == EINA_VALUE_TYPE_USHORT)
776 {
777 unsigned short other_mem = v;
778 if (EINA_UNLIKELY(v > eina_value_ushort_max))
779 return EINA_FALSE;
780 return eina_value_type_pset(convert, convert_mem, &other_mem);
781 }
782 else if (convert == EINA_VALUE_TYPE_UINT)
783 {
784 unsigned int other_mem = v;
785 if (EINA_UNLIKELY(v > eina_value_uint_max))
786 return EINA_FALSE;
787 return eina_value_type_pset(convert, convert_mem, &other_mem);
788 }
789 else if (convert == EINA_VALUE_TYPE_ULONG)
790 {
791 unsigned long other_mem = v;
792 if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) &&
793 (v > eina_value_ulong_max)))
794 return EINA_FALSE;
795 return eina_value_type_pset(convert, convert_mem, &other_mem);
796 }
797 else if (convert == EINA_VALUE_TYPE_UINT64)
798 {
799 uint64_t other_mem = v;
800 return eina_value_type_pset(convert, convert_mem, &other_mem);
801 }
802 else if (convert == EINA_VALUE_TYPE_CHAR)
803 {
804 char other_mem = v;
805 if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max))
806 return EINA_FALSE;
807 return eina_value_type_pset(convert, convert_mem, &other_mem);
808 }
809 else if (convert == EINA_VALUE_TYPE_SHORT)
810 {
811 short other_mem = v;
812 if (EINA_UNLIKELY(v > (unsigned short)eina_value_short_max))
813 return EINA_FALSE;
814 return eina_value_type_pset(convert, convert_mem, &other_mem);
815 }
816 else if (convert == EINA_VALUE_TYPE_INT)
817 {
818 int other_mem = v;
819 if (EINA_UNLIKELY(v > (unsigned int)eina_value_int_max))
820 return EINA_FALSE;
821 return eina_value_type_pset(convert, convert_mem, &other_mem);
822 }
823 else if (convert == EINA_VALUE_TYPE_LONG)
824 {
825 long other_mem = v;
826 if (EINA_UNLIKELY(v > (unsigned long)eina_value_long_max))
827 return EINA_FALSE;
828 return eina_value_type_pset(convert, convert_mem, &other_mem);
829 }
830 else if (convert == EINA_VALUE_TYPE_INT64)
831 {
832 int64_t other_mem = v;
833 if (EINA_UNLIKELY(v > (uint64_t)eina_value_int64_max))
834 return EINA_FALSE;
835 return eina_value_type_pset(convert, convert_mem, &other_mem);
836 }
837 else if (convert == EINA_VALUE_TYPE_FLOAT)
838 {
839 float other_mem = v;
840 return eina_value_type_pset(convert, convert_mem, &other_mem);
841 }
842 else if (convert == EINA_VALUE_TYPE_DOUBLE)
843 {
844 double other_mem = v;
845 return eina_value_type_pset(convert, convert_mem, &other_mem);
846 }
847 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
848 convert == EINA_VALUE_TYPE_STRING)
849 {
850 const char *other_mem;
851 char buf[64];
852 snprintf(buf, sizeof(buf), "%"PRIu64, v);
853 other_mem = buf; /* required due &buf == buf */
854 return eina_value_type_pset(convert, convert_mem, &other_mem);
855 }
856 else
857 {
858 eina_error_set(EINA_ERROR_VALUE_FAILED);
859 return EINA_FALSE;
860 }
861
862 return EINA_TRUE;
863}
864
865static Eina_Bool
866_eina_value_type_uint64_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
867{
868 uint64_t *tmem = mem;
869 *tmem = va_arg(args, uint64_t);
870 return EINA_TRUE;
871}
872
873static Eina_Bool
874_eina_value_type_uint64_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
875{
876 uint64_t *tmem = mem;
877 const uint64_t *p = ptr;
878 *tmem = *p;
879 return EINA_TRUE;
880}
881
882static Eina_Bool
883_eina_value_type_uint64_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
884{
885 const uint64_t *tmem = mem;
886 uint64_t *p = ptr;
887 *p = *tmem;
888 return EINA_TRUE;
889}
890
891static Eina_Bool
892_eina_value_type_char_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
893{
894 char *tmem = mem;
895 *tmem = 0;
896 return EINA_TRUE;
897}
898
899static Eina_Bool
900_eina_value_type_char_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
901{
902 return EINA_TRUE;
903}
904
905static Eina_Bool
906_eina_value_type_char_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
907{
908 const char *s = src;
909 char *d = dst;
910 *d = *s;
911 return EINA_TRUE;
912}
913
914static int
915_eina_value_type_char_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
916{
917 const char *ta = a, *tb = b;
918 if (*ta < *tb)
919 return -1;
920 else if (*ta > *tb)
921 return 1;
922 return 0;
923}
924
925static Eina_Bool
926_eina_value_type_char_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
927{
928 const signed char v = *(const signed char *)type_mem;
929
930 eina_error_set(0);
931
932 if (convert == EINA_VALUE_TYPE_UCHAR)
933 {
934 unsigned char other_mem = v;
935 if (EINA_UNLIKELY(v < 0))
936 return EINA_FALSE;
937 return eina_value_type_pset(convert, convert_mem, &other_mem);
938 }
939 else if (convert == EINA_VALUE_TYPE_USHORT)
940 {
941 unsigned short other_mem = v;
942 if (EINA_UNLIKELY(v < 0))
943 return EINA_FALSE;
944 return eina_value_type_pset(convert, convert_mem, &other_mem);
945 }
946 else if (convert == EINA_VALUE_TYPE_UINT)
947 {
948 unsigned int other_mem = v;
949 if (EINA_UNLIKELY(v < 0))
950 return EINA_FALSE;
951 return eina_value_type_pset(convert, convert_mem, &other_mem);
952 }
953 else if (convert == EINA_VALUE_TYPE_ULONG)
954 {
955 unsigned long other_mem = v;
956 if (EINA_UNLIKELY(v < 0))
957 return EINA_FALSE;
958 return eina_value_type_pset(convert, convert_mem, &other_mem);
959 }
960 else if (convert == EINA_VALUE_TYPE_UINT64)
961 {
962 uint64_t other_mem = v;
963 if (EINA_UNLIKELY(v < 0))
964 return EINA_FALSE;
965 return eina_value_type_pset(convert, convert_mem, &other_mem);
966 }
967 else if (convert == EINA_VALUE_TYPE_CHAR)
968 {
969 char other_mem = v;
970 return eina_value_type_pset(convert, convert_mem, &other_mem);
971 }
972 else if (convert == EINA_VALUE_TYPE_SHORT)
973 {
974 short other_mem = v;
975 return eina_value_type_pset(convert, convert_mem, &other_mem);
976 }
977 else if (convert == EINA_VALUE_TYPE_INT)
978 {
979 int other_mem = v;
980 return eina_value_type_pset(convert, convert_mem, &other_mem);
981 }
982 else if (convert == EINA_VALUE_TYPE_LONG)
983 {
984 long other_mem = v;
985 return eina_value_type_pset(convert, convert_mem, &other_mem);
986 }
987 else if (convert == EINA_VALUE_TYPE_INT64)
988 {
989 int64_t other_mem = v;
990 return eina_value_type_pset(convert, convert_mem, &other_mem);
991 }
992 else if (convert == EINA_VALUE_TYPE_FLOAT)
993 {
994 float other_mem = v;
995 return eina_value_type_pset(convert, convert_mem, &other_mem);
996 }
997 else if (convert == EINA_VALUE_TYPE_DOUBLE)
998 {
999 double other_mem = v;
1000 return eina_value_type_pset(convert, convert_mem, &other_mem);
1001 }
1002 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
1003 convert == EINA_VALUE_TYPE_STRING)
1004 {
1005 const char *other_mem;
1006 char buf[64];
1007 snprintf(buf, sizeof(buf), "%hhd", v);
1008 other_mem = buf; /* required due &buf == buf */
1009 return eina_value_type_pset(convert, convert_mem, &other_mem);
1010 }
1011 else
1012 {
1013 eina_error_set(EINA_ERROR_VALUE_FAILED);
1014 return EINA_FALSE;
1015 }
1016
1017 return EINA_TRUE;
1018}
1019
1020static Eina_Bool
1021_eina_value_type_char_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
1022{
1023 char *tmem = mem;
1024 *tmem = va_arg(args, int); /* char is promoted to int for va_arg */
1025 return EINA_TRUE;
1026}
1027
1028static Eina_Bool
1029_eina_value_type_char_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
1030{
1031 char *tmem = mem;
1032 const char *p = ptr;
1033 *tmem = *p;
1034 return EINA_TRUE;
1035}
1036
1037static Eina_Bool
1038_eina_value_type_char_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
1039{
1040 const char *tmem = mem;
1041 char *p = ptr;
1042 *p = *tmem;
1043 return EINA_TRUE;
1044}
1045
1046static Eina_Bool
1047_eina_value_type_short_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
1048{
1049 short *tmem = mem;
1050 *tmem = 0;
1051 return EINA_TRUE;
1052}
1053
1054static Eina_Bool
1055_eina_value_type_short_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
1056{
1057 return EINA_TRUE;
1058}
1059
1060static Eina_Bool
1061_eina_value_type_short_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
1062{
1063 const short *s = src;
1064 short *d = dst;
1065 *d = *s;
1066 return EINA_TRUE;
1067}
1068
1069static int
1070_eina_value_type_short_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
1071{
1072 const short *ta = a, *tb = b;
1073 if (*ta < *tb)
1074 return -1;
1075 else if (*ta > *tb)
1076 return 1;
1077 return 0;
1078}
1079
1080static Eina_Bool
1081_eina_value_type_short_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
1082{
1083 const short v = *(const short *)type_mem;
1084
1085 eina_error_set(0);
1086
1087 if (convert == EINA_VALUE_TYPE_UCHAR)
1088 {
1089 unsigned char other_mem = v;
1090 if (EINA_UNLIKELY(v < 0))
1091 return EINA_FALSE;
1092 if (EINA_UNLIKELY(v > eina_value_uchar_max))
1093 return EINA_FALSE;
1094 return eina_value_type_pset(convert, convert_mem, &other_mem);
1095 }
1096 else if (convert == EINA_VALUE_TYPE_USHORT)
1097 {
1098 unsigned short other_mem = v;
1099 if (EINA_UNLIKELY(v < 0))
1100 return EINA_FALSE;
1101 return eina_value_type_pset(convert, convert_mem, &other_mem);
1102 }
1103 else if (convert == EINA_VALUE_TYPE_UINT)
1104 {
1105 unsigned int other_mem = v;
1106 if (EINA_UNLIKELY(v < 0))
1107 return EINA_FALSE;
1108 return eina_value_type_pset(convert, convert_mem, &other_mem);
1109 }
1110 else if (convert == EINA_VALUE_TYPE_ULONG)
1111 {
1112 unsigned long other_mem = v;
1113 if (EINA_UNLIKELY(v < 0))
1114 return EINA_FALSE;
1115 return eina_value_type_pset(convert, convert_mem, &other_mem);
1116 }
1117 else if (convert == EINA_VALUE_TYPE_UINT64)
1118 {
1119 uint64_t other_mem = v;
1120 if (EINA_UNLIKELY(v < 0))
1121 return EINA_FALSE;
1122 return eina_value_type_pset(convert, convert_mem, &other_mem);
1123 }
1124 else if (convert == EINA_VALUE_TYPE_CHAR)
1125 {
1126 char other_mem = v;
1127 if (EINA_UNLIKELY(v < eina_value_char_min))
1128 return EINA_FALSE;
1129 if (EINA_UNLIKELY(v > eina_value_char_max))
1130 return EINA_FALSE;
1131 return eina_value_type_pset(convert, convert_mem, &other_mem);
1132 }
1133 else if (convert == EINA_VALUE_TYPE_SHORT)
1134 {
1135 short other_mem = v;
1136 return eina_value_type_pset(convert, convert_mem, &other_mem);
1137 }
1138 else if (convert == EINA_VALUE_TYPE_INT)
1139 {
1140 int other_mem = v;
1141 return eina_value_type_pset(convert, convert_mem, &other_mem);
1142 }
1143 else if (convert == EINA_VALUE_TYPE_LONG)
1144 {
1145 long other_mem = v;
1146 return eina_value_type_pset(convert, convert_mem, &other_mem);
1147 }
1148 else if (convert == EINA_VALUE_TYPE_INT64)
1149 {
1150 int64_t other_mem = v;
1151 return eina_value_type_pset(convert, convert_mem, &other_mem);
1152 }
1153 else if (convert == EINA_VALUE_TYPE_FLOAT)
1154 {
1155 float other_mem = v;
1156 return eina_value_type_pset(convert, convert_mem, &other_mem);
1157 }
1158 else if (convert == EINA_VALUE_TYPE_DOUBLE)
1159 {
1160 double other_mem = v;
1161 return eina_value_type_pset(convert, convert_mem, &other_mem);
1162 }
1163 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
1164 convert == EINA_VALUE_TYPE_STRING)
1165 {
1166 const char *other_mem;
1167 char buf[64];
1168 snprintf(buf, sizeof(buf), "%hd", v);
1169 other_mem = buf; /* required due &buf == buf */
1170 return eina_value_type_pset(convert, convert_mem, &other_mem);
1171 }
1172 else
1173 {
1174 eina_error_set(EINA_ERROR_VALUE_FAILED);
1175 return EINA_FALSE;
1176 }
1177
1178 return EINA_TRUE;
1179}
1180
1181static Eina_Bool
1182_eina_value_type_short_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
1183{
1184 short *tmem = mem;
1185 *tmem = va_arg(args, int); /* short int is promoted to int for va_arg */
1186 return EINA_TRUE;
1187}
1188
1189static Eina_Bool
1190_eina_value_type_short_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
1191{
1192 short *tmem = mem;
1193 const short *p = ptr;
1194 *tmem = *p;
1195 return EINA_TRUE;
1196}
1197
1198static Eina_Bool
1199_eina_value_type_short_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
1200{
1201 const short *tmem = mem;
1202 short *p = ptr;
1203 *p = *tmem;
1204 return EINA_TRUE;
1205}
1206
1207static Eina_Bool
1208_eina_value_type_int_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
1209{
1210 int *tmem = mem;
1211 *tmem = 0;
1212 return EINA_TRUE;
1213}
1214
1215static Eina_Bool
1216_eina_value_type_int_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
1217{
1218 return EINA_TRUE;
1219}
1220
1221static Eina_Bool
1222_eina_value_type_int_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
1223{
1224 const int *s = src;
1225 int *d = dst;
1226 *d = *s;
1227 return EINA_TRUE;
1228}
1229
1230static int
1231_eina_value_type_int_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
1232{
1233 const int *ta = a, *tb = b;
1234 if (*ta < *tb)
1235 return -1;
1236 else if (*ta > *tb)
1237 return 1;
1238 return 0;
1239}
1240
1241static Eina_Bool
1242_eina_value_type_int_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
1243{
1244 const int v = *(const int *)type_mem;
1245
1246 eina_error_set(0);
1247
1248 if (convert == EINA_VALUE_TYPE_UCHAR)
1249 {
1250 unsigned char other_mem = v;
1251 if (EINA_UNLIKELY(v < 0))
1252 return EINA_FALSE;
1253 if (EINA_UNLIKELY(v > eina_value_uchar_max))
1254 return EINA_FALSE;
1255 return eina_value_type_pset(convert, convert_mem, &other_mem);
1256 }
1257 else if (convert == EINA_VALUE_TYPE_USHORT)
1258 {
1259 unsigned short other_mem = v;
1260 if (EINA_UNLIKELY(v < 0))
1261 return EINA_FALSE;
1262 if (EINA_UNLIKELY(v > eina_value_ushort_max))
1263 return EINA_FALSE;
1264 return eina_value_type_pset(convert, convert_mem, &other_mem);
1265 }
1266 else if (convert == EINA_VALUE_TYPE_UINT)
1267 {
1268 unsigned int other_mem = v;
1269 if (EINA_UNLIKELY(v < 0))
1270 return EINA_FALSE;
1271 return eina_value_type_pset(convert, convert_mem, &other_mem);
1272 }
1273 else if (convert == EINA_VALUE_TYPE_ULONG)
1274 {
1275 unsigned long other_mem = v;
1276 if (EINA_UNLIKELY(v < 0))
1277 return EINA_FALSE;
1278 return eina_value_type_pset(convert, convert_mem, &other_mem);
1279 }
1280 else if (convert == EINA_VALUE_TYPE_UINT64)
1281 {
1282 uint64_t other_mem = v;
1283 if (EINA_UNLIKELY(v < 0))
1284 return EINA_FALSE;
1285 return eina_value_type_pset(convert, convert_mem, &other_mem);
1286 }
1287 else if (convert == EINA_VALUE_TYPE_CHAR)
1288 {
1289 char other_mem = v;
1290 if (EINA_UNLIKELY(v < eina_value_char_min))
1291 return EINA_FALSE;
1292 if (EINA_UNLIKELY(v > eina_value_char_max))
1293 return EINA_FALSE;
1294 return eina_value_type_pset(convert, convert_mem, &other_mem);
1295 }
1296 else if (convert == EINA_VALUE_TYPE_SHORT)
1297 {
1298 short other_mem = v;
1299 if (EINA_UNLIKELY(v < eina_value_short_min))
1300 return EINA_FALSE;
1301 if (EINA_UNLIKELY(v > eina_value_short_max))
1302 return EINA_FALSE;
1303 return eina_value_type_pset(convert, convert_mem, &other_mem);
1304 }
1305 else if (convert == EINA_VALUE_TYPE_INT)
1306 {
1307 int other_mem = v;
1308 return eina_value_type_pset(convert, convert_mem, &other_mem);
1309 }
1310 else if (convert == EINA_VALUE_TYPE_LONG)
1311 {
1312 long other_mem = v;
1313 return eina_value_type_pset(convert, convert_mem, &other_mem);
1314 }
1315 else if (convert == EINA_VALUE_TYPE_INT64)
1316 {
1317 int64_t other_mem = v;
1318 return eina_value_type_pset(convert, convert_mem, &other_mem);
1319 }
1320 else if (convert == EINA_VALUE_TYPE_FLOAT)
1321 {
1322 float other_mem = v;
1323 return eina_value_type_pset(convert, convert_mem, &other_mem);
1324 }
1325 else if (convert == EINA_VALUE_TYPE_DOUBLE)
1326 {
1327 double other_mem = v;
1328 return eina_value_type_pset(convert, convert_mem, &other_mem);
1329 }
1330 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
1331 convert == EINA_VALUE_TYPE_STRING)
1332 {
1333 const char *other_mem;
1334 char buf[64];
1335 snprintf(buf, sizeof(buf), "%d", v);
1336 other_mem = buf; /* required due &buf == buf */
1337 return eina_value_type_pset(convert, convert_mem, &other_mem);
1338 }
1339 else
1340 {
1341 eina_error_set(EINA_ERROR_VALUE_FAILED);
1342 return EINA_FALSE;
1343 }
1344
1345 return EINA_TRUE;
1346}
1347
1348static Eina_Bool
1349_eina_value_type_int_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
1350{
1351 int *tmem = mem;
1352 *tmem = va_arg(args, int);
1353 return EINA_TRUE;
1354}
1355
1356static Eina_Bool
1357_eina_value_type_int_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
1358{
1359 int *tmem = mem;
1360 const int *p = ptr;
1361 *tmem = *p;
1362 return EINA_TRUE;
1363}
1364
1365static Eina_Bool
1366_eina_value_type_int_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
1367{
1368 const int *tmem = mem;
1369 int *p = ptr;
1370 *p = *tmem;
1371 return EINA_TRUE;
1372}
1373
1374static Eina_Bool
1375_eina_value_type_long_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
1376{
1377 long *tmem = mem;
1378 *tmem = 0;
1379 return EINA_TRUE;
1380}
1381
1382static Eina_Bool
1383_eina_value_type_long_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
1384{
1385 return EINA_TRUE;
1386}
1387
1388static Eina_Bool
1389_eina_value_type_long_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
1390{
1391 const long *s = src;
1392 long *d = dst;
1393 *d = *s;
1394 return EINA_TRUE;
1395}
1396
1397static int
1398_eina_value_type_long_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
1399{
1400 const long *ta = a, *tb = b;
1401 if (*ta < *tb)
1402 return -1;
1403 else if (*ta > *tb)
1404 return 1;
1405 return 0;
1406}
1407
1408static Eina_Bool
1409_eina_value_type_long_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
1410{
1411 const long v = *(const long *)type_mem;
1412
1413 eina_error_set(0);
1414
1415 if (convert == EINA_VALUE_TYPE_UCHAR)
1416 {
1417 unsigned char other_mem = v;
1418 if (EINA_UNLIKELY(v < 0))
1419 return EINA_FALSE;
1420 if (EINA_UNLIKELY((unsigned long) v > eina_value_uchar_max))
1421 return EINA_FALSE;
1422 return eina_value_type_pset(convert, convert_mem, &other_mem);
1423 }
1424 else if (convert == EINA_VALUE_TYPE_USHORT)
1425 {
1426 unsigned short other_mem = v;
1427 if (EINA_UNLIKELY(v < 0))
1428 return EINA_FALSE;
1429 if (EINA_UNLIKELY((unsigned long) v > eina_value_ushort_max))
1430 return EINA_FALSE;
1431 return eina_value_type_pset(convert, convert_mem, &other_mem);
1432 }
1433 else if (convert == EINA_VALUE_TYPE_UINT)
1434 {
1435 unsigned int other_mem = v;
1436 if (EINA_UNLIKELY(v < 0))
1437 return EINA_FALSE;
1438 if (EINA_UNLIKELY((unsigned long) v > eina_value_uint_max))
1439 return EINA_FALSE;
1440 return eina_value_type_pset(convert, convert_mem, &other_mem);
1441 }
1442 else if (convert == EINA_VALUE_TYPE_ULONG)
1443 {
1444 unsigned long other_mem = v;
1445 if (EINA_UNLIKELY(v < 0))
1446 return EINA_FALSE;
1447 return eina_value_type_pset(convert, convert_mem, &other_mem);
1448 }
1449 else if (convert == EINA_VALUE_TYPE_UINT64)
1450 {
1451 uint64_t other_mem = v;
1452 if (EINA_UNLIKELY(v < 0))
1453 return EINA_FALSE;
1454 return eina_value_type_pset(convert, convert_mem, &other_mem);
1455 }
1456 else if (convert == EINA_VALUE_TYPE_CHAR)
1457 {
1458 char other_mem = v;
1459 if (EINA_UNLIKELY(v < eina_value_char_min))
1460 return EINA_FALSE;
1461 if (EINA_UNLIKELY(v > eina_value_char_max))
1462 return EINA_FALSE;
1463 return eina_value_type_pset(convert, convert_mem, &other_mem);
1464 }
1465 else if (convert == EINA_VALUE_TYPE_SHORT)
1466 {
1467 short other_mem = v;
1468 if (EINA_UNLIKELY(v < eina_value_short_min))
1469 return EINA_FALSE;
1470 if (EINA_UNLIKELY(v > eina_value_short_max))
1471 return EINA_FALSE;
1472 return eina_value_type_pset(convert, convert_mem, &other_mem);
1473 }
1474 else if (convert == EINA_VALUE_TYPE_INT)
1475 {
1476 int other_mem = v;
1477 if (EINA_UNLIKELY(v < eina_value_int_min))
1478 return EINA_FALSE;
1479 if (EINA_UNLIKELY(v > eina_value_int_max))
1480 return EINA_FALSE;
1481 return eina_value_type_pset(convert, convert_mem, &other_mem);
1482 }
1483 else if (convert == EINA_VALUE_TYPE_LONG)
1484 {
1485 long other_mem = v;
1486 return eina_value_type_pset(convert, convert_mem, &other_mem);
1487 }
1488 else if (convert == EINA_VALUE_TYPE_INT64)
1489 {
1490 int64_t other_mem = v;
1491 return eina_value_type_pset(convert, convert_mem, &other_mem);
1492 }
1493 else if (convert == EINA_VALUE_TYPE_FLOAT)
1494 {
1495 float other_mem = v;
1496 return eina_value_type_pset(convert, convert_mem, &other_mem);
1497 }
1498 else if (convert == EINA_VALUE_TYPE_DOUBLE)
1499 {
1500 double other_mem = v;
1501 return eina_value_type_pset(convert, convert_mem, &other_mem);
1502 }
1503 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
1504 convert == EINA_VALUE_TYPE_STRING)
1505 {
1506 const char *other_mem;
1507 char buf[64];
1508 snprintf(buf, sizeof(buf), "%ld", v);
1509 other_mem = buf; /* required due &buf == buf */
1510 return eina_value_type_pset(convert, convert_mem, &other_mem);
1511 }
1512 else
1513 {
1514 eina_error_set(EINA_ERROR_VALUE_FAILED);
1515 return EINA_FALSE;
1516 }
1517
1518 return EINA_TRUE;
1519}
1520
1521static Eina_Bool
1522_eina_value_type_long_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
1523{
1524 long *tmem = mem;
1525 *tmem = va_arg(args, long);
1526 return EINA_TRUE;
1527}
1528
1529static Eina_Bool
1530_eina_value_type_long_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
1531{
1532 long *tmem = mem;
1533 const long *p = ptr;
1534 *tmem = *p;
1535 return EINA_TRUE;
1536}
1537
1538static Eina_Bool
1539_eina_value_type_long_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
1540{
1541 const long *tmem = mem;
1542 long *p = ptr;
1543 *p = *tmem;
1544 return EINA_TRUE;
1545}
1546
1547static Eina_Bool
1548_eina_value_type_int64_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
1549{
1550 int64_t *tmem = mem;
1551 *tmem = 0;
1552 return EINA_TRUE;
1553}
1554
1555static Eina_Bool
1556_eina_value_type_int64_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
1557{
1558 return EINA_TRUE;
1559}
1560
1561static Eina_Bool
1562_eina_value_type_int64_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
1563{
1564 const int64_t *s = src;
1565 int64_t *d = dst;
1566 *d = *s;
1567 return EINA_TRUE;
1568}
1569
1570static int
1571_eina_value_type_int64_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
1572{
1573 const int64_t *ta = a, *tb = b;
1574 if (*ta < *tb)
1575 return -1;
1576 else if (*ta > *tb)
1577 return 1;
1578 return 0;
1579}
1580
1581static Eina_Bool
1582_eina_value_type_int64_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
1583{
1584 const int64_t v = *(const int64_t *)type_mem;
1585
1586 eina_error_set(0);
1587
1588 if (convert == EINA_VALUE_TYPE_UCHAR)
1589 {
1590 unsigned char other_mem = v;
1591 if (EINA_UNLIKELY(v < 0))
1592 return EINA_FALSE;
1593 if (EINA_UNLIKELY(v > eina_value_uchar_max))
1594 return EINA_FALSE;
1595 return eina_value_type_pset(convert, convert_mem, &other_mem);
1596 }
1597 else if (convert == EINA_VALUE_TYPE_USHORT)
1598 {
1599 unsigned short other_mem = v;
1600 if (EINA_UNLIKELY(v < 0))
1601 return EINA_FALSE;
1602 if (EINA_UNLIKELY(v > eina_value_ushort_max))
1603 return EINA_FALSE;
1604 return eina_value_type_pset(convert, convert_mem, &other_mem);
1605 }
1606 else if (convert == EINA_VALUE_TYPE_UINT)
1607 {
1608 unsigned int other_mem = v;
1609 if (EINA_UNLIKELY(v < 0))
1610 return EINA_FALSE;
1611 if (EINA_UNLIKELY(v > eina_value_uint_max))
1612 return EINA_FALSE;
1613 return eina_value_type_pset(convert, convert_mem, &other_mem);
1614 }
1615 else if (convert == EINA_VALUE_TYPE_ULONG)
1616 {
1617 unsigned long other_mem = v;
1618 if (EINA_UNLIKELY(v < 0))
1619 return EINA_FALSE;
1620 if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) &&
1621 (v > eina_value_ulong_max)))
1622 return EINA_FALSE;
1623 return eina_value_type_pset(convert, convert_mem, &other_mem);
1624 }
1625 else if (convert == EINA_VALUE_TYPE_UINT64)
1626 {
1627 uint64_t other_mem = v;
1628 if (EINA_UNLIKELY(v < 0))
1629 return EINA_FALSE;
1630 return eina_value_type_pset(convert, convert_mem, &other_mem);
1631 }
1632 else if (convert == EINA_VALUE_TYPE_CHAR)
1633 {
1634 char other_mem = v;
1635 if (EINA_UNLIKELY(v < eina_value_char_min))
1636 return EINA_FALSE;
1637 if (EINA_UNLIKELY(v > eina_value_char_max))
1638 return EINA_FALSE;
1639 return eina_value_type_pset(convert, convert_mem, &other_mem);
1640 }
1641 else if (convert == EINA_VALUE_TYPE_SHORT)
1642 {
1643 short other_mem = v;
1644 if (EINA_UNLIKELY(v < eina_value_short_min))
1645 return EINA_FALSE;
1646 if (EINA_UNLIKELY(v > eina_value_short_max))
1647 return EINA_FALSE;
1648 return eina_value_type_pset(convert, convert_mem, &other_mem);
1649 }
1650 else if (convert == EINA_VALUE_TYPE_INT)
1651 {
1652 int other_mem = v;
1653 if (EINA_UNLIKELY(v < eina_value_int_min))
1654 return EINA_FALSE;
1655 if (EINA_UNLIKELY(v > eina_value_int_max))
1656 return EINA_FALSE;
1657 return eina_value_type_pset(convert, convert_mem, &other_mem);
1658 }
1659 else if (convert == EINA_VALUE_TYPE_LONG)
1660 {
1661 long other_mem = v;
1662 if (EINA_UNLIKELY(v < eina_value_long_min))
1663 return EINA_FALSE;
1664 if (EINA_UNLIKELY(v > eina_value_long_max))
1665 return EINA_FALSE;
1666 return eina_value_type_pset(convert, convert_mem, &other_mem);
1667 }
1668 else if (convert == EINA_VALUE_TYPE_INT64)
1669 {
1670 int64_t other_mem = v;
1671 return eina_value_type_pset(convert, convert_mem, &other_mem);
1672 }
1673 else if (convert == EINA_VALUE_TYPE_FLOAT)
1674 {
1675 float other_mem = v;
1676 return eina_value_type_pset(convert, convert_mem, &other_mem);
1677 }
1678 else if (convert == EINA_VALUE_TYPE_DOUBLE)
1679 {
1680 double other_mem = v;
1681 return eina_value_type_pset(convert, convert_mem, &other_mem);
1682 }
1683 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
1684 convert == EINA_VALUE_TYPE_STRING)
1685 {
1686 const char *other_mem;
1687 char buf[64];
1688 snprintf(buf, sizeof(buf), "%"PRId64, v);
1689 other_mem = buf; /* required due &buf == buf */
1690 return eina_value_type_pset(convert, convert_mem, &other_mem);
1691 }
1692 else
1693 {
1694 eina_error_set(EINA_ERROR_VALUE_FAILED);
1695 return EINA_FALSE;
1696 }
1697
1698 return EINA_TRUE;
1699}
1700
1701static Eina_Bool
1702_eina_value_type_int64_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
1703{
1704 int64_t *tmem = mem;
1705 *tmem = va_arg(args, int64_t);
1706 return EINA_TRUE;
1707}
1708
1709static Eina_Bool
1710_eina_value_type_int64_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
1711{
1712 int64_t *tmem = mem;
1713 const int64_t *p = ptr;
1714 *tmem = *p;
1715 return EINA_TRUE;
1716}
1717
1718static Eina_Bool
1719_eina_value_type_int64_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
1720{
1721 const int64_t *tmem = mem;
1722 int64_t *p = ptr;
1723 *p = *tmem;
1724 return EINA_TRUE;
1725}
1726
1727static Eina_Bool
1728_eina_value_type_float_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
1729{
1730 float *tmem = mem;
1731 *tmem = 0;
1732 return EINA_TRUE;
1733}
1734
1735static Eina_Bool
1736_eina_value_type_float_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
1737{
1738 return EINA_TRUE;
1739}
1740
1741static Eina_Bool
1742_eina_value_type_float_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
1743{
1744 const float *s = src;
1745 float *d = dst;
1746 *d = *s;
1747 return EINA_TRUE;
1748}
1749
1750static int
1751_eina_value_type_float_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
1752{
1753 const float *ta = a, *tb = b;
1754 if (*ta < *tb)
1755 return -1;
1756 else if (*ta > *tb)
1757 return 1;
1758 return 0;
1759}
1760
1761static Eina_Bool
1762_eina_value_type_float_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
1763{
1764 const float v = *(const float *)type_mem;
1765
1766 eina_error_set(0);
1767
1768 if (convert == EINA_VALUE_TYPE_UCHAR)
1769 {
1770 unsigned char other_mem = v;
1771 if (EINA_UNLIKELY(v < 0))
1772 return EINA_FALSE;
1773 if (EINA_UNLIKELY(v > eina_value_uchar_max))
1774 return EINA_FALSE;
1775 return eina_value_type_pset(convert, convert_mem, &other_mem);
1776 }
1777 else if (convert == EINA_VALUE_TYPE_USHORT)
1778 {
1779 unsigned short other_mem = v;
1780 if (EINA_UNLIKELY(v < 0))
1781 return EINA_FALSE;
1782 if (EINA_UNLIKELY(v > eina_value_ushort_max))
1783 return EINA_FALSE;
1784 return eina_value_type_pset(convert, convert_mem, &other_mem);
1785 }
1786 else if (convert == EINA_VALUE_TYPE_UINT)
1787 {
1788 unsigned int other_mem = v;
1789 if (EINA_UNLIKELY(v < 0))
1790 return EINA_FALSE;
1791 if (EINA_UNLIKELY(v > eina_value_uint_max))
1792 return EINA_FALSE;
1793 return eina_value_type_pset(convert, convert_mem, &other_mem);
1794 }
1795 else if (convert == EINA_VALUE_TYPE_ULONG)
1796 {
1797 unsigned long other_mem = v;
1798 if (EINA_UNLIKELY(v < 0))
1799 return EINA_FALSE;
1800 if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) &&
1801 (v > eina_value_ulong_max)))
1802 return EINA_FALSE;
1803 return eina_value_type_pset(convert, convert_mem, &other_mem);
1804 }
1805 else if (convert == EINA_VALUE_TYPE_UINT64)
1806 {
1807 uint64_t other_mem = v;
1808 if (EINA_UNLIKELY(v < 0))
1809 return EINA_FALSE;
1810 if (EINA_UNLIKELY(v > eina_value_uint64_max))
1811 return EINA_FALSE;
1812 return eina_value_type_pset(convert, convert_mem, &other_mem);
1813 }
1814 else if (convert == EINA_VALUE_TYPE_CHAR)
1815 {
1816 char other_mem = v;
1817 if (EINA_UNLIKELY(v < eina_value_char_min))
1818 return EINA_FALSE;
1819 if (EINA_UNLIKELY(v > eina_value_char_max))
1820 return EINA_FALSE;
1821 return eina_value_type_pset(convert, convert_mem, &other_mem);
1822 }
1823 else if (convert == EINA_VALUE_TYPE_SHORT)
1824 {
1825 short other_mem = v;
1826 if (EINA_UNLIKELY(v < eina_value_short_min))
1827 return EINA_FALSE;
1828 if (EINA_UNLIKELY(v > eina_value_short_max))
1829 return EINA_FALSE;
1830 return eina_value_type_pset(convert, convert_mem, &other_mem);
1831 }
1832 else if (convert == EINA_VALUE_TYPE_INT)
1833 {
1834 int other_mem = v;
1835 if (EINA_UNLIKELY(v < eina_value_int_min))
1836 return EINA_FALSE;
1837 if (EINA_UNLIKELY(v > eina_value_int_max))
1838 return EINA_FALSE;
1839 return eina_value_type_pset(convert, convert_mem, &other_mem);
1840 }
1841 else if (convert == EINA_VALUE_TYPE_LONG)
1842 {
1843 long other_mem = v;
1844 if (EINA_UNLIKELY(v < eina_value_long_min))
1845 return EINA_FALSE;
1846 if (EINA_UNLIKELY(v > eina_value_long_max))
1847 return EINA_FALSE;
1848 return eina_value_type_pset(convert, convert_mem, &other_mem);
1849 }
1850 else if (convert == EINA_VALUE_TYPE_INT64)
1851 {
1852 int64_t other_mem = v;
1853 if (EINA_UNLIKELY(v < eina_value_int64_min))
1854 return EINA_FALSE;
1855 if (EINA_UNLIKELY(v > eina_value_int64_max))
1856 return EINA_FALSE;
1857 return eina_value_type_pset(convert, convert_mem, &other_mem);
1858 }
1859 else if (convert == EINA_VALUE_TYPE_FLOAT)
1860 {
1861 float other_mem = v;
1862 return eina_value_type_pset(convert, convert_mem, &other_mem);
1863 }
1864 else if (convert == EINA_VALUE_TYPE_DOUBLE)
1865 {
1866 double other_mem = v;
1867 return eina_value_type_pset(convert, convert_mem, &other_mem);
1868 }
1869 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
1870 convert == EINA_VALUE_TYPE_STRING)
1871 {
1872 const char *other_mem;
1873 char buf[64];
1874 snprintf(buf, sizeof(buf), "%f", v);
1875 other_mem = buf; /* required due &buf == buf */
1876 return eina_value_type_pset(convert, convert_mem, &other_mem);
1877 }
1878 else
1879 {
1880 eina_error_set(EINA_ERROR_VALUE_FAILED);
1881 return EINA_FALSE;
1882 }
1883
1884 return EINA_TRUE;
1885}
1886
1887static Eina_Bool
1888_eina_value_type_float_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
1889{
1890 float *tmem = mem;
1891 *tmem = va_arg(args, double); /* float is promoted to double for va_args */
1892 return EINA_TRUE;
1893}
1894
1895static Eina_Bool
1896_eina_value_type_float_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
1897{
1898 float *tmem = mem;
1899 const float *p = ptr;
1900 *tmem = *p;
1901 return EINA_TRUE;
1902}
1903
1904static Eina_Bool
1905_eina_value_type_float_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
1906{
1907 const float *tmem = mem;
1908 float *p = ptr;
1909 *p = *tmem;
1910 return EINA_TRUE;
1911}
1912
1913static Eina_Bool
1914_eina_value_type_double_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
1915{
1916 double *tmem = mem;
1917 *tmem = 0;
1918 return EINA_TRUE;
1919}
1920
1921static Eina_Bool
1922_eina_value_type_double_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
1923{
1924 return EINA_TRUE;
1925}
1926
1927static Eina_Bool
1928_eina_value_type_double_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
1929{
1930 const double *s = src;
1931 double *d = dst;
1932 *d = *s;
1933 return EINA_TRUE;
1934}
1935
1936static int
1937_eina_value_type_double_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
1938{
1939 const double *ta = a, *tb = b;
1940 if (*ta < *tb)
1941 return -1;
1942 else if (*ta > *tb)
1943 return 1;
1944 return 0;
1945}
1946
1947static Eina_Bool
1948_eina_value_type_double_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
1949{
1950 const double v = *(const double *)type_mem;
1951
1952 eina_error_set(0);
1953
1954 if (convert == EINA_VALUE_TYPE_UCHAR)
1955 {
1956 unsigned char other_mem = v;
1957 if (EINA_UNLIKELY(v < 0))
1958 return EINA_FALSE;
1959 if (EINA_UNLIKELY(v > eina_value_uchar_max))
1960 return EINA_FALSE;
1961 return eina_value_type_pset(convert, convert_mem, &other_mem);
1962 }
1963 else if (convert == EINA_VALUE_TYPE_USHORT)
1964 {
1965 unsigned short other_mem = v;
1966 if (EINA_UNLIKELY(v < 0))
1967 return EINA_FALSE;
1968 if (EINA_UNLIKELY(v > eina_value_ushort_max))
1969 return EINA_FALSE;
1970 return eina_value_type_pset(convert, convert_mem, &other_mem);
1971 }
1972 else if (convert == EINA_VALUE_TYPE_UINT)
1973 {
1974 unsigned int other_mem = v;
1975 if (EINA_UNLIKELY(v < 0))
1976 return EINA_FALSE;
1977 if (EINA_UNLIKELY(v > eina_value_uint_max))
1978 return EINA_FALSE;
1979 return eina_value_type_pset(convert, convert_mem, &other_mem);
1980 }
1981 else if (convert == EINA_VALUE_TYPE_ULONG)
1982 {
1983 unsigned long other_mem = v;
1984 if (EINA_UNLIKELY(v < 0))
1985 return EINA_FALSE;
1986 if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) &&
1987 (v > eina_value_ulong_max)))
1988 return EINA_FALSE;
1989 return eina_value_type_pset(convert, convert_mem, &other_mem);
1990 }
1991 else if (convert == EINA_VALUE_TYPE_UINT64)
1992 {
1993 uint64_t other_mem = v;
1994 if (EINA_UNLIKELY(v < 0))
1995 return EINA_FALSE;
1996 return eina_value_type_pset(convert, convert_mem, &other_mem);
1997 }
1998 else if (convert == EINA_VALUE_TYPE_CHAR)
1999 {
2000 char other_mem = v;
2001 if (EINA_UNLIKELY(v < eina_value_char_min))
2002 return EINA_FALSE;
2003 if (EINA_UNLIKELY(v > eina_value_char_max))
2004 return EINA_FALSE;
2005 return eina_value_type_pset(convert, convert_mem, &other_mem);
2006 }
2007 else if (convert == EINA_VALUE_TYPE_SHORT)
2008 {
2009 short other_mem = v;
2010 if (EINA_UNLIKELY(v < eina_value_short_min))
2011 return EINA_FALSE;
2012 if (EINA_UNLIKELY(v > eina_value_short_max))
2013 return EINA_FALSE;
2014 return eina_value_type_pset(convert, convert_mem, &other_mem);
2015 }
2016 else if (convert == EINA_VALUE_TYPE_INT)
2017 {
2018 int other_mem = v;
2019 if (EINA_UNLIKELY(v < eina_value_int_min))
2020 return EINA_FALSE;
2021 if (EINA_UNLIKELY(v > eina_value_int_max))
2022 return EINA_FALSE;
2023 return eina_value_type_pset(convert, convert_mem, &other_mem);
2024 }
2025 else if (convert == EINA_VALUE_TYPE_LONG)
2026 {
2027 long other_mem = v;
2028 if (EINA_UNLIKELY(v < eina_value_long_min))
2029 return EINA_FALSE;
2030 if (EINA_UNLIKELY(v > eina_value_long_max))
2031 return EINA_FALSE;
2032 return eina_value_type_pset(convert, convert_mem, &other_mem);
2033 }
2034 else if (convert == EINA_VALUE_TYPE_INT64)
2035 {
2036 int64_t other_mem = v;
2037 return eina_value_type_pset(convert, convert_mem, &other_mem);
2038 }
2039 else if (convert == EINA_VALUE_TYPE_FLOAT)
2040 {
2041 float other_mem = v;
2042 return eina_value_type_pset(convert, convert_mem, &other_mem);
2043 }
2044 else if (convert == EINA_VALUE_TYPE_DOUBLE)
2045 {
2046 double other_mem = v;
2047 return eina_value_type_pset(convert, convert_mem, &other_mem);
2048 }
2049 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
2050 convert == EINA_VALUE_TYPE_STRING)
2051 {
2052 const char *other_mem;
2053 char buf[64];
2054 snprintf(buf, sizeof(buf), "%g", (double)v);
2055 other_mem = buf; /* required due &buf == buf */
2056 return eina_value_type_pset(convert, convert_mem, &other_mem);
2057 }
2058 else
2059 {
2060 eina_error_set(EINA_ERROR_VALUE_FAILED);
2061 return EINA_FALSE;
2062 }
2063
2064 return EINA_TRUE;
2065}
2066
2067static Eina_Bool
2068_eina_value_type_double_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
2069{
2070 double *tmem = mem;
2071 *tmem = va_arg(args, double);
2072 return EINA_TRUE;
2073}
2074
2075static Eina_Bool
2076_eina_value_type_double_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
2077{
2078 double *tmem = mem;
2079 const double *p = ptr;
2080 *tmem = *p;
2081 return EINA_TRUE;
2082}
2083
2084static Eina_Bool
2085_eina_value_type_double_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
2086{
2087 const double *tmem = mem;
2088 double *p = ptr;
2089 *p = *tmem;
2090 return EINA_TRUE;
2091}
2092
2093static Eina_Bool
2094_eina_value_type_string_common_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
2095{
2096 const char **tmem = mem;
2097 *tmem = NULL;
2098 return EINA_TRUE;
2099}
2100
2101static int
2102_eina_value_type_string_common_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
2103{
2104 const char *sa = *(const char **)a;
2105 const char *sb = *(const char **)b;
2106 if (sa == sb)
2107 return 0;
2108 if (sa == NULL)
2109 return -1;
2110 if (sb == NULL)
2111 return 1;
2112 return strcmp(sa, sb);
2113}
2114
2115static Eina_Bool
2116_eina_value_type_string_common_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
2117{
2118 const char *v = *(const char **)type_mem;
2119
2120 eina_error_set(0);
2121
2122 if (convert == EINA_VALUE_TYPE_UCHAR)
2123 {
2124 unsigned char other_mem;
2125 if ((sscanf(v, "%hhu", &other_mem) != 1) &&
2126 (sscanf(v, "%hhx", &other_mem) != 1) &&
2127 (sscanf(v, "%hho", &other_mem) != 1))
2128 return EINA_FALSE;
2129 return eina_value_type_pset(convert, convert_mem, &other_mem);
2130 }
2131 else if (convert == EINA_VALUE_TYPE_USHORT)
2132 {
2133 unsigned short other_mem;
2134 if ((sscanf(v, "%hu", &other_mem) != 1) &&
2135 (sscanf(v, "%hx", &other_mem) != 1) &&
2136 (sscanf(v, "%ho", &other_mem) != 1))
2137 return EINA_FALSE;
2138 return eina_value_type_pset(convert, convert_mem, &other_mem);
2139 }
2140 else if (convert == EINA_VALUE_TYPE_UINT)
2141 {
2142 unsigned int other_mem;
2143 if ((sscanf(v, "%u", &other_mem) != 1) &&
2144 (sscanf(v, "%x", &other_mem) != 1) &&
2145 (sscanf(v, "%o", &other_mem) != 1))
2146 return EINA_FALSE;
2147 return eina_value_type_pset(convert, convert_mem, &other_mem);
2148 }
2149 else if (convert == EINA_VALUE_TYPE_ULONG)
2150 {
2151 unsigned long other_mem;
2152 if ((sscanf(v, "%lu", &other_mem) != 1) &&
2153 (sscanf(v, "%lx", &other_mem) != 1) &&
2154 (sscanf(v, "%lo", &other_mem) != 1))
2155 return EINA_FALSE;
2156 return eina_value_type_pset(convert, convert_mem, &other_mem);
2157 }
2158 else if (convert == EINA_VALUE_TYPE_UINT64)
2159 {
2160 uint64_t other_mem;
2161 if ((sscanf(v, "%"SCNu64, &other_mem) != 1) &&
2162 (sscanf(v, "%"SCNx64, &other_mem) != 1) &&
2163 (sscanf(v, "%"SCNo64, &other_mem) != 1))
2164 return EINA_FALSE;
2165 return eina_value_type_pset(convert, convert_mem, &other_mem);
2166 }
2167 else if (convert == EINA_VALUE_TYPE_CHAR)
2168 {
2169 char other_mem;
2170 if ((sscanf(v, "%hhd", &other_mem) != 1) &&
2171 (sscanf(v, "%hhx", &other_mem) != 1) &&
2172 (sscanf(v, "%hho", &other_mem) != 1))
2173 return EINA_FALSE;
2174 return eina_value_type_pset(convert, convert_mem, &other_mem);
2175 }
2176 else if (convert == EINA_VALUE_TYPE_SHORT)
2177 {
2178 short other_mem;
2179 if ((sscanf(v, "%hd", &other_mem) != 1) &&
2180 (sscanf(v, "%hx", &other_mem) != 1) &&
2181 (sscanf(v, "%ho", &other_mem) != 1))
2182 return EINA_FALSE;
2183 return eina_value_type_pset(convert, convert_mem, &other_mem);
2184 }
2185 else if (convert == EINA_VALUE_TYPE_INT)
2186 {
2187 int other_mem;
2188 if ((sscanf(v, "%d", &other_mem) != 1) &&
2189 (sscanf(v, "%x", &other_mem) != 1) &&
2190 (sscanf(v, "%o", &other_mem) != 1))
2191 return EINA_FALSE;
2192 return eina_value_type_pset(convert, convert_mem, &other_mem);
2193 }
2194 else if (convert == EINA_VALUE_TYPE_LONG)
2195 {
2196 long other_mem;
2197 if ((sscanf(v, "%ld", &other_mem) != 1) &&
2198 (sscanf(v, "%lx", &other_mem) != 1) &&
2199 (sscanf(v, "%lo", &other_mem) != 1))
2200 return EINA_FALSE;
2201 return eina_value_type_pset(convert, convert_mem, &other_mem);
2202 }
2203 else if (convert == EINA_VALUE_TYPE_INT64)
2204 {
2205 int64_t other_mem;
2206 if ((sscanf(v, "%"SCNd64, &other_mem) != 1) &&
2207 (sscanf(v, "%"SCNx64, &other_mem) != 1) &&
2208 (sscanf(v, "%"SCNo64, &other_mem) != 1))
2209 return EINA_FALSE;
2210 return eina_value_type_pset(convert, convert_mem, &other_mem);
2211 }
2212 else if (convert == EINA_VALUE_TYPE_FLOAT)
2213 {
2214 float other_mem;
2215 if (sscanf(v, "%f", &other_mem) != 1)
2216 return EINA_FALSE;
2217 return eina_value_type_pset(convert, convert_mem, &other_mem);
2218 }
2219 else if (convert == EINA_VALUE_TYPE_DOUBLE)
2220 {
2221 double other_mem;
2222 if (sscanf(v, "%lf", &other_mem) != 1)
2223 return EINA_FALSE;
2224 return eina_value_type_pset(convert, convert_mem, &other_mem);
2225 }
2226 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
2227 convert == EINA_VALUE_TYPE_STRING)
2228 {
2229 return eina_value_type_pset(convert, convert_mem, &v);
2230 }
2231 else
2232 {
2233 eina_error_set(EINA_ERROR_VALUE_FAILED);
2234 return EINA_FALSE;
2235 }
2236
2237 return EINA_TRUE;
2238}
2239
2240static Eina_Bool
2241_eina_value_type_string_common_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
2242{
2243 memcpy(ptr, mem, sizeof(const char *));
2244 return EINA_TRUE;
2245}
2246
2247static Eina_Bool
2248_eina_value_type_stringshare_flush(const Eina_Value_Type *type __UNUSED__, void *mem)
2249{
2250 const char **tmem = mem;
2251 if (*tmem) eina_stringshare_del(*tmem);
2252 return EINA_TRUE;
2253}
2254
2255static Eina_Bool
2256_eina_value_type_stringshare_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
2257{
2258 const char * const*s = src;
2259 const char **d = dst;
2260 *d = *s;
2261 eina_stringshare_ref(*d);
2262 return EINA_TRUE;
2263}
2264
2265static Eina_Bool
2266_eina_value_type_stringshare_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
2267{
2268 const char *str = va_arg(args, const char *);
2269 return eina_stringshare_replace((const char **)mem, str);
2270}
2271
2272static Eina_Bool
2273_eina_value_type_stringshare_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
2274{
2275 const char * const *str = ptr;
2276 return eina_stringshare_replace((const char **)mem, *str);
2277}
2278
2279static Eina_Bool
2280_eina_value_type_string_flush(const Eina_Value_Type *type __UNUSED__, void *mem)
2281{
2282 char **tmem = mem;
2283 if (*tmem) free(*tmem);
2284 return EINA_TRUE;
2285}
2286
2287static Eina_Bool
2288_eina_value_type_string_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
2289{
2290 const char * const *s = src;
2291 char **d = dst;
2292 if (*s == NULL)
2293 *d = NULL;
2294 else
2295 {
2296 *d = strdup(*s);
2297 if (*d == NULL)
2298 {
2299 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
2300 return EINA_FALSE;
2301 }
2302 }
2303 return EINA_TRUE;
2304}
2305
2306static Eina_Bool
2307_eina_value_type_string_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args)
2308{
2309 char **tmem = mem;
2310 const char *str = va_arg(args, const char *);
2311 free(*tmem);
2312 if (str == NULL)
2313 *tmem = NULL;
2314 else
2315 {
2316 *tmem = strdup(str);
2317 if (*tmem == NULL)
2318 {
2319 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
2320 return EINA_FALSE;
2321 }
2322 }
2323 eina_error_set(0);
2324 return EINA_TRUE;
2325}
2326
2327static Eina_Bool
2328_eina_value_type_string_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
2329{
2330 char **tmem = mem;
2331 const char * const *str = ptr;
2332 free(*tmem);
2333 if (*str == NULL)
2334 *tmem = NULL;
2335 else
2336 {
2337 *tmem = strdup(*str);
2338 if (*tmem == NULL)
2339 {
2340 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
2341 return EINA_FALSE;
2342 }
2343 }
2344 eina_error_set(0);
2345 return EINA_TRUE;
2346}
2347
2348static Eina_Bool
2349_eina_value_type_array_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
2350{
2351 memset(mem, 0, sizeof(Eina_Value_Array));
2352 return EINA_TRUE;
2353}
2354
2355static Eina_Bool
2356_eina_value_type_array_flush_elements(Eina_Value_Array *tmem)
2357{
2358 const Eina_Value_Type *subtype = tmem->subtype;
2359 Eina_Bool ret = EINA_TRUE;
2360 unsigned char sz;
2361 char *ptr, *ptr_end;
2362
2363 if (!tmem->array) return EINA_TRUE;
2364
2365 sz = tmem->array->member_size;
2366 ptr = tmem->array->members;
2367 ptr_end = ptr + tmem->array->len * sz;
2368
2369 for (; ptr < ptr_end; ptr += sz)
2370 ret &= eina_value_type_flush(subtype, ptr);
2371
2372 eina_inarray_flush(tmem->array);
2373 return ret;
2374}
2375
2376static Eina_Bool
2377_eina_value_type_array_flush(const Eina_Value_Type *type __UNUSED__, void *mem)
2378{
2379 Eina_Value_Array *tmem = mem;
2380 Eina_Bool ret =_eina_value_type_array_flush_elements(tmem);
2381
2382 if (tmem->array) eina_inarray_free(tmem->array);
2383 tmem->array = NULL;
2384 tmem->subtype = NULL;
2385 return ret;
2386}
2387
2388static Eina_Bool
2389_eina_value_type_array_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
2390{
2391 const Eina_Value_Type *subtype;
2392 const Eina_Value_Array *s = src;
2393 Eina_Value_Array *d = dst;
2394 unsigned int i, count, sz;
2395 char *ptr, *ptr_end;
2396
2397 d->subtype = subtype = s->subtype;
2398 d->step = s->step;
2399
2400 if ((!s->array) || (!s->subtype))
2401 {
2402 d->array = NULL;
2403 return EINA_TRUE;
2404 }
2405
2406 if (!subtype->copy)
2407 {
2408 eina_error_set(EINA_ERROR_VALUE_FAILED);
2409 return EINA_FALSE;
2410 }
2411
2412 d->array = eina_inarray_new(subtype->value_size, s->step);
2413 if (!d->array)
2414 return EINA_FALSE;
2415
2416 sz = s->array->member_size;
2417
2418 count = eina_inarray_count(s->array);
2419 ptr = s->array->members;
2420 ptr_end = ptr + (count * sz);
2421
2422 for (i = 0; ptr < ptr_end; ptr += sz, i++)
2423 {
2424 void *imem = eina_inarray_alloc_at(d->array, i, 1);
2425 if (!imem) goto error;
2426 if (!subtype->copy(subtype, ptr, imem))
2427 {
2428 eina_inarray_pop(d->array);
2429 goto error;
2430 }
2431 }
2432
2433 return EINA_TRUE;
2434
2435 error:
2436 _eina_value_type_array_flush_elements(d);
2437 return EINA_FALSE;
2438}
2439
2440static int
2441_eina_value_type_array_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
2442{
2443 const Eina_Value_Type *subtype;
2444 const Eina_Value_Array *eva_a = a, *eva_b = b;
2445 const char *a_ptr, *a_ptr_end, *b_ptr;
2446 unsigned int count_a, count_b, count, sz;
2447 int cmp = 0;
2448
2449 if (eva_a->subtype != eva_b->subtype)
2450 {
2451 eina_error_set(EINA_ERROR_VALUE_FAILED);
2452 return -1;
2453 }
2454
2455 subtype = eva_a->subtype;
2456 if (!subtype->compare)
2457 {
2458 eina_error_set(EINA_ERROR_VALUE_FAILED);
2459 return 0;
2460 }
2461
2462 if ((!eva_a->array) && (!eva_b->array))
2463 return 0;
2464 else if (!eva_a->array)
2465 return -1;
2466 else if (!eva_b->array)
2467 return 1;
2468
2469 count_a = eina_inarray_count(eva_a->array);
2470 count_b = eina_inarray_count(eva_b->array);
2471
2472 if (count_a <= count_b)
2473 count = count_a;
2474 else
2475 count = count_b;
2476
2477 sz = eva_a->array->member_size;
2478
2479 a_ptr = eva_a->array->members;
2480 a_ptr_end = a_ptr + (count * sz);
2481 b_ptr = eva_b->array->members;
2482
2483 for (; (cmp == 0) && (a_ptr < a_ptr_end); a_ptr += sz, b_ptr += sz)
2484 cmp = subtype->compare(subtype, a_ptr, b_ptr);
2485
2486 if (cmp == 0)
2487 {
2488 if (count_a < count_b)
2489 return -1;
2490 else if (count_a > count_b)
2491 return 1;
2492 return 0;
2493 }
2494
2495 return cmp;
2496}
2497
2498static Eina_Bool
2499_eina_value_type_array_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
2500{
2501 const Eina_Value_Array *tmem = type_mem;
2502 Eina_Bool ret = EINA_FALSE;
2503
2504 if ((convert == EINA_VALUE_TYPE_STRING) ||
2505 (convert == EINA_VALUE_TYPE_STRINGSHARE))
2506 {
2507 Eina_Strbuf *str = eina_strbuf_new();
2508 if (!tmem->array) eina_strbuf_append(str, "[]");
2509 else
2510 {
2511 const Eina_Value_Type *subtype = tmem->subtype;
2512 unsigned char sz;
2513 const char *ptr, *ptr_end;
2514 Eina_Value tmp;
2515 Eina_Bool first = EINA_TRUE;
2516
2517 eina_value_setup(&tmp, EINA_VALUE_TYPE_STRING);
2518
2519 eina_strbuf_append_char(str, '[');
2520
2521 sz = tmem->array->member_size;
2522 ptr = tmem->array->members;
2523 ptr_end = ptr + tmem->array->len * sz;
2524 for (; ptr < ptr_end; ptr += sz)
2525 {
2526 Eina_Bool r = EINA_FALSE;
2527 if (subtype->convert_to)
2528 {
2529 r = subtype->convert_to(subtype, EINA_VALUE_TYPE_STRING,
2530 ptr, tmp.value.buf);
2531 if (r)
2532 {
2533 if (first) first = EINA_FALSE;
2534 else eina_strbuf_append_length(str, ", ", 2);
2535 eina_strbuf_append(str, tmp.value.ptr);
2536 free(tmp.value.ptr);
2537 tmp.value.ptr = NULL;
2538 }
2539 }
2540
2541 if (!r)
2542 {
2543 if (first)
2544 {
2545 first = EINA_FALSE;
2546 eina_strbuf_append_char(str, '?');
2547 }
2548 else
2549 eina_strbuf_append_length(str, ", ?", 3);
2550 }
2551 }
2552
2553 eina_strbuf_append_char(str, ']');
2554 ptr = eina_strbuf_string_get(str);
2555 ret = eina_value_type_pset(convert, convert_mem, &ptr);
2556 eina_strbuf_free(str);
2557 }
2558 }
2559 else if ((tmem->array) && (tmem->array->len == 1))
2560 {
2561 const Eina_Value_Type *subtype = tmem->subtype;
2562 void *imem = tmem->array->members;
2563
2564 if (subtype->convert_to)
2565 ret = subtype->convert_to(subtype, convert, imem, convert_mem);
2566 if ((!ret) && (convert->convert_from))
2567 ret = convert->convert_from(convert, subtype, convert_mem, imem);
2568 }
2569
2570 if (!ret)
2571 {
2572 eina_error_set(EINA_ERROR_VALUE_FAILED);
2573 return EINA_FALSE;
2574 }
2575 return EINA_TRUE;
2576}
2577
2578static Eina_Bool
2579_eina_value_type_array_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem)
2580{
2581 Eina_Value_Array *tmem = type_mem;
2582 Eina_Value_Array desc = {convert, tmem->step, NULL};
2583 char *buf;
2584 void *imem;
2585
2586 if (!eina_value_type_pset(type, tmem, &desc))
2587 return EINA_FALSE;
2588
2589 buf = alloca(convert->value_size);
2590 if (!eina_value_type_pget(convert, convert_mem, &buf))
2591 return EINA_FALSE;
2592
2593 imem = eina_inarray_alloc_at(tmem->array, 0, 1);
2594 if (!imem)
2595 return EINA_FALSE;
2596
2597 if (!eina_value_type_setup(convert, imem)) goto error_setup;
2598 if (!eina_value_type_pset(convert, imem, &buf)) goto error_set;
2599 return EINA_TRUE;
2600
2601 error_set:
2602 eina_value_type_flush(convert, imem);
2603 error_setup:
2604 eina_inarray_remove_at(tmem->array, 0);
2605 return EINA_FALSE;
2606}
2607
2608static Eina_Bool
2609_eina_value_type_array_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
2610{
2611 Eina_Value_Array *tmem = mem;
2612 const Eina_Value_Array *desc = ptr;
2613 Eina_Inarray *desc_array;
2614
2615 if ((!tmem->subtype) && (!desc->subtype))
2616 return EINA_TRUE;
2617
2618 desc_array = desc->array;
2619 if (desc_array)
2620 {
2621 EINA_SAFETY_ON_FALSE_RETURN_VAL
2622 (desc_array->member_size == desc->subtype->value_size, EINA_FALSE);
2623 }
2624
2625 if (tmem->array)
2626 {
2627 _eina_value_type_array_flush_elements(tmem);
2628 if (desc_array)
2629 eina_inarray_free(tmem->array);
2630 else
2631 eina_inarray_setup(tmem->array, desc->subtype->value_size,
2632 desc->step);
2633 }
2634 else if (!desc_array)
2635 {
2636 tmem->array = eina_inarray_new(desc->subtype->value_size, desc->step);
2637 if (!tmem->array)
2638 return EINA_FALSE;
2639 }
2640
2641 if (desc_array)
2642 tmem->array = desc_array;
2643
2644 tmem->subtype = desc->subtype;
2645
2646 return EINA_TRUE;
2647}
2648
2649static Eina_Bool
2650_eina_value_type_array_vset(const Eina_Value_Type *type, void *mem, va_list args)
2651{
2652 const Eina_Value_Array desc = va_arg(args, Eina_Value_Array);
2653 _eina_value_type_array_pset(type, mem, &desc);
2654 return EINA_TRUE;
2655}
2656
2657static Eina_Bool
2658_eina_value_type_array_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
2659{
2660 memcpy(ptr, mem, sizeof(Eina_Value_Array));
2661 return EINA_TRUE;
2662}
2663
2664static const Eina_Value_Type _EINA_VALUE_TYPE_ARRAY = {
2665 EINA_VALUE_TYPE_VERSION,
2666 sizeof(Eina_Value_Array),
2667 "Eina_Value_Array",
2668 _eina_value_type_array_setup,
2669 _eina_value_type_array_flush,
2670 _eina_value_type_array_copy,
2671 _eina_value_type_array_compare,
2672 _eina_value_type_array_convert_to,
2673 _eina_value_type_array_convert_from,
2674 _eina_value_type_array_vset,
2675 _eina_value_type_array_pset,
2676 _eina_value_type_array_pget
2677};
2678
2679static Eina_Bool
2680_eina_value_type_list_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
2681{
2682 memset(mem, 0, sizeof(Eina_Value_List));
2683 return EINA_TRUE;
2684}
2685
2686static Eina_Bool
2687_eina_value_type_list_flush_elements(Eina_Value_List *tmem)
2688{
2689 const Eina_Value_Type *subtype = tmem->subtype;
2690 Eina_Bool ret = EINA_TRUE;
2691
2692 if (!tmem->list) return EINA_TRUE;
2693
2694 while (tmem->list)
2695 {
2696 void *mem = eina_value_list_node_memory_get(tmem->subtype, tmem->list);
2697 ret &= eina_value_type_flush(subtype, mem);
2698 eina_value_list_node_memory_flush(tmem->subtype, tmem->list);
2699 tmem->list = eina_list_remove_list(tmem->list, tmem->list);
2700 }
2701
2702 return ret;
2703}
2704
2705static Eina_Bool
2706_eina_value_type_list_flush(const Eina_Value_Type *type __UNUSED__, void *mem)
2707{
2708 Eina_Value_List *tmem = mem;
2709 Eina_Bool ret =_eina_value_type_list_flush_elements(tmem);
2710
2711 if (tmem->list) eina_list_free(tmem->list);
2712 tmem->list = NULL;
2713 tmem->subtype = NULL;
2714 return ret;
2715}
2716
2717static Eina_Bool
2718_eina_value_type_list_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
2719{
2720 const Eina_Value_Type *subtype;
2721 const Eina_Value_List *s = src;
2722 Eina_Value_List *d = dst;
2723 const Eina_List *snode;
2724
2725 d->subtype = subtype = s->subtype;
2726 if ((!s->list) || (!s->subtype))
2727 {
2728 d->list = NULL;
2729 return EINA_TRUE;
2730 }
2731
2732 if (!subtype->copy)
2733 {
2734 eina_error_set(EINA_ERROR_VALUE_FAILED);
2735 return EINA_FALSE;
2736 }
2737
2738 d->list = NULL;
2739 for (snode = s->list; snode != NULL; snode = snode->next)
2740 {
2741 const void *ptr = eina_value_list_node_memory_get(subtype, snode);
2742 Eina_List *dnode;
2743 void *imem;
2744
2745 d->list = eina_list_append(d->list, (void*)1L);
2746 dnode = eina_list_last(d->list);
2747 EINA_SAFETY_ON_NULL_GOTO(dnode, error);
2748 EINA_SAFETY_ON_FALSE_GOTO(dnode->data == (void*)1L, error);
2749
2750 imem = eina_value_list_node_memory_setup(subtype, dnode);
2751 if (!subtype->copy(subtype, ptr, imem))
2752 {
2753 eina_value_list_node_memory_flush(subtype, dnode);
2754 d->list = eina_list_remove_list(d->list, dnode);
2755 goto error;
2756 }
2757 }
2758 return EINA_TRUE;
2759
2760 error:
2761 _eina_value_type_list_flush_elements(d);
2762 return EINA_FALSE;
2763}
2764
2765static int
2766_eina_value_type_list_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
2767{
2768 const Eina_Value_Type *subtype;
2769 const Eina_Value_List *eva_a = a, *eva_b = b;
2770 const Eina_List *anode, *bnode;
2771 int cmp = 0;
2772
2773 if (eva_a->subtype != eva_b->subtype)
2774 {
2775 eina_error_set(EINA_ERROR_VALUE_FAILED);
2776 return -1;
2777 }
2778
2779 subtype = eva_a->subtype;
2780 if (!subtype->compare)
2781 {
2782 eina_error_set(EINA_ERROR_VALUE_FAILED);
2783 return 0;
2784 }
2785
2786 if ((!eva_a->list) && (!eva_b->list))
2787 return 0;
2788 else if (!eva_a->list)
2789 return -1;
2790 else if (!eva_b->list)
2791 return 1;
2792
2793 for (anode = eva_a->list, bnode = eva_b->list;
2794 (cmp == 0) && (anode) && (bnode);
2795 anode = anode->next, bnode = bnode->next)
2796 {
2797 const void *amem = eina_value_list_node_memory_get(subtype, anode);
2798 const void *bmem = eina_value_list_node_memory_get(subtype, bnode);
2799 cmp = subtype->compare(subtype, amem, bmem);
2800 }
2801
2802 if (cmp == 0)
2803 {
2804 if ((!anode) && (bnode))
2805 return -1;
2806 else if ((anode) && (!bnode))
2807 return 1;
2808 return 0;
2809 }
2810
2811 return cmp;
2812}
2813
2814static Eina_Bool
2815_eina_value_type_list_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
2816{
2817 const Eina_Value_List *tmem = type_mem;
2818 Eina_Bool ret = EINA_FALSE;
2819
2820 if ((convert == EINA_VALUE_TYPE_STRING) ||
2821 (convert == EINA_VALUE_TYPE_STRINGSHARE))
2822 {
2823 Eina_Strbuf *str = eina_strbuf_new();
2824 if (!tmem->list) eina_strbuf_append(str, "[]");
2825 else
2826 {
2827 const Eina_Value_Type *subtype = tmem->subtype;
2828 const Eina_List *node;
2829 Eina_Value tmp;
2830 const char *s;
2831 Eina_Bool first = EINA_TRUE;
2832
2833 eina_value_setup(&tmp, EINA_VALUE_TYPE_STRING);
2834
2835 eina_strbuf_append_char(str, '[');
2836
2837 for (node = tmem->list; node != NULL; node = node->next)
2838 {
2839 Eina_Bool r = EINA_FALSE;
2840
2841 if (subtype->convert_to)
2842 {
2843 const void *ptr;
2844 ptr = eina_value_list_node_memory_get(subtype, node);
2845 r = subtype->convert_to(subtype, EINA_VALUE_TYPE_STRING,
2846 ptr, tmp.value.buf);
2847 if (r)
2848 {
2849 if (first) first = EINA_FALSE;
2850 else eina_strbuf_append_length(str, ", ", 2);
2851 eina_strbuf_append(str, tmp.value.ptr);
2852 free(tmp.value.ptr);
2853 tmp.value.ptr = NULL;
2854 }
2855 }
2856
2857 if (!r)
2858 {
2859 if (first)
2860 {
2861 first = EINA_FALSE;
2862 eina_strbuf_append_char(str, '?');
2863 }
2864 else
2865 eina_strbuf_append_length(str, ", ?", 3);
2866 }
2867 }
2868
2869 eina_strbuf_append_char(str, ']');
2870 s = eina_strbuf_string_get(str);
2871 ret = eina_value_type_pset(convert, convert_mem, &s);
2872 eina_strbuf_free(str);
2873 }
2874 }
2875 else if ((tmem->list) && (tmem->list->next == NULL))
2876 {
2877 const Eina_Value_Type *subtype = tmem->subtype;
2878 void *imem = eina_value_list_node_memory_get(subtype, tmem->list);
2879
2880 if (subtype->convert_to)
2881 ret = subtype->convert_to(subtype, convert, imem, convert_mem);
2882 if ((!ret) && (convert->convert_from))
2883 ret = convert->convert_from(convert, subtype, convert_mem, imem);
2884 }
2885
2886 if (!ret)
2887 {
2888 eina_error_set(EINA_ERROR_VALUE_FAILED);
2889 return EINA_FALSE;
2890 }
2891 return EINA_TRUE;
2892}
2893
2894static Eina_Bool
2895_eina_value_type_list_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem)
2896{
2897 Eina_Value_List *tmem = type_mem;
2898 Eina_Value_List desc = {convert, NULL};
2899 Eina_List *node;
2900 char *buf;
2901 void *imem;
2902
2903 if (!eina_value_type_pset(type, tmem, &desc))
2904 return EINA_FALSE;
2905
2906 buf = alloca(convert->value_size);
2907 if (!eina_value_type_pget(convert, convert_mem, &buf))
2908 return EINA_FALSE;
2909
2910 tmem->list = eina_list_append(tmem->list, (void*)1L);
2911 node = eina_list_last(tmem->list);
2912 EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE);
2913 EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE);
2914
2915 imem = eina_value_list_node_memory_setup(tmem->subtype, node);
2916 if (!imem)
2917 {
2918 tmem->list = eina_list_remove_list(tmem->list, node);
2919 return EINA_FALSE;
2920 }
2921
2922 if (!eina_value_type_setup(tmem->subtype, imem)) goto error_setup;
2923 if (!eina_value_type_pset(tmem->subtype, imem, &buf)) goto error_set;
2924 return EINA_TRUE;
2925
2926 error_set:
2927 eina_value_type_flush(tmem->subtype, imem);
2928 error_setup:
2929 eina_value_list_node_memory_flush(tmem->subtype, node);
2930 tmem->list = eina_list_remove_list(tmem->list, node);
2931 return EINA_FALSE;
2932}
2933
2934static Eina_Bool
2935_eina_value_type_list_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
2936{
2937 Eina_Value_List *tmem = mem;
2938 const Eina_Value_List *desc = ptr;
2939
2940 if ((!tmem->subtype) && (!desc->subtype))
2941 return EINA_TRUE;
2942
2943 _eina_value_type_list_flush_elements(tmem);
2944 tmem->subtype = desc->subtype;
2945 tmem->list = desc->list;
2946
2947 return EINA_TRUE;
2948}
2949
2950static Eina_Bool
2951_eina_value_type_list_vset(const Eina_Value_Type *type, void *mem, va_list args)
2952{
2953 const Eina_Value_List desc = va_arg(args, Eina_Value_List);
2954 _eina_value_type_list_pset(type, mem, &desc);
2955 return EINA_TRUE;
2956}
2957
2958static Eina_Bool
2959_eina_value_type_list_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
2960{
2961 memcpy(ptr, mem, sizeof(Eina_Value_List));
2962 return EINA_TRUE;
2963}
2964
2965static const Eina_Value_Type _EINA_VALUE_TYPE_LIST = {
2966 EINA_VALUE_TYPE_VERSION,
2967 sizeof(Eina_Value_List),
2968 "Eina_Value_List",
2969 _eina_value_type_list_setup,
2970 _eina_value_type_list_flush,
2971 _eina_value_type_list_copy,
2972 _eina_value_type_list_compare,
2973 _eina_value_type_list_convert_to,
2974 _eina_value_type_list_convert_from,
2975 _eina_value_type_list_vset,
2976 _eina_value_type_list_pset,
2977 _eina_value_type_list_pget
2978};
2979
2980static Eina_Bool
2981_eina_value_type_hash_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
2982{
2983 memset(mem, 0, sizeof(Eina_Value_Hash));
2984 return EINA_TRUE;
2985}
2986
2987struct _eina_value_type_hash_flush_each_ctx
2988{
2989 const Eina_Value_Type *subtype;
2990 Eina_Bool ret;
2991};
2992
2993static Eina_Bool
2994_eina_value_type_hash_flush_each(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *mem, void *user_data)
2995{
2996 struct _eina_value_type_hash_flush_each_ctx *ctx = user_data;
2997 ctx->ret &= eina_value_type_flush(ctx->subtype, mem);
2998 return EINA_TRUE;
2999}
3000
3001static Eina_Bool
3002_eina_value_type_hash_flush_elements(Eina_Value_Hash *tmem)
3003{
3004 struct _eina_value_type_hash_flush_each_ctx ctx = {
3005 tmem->subtype,
3006 EINA_TRUE
3007 };
3008
3009 if (!tmem->hash) return EINA_TRUE;
3010
3011 eina_hash_foreach(tmem->hash, _eina_value_type_hash_flush_each, &ctx);
3012 eina_hash_free(tmem->hash);
3013 tmem->hash = NULL;
3014 return ctx.ret;
3015}
3016
3017static Eina_Bool
3018_eina_value_type_hash_flush(const Eina_Value_Type *type __UNUSED__, void *mem)
3019{
3020 Eina_Value_Hash *tmem = mem;
3021 Eina_Bool ret =_eina_value_type_hash_flush_elements(tmem);
3022 tmem->subtype = NULL;
3023 return ret;
3024}
3025
3026static unsigned int
3027_eina_value_hash_key_length(const void *key)
3028{
3029 if (!key)
3030 return 0;
3031 return (int)strlen(key) + 1;
3032}
3033
3034static int
3035_eina_value_hash_key_cmp(const void *key1, int key1_len, const void *key2, int key2_len)
3036{
3037 int r = key1_len - key2_len;
3038 if (r != 0)
3039 return r;
3040 return strcmp(key1, key2);
3041}
3042
3043static Eina_Bool
3044_eina_value_type_hash_create(Eina_Value_Hash *desc)
3045{
3046 if (!desc->buckets_power_size)
3047 desc->buckets_power_size = 5;
3048
3049 desc->hash = eina_hash_new(_eina_value_hash_key_length,
3050 _eina_value_hash_key_cmp,
3051 EINA_KEY_HASH(eina_hash_superfast),
3052 NULL, desc->buckets_power_size);
3053 return !!desc->hash;
3054}
3055
3056struct _eina_value_type_hash_copy_each_ctx
3057{
3058 const Eina_Value_Type *subtype;
3059 Eina_Value_Hash *dest;
3060 Eina_Bool ret;
3061};
3062
3063static Eina_Bool
3064_eina_value_type_hash_copy_each(const Eina_Hash *hash __UNUSED__, const void *key, void *_ptr, void *user_data)
3065{
3066 struct _eina_value_type_hash_copy_each_ctx *ctx = user_data;
3067 const void *ptr = _ptr;
3068 void *imem = malloc(ctx->subtype->value_size);
3069 if (!imem)
3070 {
3071 ctx->ret = EINA_FALSE;
3072 return EINA_FALSE;
3073 }
3074 if (!ctx->subtype->copy(ctx->subtype, ptr, imem))
3075 {
3076 free(imem);
3077 ctx->ret = EINA_FALSE;
3078 return EINA_FALSE;
3079 }
3080 if (!eina_hash_add(ctx->dest->hash, key, imem))
3081 {
3082 eina_value_type_flush(ctx->subtype, imem);
3083 free(imem);
3084 ctx->ret = EINA_FALSE;
3085 return EINA_FALSE;
3086 }
3087 return EINA_TRUE;
3088}
3089
3090static Eina_Bool
3091_eina_value_type_hash_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
3092{
3093 const Eina_Value_Hash *s = src;
3094 Eina_Value_Hash *d = dst;
3095 struct _eina_value_type_hash_copy_each_ctx ctx = {s->subtype, d, EINA_TRUE};
3096
3097 d->subtype = s->subtype;
3098 d->buckets_power_size = s->buckets_power_size;
3099
3100 if ((!s->hash) || (!s->subtype))
3101 {
3102 d->hash = NULL;
3103 return EINA_TRUE;
3104 }
3105
3106 if (!s->subtype->copy)
3107 {
3108 eina_error_set(EINA_ERROR_VALUE_FAILED);
3109 return EINA_FALSE;
3110 }
3111
3112 if (!_eina_value_type_hash_create(d))
3113 return EINA_FALSE;
3114
3115 eina_hash_foreach(s->hash, _eina_value_type_hash_copy_each, &ctx);
3116 if (!ctx.ret)
3117 {
3118 _eina_value_type_hash_flush_elements(d);
3119 return EINA_FALSE;
3120 }
3121 return EINA_TRUE;
3122}
3123
3124struct _eina_value_type_hash_compare_each_ctx
3125{
3126 const Eina_Value_Type *subtype;
3127 const Eina_Hash *other;
3128 int cmp;
3129};
3130
3131static Eina_Bool
3132_eina_value_type_hash_compare_each(const Eina_Hash *hash __UNUSED__, const void *key, void *_ptr, void *user_data)
3133{
3134 struct _eina_value_type_hash_compare_each_ctx *ctx = user_data;
3135 const void *self_ptr = _ptr;
3136 const void *other_ptr = eina_hash_find(ctx->other, key);
3137 if (!other_ptr) return EINA_TRUE;
3138 ctx->cmp = ctx->subtype->compare(ctx->subtype, self_ptr, other_ptr);
3139 return ctx->cmp == 0;
3140}
3141
3142static int
3143_eina_value_type_hash_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
3144{
3145 const Eina_Value_Hash *eva_a = a, *eva_b = b;
3146 struct _eina_value_type_hash_compare_each_ctx ctx = {
3147 eva_a->subtype, eva_b->hash, 0
3148 };
3149
3150 if (eva_a->subtype != eva_b->subtype)
3151 {
3152 eina_error_set(EINA_ERROR_VALUE_FAILED);
3153 return -1;
3154 }
3155
3156 if (!eva_a->subtype->compare)
3157 {
3158 eina_error_set(EINA_ERROR_VALUE_FAILED);
3159 return 0;
3160 }
3161
3162 if ((!eva_a->hash) && (!eva_b->hash))
3163 return 0;
3164 else if (!eva_a->hash)
3165 return -1;
3166 else if (!eva_b->hash)
3167 return 1;
3168
3169 eina_hash_foreach(eva_a->hash, _eina_value_type_hash_compare_each, &ctx);
3170 if (ctx.cmp == 0)
3171 {
3172 unsigned int count_a = eina_hash_population(eva_a->hash);
3173 unsigned int count_b = eina_hash_population(eva_b->hash);
3174 if (count_a < count_b)
3175 return -1;
3176 else if (count_a > count_b)
3177 return 1;
3178 return 0;
3179 }
3180
3181 return ctx.cmp;
3182}
3183
3184static Eina_Bool
3185_eina_value_type_hash_find_first(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *ptr, void *user_data)
3186{
3187 void **ret = user_data;
3188 *ret = ptr;
3189 return EINA_FALSE;
3190}
3191
3192struct _eina_value_type_hash_convert_to_string_each_ctx
3193{
3194 const Eina_Value_Type *subtype;
3195 Eina_Strbuf *str;
3196 Eina_Value tmp;
3197 Eina_Bool first;
3198};
3199
3200static Eina_Bool
3201_eina_value_type_hash_convert_to_string_each(const Eina_Hash *hash __UNUSED__, const void *_key, void *_ptr, void *user_data)
3202{
3203 struct _eina_value_type_hash_convert_to_string_each_ctx *ctx = user_data;
3204 const char *key = _key;
3205 const void *ptr = _ptr;
3206 Eina_Bool r = EINA_FALSE;
3207
3208 if (ctx->first) ctx->first = EINA_FALSE;
3209 else eina_strbuf_append_length(ctx->str, ", ", 2);
3210
3211 eina_strbuf_append(ctx->str, key);
3212 eina_strbuf_append_length(ctx->str, ": ", 2);
3213
3214 if (ctx->subtype->convert_to)
3215 {
3216 r = ctx->subtype->convert_to(ctx->subtype, EINA_VALUE_TYPE_STRING,
3217 ptr, ctx->tmp.value.buf);
3218 if (r)
3219 {
3220 eina_strbuf_append(ctx->str, ctx->tmp.value.ptr);
3221 free(ctx->tmp.value.ptr);
3222 ctx->tmp.value.ptr = NULL;
3223 }
3224 }
3225
3226 if (!r)
3227 eina_strbuf_append_char(ctx->str, '?');
3228
3229 return EINA_TRUE;
3230}
3231
3232static Eina_Bool
3233_eina_value_type_hash_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
3234{
3235 const Eina_Value_Hash *tmem = type_mem;
3236 Eina_Bool ret = EINA_FALSE;
3237
3238 if ((convert == EINA_VALUE_TYPE_STRING) ||
3239 (convert == EINA_VALUE_TYPE_STRINGSHARE))
3240 {
3241 Eina_Strbuf *str = eina_strbuf_new();
3242 if (!tmem->hash) eina_strbuf_append(str, "{}");
3243 else
3244 {
3245 struct _eina_value_type_hash_convert_to_string_each_ctx ctx;
3246 const char *s;
3247
3248 ctx.subtype = tmem->subtype;
3249 ctx.str = str;
3250 ctx.first = EINA_TRUE;
3251 eina_value_setup(&ctx.tmp, EINA_VALUE_TYPE_STRING);
3252
3253 eina_strbuf_append_char(str, '{');
3254
3255 eina_hash_foreach(tmem->hash,
3256 _eina_value_type_hash_convert_to_string_each,
3257 &ctx);
3258
3259 eina_strbuf_append_char(str, '}');
3260 s = eina_strbuf_string_get(str);
3261 ret = eina_value_type_pset(convert, convert_mem, &s);
3262 eina_strbuf_free(str);
3263 }
3264 }
3265 else if ((tmem->hash) && (eina_hash_population(tmem->hash) == 1))
3266 {
3267 const Eina_Value_Type *subtype = tmem->subtype;
3268 void *imem = NULL;
3269
3270 eina_hash_foreach(tmem->hash, _eina_value_type_hash_find_first, &imem);
3271 if (!imem) /* shouldn't happen... */
3272 ret = EINA_FALSE;
3273 else
3274 {
3275 if (subtype->convert_to)
3276 ret = subtype->convert_to(subtype, convert, imem, convert_mem);
3277 if ((!ret) && (convert->convert_from))
3278 ret = convert->convert_from(convert, subtype, convert_mem, imem);
3279 }
3280 }
3281
3282 if (!ret)
3283 {
3284 eina_error_set(EINA_ERROR_VALUE_FAILED);
3285 return EINA_FALSE;
3286 }
3287 return EINA_TRUE;
3288}
3289
3290static Eina_Bool
3291_eina_value_type_hash_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
3292{
3293 Eina_Value_Hash *tmem = mem;
3294 const Eina_Value_Hash *desc = ptr;
3295
3296 if ((!tmem->subtype) && (!desc->subtype))
3297 return EINA_TRUE;
3298
3299 if (tmem->hash) _eina_value_type_hash_flush_elements(tmem);
3300
3301 if (desc->hash)
3302 tmem->hash = desc->hash;
3303 else if (!_eina_value_type_hash_create(tmem))
3304 return EINA_FALSE;
3305
3306 tmem->subtype = desc->subtype;
3307
3308 return EINA_TRUE;
3309}
3310
3311static Eina_Bool
3312_eina_value_type_hash_vset(const Eina_Value_Type *type, void *mem, va_list args)
3313{
3314 const Eina_Value_Hash desc = va_arg(args, Eina_Value_Hash);
3315 _eina_value_type_hash_pset(type, mem, &desc);
3316 return EINA_TRUE;
3317}
3318
3319static Eina_Bool
3320_eina_value_type_hash_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
3321{
3322 memcpy(ptr, mem, sizeof(Eina_Value_Hash));
3323 return EINA_TRUE;
3324}
3325
3326static const Eina_Value_Type _EINA_VALUE_TYPE_HASH = {
3327 EINA_VALUE_TYPE_VERSION,
3328 sizeof(Eina_Value_Hash),
3329 "Eina_Value_Hash",
3330 _eina_value_type_hash_setup,
3331 _eina_value_type_hash_flush,
3332 _eina_value_type_hash_copy,
3333 _eina_value_type_hash_compare,
3334 _eina_value_type_hash_convert_to,
3335 NULL, /* no convert from */
3336 _eina_value_type_hash_vset,
3337 _eina_value_type_hash_pset,
3338 _eina_value_type_hash_pget
3339};
3340
3341static Eina_Bool
3342_eina_value_type_timeval_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
3343{
3344 memset(mem, 0, sizeof(struct timeval));
3345 return EINA_TRUE;
3346}
3347
3348static Eina_Bool
3349_eina_value_type_timeval_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__)
3350{
3351 return EINA_TRUE;
3352}
3353
3354static Eina_Bool
3355_eina_value_type_timeval_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
3356{
3357 const struct timeval *s = src;
3358 struct timeval *d = dst;
3359 *d = *s;
3360 return EINA_TRUE;
3361}
3362
3363static inline struct timeval _eina_value_type_timeval_fix(const struct timeval *input)
3364{
3365 struct timeval ret = *input;
3366 if (EINA_UNLIKELY(ret.tv_usec < 0))
3367 {
3368 ret.tv_sec -= 1;
3369 ret.tv_usec += 1e6;
3370 }
3371 return ret;
3372}
3373
3374static int
3375_eina_value_type_timeval_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
3376{
3377 struct timeval va = _eina_value_type_timeval_fix(a);
3378 struct timeval vb = _eina_value_type_timeval_fix(b);
3379
3380 if (va.tv_sec < vb.tv_sec)
3381 return -1;
3382 else if (va.tv_sec > vb.tv_sec)
3383 return 1;
3384
3385 if (va.tv_usec < vb.tv_usec)
3386 return -1;
3387 else if (va.tv_usec > vb.tv_usec)
3388 return 1;
3389
3390 return 0;
3391}
3392
3393static Eina_Bool
3394_eina_value_type_timeval_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
3395{
3396 struct timeval v = _eina_value_type_timeval_fix(type_mem);
3397
3398 eina_error_set(0);
3399
3400 if (convert == EINA_VALUE_TYPE_UCHAR)
3401 {
3402 unsigned char other_mem = v.tv_sec;
3403 if (EINA_UNLIKELY(v.tv_sec < 0))
3404 return EINA_FALSE;
3405 if (EINA_UNLIKELY(v.tv_sec > eina_value_uchar_max))
3406 return EINA_FALSE;
3407 return eina_value_type_pset(convert, convert_mem, &other_mem);
3408 }
3409 else if (convert == EINA_VALUE_TYPE_USHORT)
3410 {
3411 unsigned short other_mem = v.tv_sec;
3412 if (EINA_UNLIKELY(v.tv_sec < 0))
3413 return EINA_FALSE;
3414 if (EINA_UNLIKELY(v.tv_sec > eina_value_ushort_max))
3415 return EINA_FALSE;
3416 return eina_value_type_pset(convert, convert_mem, &other_mem);
3417 }
3418 else if (convert == EINA_VALUE_TYPE_UINT)
3419 {
3420 unsigned int other_mem = v.tv_sec;
3421 if (EINA_UNLIKELY(v.tv_sec < 0))
3422 return EINA_FALSE;
3423 if (EINA_UNLIKELY((unsigned long) v.tv_sec > eina_value_uint_max))
3424 return EINA_FALSE;
3425 return eina_value_type_pset(convert, convert_mem, &other_mem);
3426 }
3427 else if (convert == EINA_VALUE_TYPE_ULONG)
3428 {
3429 unsigned long other_mem = v.tv_sec;
3430 if (EINA_UNLIKELY(v.tv_sec < 0))
3431 return EINA_FALSE;
3432 if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) &&
3433 ((unsigned long)v.tv_sec > eina_value_ulong_max)))
3434 return EINA_FALSE;
3435 return eina_value_type_pset(convert, convert_mem, &other_mem);
3436 }
3437 else if (convert == EINA_VALUE_TYPE_UINT64)
3438 {
3439 uint64_t other_mem = v.tv_sec;
3440 if (EINA_UNLIKELY(v.tv_sec < 0))
3441 return EINA_FALSE;
3442 return eina_value_type_pset(convert, convert_mem, &other_mem);
3443 }
3444 else if (convert == EINA_VALUE_TYPE_CHAR)
3445 {
3446 char other_mem = v.tv_sec;
3447 if (EINA_UNLIKELY(v.tv_sec < eina_value_char_min))
3448 return EINA_FALSE;
3449 if (EINA_UNLIKELY(v.tv_sec > eina_value_char_max))
3450 return EINA_FALSE;
3451 return eina_value_type_pset(convert, convert_mem, &other_mem);
3452 }
3453 else if (convert == EINA_VALUE_TYPE_SHORT)
3454 {
3455 short other_mem = v.tv_sec;
3456 if (EINA_UNLIKELY(v.tv_sec < eina_value_short_min))
3457 return EINA_FALSE;
3458 if (EINA_UNLIKELY(v.tv_sec > eina_value_short_max))
3459 return EINA_FALSE;
3460 return eina_value_type_pset(convert, convert_mem, &other_mem);
3461 }
3462 else if (convert == EINA_VALUE_TYPE_INT)
3463 {
3464 int other_mem = v.tv_sec;
3465 if (EINA_UNLIKELY(v.tv_sec < eina_value_int_min))
3466 return EINA_FALSE;
3467 if (EINA_UNLIKELY(v.tv_sec > eina_value_int_max))
3468 return EINA_FALSE;
3469 return eina_value_type_pset(convert, convert_mem, &other_mem);
3470 }
3471 else if (convert == EINA_VALUE_TYPE_LONG)
3472 {
3473 long other_mem = v.tv_sec;
3474 if (EINA_UNLIKELY(v.tv_sec < eina_value_long_min))
3475 return EINA_FALSE;
3476 if (EINA_UNLIKELY(v.tv_sec > eina_value_long_max))
3477 return EINA_FALSE;
3478 return eina_value_type_pset(convert, convert_mem, &other_mem);
3479 }
3480 else if (convert == EINA_VALUE_TYPE_INT64)
3481 {
3482 int64_t other_mem = v.tv_sec;
3483 return eina_value_type_pset(convert, convert_mem, &other_mem);
3484 }
3485 else if (convert == EINA_VALUE_TYPE_FLOAT)
3486 {
3487 float other_mem = (float)v.tv_sec + (float)v.tv_usec / 1.0e6;
3488 return eina_value_type_pset(convert, convert_mem, &other_mem);
3489 }
3490 else if (convert == EINA_VALUE_TYPE_DOUBLE)
3491 {
3492 double other_mem = (double)v.tv_sec + (double)v.tv_usec / 1.0e6;
3493 return eina_value_type_pset(convert, convert_mem, &other_mem);
3494 }
3495 else if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
3496 convert == EINA_VALUE_TYPE_STRING)
3497 {
3498 const char *other_mem;
3499 char buf[64];
3500 snprintf(buf, sizeof(buf), "%ld.%06ld", v.tv_sec, v.tv_usec);
3501 other_mem = buf; /* required due &buf == buf */
3502 return eina_value_type_pset(convert, convert_mem, &other_mem);
3503 }
3504 else
3505 {
3506 eina_error_set(EINA_ERROR_VALUE_FAILED);
3507 return EINA_FALSE;
3508 }
3509}
3510
3511static Eina_Bool
3512_eina_value_type_timeval_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
3513{
3514 struct timeval *tmem = mem;
3515 *tmem = _eina_value_type_timeval_fix(ptr);
3516 return EINA_TRUE;
3517}
3518
3519static Eina_Bool
3520_eina_value_type_timeval_vset(const Eina_Value_Type *type, void *mem, va_list args)
3521{
3522 const struct timeval desc = va_arg(args, struct timeval);
3523 _eina_value_type_timeval_pset(type, mem, &desc);
3524 return EINA_TRUE;
3525}
3526
3527static Eina_Bool
3528_eina_value_type_timeval_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
3529{
3530 memcpy(ptr, mem, sizeof(struct timeval));
3531 return EINA_TRUE;
3532}
3533
3534static const Eina_Value_Type _EINA_VALUE_TYPE_TIMEVAL = {
3535 EINA_VALUE_TYPE_VERSION,
3536 sizeof(struct timeval),
3537 "struct timeval",
3538 _eina_value_type_timeval_setup,
3539 _eina_value_type_timeval_flush,
3540 _eina_value_type_timeval_copy,
3541 _eina_value_type_timeval_compare,
3542 _eina_value_type_timeval_convert_to,
3543 NULL, /* no convert from */
3544 _eina_value_type_timeval_vset,
3545 _eina_value_type_timeval_pset,
3546 _eina_value_type_timeval_pget
3547};
3548
3549static Eina_Bool
3550_eina_value_type_blob_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
3551{
3552 memset(mem, 0, sizeof(Eina_Value_Blob));
3553 return EINA_TRUE;
3554}
3555
3556static inline const Eina_Value_Blob_Operations *
3557_eina_value_type_blob_ops_get(const Eina_Value_Blob *blob)
3558{
3559 if (!blob) return NULL;
3560 if (!blob->ops) return NULL;
3561 EINA_SAFETY_ON_FALSE_RETURN_VAL
3562 (blob->ops->version == EINA_VALUE_BLOB_OPERATIONS_VERSION, NULL);
3563 return blob->ops;
3564}
3565
3566static Eina_Bool
3567_eina_value_type_blob_flush(const Eina_Value_Type *type __UNUSED__, void *mem)
3568{
3569 const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(mem);
3570 Eina_Value_Blob *tmem = mem;
3571 if ((ops) && (ops->free))
3572 ops->free(ops, (void *)tmem->memory, tmem->size);
3573 return EINA_TRUE;
3574}
3575
3576static Eina_Bool
3577_eina_value_type_blob_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
3578{
3579 const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(src);
3580 const Eina_Value_Blob *s = src;
3581 Eina_Value_Blob *d = dst;
3582
3583 *d = *s;
3584
3585 if ((ops) && (ops->copy))
3586 {
3587 d->memory = ops->copy(ops, s->memory, s->size);
3588 if ((d->memory == NULL) && (s->size > 0))
3589 return EINA_FALSE;
3590 }
3591
3592 return EINA_TRUE;
3593}
3594
3595static int
3596_eina_value_type_blob_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
3597{
3598 const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(a);
3599 const Eina_Value_Blob *ta = a, *tb = b;
3600 size_t minsize;
3601 if (ta->ops != tb->ops)
3602 {
3603 eina_error_set(EINA_ERROR_VALUE_FAILED);
3604 return -1;
3605 }
3606 if ((ops) && (ops->compare))
3607 return ops->compare(ops, ta->memory, ta->size, tb->memory, tb->size);
3608
3609 if (ta->size < tb->size)
3610 minsize = ta->size;
3611 else
3612 minsize = tb->size;
3613
3614 return memcmp(ta->memory, tb->memory, minsize);
3615}
3616
3617static Eina_Bool
3618_eina_value_type_blob_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
3619{
3620 const Eina_Value_Blob *tmem = type_mem;
3621
3622 eina_error_set(0);
3623 if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
3624 convert == EINA_VALUE_TYPE_STRING)
3625 {
3626 const Eina_Value_Blob_Operations *ops;
3627 Eina_Strbuf *str;
3628 const char *other_mem;
3629 Eina_Bool ret = EINA_FALSE, first = EINA_TRUE;
3630 const unsigned char *ptr, *ptr_end;
3631
3632 ops = _eina_value_type_blob_ops_get(tmem);
3633 if ((ops) && (ops->to_string))
3634 {
3635 char *x = ops->to_string(ops, tmem->memory, tmem->size);
3636 if (x)
3637 {
3638 ret = eina_value_type_pset(convert, convert_mem, &x);
3639 free(x);
3640 }
3641 return ret;
3642 }
3643
3644 str = eina_strbuf_new();
3645 if (!str)
3646 return EINA_FALSE;
3647
3648 if (!eina_strbuf_append_printf(str, "BLOB(%u, [", tmem->size))
3649 goto error;
3650
3651 ptr = tmem->memory;
3652 ptr_end = ptr + tmem->size;
3653 for (; ptr < ptr_end; ptr++)
3654 {
3655 if (first)
3656 {
3657 first = EINA_FALSE;
3658 if (!eina_strbuf_append_printf(str, "%02hhx", *ptr))
3659 goto error;
3660 }
3661 else
3662 {
3663 if (!eina_strbuf_append_printf(str, " %02hhx", *ptr))
3664 goto error;
3665 }
3666 }
3667
3668 if (!eina_strbuf_append(str, "])"))
3669 goto error;
3670
3671 other_mem = eina_strbuf_string_get(str);
3672 ret = eina_value_type_pset(convert, convert_mem, &other_mem);
3673
3674 error:
3675 eina_strbuf_free(str);
3676 return ret;
3677 }
3678 else
3679 {
3680 eina_error_set(EINA_ERROR_VALUE_FAILED);
3681 return EINA_FALSE;
3682 }
3683}
3684
3685static Eina_Bool
3686_eina_value_type_blob_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem)
3687{
3688 Eina_Value_Blob desc;
3689 char *buf;
3690
3691 desc.ops = EINA_VALUE_BLOB_OPERATIONS_MALLOC;
3692
3693 if ((convert == EINA_VALUE_TYPE_STRING) ||
3694 (convert == EINA_VALUE_TYPE_STRINGSHARE))
3695 {
3696 const char *str = *(const char **)convert_mem;
3697 if (!str)
3698 {
3699 desc.size = 0;
3700 desc.memory = NULL;
3701 }
3702 else
3703 {
3704 desc.size = strlen(str) + 1;
3705 desc.memory = buf = malloc(desc.size);
3706 if (!desc.memory)
3707 {
3708 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
3709 return EINA_FALSE;
3710 }
3711 memcpy(buf, str, desc.size);
3712 }
3713 }
3714 else if (convert == EINA_VALUE_TYPE_ARRAY)
3715 {
3716 const Eina_Value_Array *a = convert_mem;
3717 if ((!a->array) || (a->array->len == 0))
3718 {
3719 desc.size = 0;
3720 desc.memory = NULL;
3721 }
3722 else
3723 {
3724 desc.size = a->array->len * a->array->member_size;
3725 desc.memory = buf = malloc(desc.size);
3726 if (!desc.memory)
3727 {
3728 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
3729 return EINA_FALSE;
3730 }
3731 memcpy(buf, a->array->members, desc.size);
3732 }
3733 }
3734 else if (convert == EINA_VALUE_TYPE_BLOB)
3735 {
3736 const Eina_Value_Blob *b = convert_mem;
3737 if (b->size == 0)
3738 {
3739 desc.size = 0;
3740 desc.memory = NULL;
3741 }
3742 else
3743 {
3744 desc.size = b->size;
3745 desc.memory = buf = malloc(desc.size);
3746 if (!desc.memory)
3747 {
3748 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
3749 return EINA_FALSE;
3750 }
3751 memcpy(buf, b->memory, desc.size);
3752 }
3753 }
3754 else
3755 {
3756 desc.size = convert->value_size;
3757 desc.memory = buf = malloc(convert->value_size);
3758 if (!desc.memory)
3759 {
3760 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
3761 return EINA_FALSE;
3762 }
3763 if (!eina_value_type_pget(convert, convert_mem, buf))
3764 {
3765 free(buf);
3766 return EINA_FALSE;
3767 }
3768 }
3769 return eina_value_type_pset(type, type_mem, &desc);
3770}
3771
3772static Eina_Bool
3773_eina_value_type_blob_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
3774{
3775 const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(mem);
3776 Eina_Value_Blob *tmem = mem;
3777 const Eina_Value_Blob *desc = ptr;
3778
3779 if ((ops) && (ops->free))
3780 ops->free(ops, (void *)tmem->memory, tmem->size);
3781
3782 *tmem = *desc;
3783 return EINA_TRUE;
3784}
3785
3786static Eina_Bool
3787_eina_value_type_blob_vset(const Eina_Value_Type *type, void *mem, va_list args)
3788{
3789 const Eina_Value_Blob desc = va_arg(args, Eina_Value_Blob);
3790 _eina_value_type_blob_pset(type, mem, &desc);
3791 return EINA_TRUE;
3792}
3793
3794static Eina_Bool
3795_eina_value_type_blob_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
3796{
3797 memcpy(ptr, mem, sizeof(Eina_Value_Blob));
3798 return EINA_TRUE;
3799}
3800
3801static const Eina_Value_Type _EINA_VALUE_TYPE_BLOB = {
3802 EINA_VALUE_TYPE_VERSION,
3803 sizeof(Eina_Value_Blob),
3804 "Eina_Value_Blob",
3805 _eina_value_type_blob_setup,
3806 _eina_value_type_blob_flush,
3807 _eina_value_type_blob_copy,
3808 _eina_value_type_blob_compare,
3809 _eina_value_type_blob_convert_to,
3810 _eina_value_type_blob_convert_from,
3811 _eina_value_type_blob_vset,
3812 _eina_value_type_blob_pset,
3813 _eina_value_type_blob_pget
3814};
3815
3816static int
3817_eina_value_struct_operations_binsearch_cmp(const void *pa, const void *pb)
3818{
3819 const Eina_Value_Struct_Member *a = pa, *b = pb;
3820 return strcmp(a->name, b->name);
3821}
3822
3823static const Eina_Value_Struct_Member *
3824_eina_value_struct_operations_binsearch_find_member(const Eina_Value_Struct_Operations *ops __UNUSED__, const Eina_Value_Struct_Desc *desc, const char *name)
3825{
3826 unsigned int count = desc->member_count;
3827 Eina_Value_Struct_Member search;
3828 if (count == 0)
3829 {
3830 const Eina_Value_Struct_Member *itr = desc->members;
3831 for (; itr->name != NULL; itr++)
3832 count++;
3833 }
3834
3835 search.name = name;
3836 return bsearch(&search, desc->members, count,
3837 sizeof(Eina_Value_Struct_Member),
3838 _eina_value_struct_operations_binsearch_cmp);
3839}
3840
3841static Eina_Value_Struct_Operations _EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH = {
3842 EINA_VALUE_STRUCT_OPERATIONS_VERSION,
3843 NULL, /* default alloc */
3844 NULL, /* default free */
3845 NULL, /* default copy */
3846 NULL, /* default compare */
3847 _eina_value_struct_operations_binsearch_find_member
3848};
3849
3850static const Eina_Value_Struct_Member *
3851_eina_value_struct_operations_stringshare_find_member(const Eina_Value_Struct_Operations *ops __UNUSED__, const Eina_Value_Struct_Desc *desc, const char *name)
3852{
3853 const Eina_Value_Struct_Member *itr = desc->members;
3854
3855 /* assumes name is stringshared.
3856 *
3857 * we do this because it's the recommended usage pattern, moreover
3858 * we expect to find the member, as users shouldn't look for
3859 * non-existent members!
3860 */
3861 if (desc->member_count > 0)
3862 {
3863 const Eina_Value_Struct_Member *itr_end = itr + desc->member_count;
3864 for (; itr < itr_end; itr++)
3865 if (itr->name == name)
3866 return itr;
3867 }
3868 else
3869 {
3870 for (; itr->name != NULL; itr++)
3871 if (itr->name == name)
3872 return itr;
3873 }
3874
3875 name = eina_stringshare_add(name);
3876 eina_stringshare_del(name); /* we'll not use the contents, this is fine */
3877 /* stringshare and look again */
3878 if (desc->member_count > 0)
3879 {
3880 const Eina_Value_Struct_Member *itr_end = itr + desc->member_count;
3881 for (; itr < itr_end; itr++)
3882 if (itr->name == name)
3883 return itr;
3884 }
3885 else
3886 {
3887 for (; itr->name != NULL; itr++)
3888 if (itr->name == name)
3889 return itr;
3890 }
3891
3892 return NULL;
3893}
3894
3895static Eina_Value_Struct_Operations _EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE = {
3896 EINA_VALUE_STRUCT_OPERATIONS_VERSION,
3897 NULL, /* default alloc */
3898 NULL, /* default free */
3899 NULL, /* default copy */
3900 NULL, /* default compare */
3901 _eina_value_struct_operations_stringshare_find_member
3902};
3903
3904static inline const Eina_Value_Struct_Operations *
3905_eina_value_type_struct_ops_get(const Eina_Value_Struct *st)
3906{
3907 if (!st) return NULL;
3908 if (!st->desc) return NULL;
3909 if (!st->desc->ops) return NULL;
3910 EINA_SAFETY_ON_FALSE_RETURN_VAL
3911 (st->desc->ops->version == EINA_VALUE_STRUCT_OPERATIONS_VERSION, NULL);
3912 return st->desc->ops;
3913}
3914
3915EAPI const Eina_Value_Struct_Member *
3916eina_value_struct_member_find(const Eina_Value_Struct *st, const char *name)
3917{
3918 const Eina_Value_Struct_Operations *ops;
3919 const Eina_Value_Struct_Member *itr;
3920
3921 EINA_SAFETY_ON_NULL_RETURN_VAL(st, NULL);
3922 EINA_SAFETY_ON_NULL_RETURN_VAL(st->desc, NULL);
3923
3924 ops = _eina_value_type_struct_ops_get(st);
3925 if ((ops) && (ops->find_member))
3926 return ops->find_member(ops, st->desc, name);
3927
3928 itr = st->desc->members;
3929 if (st->desc->member_count)
3930 {
3931 const Eina_Value_Struct_Member *itr_end = itr + st->desc->member_count;
3932 for (; itr < itr_end; itr++)
3933 {
3934 if (strcmp(name, itr->name) == 0)
3935 return itr;
3936 }
3937 return NULL;
3938 }
3939 else
3940 {
3941 for (; itr->name != NULL; itr++)
3942 {
3943 if (strcmp(name, itr->name) == 0)
3944 return itr;
3945 }
3946 return NULL;
3947 }
3948}
3949
3950static Eina_Bool
3951_eina_value_type_struct_setup(const Eina_Value_Type *type __UNUSED__, void *mem)
3952{
3953 memset(mem, 0, sizeof(Eina_Value_Struct));
3954 return EINA_TRUE;
3955}
3956
3957static Eina_Bool
3958_eina_value_type_struct_flush_member(const Eina_Value_Struct_Member *member, Eina_Value_Struct *st)
3959{
3960 unsigned char *base = st->memory;
3961 return eina_value_type_flush(member->type, base + member->offset);
3962}
3963
3964static Eina_Bool
3965_eina_value_type_struct_flush(const Eina_Value_Type *type __UNUSED__, void *mem)
3966{
3967 const Eina_Value_Struct_Operations *ops;
3968 const Eina_Value_Struct_Member *itr;
3969 Eina_Value_Struct *tmem = mem;
3970 Eina_Bool ret = EINA_TRUE;
3971
3972 itr = tmem->desc->members;
3973 if (tmem->desc->member_count > 0)
3974 {
3975 const Eina_Value_Struct_Member *itr_end;
3976 itr_end = itr + tmem->desc->member_count;
3977 for (; itr < itr_end; itr++)
3978 ret &= _eina_value_type_struct_flush_member(itr, tmem);
3979 }
3980 else
3981 {
3982 for (; itr->name != NULL; itr++)
3983 ret &= _eina_value_type_struct_flush_member(itr, tmem);
3984 }
3985
3986 ops = _eina_value_type_struct_ops_get(mem);
3987 if ((ops) && (ops->free))
3988 ops->free(ops, tmem->desc, tmem->memory);
3989 else
3990 free(tmem->memory);
3991
3992 return ret;
3993}
3994
3995static Eina_Bool
3996_eina_value_type_struct_copy_member(const Eina_Value_Struct_Member *member, const Eina_Value_Struct *s, Eina_Value_Struct *d)
3997{
3998 const unsigned char *base_s = s->memory;
3999 unsigned char *base_d = d->memory;
4000 return eina_value_type_copy(member->type,
4001 base_s + member->offset,
4002 base_d + member->offset);
4003}
4004
4005static Eina_Bool
4006_eina_value_type_struct_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst)
4007{
4008 const Eina_Value_Struct_Operations *ops;
4009 const Eina_Value_Struct_Member *itr;
4010 const Eina_Value_Struct *s = src;
4011 Eina_Value_Struct *d = dst;
4012
4013 *d = *s;
4014
4015 ops = _eina_value_type_struct_ops_get(src);
4016 if ((ops) && (ops->copy))
4017 {
4018 d->memory = ops->copy(ops, s->desc, s->memory);
4019 if (d->memory == NULL)
4020 return EINA_FALSE;
4021 return EINA_TRUE;
4022 }
4023
4024 d->memory = malloc(s->desc->size);
4025 if (!d->memory)
4026 {
4027 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
4028 return EINA_FALSE;
4029 }
4030
4031 itr = s->desc->members;
4032 if (s->desc->member_count > 0)
4033 {
4034 const Eina_Value_Struct_Member *itr_end = itr + s->desc->member_count;
4035 for (; itr < itr_end; itr++)
4036 if (!_eina_value_type_struct_copy_member(itr, s, d))
4037 goto error;
4038 }
4039 else
4040 {
4041 for (; itr->name != NULL; itr++)
4042 if (!_eina_value_type_struct_copy_member(itr, s, d))
4043 goto error;
4044 }
4045
4046
4047 return EINA_TRUE;
4048
4049 error:
4050 itr--;
4051 for (; itr >= s->desc->members; itr--)
4052 _eina_value_type_struct_flush_member(itr, d);
4053 free(d->memory);
4054 return EINA_FALSE;
4055}
4056
4057static inline int
4058_eina_value_type_struct_compare_member(const Eina_Value_Struct_Member *member, const Eina_Value_Struct *ta, const Eina_Value_Struct *tb)
4059{
4060 const unsigned char *base_a = ta->memory;
4061 const unsigned char *base_b = tb->memory;
4062 return eina_value_type_compare(member->type,
4063 base_a + member->offset,
4064 base_b + member->offset);
4065}
4066
4067static int
4068_eina_value_type_struct_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
4069{
4070 const Eina_Value_Struct_Operations *ops = _eina_value_type_struct_ops_get(a);
4071 const Eina_Value_Struct *ta = a, *tb = b;
4072 const Eina_Value_Struct_Member *itr;
4073 int cmp = 0;
4074
4075 if (ta->desc != tb->desc)
4076 {
4077 eina_error_set(EINA_ERROR_VALUE_FAILED);
4078 return -1;
4079 }
4080 if (ta->desc->ops != tb->desc->ops)
4081 {
4082 eina_error_set(EINA_ERROR_VALUE_FAILED);
4083 return -1;
4084 }
4085 if ((!ta->memory) && (!tb->memory))
4086 return 0;
4087 else if (!ta->memory)
4088 return -1;
4089 else if (!tb->memory)
4090 return 1;
4091
4092 if ((ops) && (ops->compare))
4093 return ops->compare(ops, ta->desc, ta->memory, tb->memory);
4094
4095 itr = ta->desc->members;
4096 if (ta->desc->member_count > 0)
4097 {
4098 const Eina_Value_Struct_Member *itr_end = itr + ta->desc->member_count;
4099 for (; (cmp == 0) && (itr < itr_end); itr++)
4100 cmp = _eina_value_type_struct_compare_member(itr, ta, tb);
4101 }
4102 else
4103 {
4104 for (; (cmp == 0) && (itr->name != NULL); itr++)
4105 cmp = _eina_value_type_struct_compare_member(itr, ta, tb);
4106 }
4107 return cmp;
4108}
4109
4110static void
4111_eina_value_type_struct_convert_to_string_member(const Eina_Value_Struct *st, const Eina_Value_Struct_Member *member, Eina_Strbuf *str)
4112{
4113 const unsigned char *p = st->memory;
4114 Eina_Bool first = st->desc->members == member;
4115 Eina_Bool r = EINA_FALSE;
4116
4117 if (first) eina_strbuf_append_printf(str, "%s: ", member->name);
4118 else eina_strbuf_append_printf(str, ", %s: ", member->name);
4119
4120 if ((member->type) && (member->type->convert_to))
4121 {
4122 const Eina_Value_Type *type = member->type;
4123 char *conv = NULL;
4124
4125 r = eina_value_type_convert_to(type, EINA_VALUE_TYPE_STRING,
4126 p + member->offset, &conv);
4127 if (r)
4128 {
4129 eina_strbuf_append(str, conv);
4130 free(conv);
4131 }
4132 }
4133
4134 if (!r)
4135 eina_strbuf_append_char(str, '?');
4136}
4137
4138static Eina_Bool
4139_eina_value_type_struct_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
4140{
4141 const Eina_Value_Struct *tmem = type_mem;
4142
4143 eina_error_set(0);
4144 if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
4145 convert == EINA_VALUE_TYPE_STRING)
4146 {
4147 Eina_Strbuf *str = eina_strbuf_new();
4148 const char *s;
4149 Eina_Bool ret;
4150
4151 if (!tmem->memory) eina_strbuf_append(str, "{}");
4152 else
4153 {
4154 const Eina_Value_Struct_Member *itr = tmem->desc->members;
4155
4156 eina_strbuf_append_char(str, '{');
4157
4158 if (tmem->desc->member_count > 0)
4159 {
4160 const Eina_Value_Struct_Member *itr_end;
4161
4162 itr_end = itr + tmem->desc->member_count;
4163 for (; itr < itr_end; itr++)
4164 _eina_value_type_struct_convert_to_string_member
4165 (tmem, itr, str);
4166 }
4167 else
4168 {
4169 for (; itr->name != NULL; itr++)
4170 _eina_value_type_struct_convert_to_string_member
4171 (tmem, itr, str);
4172 }
4173
4174 eina_strbuf_append_char(str, '}');
4175 }
4176 s = eina_strbuf_string_get(str);
4177 ret = eina_value_type_pset(convert, convert_mem, &s);
4178 eina_strbuf_free(str);
4179 return ret;
4180 }
4181 else
4182 {
4183 eina_error_set(EINA_ERROR_VALUE_FAILED);
4184 return EINA_FALSE;
4185 }
4186}
4187
4188static Eina_Bool
4189_eina_value_type_struct_desc_check(const Eina_Value_Struct_Desc *desc)
4190{
4191 unsigned int minsize = 0;
4192 const Eina_Value_Struct_Member *itr;
4193
4194 EINA_SAFETY_ON_NULL_RETURN_VAL(desc, EINA_FALSE);
4195 EINA_SAFETY_ON_FALSE_RETURN_VAL
4196 (desc->version == EINA_VALUE_STRUCT_DESC_VERSION, EINA_FALSE);
4197
4198 itr = desc->members;
4199 if (desc->member_count > 0)
4200 {
4201 const Eina_Value_Struct_Member *itr_end = itr + desc->member_count;
4202 for (; itr < itr_end; itr++)
4203 {
4204 unsigned int member_end;
4205
4206 EINA_SAFETY_ON_FALSE_RETURN_VAL
4207 (eina_value_type_check(itr->type), EINA_FALSE);
4208 EINA_SAFETY_ON_FALSE_RETURN_VAL
4209 (itr->type->value_size > 0, EINA_FALSE);
4210
4211 member_end = itr->offset + itr->type->value_size;
4212 if (minsize < member_end)
4213 minsize = member_end;
4214 }
4215 }
4216 else
4217 {
4218 for (; itr->name != NULL; itr++)
4219 {
4220 unsigned int member_end;
4221
4222 EINA_SAFETY_ON_FALSE_RETURN_VAL
4223 (eina_value_type_check(itr->type), EINA_FALSE);
4224 EINA_SAFETY_ON_FALSE_RETURN_VAL
4225 (itr->type->value_size > 0, EINA_FALSE);
4226
4227 member_end = itr->offset + itr->type->value_size;
4228 if (minsize < member_end)
4229 minsize = member_end;
4230 }
4231 }
4232
4233 EINA_SAFETY_ON_FALSE_RETURN_VAL(minsize > 0, EINA_FALSE);
4234 EINA_SAFETY_ON_FALSE_RETURN_VAL(desc->size >= minsize, EINA_FALSE);
4235 return EINA_TRUE;
4236}
4237
4238static Eina_Bool
4239_eina_value_type_struct_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr)
4240{
4241 const Eina_Value_Struct_Operations *ops = _eina_value_type_struct_ops_get(mem);
4242 Eina_Value_Struct *tmem = mem;
4243 const Eina_Value_Struct *desc = ptr;
4244
4245 if (!_eina_value_type_struct_desc_check(desc->desc))
4246 {
4247 eina_error_set(EINA_ERROR_VALUE_FAILED);
4248 return EINA_FALSE;
4249 }
4250
4251 if ((ops) && (ops->free))
4252 ops->free(ops, tmem->desc, tmem->memory);
4253 else
4254 free(tmem->memory);
4255
4256 *tmem = *desc;
4257
4258 ops = _eina_value_type_struct_ops_get(desc);
4259 if (!tmem->memory)
4260 {
4261 if ((ops) && (ops->alloc))
4262 tmem->memory = ops->alloc(ops, tmem->desc);
4263 else
4264 tmem->memory = malloc(tmem->desc->size);
4265
4266 if (!tmem->memory)
4267 {
4268 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
4269 return EINA_FALSE;
4270 }
4271 }
4272
4273 eina_error_set(0);
4274 return EINA_TRUE;
4275}
4276
4277static Eina_Bool
4278_eina_value_type_struct_vset(const Eina_Value_Type *type, void *mem, va_list args)
4279{
4280 const Eina_Value_Struct desc = va_arg(args, Eina_Value_Struct);
4281 _eina_value_type_struct_pset(type, mem, &desc);
4282 return EINA_TRUE;
4283}
4284
4285static Eina_Bool
4286_eina_value_type_struct_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr)
4287{
4288 memcpy(ptr, mem, sizeof(Eina_Value_Struct));
4289 return EINA_TRUE;
4290}
4291
4292static const Eina_Value_Type _EINA_VALUE_TYPE_STRUCT = {
4293 EINA_VALUE_TYPE_VERSION,
4294 sizeof(Eina_Value_Struct),
4295 "Eina_Value_Struct",
4296 _eina_value_type_struct_setup,
4297 _eina_value_type_struct_flush,
4298 _eina_value_type_struct_copy,
4299 _eina_value_type_struct_compare,
4300 _eina_value_type_struct_convert_to,
4301 NULL, /* no convert from */
4302 _eina_value_type_struct_vset,
4303 _eina_value_type_struct_pset,
4304 _eina_value_type_struct_pget
4305};
4306
4307/* keep all basic types inlined in an array so we can compare if it's
4308 * a basic type using pointer arithmetic.
4309 *
4310 * NOTE-1: JUST BASIC TYPES, DO NOT ADD MORE TYPES HERE!!!
4311 * NOTE-2: KEEP ORDER, see eina_value_init()
4312 */
4313static const Eina_Value_Type _EINA_VALUE_TYPE_BASICS[] = {
4314 {
4315 EINA_VALUE_TYPE_VERSION,
4316 sizeof(unsigned char),
4317 "unsigned char",
4318 _eina_value_type_uchar_setup,
4319 _eina_value_type_uchar_flush,
4320 _eina_value_type_uchar_copy,
4321 _eina_value_type_uchar_compare,
4322 _eina_value_type_uchar_convert_to,
4323 NULL, /* no convert from */
4324 _eina_value_type_uchar_vset,
4325 _eina_value_type_uchar_pset,
4326 _eina_value_type_uchar_pget
4327 },
4328 {
4329 EINA_VALUE_TYPE_VERSION,
4330 sizeof(unsigned short),
4331 "unsigned short",
4332 _eina_value_type_ushort_setup,
4333 _eina_value_type_ushort_flush,
4334 _eina_value_type_ushort_copy,
4335 _eina_value_type_ushort_compare,
4336 _eina_value_type_ushort_convert_to,
4337 NULL, /* no convert from */
4338 _eina_value_type_ushort_vset,
4339 _eina_value_type_ushort_pset,
4340 _eina_value_type_ushort_pget
4341 },
4342 {
4343 EINA_VALUE_TYPE_VERSION,
4344 sizeof(unsigned int),
4345 "unsigned int",
4346 _eina_value_type_uint_setup,
4347 _eina_value_type_uint_flush,
4348 _eina_value_type_uint_copy,
4349 _eina_value_type_uint_compare,
4350 _eina_value_type_uint_convert_to,
4351 NULL, /* no convert from */
4352 _eina_value_type_uint_vset,
4353 _eina_value_type_uint_pset,
4354 _eina_value_type_uint_pget
4355 },
4356 {
4357 EINA_VALUE_TYPE_VERSION,
4358 sizeof(unsigned long),
4359 "unsigned long",
4360 _eina_value_type_ulong_setup,
4361 _eina_value_type_ulong_flush,
4362 _eina_value_type_ulong_copy,
4363 _eina_value_type_ulong_compare,
4364 _eina_value_type_ulong_convert_to,
4365 NULL, /* no convert from */
4366 _eina_value_type_ulong_vset,
4367 _eina_value_type_ulong_pset,
4368 _eina_value_type_ulong_pget
4369 },
4370 {
4371 EINA_VALUE_TYPE_VERSION,
4372 sizeof(uint64_t),
4373 "uint64_t",
4374 _eina_value_type_uint64_setup,
4375 _eina_value_type_uint64_flush,
4376 _eina_value_type_uint64_copy,
4377 _eina_value_type_uint64_compare,
4378 _eina_value_type_uint64_convert_to,
4379 NULL, /* no convert from */
4380 _eina_value_type_uint64_vset,
4381 _eina_value_type_uint64_pset,
4382 _eina_value_type_uint64_pget
4383 },
4384 {
4385 EINA_VALUE_TYPE_VERSION,
4386 sizeof(char),
4387 "char",
4388 _eina_value_type_char_setup,
4389 _eina_value_type_char_flush,
4390 _eina_value_type_char_copy,
4391 _eina_value_type_char_compare,
4392 _eina_value_type_char_convert_to,
4393 NULL, /* no convert from */
4394 _eina_value_type_char_vset,
4395 _eina_value_type_char_pset,
4396 _eina_value_type_char_pget
4397 },
4398 {
4399 EINA_VALUE_TYPE_VERSION,
4400 sizeof(short),
4401 "short",
4402 _eina_value_type_short_setup,
4403 _eina_value_type_short_flush,
4404 _eina_value_type_short_copy,
4405 _eina_value_type_short_compare,
4406 _eina_value_type_short_convert_to,
4407 NULL, /* no convert from */
4408 _eina_value_type_short_vset,
4409 _eina_value_type_short_pset,
4410 _eina_value_type_short_pget
4411 },
4412 {
4413 EINA_VALUE_TYPE_VERSION,
4414 sizeof(int),
4415 "int",
4416 _eina_value_type_int_setup,
4417 _eina_value_type_int_flush,
4418 _eina_value_type_int_copy,
4419 _eina_value_type_int_compare,
4420 _eina_value_type_int_convert_to,
4421 NULL, /* no convert from */
4422 _eina_value_type_int_vset,
4423 _eina_value_type_int_pset,
4424 _eina_value_type_int_pget
4425 },
4426 {
4427 EINA_VALUE_TYPE_VERSION,
4428 sizeof(long),
4429 "long",
4430 _eina_value_type_long_setup,
4431 _eina_value_type_long_flush,
4432 _eina_value_type_long_copy,
4433 _eina_value_type_long_compare,
4434 _eina_value_type_long_convert_to,
4435 NULL, /* no convert from */
4436 _eina_value_type_long_vset,
4437 _eina_value_type_long_pset,
4438 _eina_value_type_long_pget
4439 },
4440 {
4441 EINA_VALUE_TYPE_VERSION,
4442 sizeof(int64_t),
4443 "int64_t",
4444 _eina_value_type_int64_setup,
4445 _eina_value_type_int64_flush,
4446 _eina_value_type_int64_copy,
4447 _eina_value_type_int64_compare,
4448 _eina_value_type_int64_convert_to,
4449 NULL, /* no convert from */
4450 _eina_value_type_int64_vset,
4451 _eina_value_type_int64_pset,
4452 _eina_value_type_int64_pget
4453 },
4454 {
4455 EINA_VALUE_TYPE_VERSION,
4456 sizeof(float),
4457 "float",
4458 _eina_value_type_float_setup,
4459 _eina_value_type_float_flush,
4460 _eina_value_type_float_copy,
4461 _eina_value_type_float_compare,
4462 _eina_value_type_float_convert_to,
4463 NULL, /* no convert from */
4464 _eina_value_type_float_vset,
4465 _eina_value_type_float_pset,
4466 _eina_value_type_float_pget
4467 },
4468 {
4469 EINA_VALUE_TYPE_VERSION,
4470 sizeof(double),
4471 "double",
4472 _eina_value_type_double_setup,
4473 _eina_value_type_double_flush,
4474 _eina_value_type_double_copy,
4475 _eina_value_type_double_compare,
4476 _eina_value_type_double_convert_to,
4477 NULL, /* no convert from */
4478 _eina_value_type_double_vset,
4479 _eina_value_type_double_pset,
4480 _eina_value_type_double_pget
4481 },
4482 {
4483 EINA_VALUE_TYPE_VERSION,
4484 sizeof(const char *),
4485 "stringshare",
4486 _eina_value_type_string_common_setup,
4487 _eina_value_type_stringshare_flush,
4488 _eina_value_type_stringshare_copy,
4489 _eina_value_type_string_common_compare,
4490 _eina_value_type_string_common_convert_to,
4491 NULL, /* no convert from */
4492 _eina_value_type_stringshare_vset,
4493 _eina_value_type_stringshare_pset,
4494 _eina_value_type_string_common_pget
4495 },
4496 {
4497 EINA_VALUE_TYPE_VERSION,
4498 sizeof(char *),
4499 "string",
4500 _eina_value_type_string_common_setup,
4501 _eina_value_type_string_flush,
4502 _eina_value_type_string_copy,
4503 _eina_value_type_string_common_compare,
4504 _eina_value_type_string_common_convert_to,
4505 NULL, /* no convert from */
4506 _eina_value_type_string_vset,
4507 _eina_value_type_string_pset,
4508 _eina_value_type_string_common_pget
4509 }
4510};
4511
4512static void
4513_eina_value_blob_operations_malloc_free(const Eina_Value_Blob_Operations *ops __UNUSED__, void *memory, size_t size __UNUSED__)
4514{
4515 free(memory);
4516}
4517
4518static void *
4519_eina_value_blob_operations_malloc_copy(const Eina_Value_Blob_Operations *ops __UNUSED__, const void *memory, size_t size)
4520{
4521 void *ret = malloc(size);
4522 if (!ret)
4523 {
4524 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
4525 return NULL;
4526 }
4527 memcpy(ret, memory, size);
4528 return ret;
4529}
4530
4531static const Eina_Value_Blob_Operations _EINA_VALUE_BLOB_OPERATIONS_MALLOC = {
4532 EINA_VALUE_BLOB_OPERATIONS_VERSION,
4533 _eina_value_blob_operations_malloc_free,
4534 _eina_value_blob_operations_malloc_copy,
4535 NULL,
4536 NULL
4537};
4538
4539typedef struct _Eina_Value_Inner_Mp Eina_Value_Inner_Mp;
4540struct _Eina_Value_Inner_Mp
4541{
4542 Eina_Mempool *mempool;
4543 int references;
4544};
4545
4546/**
4547 * @endcond
4548 */
4549
4550static const char EINA_ERROR_VALUE_FAILED_STR[] = "Value check failed.";
4551
4552/**
4553 */
4554
4555static inline void
4556_eina_value_inner_mp_dispose(int size, Eina_Value_Inner_Mp *imp)
4557{
4558 EINA_SAFETY_ON_FALSE_RETURN(imp->references == 0);
4559
4560 eina_hash_del_by_key(_eina_value_inner_mps, &size);
4561 eina_mempool_del(imp->mempool);
4562 free(imp);
4563}
4564
4565static inline Eina_Value_Inner_Mp *
4566_eina_value_inner_mp_get(int size)
4567{
4568 Eina_Value_Inner_Mp *imp = eina_hash_find(_eina_value_inner_mps, &size);
4569 if (imp) return imp;
4570
4571 imp = malloc(sizeof(Eina_Value_Inner_Mp));
4572 if (!imp)
4573 return NULL;
4574
4575 imp->references = 0;
4576
4577 imp->mempool = eina_mempool_add(_eina_value_mp_choice,
4578 "Eina_Value_Inner_Mp", NULL, size, 128);
4579 if (!imp->mempool)
4580 {
4581 free(imp);
4582 return NULL;
4583 }
4584
4585 if (!eina_hash_add(_eina_value_inner_mps, &size, imp))
4586 {
4587 eina_mempool_del(imp->mempool);
4588 free(imp);
4589 return NULL;
4590 }
4591
4592 return imp;
4593}
4594
4595static inline void *
4596_eina_value_inner_alloc_internal(int size)
4597{
4598 Eina_Value_Inner_Mp *imp;
4599 void *mem;
4600
4601 imp = _eina_value_inner_mp_get(size);
4602 if (!imp) return NULL;
4603
4604 mem = eina_mempool_malloc(imp->mempool, size);
4605 if (mem) imp->references++;
4606 else if (imp->references == 0) _eina_value_inner_mp_dispose(size, imp);
4607
4608 return mem;
4609}
4610
4611static inline void
4612_eina_value_inner_free_internal(int size, void *mem)
4613{
4614 Eina_Value_Inner_Mp *imp = eina_hash_find(_eina_value_inner_mps, &size);
4615 EINA_SAFETY_ON_NULL_RETURN(imp);
4616
4617 eina_mempool_free(imp->mempool, mem);
4618
4619 imp->references--;
4620 if (imp->references > 0) return;
4621 _eina_value_inner_mp_dispose(size, imp);
4622}
4623
4624EAPI void *
4625eina_value_inner_alloc(size_t size)
4626{
4627 void *mem;
4628
4629 if (size > 256) return malloc(size);
4630
4631 eina_lock_take(&_eina_value_inner_mps_lock);
4632 mem = _eina_value_inner_alloc_internal(size);
4633 eina_lock_release(&_eina_value_inner_mps_lock);
4634
4635 return mem;
4636}
4637
4638EAPI void
4639eina_value_inner_free(size_t size, void *mem)
4640{
4641 if (size > 256)
4642 {
4643 free(mem);
4644 return;
4645 }
4646
4647 eina_lock_take(&_eina_value_inner_mps_lock);
4648 _eina_value_inner_free_internal(size, mem);
4649 eina_lock_release(&_eina_value_inner_mps_lock);
4650}
4651
4652/**
4653 * @internal
4654 * @brief Initialize the value module.
4655 *
4656 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
4657 *
4658 * This function sets up the value module of Eina. It is called
4659 * by eina_init().
4660 *
4661 * @see eina_init()
4662 */
4663Eina_Bool
4664eina_value_init(void)
4665{
4666 const char *choice, *tmp;
4667
4668 _eina_value_log_dom = eina_log_domain_register("eina_value",
4669 EINA_LOG_COLOR_DEFAULT);
4670 if (_eina_value_log_dom < 0)
4671 {
4672 EINA_LOG_ERR("Could not register log domain: eina_value");
4673 return EINA_FALSE;
4674 }
4675
4676#ifdef EINA_DEFAULT_MEMPOOL
4677 choice = "pass_through";
4678#else
4679 choice = "chained_mempool";
4680#endif
4681 tmp = getenv("EINA_MEMPOOL");
4682 if (tmp && tmp[0])
4683 choice = tmp;
4684
4685 if (choice)
4686 _eina_value_mp_choice = strdup(choice);
4687
4688 _eina_value_mp = eina_mempool_add
4689 (_eina_value_mp_choice, "value", NULL, sizeof(Eina_Value), 320);
4690 if (!_eina_value_mp)
4691 {
4692 ERR("Mempool for value cannot be allocated in value init.");
4693 goto on_init_fail_mp;
4694 }
4695
4696 if (!eina_lock_new(&_eina_value_inner_mps_lock))
4697 {
4698 ERR("Cannot create lock in value init.");
4699 goto on_init_fail_lock;
4700 }
4701 _eina_value_inner_mps = eina_hash_int32_new(NULL);
4702 if (!_eina_value_inner_mps)
4703 {
4704 ERR("Cannot create hash for inner mempools in value init.");
4705 goto on_init_fail_hash;
4706 }
4707
4708 EINA_ERROR_VALUE_FAILED = eina_error_msg_static_register(
4709 EINA_ERROR_VALUE_FAILED_STR);
4710
4711 EINA_VALUE_TYPE_UCHAR = _EINA_VALUE_TYPE_BASICS + 0;
4712 EINA_VALUE_TYPE_USHORT = _EINA_VALUE_TYPE_BASICS + 1;
4713 EINA_VALUE_TYPE_UINT = _EINA_VALUE_TYPE_BASICS + 2;
4714 EINA_VALUE_TYPE_ULONG = _EINA_VALUE_TYPE_BASICS + 3;
4715 EINA_VALUE_TYPE_UINT64 = _EINA_VALUE_TYPE_BASICS + 4;
4716 EINA_VALUE_TYPE_CHAR = _EINA_VALUE_TYPE_BASICS + 5;
4717 EINA_VALUE_TYPE_SHORT = _EINA_VALUE_TYPE_BASICS + 6;
4718 EINA_VALUE_TYPE_INT = _EINA_VALUE_TYPE_BASICS + 7;
4719 EINA_VALUE_TYPE_LONG = _EINA_VALUE_TYPE_BASICS + 8;
4720 EINA_VALUE_TYPE_INT64 = _EINA_VALUE_TYPE_BASICS + 9;
4721 EINA_VALUE_TYPE_FLOAT = _EINA_VALUE_TYPE_BASICS + 10;
4722 EINA_VALUE_TYPE_DOUBLE = _EINA_VALUE_TYPE_BASICS + 11;
4723 EINA_VALUE_TYPE_STRINGSHARE = _EINA_VALUE_TYPE_BASICS + 12;
4724 EINA_VALUE_TYPE_STRING = _EINA_VALUE_TYPE_BASICS + 13;
4725
4726 _EINA_VALUE_TYPE_BASICS_START = _EINA_VALUE_TYPE_BASICS + 0;
4727 _EINA_VALUE_TYPE_BASICS_END = _EINA_VALUE_TYPE_BASICS + 13;
4728
4729 EINA_SAFETY_ON_FALSE_RETURN_VAL((sizeof(_EINA_VALUE_TYPE_BASICS)/sizeof(_EINA_VALUE_TYPE_BASICS[0])) == 14, EINA_FALSE);
4730
4731
4732 EINA_VALUE_TYPE_ARRAY = &_EINA_VALUE_TYPE_ARRAY;
4733 EINA_VALUE_TYPE_LIST = &_EINA_VALUE_TYPE_LIST;
4734 EINA_VALUE_TYPE_HASH = &_EINA_VALUE_TYPE_HASH;
4735 EINA_VALUE_TYPE_TIMEVAL = &_EINA_VALUE_TYPE_TIMEVAL;
4736 EINA_VALUE_TYPE_BLOB = &_EINA_VALUE_TYPE_BLOB;
4737 EINA_VALUE_TYPE_STRUCT = &_EINA_VALUE_TYPE_STRUCT;
4738
4739 EINA_VALUE_BLOB_OPERATIONS_MALLOC = &_EINA_VALUE_BLOB_OPERATIONS_MALLOC;
4740
4741 EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH = &_EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH;
4742 EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE = &_EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE;
4743
4744 return EINA_TRUE;
4745
4746 on_init_fail_hash:
4747 eina_lock_free(&_eina_value_inner_mps_lock);
4748 on_init_fail_lock:
4749 eina_mempool_del(_eina_value_mp);
4750 on_init_fail_mp:
4751 free(_eina_value_mp_choice);
4752 _eina_value_mp_choice = NULL;
4753 eina_log_domain_unregister(_eina_value_log_dom);
4754 _eina_value_log_dom = -1;
4755 return EINA_FALSE;
4756}
4757
4758/**
4759 * @internal
4760 * @brief Shut down the value module.
4761 *
4762 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
4763 *
4764 * This function shuts down the value module set up by
4765 * eina_value_init(). It is called by eina_shutdown().
4766 *
4767 * @see eina_shutdown()
4768 */
4769Eina_Bool
4770eina_value_shutdown(void)
4771{
4772 eina_lock_take(&_eina_value_inner_mps_lock);
4773 if (eina_hash_population(_eina_value_inner_mps) != 0)
4774 ERR("Cannot free eina_value internal memory pools -- still in use!");
4775 else
4776 eina_hash_free(_eina_value_inner_mps);
4777 eina_lock_release(&_eina_value_inner_mps_lock);
4778 eina_lock_free(&_eina_value_inner_mps_lock);
4779
4780 free(_eina_value_mp_choice);
4781 _eina_value_mp_choice = NULL;
4782 eina_mempool_del(_eina_value_mp);
4783 eina_log_domain_unregister(_eina_value_log_dom);
4784 _eina_value_log_dom = -1;
4785 return EINA_TRUE;
4786}
33 4787
34/*============================================================================* 4788/*============================================================================*
35* Global * 4789* Global *
@@ -39,9 +4793,232 @@
39* API * 4793* API *
40*============================================================================*/ 4794*============================================================================*/
41 4795
4796EAPI const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_START = NULL;
4797EAPI const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_END = NULL;
4798
4799EAPI const Eina_Value_Type *EINA_VALUE_TYPE_UCHAR = NULL;
4800EAPI const Eina_Value_Type *EINA_VALUE_TYPE_USHORT = NULL;
4801EAPI const Eina_Value_Type *EINA_VALUE_TYPE_UINT = NULL;
4802EAPI const Eina_Value_Type *EINA_VALUE_TYPE_ULONG = NULL;
4803EAPI const Eina_Value_Type *EINA_VALUE_TYPE_UINT64 = NULL;
4804EAPI const Eina_Value_Type *EINA_VALUE_TYPE_CHAR = NULL;
4805EAPI const Eina_Value_Type *EINA_VALUE_TYPE_SHORT = NULL;
4806EAPI const Eina_Value_Type *EINA_VALUE_TYPE_INT = NULL;
4807EAPI const Eina_Value_Type *EINA_VALUE_TYPE_LONG = NULL;
4808EAPI const Eina_Value_Type *EINA_VALUE_TYPE_INT64 = NULL;
4809EAPI const Eina_Value_Type *EINA_VALUE_TYPE_FLOAT = NULL;
4810EAPI const Eina_Value_Type *EINA_VALUE_TYPE_DOUBLE = NULL;
4811EAPI const Eina_Value_Type *EINA_VALUE_TYPE_STRINGSHARE = NULL;
4812EAPI const Eina_Value_Type *EINA_VALUE_TYPE_STRING = NULL;
4813EAPI const Eina_Value_Type *EINA_VALUE_TYPE_ARRAY = NULL;
4814EAPI const Eina_Value_Type *EINA_VALUE_TYPE_LIST = NULL;
4815EAPI const Eina_Value_Type *EINA_VALUE_TYPE_HASH = NULL;
4816EAPI const Eina_Value_Type *EINA_VALUE_TYPE_TIMEVAL = NULL;
4817EAPI const Eina_Value_Type *EINA_VALUE_TYPE_BLOB = NULL;
4818EAPI const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT = NULL;
4819
4820EAPI const Eina_Value_Blob_Operations *EINA_VALUE_BLOB_OPERATIONS_MALLOC = NULL;
4821
4822EAPI const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH = NULL;
4823EAPI const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE = NULL;
4824
4825EAPI Eina_Error EINA_ERROR_VALUE_FAILED = 0;
4826
42EAPI const unsigned int eina_prime_table[] = 4827EAPI const unsigned int eina_prime_table[] =
43{ 4828{
44 17, 31, 61, 127, 257, 509, 1021, 4829 17, 31, 61, 127, 257, 509, 1021,
45 2053, 4093, 8191, 16381, 32771, 65537, 131071, 262147, 524287, 1048573, 4830 2053, 4093, 8191, 16381, 32771, 65537, 131071, 262147, 524287, 1048573,
46 2097143, 4194301, 8388617, 16777213 4831 2097143, 4194301, 8388617, 16777213
47}; 4832};
4833
4834EAPI Eina_Value *
4835eina_value_new(const Eina_Value_Type *type)
4836{
4837 Eina_Value *value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));;
4838 if (!value)
4839 {
4840 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
4841 return NULL;
4842 }
4843 if (!eina_value_setup(value, type))
4844 {
4845 free(value);
4846 return NULL;
4847 }
4848 return value;
4849}
4850
4851EAPI void
4852eina_value_free(Eina_Value *value)
4853{
4854 EINA_SAFETY_ON_NULL_RETURN(value);
4855 eina_value_flush(value);
4856 eina_mempool_free(_eina_value_mp, value);
4857}
4858
4859
4860EAPI Eina_Bool
4861eina_value_copy(const Eina_Value *value, Eina_Value *copy)
4862{
4863 const Eina_Value_Type *type;
4864 const void *src;
4865 void *dst;
4866 Eina_Bool ret;
4867
4868 EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
4869 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type),
4870 EINA_FALSE);
4871 EINA_SAFETY_ON_NULL_RETURN_VAL(copy, EINA_FALSE);
4872 EINA_SAFETY_ON_NULL_RETURN_VAL(value->type->copy, EINA_FALSE);
4873
4874 type = value->type;
4875 if (!eina_value_setup(copy, type))
4876 return EINA_FALSE;
4877
4878 src = eina_value_memory_get(value);
4879 dst = eina_value_memory_get(copy);
4880 ret = type->copy(type, src, dst);
4881 if (!ret)
4882 eina_value_flush(copy);
4883
4884 return ret;
4885}
4886
4887EAPI Eina_Bool
4888eina_value_convert(const Eina_Value *value, Eina_Value *convert)
4889{
4890 Eina_Bool ret = EINA_FALSE;
4891 const Eina_Value_Type *type, *convert_type;
4892 const void *type_mem;
4893 void *convert_mem;
4894
4895 EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
4896 EINA_SAFETY_ON_NULL_RETURN_VAL(convert, EINA_FALSE);
4897 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type),
4898 EINA_FALSE);
4899 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(convert->type),
4900 EINA_FALSE);
4901
4902 type = value->type;
4903 convert_type = convert->type;
4904
4905 type_mem = eina_value_memory_get(value);
4906 convert_mem = eina_value_memory_get(convert);
4907
4908 if (type->convert_to)
4909 ret = type->convert_to(type, convert_type, type_mem, convert_mem);
4910
4911 if ((!ret) && (convert_type->convert_from))
4912 ret = convert_type->convert_from(convert_type, type, convert_mem,
4913 type_mem);
4914
4915 return ret;
4916}
4917
4918EAPI char *
4919eina_value_to_string(const Eina_Value *value)
4920{
4921 Eina_Value tmp;
4922
4923 EINA_SAFETY_ON_NULL_RETURN_VAL(value, NULL);
4924 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type), NULL);
4925
4926 if (!eina_value_setup(&tmp, EINA_VALUE_TYPE_STRING))
4927 return NULL;
4928 if (!eina_value_convert(value, &tmp))
4929 return NULL;
4930
4931 return tmp.value.ptr; /* steal value */
4932}
4933
4934EAPI Eina_Value *
4935eina_value_array_new(const Eina_Value_Type *subtype, unsigned int step)
4936{
4937 Eina_Value *value;
4938
4939 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(subtype), EINA_FALSE);
4940
4941 value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));;
4942 if (!value)
4943 return NULL;
4944
4945 if (!eina_value_array_setup(value, subtype, step))
4946 {
4947 eina_mempool_free(_eina_value_mp, value);
4948 return NULL;
4949 }
4950
4951 return value;
4952}
4953
4954EAPI Eina_Value *
4955eina_value_list_new(const Eina_Value_Type *subtype)
4956{
4957 Eina_Value *value;
4958
4959 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(subtype), EINA_FALSE);
4960
4961 value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));;
4962 if (!value)
4963 return NULL;
4964
4965 if (!eina_value_list_setup(value, subtype))
4966 {
4967 eina_mempool_free(_eina_value_mp, value);
4968 return NULL;
4969 }
4970
4971 return value;
4972}
4973
4974EAPI Eina_Value *
4975eina_value_hash_new(const Eina_Value_Type *subtype, unsigned int buckets_power_size)
4976{
4977 Eina_Value *value;
4978
4979 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(subtype), EINA_FALSE);
4980
4981 value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));;
4982 if (!value)
4983 return NULL;
4984
4985 if (!eina_value_hash_setup(value, subtype, buckets_power_size))
4986 {
4987 eina_mempool_free(_eina_value_mp, value);
4988 return NULL;
4989 }
4990
4991 return value;
4992}
4993
4994EAPI Eina_Value *
4995eina_value_struct_new(const Eina_Value_Struct_Desc *desc)
4996{
4997 Eina_Value *value;
4998
4999 value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));;
5000 if (!value)
5001 return NULL;
5002
5003 if (!eina_value_struct_setup(value, desc))
5004 {
5005 eina_mempool_free(_eina_value_mp, value);
5006 return NULL;
5007 }
5008
5009 return value;
5010}
5011
5012EAPI Eina_Bool
5013eina_value_type_check(const Eina_Value_Type *type)
5014{
5015 EINA_SAFETY_ON_NULL_RETURN_VAL(type, EINA_FALSE);
5016 return type->version == EINA_VALUE_TYPE_VERSION;
5017}
5018
5019EAPI const char *
5020eina_value_type_name_get(const Eina_Value_Type *type)
5021{
5022 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), NULL);
5023 return type->name;
5024}
diff --git a/libraries/eina/src/lib/eina_xattr.c b/libraries/eina/src/lib/eina_xattr.c
index bd5b98e..d4ed139 100644
--- a/libraries/eina/src/lib/eina_xattr.c
+++ b/libraries/eina/src/lib/eina_xattr.c
@@ -20,6 +20,7 @@
20# include "config.h" 20# include "config.h"
21#endif 21#endif
22 22
23#include <stdlib.h>
23#include <sys/types.h> 24#include <sys/types.h>
24#include <string.h> 25#include <string.h>
25#include <math.h> 26#include <math.h>
@@ -34,6 +35,7 @@
34#include "eina_safety_checks.h" 35#include "eina_safety_checks.h"
35#include "eina_xattr.h" 36#include "eina_xattr.h"
36#include "eina_convert.h" 37#include "eina_convert.h"
38#include "eina_stringshare.h"
37 39
38/*============================================================================* 40/*============================================================================*
39 * Local * 41 * Local *
@@ -49,14 +51,83 @@ struct _Eina_Xattr_Iterator
49{ 51{
50 Eina_Iterator iterator; 52 Eina_Iterator iterator;
51 53
54 const char *file;
55 Eina_Xattr *attr;
56
52 ssize_t length; 57 ssize_t length;
53 ssize_t offset; 58 ssize_t offset;
54 59
60 int fd;
61
55 char xattr[1]; 62 char xattr[1];
56}; 63};
57 64
58#ifdef HAVE_XATTR 65#ifdef HAVE_XATTR
59static Eina_Bool 66static Eina_Bool
67_eina_xattr_value_ls_fd_iterator_next(Eina_Xattr_Iterator *it, void **data)
68{
69 char *tmp;
70
71 if (it->offset >= it->length)
72 return EINA_FALSE;
73
74 *data = it->attr;
75 it->attr->name = it->xattr + it->offset;
76
77 it->attr->length = fgetxattr(it->fd, it->attr->name, NULL, 0);
78 if (it->attr->length)
79 {
80 tmp = realloc((void*) it->attr->value, it->attr->length);
81 if (!tmp)
82 {
83 free((void*) it->attr->value);
84 it->attr->value = NULL;
85 it->attr->length = 0;
86 }
87 else
88 {
89 it->attr->length = fgetxattr(it->fd, it->attr->name,
90 (void *) it->attr->value,
91 it->attr->length);
92 }
93 }
94
95 return EINA_TRUE;
96}
97
98static Eina_Bool
99_eina_xattr_value_ls_iterator_next(Eina_Xattr_Iterator *it, void **data)
100{
101 char *tmp;
102
103 if (it->offset >= it->length)
104 return EINA_FALSE;
105
106 *data = it->attr;
107 it->attr->name = it->xattr + it->offset;
108
109 it->attr->length = getxattr(it->file, it->attr->name, NULL, 0);
110 if (it->attr->length)
111 {
112 tmp = realloc((void*) it->attr->value, it->attr->length);
113 if (!tmp)
114 {
115 free((void*) it->attr->value);
116 it->attr->value = NULL;
117 it->attr->length = 0;
118 }
119 else
120 {
121 it->attr->length = getxattr(it->file, it->attr->name,
122 (void*) it->attr->value,
123 it->attr->length);
124 }
125 }
126
127 return EINA_TRUE;
128}
129
130static Eina_Bool
60_eina_xattr_ls_iterator_next(Eina_Xattr_Iterator *it, void **data) 131_eina_xattr_ls_iterator_next(Eina_Xattr_Iterator *it, void **data)
61{ 132{
62 if (it->offset >= it->length) 133 if (it->offset >= it->length)
@@ -78,6 +149,9 @@ static void
78_eina_xattr_ls_iterator_free(Eina_Xattr_Iterator *it) 149_eina_xattr_ls_iterator_free(Eina_Xattr_Iterator *it)
79{ 150{
80 EINA_MAGIC_SET(&it->iterator, 0); 151 EINA_MAGIC_SET(&it->iterator, 0);
152 if (it->attr) free((void *) it->attr->value);
153 eina_stringshare_del(it->file);
154 free(it->attr);
81 free(it); 155 free(it);
82} 156}
83#endif 157#endif
@@ -96,6 +170,85 @@ _eina_xattr_ls_iterator_free(Eina_Xattr_Iterator *it)
96 * API * 170 * API *
97 *============================================================================*/ 171 *============================================================================*/
98 172
173EAPI Eina_Iterator *
174eina_xattr_value_fd_ls(int fd)
175{
176#ifdef HAVE_XATTR
177 Eina_Xattr_Iterator *it;
178 ssize_t length;
179
180 if (fd < 0) return NULL;
181
182 length = flistxattr(fd, NULL, 0);
183 if (length <= 0) return NULL;
184
185 it = calloc(1, sizeof (Eina_Xattr_Iterator) + length - 1);
186 if (!it) return NULL;
187
188 it->attr = calloc(1, sizeof (Eina_Xattr));
189 if (!it->attr)
190 {
191 free(it);
192 return NULL;
193 }
194
195 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
196
197 it->fd = fd;
198 it->length = flistxattr(fd, it->xattr, length);
199 if (it->length != length)
200 {
201 free(it);
202 return NULL;
203 }
204
205 it->iterator.version = EINA_ITERATOR_VERSION;
206 it->iterator.next = FUNC_ITERATOR_NEXT(_eina_xattr_value_ls_fd_iterator_next);
207 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_eina_xattr_ls_iterator_container);
208 it->iterator.free = FUNC_ITERATOR_FREE(_eina_xattr_ls_iterator_free);
209
210 return &it->iterator;
211#else
212 return NULL;
213 (void)fd;
214#endif
215}
216
217EAPI Eina_Iterator *
218eina_xattr_fd_ls(int fd)
219{
220#ifdef HAVE_XATTR
221 Eina_Xattr_Iterator *it;
222 ssize_t length;
223
224 if (fd < 0) return NULL;
225
226 length = flistxattr(fd, NULL, 0);
227 if (length <= 0) return NULL;
228
229 it = calloc(1, sizeof (Eina_Xattr_Iterator) + length - 1);
230 if (!it) return NULL;
231
232 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
233
234 it->length = flistxattr(fd, it->xattr, length);
235 if (it->length != length)
236 {
237 free(it);
238 return NULL;
239 }
240
241 it->iterator.version = EINA_ITERATOR_VERSION;
242 it->iterator.next = FUNC_ITERATOR_NEXT(_eina_xattr_ls_iterator_next);
243 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_eina_xattr_ls_iterator_container);
244 it->iterator.free = FUNC_ITERATOR_FREE(_eina_xattr_ls_iterator_free);
245
246 return &it->iterator;
247#else
248 return NULL;
249 (void)fd;
250#endif
251}
99 252
100EAPI Eina_Iterator * 253EAPI Eina_Iterator *
101eina_xattr_ls(const char *file) 254eina_xattr_ls(const char *file)
@@ -133,6 +286,44 @@ eina_xattr_ls(const char *file)
133#endif 286#endif
134} 287}
135 288
289EAPI Eina_Iterator *
290eina_xattr_value_ls(const char *file)
291{
292#ifdef HAVE_XATTR
293 Eina_Xattr_Iterator *it;
294 ssize_t length;
295
296 EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
297
298 length = listxattr(file, NULL, 0);
299 if (length <= 0) return NULL;
300
301 it = calloc(1, sizeof (Eina_Xattr_Iterator) + length - 1);
302 if (!it) return NULL;
303
304 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
305
306 it->length = listxattr(file, it->xattr, length);
307 if (it->length != length)
308 {
309 free(it);
310 return NULL;
311 }
312
313 it->file = eina_stringshare_add(file);
314
315 it->iterator.version = EINA_ITERATOR_VERSION;
316 it->iterator.next = FUNC_ITERATOR_NEXT(_eina_xattr_value_ls_iterator_next);
317 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_eina_xattr_ls_iterator_container);
318 it->iterator.free = FUNC_ITERATOR_FREE(_eina_xattr_ls_iterator_free);
319
320 return &it->iterator;
321#else
322 return NULL;
323 (void)file;
324#endif
325}
326
136EAPI void * 327EAPI void *
137eina_xattr_get(const char *file, const char *attribute, ssize_t *size) 328eina_xattr_get(const char *file, const char *attribute, ssize_t *size)
138{ 329{
diff --git a/libraries/eina/src/modules/Makefile.in b/libraries/eina/src/modules/Makefile.in
index f3385f1..1ee8386 100644
--- a/libraries/eina/src/modules/Makefile.in
+++ b/libraries/eina/src/modules/Makefile.in
@@ -147,7 +147,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
147EGREP = @EGREP@ 147EGREP = @EGREP@
148EINA_CFLAGS = @EINA_CFLAGS@ 148EINA_CFLAGS = @EINA_CFLAGS@
149EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 149EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
150EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
150EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 151EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
152EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
151EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 153EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
152EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 154EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
153EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 155EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -199,8 +201,6 @@ PACKAGE_URL = @PACKAGE_URL@
199PACKAGE_VERSION = @PACKAGE_VERSION@ 201PACKAGE_VERSION = @PACKAGE_VERSION@
200PATH_SEPARATOR = @PATH_SEPARATOR@ 202PATH_SEPARATOR = @PATH_SEPARATOR@
201PKG_CONFIG = @PKG_CONFIG@ 203PKG_CONFIG = @PKG_CONFIG@
202PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
203PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
204RANLIB = @RANLIB@ 204RANLIB = @RANLIB@
205SED = @SED@ 205SED = @SED@
206SET_MAKE = @SET_MAKE@ 206SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/modules/mp/Makefile.in b/libraries/eina/src/modules/mp/Makefile.in
index d7e67ad..d3a6dd9 100644
--- a/libraries/eina/src/modules/mp/Makefile.in
+++ b/libraries/eina/src/modules/mp/Makefile.in
@@ -155,7 +155,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
155EGREP = @EGREP@ 155EGREP = @EGREP@
156EINA_CFLAGS = @EINA_CFLAGS@ 156EINA_CFLAGS = @EINA_CFLAGS@
157EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 157EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
158EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
158EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 159EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
160EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
159EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 161EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
160EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 162EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
161EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 163EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -207,8 +209,6 @@ PACKAGE_URL = @PACKAGE_URL@
207PACKAGE_VERSION = @PACKAGE_VERSION@ 209PACKAGE_VERSION = @PACKAGE_VERSION@
208PATH_SEPARATOR = @PATH_SEPARATOR@ 210PATH_SEPARATOR = @PATH_SEPARATOR@
209PKG_CONFIG = @PKG_CONFIG@ 211PKG_CONFIG = @PKG_CONFIG@
210PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
211PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
212RANLIB = @RANLIB@ 212RANLIB = @RANLIB@
213SED = @SED@ 213SED = @SED@
214SET_MAKE = @SET_MAKE@ 214SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/modules/mp/buddy/Makefile.in b/libraries/eina/src/modules/mp/buddy/Makefile.in
index 64d7fc7..5619b2c 100644
--- a/libraries/eina/src/modules/mp/buddy/Makefile.in
+++ b/libraries/eina/src/modules/mp/buddy/Makefile.in
@@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
163EGREP = @EGREP@ 163EGREP = @EGREP@
164EINA_CFLAGS = @EINA_CFLAGS@ 164EINA_CFLAGS = @EINA_CFLAGS@
165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
166EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
166EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 167EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
168EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
167EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 169EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
168EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 170EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
169EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 171EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@
215PACKAGE_VERSION = @PACKAGE_VERSION@ 217PACKAGE_VERSION = @PACKAGE_VERSION@
216PATH_SEPARATOR = @PATH_SEPARATOR@ 218PATH_SEPARATOR = @PATH_SEPARATOR@
217PKG_CONFIG = @PKG_CONFIG@ 219PKG_CONFIG = @PKG_CONFIG@
218PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
219PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
220RANLIB = @RANLIB@ 220RANLIB = @RANLIB@
221SED = @SED@ 221SED = @SED@
222SET_MAKE = @SET_MAKE@ 222SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/modules/mp/buddy/eina_buddy.c b/libraries/eina/src/modules/mp/buddy/eina_buddy.c
index f402c6f..7d830db 100644
--- a/libraries/eina/src/modules/mp/buddy/eina_buddy.c
+++ b/libraries/eina/src/modules/mp/buddy/eina_buddy.c
@@ -133,23 +133,23 @@ static void _free(void *data, void *element)
133 Buddy *b = data; 133 Buddy *b = data;
134 Block *block, *buddy; 134 Block *block, *buddy;
135 size_t offset; 135 size_t offset;
136 size_t index; 136 size_t idx;
137 137
138 offset = (unsigned char *)element - (unsigned char *)b->heap; 138 offset = (unsigned char *)element - (unsigned char *)b->heap;
139 if (offset > b->size) 139 if (offset > b->size)
140 return; 140 return;
141 141
142 index = offset >> b->min_order; 142 idx = offset >> b->min_order;
143 block = &b->blocks[index]; 143 block = &b->blocks[idx];
144 144
145 //printf("free %x index = %d order = %d buddy = %d\n", offset, index, block->order, index ^ (1 << block->order)); 145 //printf("free %x idx = %d order = %d buddy = %d\n", offset, idx, block->order, idx ^ (1 << block->order));
146 /* we should always work with the buddy at right */ 146 /* we should always work with the buddy at right */
147 if (index & (1 << block->order)) 147 if (idx & (1 << block->order))
148 { 148 {
149 Block *left; 149 Block *left;
150 150
151 index = index ^ (1 << block->order); 151 idx = idx ^ (1 << block->order);
152 left = &b->blocks[index]; 152 left = &b->blocks[idx];
153 if (!left->available) 153 if (!left->available)
154 goto end; 154 goto end;
155 else 155 else
@@ -170,7 +170,7 @@ check:
170 170
171 } 171 }
172 172
173 buddy = &b->blocks[index ^ (1 << block->order)]; 173 buddy = &b->blocks[idx ^ (1 << block->order)];
174 if (!buddy->available) 174 if (!buddy->available)
175 { 175 {
176 goto end; /* merge two blocks */ 176 goto end; /* merge two blocks */
@@ -239,7 +239,7 @@ static void _statistics(void *data)
239 239
240 printf("Information:\n"); 240 printf("Information:\n");
241 printf( 241 printf(
242 "size = %li, min_order = %d, max_order = %d, num_order = %d, num_blocks = %d (%luKB)\n", 242 "size = %zu, min_order = %d, max_order = %d, num_order = %d, num_blocks = %d (%uKB)\n",
243 b->size, 243 b->size,
244 b->min_order, 244 b->min_order,
245 b->max_order, 245 b->max_order,
@@ -255,7 +255,7 @@ static void _statistics(void *data)
255 printf("\n2^%d:", b->min_order + i); 255 printf("\n2^%d:", b->min_order + i);
256 EINA_INLIST_FOREACH(b->areas[i], block) 256 EINA_INLIST_FOREACH(b->areas[i], block)
257 { 257 {
258 printf(" %li", (block - &b->blocks[0])); 258 printf(" %d", (block - &b->blocks[0]));
259 } 259 }
260 } 260 }
261 printf("\nBlocks dumping:\n"); 261 printf("\nBlocks dumping:\n");
diff --git a/libraries/eina/src/modules/mp/chained_pool/Makefile.in b/libraries/eina/src/modules/mp/chained_pool/Makefile.in
index b728672..03b639f 100644
--- a/libraries/eina/src/modules/mp/chained_pool/Makefile.in
+++ b/libraries/eina/src/modules/mp/chained_pool/Makefile.in
@@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
163EGREP = @EGREP@ 163EGREP = @EGREP@
164EINA_CFLAGS = @EINA_CFLAGS@ 164EINA_CFLAGS = @EINA_CFLAGS@
165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
166EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
166EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 167EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
168EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
167EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 169EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
168EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 170EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
169EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 171EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@
215PACKAGE_VERSION = @PACKAGE_VERSION@ 217PACKAGE_VERSION = @PACKAGE_VERSION@
216PATH_SEPARATOR = @PATH_SEPARATOR@ 218PATH_SEPARATOR = @PATH_SEPARATOR@
217PKG_CONFIG = @PKG_CONFIG@ 219PKG_CONFIG = @PKG_CONFIG@
218PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
219PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
220RANLIB = @RANLIB@ 220RANLIB = @RANLIB@
221SED = @SED@ 221SED = @SED@
222SET_MAKE = @SET_MAKE@ 222SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c b/libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c
index 009b62b..020d0ad 100644
--- a/libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c
+++ b/libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c
@@ -31,6 +31,10 @@
31# endif 31# endif
32#endif 32#endif
33 33
34#ifdef EINA_DEBUG_MALLOC
35# include <malloc.h>
36#endif
37
34#ifdef EFL_HAVE_WIN32_THREADS 38#ifdef EFL_HAVE_WIN32_THREADS
35# define WIN32_LEAN_AND_MEAN 39# define WIN32_LEAN_AND_MEAN
36# include <windows.h> 40# include <windows.h>
@@ -51,7 +55,7 @@
51# include <valgrind/memcheck.h> 55# include <valgrind/memcheck.h>
52#endif 56#endif
53 57
54#ifdef DEBUG 58#if defined DEBUG || defined EINA_DEBUG_MALLOC
55#include <assert.h> 59#include <assert.h>
56#include "eina_log.h" 60#include "eina_log.h"
57 61
@@ -74,6 +78,9 @@ struct _Chained_Mempool
74 int alloc_size; 78 int alloc_size;
75 int group_size; 79 int group_size;
76 int usage; 80 int usage;
81#ifdef EINA_DEBUG_MALLOC
82 int minimal_size;
83#endif
77#ifdef EFL_DEBUG_THREADS 84#ifdef EFL_DEBUG_THREADS
78 pthread_t self; 85 pthread_t self;
79#endif 86#endif
@@ -125,6 +132,20 @@ _eina_chained_mp_pool_new(Chained_Mempool *pool)
125 return NULL; 132 return NULL;
126 } 133 }
127 134
135#ifdef EINA_DEBUG_MALLOC
136 {
137 size_t sz;
138
139 sz = malloc_usable_size(p);
140 if (sz - pool->minimal_size > 0)
141 INF("Just allocated %0.2f%% to much memory in '%s' for one block of size %i that means %i bytes to much.",
142 ((float)(sz - pool->minimal_size) * 100) / (float) (pool->alloc_size),
143 pool->name,
144 pool->alloc_size,
145 sz - pool->minimal_size);
146 }
147#endif
148
128 alignof = eina_mempool_alignof(sizeof(Chained_Pool)); 149 alignof = eina_mempool_alignof(sizeof(Chained_Pool));
129 ptr = (unsigned char *)p + alignof; 150 ptr = (unsigned char *)p + alignof;
130 p->usage = 0; 151 p->usage = 0;
@@ -444,6 +465,10 @@ eina_chained_mempool_init(const char *context,
444 memcpy((char *)mp->name, context, length); 465 memcpy((char *)mp->name, context, length);
445 } 466 }
446 467
468#ifdef EINA_DEBUG_MALLOC
469 mp->minimal_size = item_size * mp->pool_size + sizeof(Chained_Pool);
470#endif
471
447 mp->item_alloc = eina_mempool_alignof(item_size); 472 mp->item_alloc = eina_mempool_alignof(item_size);
448 mp->group_size = mp->item_alloc * mp->pool_size; 473 mp->group_size = mp->item_alloc * mp->pool_size;
449 mp->alloc_size = mp->group_size + eina_mempool_alignof(sizeof(Chained_Pool)); 474 mp->alloc_size = mp->group_size + eina_mempool_alignof(sizeof(Chained_Pool));
@@ -517,7 +542,7 @@ static Eina_Mempool_Backend _eina_chained_mp_backend = {
517 542
518Eina_Bool chained_init(void) 543Eina_Bool chained_init(void)
519{ 544{
520#ifdef DEBUG 545#if defined DEBUG || defined EINA_DEBUG_MALLOC
521 _eina_chained_mp_log_dom = eina_log_domain_register("eina_mempool", 546 _eina_chained_mp_log_dom = eina_log_domain_register("eina_mempool",
522 EINA_LOG_COLOR_DEFAULT); 547 EINA_LOG_COLOR_DEFAULT);
523 if (_eina_chained_mp_log_dom < 0) 548 if (_eina_chained_mp_log_dom < 0)
@@ -533,7 +558,7 @@ Eina_Bool chained_init(void)
533void chained_shutdown(void) 558void chained_shutdown(void)
534{ 559{
535 eina_mempool_unregister(&_eina_chained_mp_backend); 560 eina_mempool_unregister(&_eina_chained_mp_backend);
536#ifdef DEBUG 561#if defined DEBUG || defined EINA_DEBUG_MALLOC
537 eina_log_domain_unregister(_eina_chained_mp_log_dom); 562 eina_log_domain_unregister(_eina_chained_mp_log_dom);
538 _eina_chained_mp_log_dom = -1; 563 _eina_chained_mp_log_dom = -1;
539#endif 564#endif
diff --git a/libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in b/libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in
index ec97bb1..ccc4f1a 100644
--- a/libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in
+++ b/libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in
@@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
163EGREP = @EGREP@ 163EGREP = @EGREP@
164EINA_CFLAGS = @EINA_CFLAGS@ 164EINA_CFLAGS = @EINA_CFLAGS@
165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
166EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
166EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 167EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
168EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
167EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 169EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
168EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 170EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
169EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 171EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@
215PACKAGE_VERSION = @PACKAGE_VERSION@ 217PACKAGE_VERSION = @PACKAGE_VERSION@
216PATH_SEPARATOR = @PATH_SEPARATOR@ 218PATH_SEPARATOR = @PATH_SEPARATOR@
217PKG_CONFIG = @PKG_CONFIG@ 219PKG_CONFIG = @PKG_CONFIG@
218PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
219PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
220RANLIB = @RANLIB@ 220RANLIB = @RANLIB@
221SED = @SED@ 221SED = @SED@
222SET_MAKE = @SET_MAKE@ 222SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in b/libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in
index b295c64..8b0ec6e 100644
--- a/libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in
+++ b/libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in
@@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
163EGREP = @EGREP@ 163EGREP = @EGREP@
164EINA_CFLAGS = @EINA_CFLAGS@ 164EINA_CFLAGS = @EINA_CFLAGS@
165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
166EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
166EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 167EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
168EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
167EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 169EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
168EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 170EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
169EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 171EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@
215PACKAGE_VERSION = @PACKAGE_VERSION@ 217PACKAGE_VERSION = @PACKAGE_VERSION@
216PATH_SEPARATOR = @PATH_SEPARATOR@ 218PATH_SEPARATOR = @PATH_SEPARATOR@
217PKG_CONFIG = @PKG_CONFIG@ 219PKG_CONFIG = @PKG_CONFIG@
218PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
219PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
220RANLIB = @RANLIB@ 220RANLIB = @RANLIB@
221SED = @SED@ 221SED = @SED@
222SET_MAKE = @SET_MAKE@ 222SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in b/libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in
index c1541fc..337f820 100644
--- a/libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in
+++ b/libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in
@@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
163EGREP = @EGREP@ 163EGREP = @EGREP@
164EINA_CFLAGS = @EINA_CFLAGS@ 164EINA_CFLAGS = @EINA_CFLAGS@
165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
166EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
166EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 167EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
168EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
167EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 169EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
168EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 170EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
169EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 171EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@
215PACKAGE_VERSION = @PACKAGE_VERSION@ 217PACKAGE_VERSION = @PACKAGE_VERSION@
216PATH_SEPARATOR = @PATH_SEPARATOR@ 218PATH_SEPARATOR = @PATH_SEPARATOR@
217PKG_CONFIG = @PKG_CONFIG@ 219PKG_CONFIG = @PKG_CONFIG@
218PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
219PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
220RANLIB = @RANLIB@ 220RANLIB = @RANLIB@
221SED = @SED@ 221SED = @SED@
222SET_MAKE = @SET_MAKE@ 222SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/modules/mp/one_big/Makefile.in b/libraries/eina/src/modules/mp/one_big/Makefile.in
index e999b78..c8560c9 100644
--- a/libraries/eina/src/modules/mp/one_big/Makefile.in
+++ b/libraries/eina/src/modules/mp/one_big/Makefile.in
@@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
163EGREP = @EGREP@ 163EGREP = @EGREP@
164EINA_CFLAGS = @EINA_CFLAGS@ 164EINA_CFLAGS = @EINA_CFLAGS@
165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
166EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
166EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 167EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
168EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
167EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 169EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
168EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 170EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
169EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 171EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@
215PACKAGE_VERSION = @PACKAGE_VERSION@ 217PACKAGE_VERSION = @PACKAGE_VERSION@
216PATH_SEPARATOR = @PATH_SEPARATOR@ 218PATH_SEPARATOR = @PATH_SEPARATOR@
217PKG_CONFIG = @PKG_CONFIG@ 219PKG_CONFIG = @PKG_CONFIG@
218PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
219PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
220RANLIB = @RANLIB@ 220RANLIB = @RANLIB@
221SED = @SED@ 221SED = @SED@
222SET_MAKE = @SET_MAKE@ 222SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/modules/mp/pass_through/Makefile.in b/libraries/eina/src/modules/mp/pass_through/Makefile.in
index 01e7b51..f5664be 100644
--- a/libraries/eina/src/modules/mp/pass_through/Makefile.in
+++ b/libraries/eina/src/modules/mp/pass_through/Makefile.in
@@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
163EGREP = @EGREP@ 163EGREP = @EGREP@
164EINA_CFLAGS = @EINA_CFLAGS@ 164EINA_CFLAGS = @EINA_CFLAGS@
165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 165EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
166EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
166EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 167EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
168EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
167EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 169EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
168EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 170EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
169EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 171EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@
215PACKAGE_VERSION = @PACKAGE_VERSION@ 217PACKAGE_VERSION = @PACKAGE_VERSION@
216PATH_SEPARATOR = @PATH_SEPARATOR@ 218PATH_SEPARATOR = @PATH_SEPARATOR@
217PKG_CONFIG = @PKG_CONFIG@ 219PKG_CONFIG = @PKG_CONFIG@
218PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
219PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
220RANLIB = @RANLIB@ 220RANLIB = @RANLIB@
221SED = @SED@ 221SED = @SED@
222SET_MAKE = @SET_MAKE@ 222SET_MAKE = @SET_MAKE@
diff --git a/libraries/eina/src/tests/Makefile.am b/libraries/eina/src/tests/Makefile.am
index a413e6e..7e05ba9 100644
--- a/libraries/eina/src/tests/Makefile.am
+++ b/libraries/eina/src/tests/Makefile.am
@@ -28,7 +28,7 @@ endif
28 28
29if EFL_ENABLE_TESTS 29if EFL_ENABLE_TESTS
30 30
31check_PROGRAMS = eina_suite 31check_PROGRAMS = eina_suite cxx_compile_test
32 32
33eina_suite_SOURCES = \ 33eina_suite_SOURCES = \
34eina_suite.c \ 34eina_suite.c \
@@ -38,6 +38,7 @@ eina_test_ustringshare.c\
38eina_test_ustr.c \ 38eina_test_ustr.c \
39eina_test_binshare.c \ 39eina_test_binshare.c \
40eina_test_binbuf.c \ 40eina_test_binbuf.c \
41eina_test_inarray.c \
41eina_test_array.c \ 42eina_test_array.c \
42eina_test_clist.c \ 43eina_test_clist.c \
43eina_test_error.c \ 44eina_test_error.c \
@@ -64,10 +65,14 @@ eina_test_tiler.c \
64eina_test_strbuf.c \ 65eina_test_strbuf.c \
65eina_test_str.c \ 66eina_test_str.c \
66eina_test_quadtree.c \ 67eina_test_quadtree.c \
67eina_test_simple_xml_parser.c 68eina_test_simple_xml_parser.c \
69eina_test_value.c
68 70
69eina_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libeina.la -lm 71eina_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libeina.la -lm
70 72
73cxx_compile_test_SOURCES = cxx_compile_test.cxx
74cxx_compile_test_LDADD = $(top_builddir)/src/lib/libeina.la
75
71module_dummydir = $(libdir)/eina/test 76module_dummydir = $(libdir)/eina/test
72module_dummy_LTLIBRARIES = module_dummy.la 77module_dummy_LTLIBRARIES = module_dummy.la
73 78
diff --git a/libraries/eina/src/tests/Makefile.in b/libraries/eina/src/tests/Makefile.in
index b5983b3..c56211a 100644
--- a/libraries/eina/src/tests/Makefile.in
+++ b/libraries/eina/src/tests/Makefile.in
@@ -37,7 +37,8 @@ build_triplet = @build@
37host_triplet = @host@ 37host_triplet = @host@
38@EINA_HAVE_GLIB_TRUE@am__append_1 = -DEINA_BENCH_HAVE_GLIB 38@EINA_HAVE_GLIB_TRUE@am__append_1 = -DEINA_BENCH_HAVE_GLIB
39@EINA_ENABLE_BENCHMARK_E17_TRUE@am__append_2 = -DEINA_ENABLE_BENCH_E17 39@EINA_ENABLE_BENCHMARK_E17_TRUE@am__append_2 = -DEINA_ENABLE_BENCH_E17
40@EFL_ENABLE_TESTS_TRUE@check_PROGRAMS = eina_suite$(EXEEXT) 40@EFL_ENABLE_TESTS_TRUE@check_PROGRAMS = eina_suite$(EXEEXT) \
41@EFL_ENABLE_TESTS_TRUE@ cxx_compile_test$(EXEEXT)
41@EFL_ENABLE_BENCHMARK_TRUE@bench_PROGRAMS = eina_bench$(EXEEXT) 42@EFL_ENABLE_BENCHMARK_TRUE@bench_PROGRAMS = eina_bench$(EXEEXT)
42subdir = src/tests 43subdir = src/tests
43DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 44DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@ -107,6 +108,12 @@ module_dummy_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
107@EFL_ENABLE_TESTS_TRUE@am_module_dummy_la_rpath = -rpath \ 108@EFL_ENABLE_TESTS_TRUE@am_module_dummy_la_rpath = -rpath \
108@EFL_ENABLE_TESTS_TRUE@ $(module_dummydir) 109@EFL_ENABLE_TESTS_TRUE@ $(module_dummydir)
109PROGRAMS = $(bench_PROGRAMS) 110PROGRAMS = $(bench_PROGRAMS)
111am__cxx_compile_test_SOURCES_DIST = cxx_compile_test.cxx
112@EFL_ENABLE_TESTS_TRUE@am_cxx_compile_test_OBJECTS = \
113@EFL_ENABLE_TESTS_TRUE@ cxx_compile_test.$(OBJEXT)
114cxx_compile_test_OBJECTS = $(am_cxx_compile_test_OBJECTS)
115@EFL_ENABLE_TESTS_TRUE@cxx_compile_test_DEPENDENCIES = \
116@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/libeina.la
110am__eina_bench_SOURCES_DIST = eina_bench.c eina_bench_sort.c \ 117am__eina_bench_SOURCES_DIST = eina_bench.c eina_bench_sort.c \
111 eina_bench_hash.c eina_bench_stringshare.c \ 118 eina_bench_hash.c eina_bench_stringshare.c \
112 eina_bench_convert.c eina_bench_mempool.c \ 119 eina_bench_convert.c eina_bench_mempool.c \
@@ -142,16 +149,17 @@ eina_bench_OBJECTS = $(am_eina_bench_OBJECTS)
142am__eina_suite_SOURCES_DIST = eina_suite.c eina_test_fp.c \ 149am__eina_suite_SOURCES_DIST = eina_suite.c eina_test_fp.c \
143 eina_test_stringshare.c eina_test_ustringshare.c \ 150 eina_test_stringshare.c eina_test_ustringshare.c \
144 eina_test_ustr.c eina_test_binshare.c eina_test_binbuf.c \ 151 eina_test_ustr.c eina_test_binshare.c eina_test_binbuf.c \
145 eina_test_array.c eina_test_clist.c eina_test_error.c \ 152 eina_test_inarray.c eina_test_array.c eina_test_clist.c \
146 eina_test_sched.c eina_test_log.c eina_test_magic.c \ 153 eina_test_error.c eina_test_sched.c eina_test_log.c \
147 eina_test_inlist.c eina_test_main.c eina_test_counter.c \ 154 eina_test_magic.c eina_test_inlist.c eina_test_main.c \
148 eina_test_lalloc.c eina_test_hash.c eina_test_iterator.c \ 155 eina_test_counter.c eina_test_lalloc.c eina_test_hash.c \
149 eina_test_accessor.c eina_test_module.c eina_test_convert.c \ 156 eina_test_iterator.c eina_test_accessor.c eina_test_module.c \
150 eina_test_rbtree.c eina_test_file.c eina_test_benchmark.c \ 157 eina_test_convert.c eina_test_rbtree.c eina_test_file.c \
151 eina_test_mempool.c eina_test_rectangle.c eina_test_list.c \ 158 eina_test_benchmark.c eina_test_mempool.c \
159 eina_test_rectangle.c eina_test_list.c \
152 eina_test_matrixsparse.c eina_test_tiler.c eina_test_strbuf.c \ 160 eina_test_matrixsparse.c eina_test_tiler.c eina_test_strbuf.c \
153 eina_test_str.c eina_test_quadtree.c \ 161 eina_test_str.c eina_test_quadtree.c \
154 eina_test_simple_xml_parser.c 162 eina_test_simple_xml_parser.c eina_test_value.c
155@EFL_ENABLE_TESTS_TRUE@am_eina_suite_OBJECTS = eina_suite.$(OBJEXT) \ 163@EFL_ENABLE_TESTS_TRUE@am_eina_suite_OBJECTS = eina_suite.$(OBJEXT) \
156@EFL_ENABLE_TESTS_TRUE@ eina_test_fp.$(OBJEXT) \ 164@EFL_ENABLE_TESTS_TRUE@ eina_test_fp.$(OBJEXT) \
157@EFL_ENABLE_TESTS_TRUE@ eina_test_stringshare.$(OBJEXT) \ 165@EFL_ENABLE_TESTS_TRUE@ eina_test_stringshare.$(OBJEXT) \
@@ -159,6 +167,7 @@ am__eina_suite_SOURCES_DIST = eina_suite.c eina_test_fp.c \
159@EFL_ENABLE_TESTS_TRUE@ eina_test_ustr.$(OBJEXT) \ 167@EFL_ENABLE_TESTS_TRUE@ eina_test_ustr.$(OBJEXT) \
160@EFL_ENABLE_TESTS_TRUE@ eina_test_binshare.$(OBJEXT) \ 168@EFL_ENABLE_TESTS_TRUE@ eina_test_binshare.$(OBJEXT) \
161@EFL_ENABLE_TESTS_TRUE@ eina_test_binbuf.$(OBJEXT) \ 169@EFL_ENABLE_TESTS_TRUE@ eina_test_binbuf.$(OBJEXT) \
170@EFL_ENABLE_TESTS_TRUE@ eina_test_inarray.$(OBJEXT) \
162@EFL_ENABLE_TESTS_TRUE@ eina_test_array.$(OBJEXT) \ 171@EFL_ENABLE_TESTS_TRUE@ eina_test_array.$(OBJEXT) \
163@EFL_ENABLE_TESTS_TRUE@ eina_test_clist.$(OBJEXT) \ 172@EFL_ENABLE_TESTS_TRUE@ eina_test_clist.$(OBJEXT) \
164@EFL_ENABLE_TESTS_TRUE@ eina_test_error.$(OBJEXT) \ 173@EFL_ENABLE_TESTS_TRUE@ eina_test_error.$(OBJEXT) \
@@ -185,7 +194,8 @@ am__eina_suite_SOURCES_DIST = eina_suite.c eina_test_fp.c \
185@EFL_ENABLE_TESTS_TRUE@ eina_test_strbuf.$(OBJEXT) \ 194@EFL_ENABLE_TESTS_TRUE@ eina_test_strbuf.$(OBJEXT) \
186@EFL_ENABLE_TESTS_TRUE@ eina_test_str.$(OBJEXT) \ 195@EFL_ENABLE_TESTS_TRUE@ eina_test_str.$(OBJEXT) \
187@EFL_ENABLE_TESTS_TRUE@ eina_test_quadtree.$(OBJEXT) \ 196@EFL_ENABLE_TESTS_TRUE@ eina_test_quadtree.$(OBJEXT) \
188@EFL_ENABLE_TESTS_TRUE@ eina_test_simple_xml_parser.$(OBJEXT) 197@EFL_ENABLE_TESTS_TRUE@ eina_test_simple_xml_parser.$(OBJEXT) \
198@EFL_ENABLE_TESTS_TRUE@ eina_test_value.$(OBJEXT)
189eina_suite_OBJECTS = $(am_eina_suite_OBJECTS) 199eina_suite_OBJECTS = $(am_eina_suite_OBJECTS)
190@EFL_ENABLE_TESTS_TRUE@eina_suite_DEPENDENCIES = \ 200@EFL_ENABLE_TESTS_TRUE@eina_suite_DEPENDENCIES = \
191@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/libeina.la 201@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/libeina.la
@@ -232,10 +242,11 @@ AM_V_GEN = $(am__v_GEN_$(V))
232am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) 242am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
233am__v_GEN_0 = @echo " GEN " $@; 243am__v_GEN_0 = @echo " GEN " $@;
234SOURCES = $(libcity_la_SOURCES) $(module_dummy_la_SOURCES) \ 244SOURCES = $(libcity_la_SOURCES) $(module_dummy_la_SOURCES) \
235 $(eina_bench_SOURCES) $(nodist_EXTRA_eina_bench_SOURCES) \ 245 $(cxx_compile_test_SOURCES) $(eina_bench_SOURCES) \
236 $(eina_suite_SOURCES) 246 $(nodist_EXTRA_eina_bench_SOURCES) $(eina_suite_SOURCES)
237DIST_SOURCES = $(am__libcity_la_SOURCES_DIST) \ 247DIST_SOURCES = $(am__libcity_la_SOURCES_DIST) \
238 $(am__module_dummy_la_SOURCES_DIST) \ 248 $(am__module_dummy_la_SOURCES_DIST) \
249 $(am__cxx_compile_test_SOURCES_DIST) \
239 $(am__eina_bench_SOURCES_DIST) $(am__eina_suite_SOURCES_DIST) 250 $(am__eina_bench_SOURCES_DIST) $(am__eina_suite_SOURCES_DIST)
240ETAGS = etags 251ETAGS = etags
241CTAGS = ctags 252CTAGS = ctags
@@ -282,7 +293,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@
282EGREP = @EGREP@ 293EGREP = @EGREP@
283EINA_CFLAGS = @EINA_CFLAGS@ 294EINA_CFLAGS = @EINA_CFLAGS@
284EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ 295EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@
296EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@
285EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ 297EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@
298EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@
286EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ 299EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@
287EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ 300EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@
288EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ 301EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@
@@ -334,8 +347,6 @@ PACKAGE_URL = @PACKAGE_URL@
334PACKAGE_VERSION = @PACKAGE_VERSION@ 347PACKAGE_VERSION = @PACKAGE_VERSION@
335PATH_SEPARATOR = @PATH_SEPARATOR@ 348PATH_SEPARATOR = @PATH_SEPARATOR@
336PKG_CONFIG = @PKG_CONFIG@ 349PKG_CONFIG = @PKG_CONFIG@
337PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
338PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
339RANLIB = @RANLIB@ 350RANLIB = @RANLIB@
340SED = @SED@ 351SED = @SED@
341SET_MAKE = @SET_MAKE@ 352SET_MAKE = @SET_MAKE@
@@ -426,6 +437,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/include \
426@EFL_ENABLE_TESTS_TRUE@eina_test_ustr.c \ 437@EFL_ENABLE_TESTS_TRUE@eina_test_ustr.c \
427@EFL_ENABLE_TESTS_TRUE@eina_test_binshare.c \ 438@EFL_ENABLE_TESTS_TRUE@eina_test_binshare.c \
428@EFL_ENABLE_TESTS_TRUE@eina_test_binbuf.c \ 439@EFL_ENABLE_TESTS_TRUE@eina_test_binbuf.c \
440@EFL_ENABLE_TESTS_TRUE@eina_test_inarray.c \
429@EFL_ENABLE_TESTS_TRUE@eina_test_array.c \ 441@EFL_ENABLE_TESTS_TRUE@eina_test_array.c \
430@EFL_ENABLE_TESTS_TRUE@eina_test_clist.c \ 442@EFL_ENABLE_TESTS_TRUE@eina_test_clist.c \
431@EFL_ENABLE_TESTS_TRUE@eina_test_error.c \ 443@EFL_ENABLE_TESTS_TRUE@eina_test_error.c \
@@ -452,9 +464,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/include \
452@EFL_ENABLE_TESTS_TRUE@eina_test_strbuf.c \ 464@EFL_ENABLE_TESTS_TRUE@eina_test_strbuf.c \
453@EFL_ENABLE_TESTS_TRUE@eina_test_str.c \ 465@EFL_ENABLE_TESTS_TRUE@eina_test_str.c \
454@EFL_ENABLE_TESTS_TRUE@eina_test_quadtree.c \ 466@EFL_ENABLE_TESTS_TRUE@eina_test_quadtree.c \
455@EFL_ENABLE_TESTS_TRUE@eina_test_simple_xml_parser.c 467@EFL_ENABLE_TESTS_TRUE@eina_test_simple_xml_parser.c \
468@EFL_ENABLE_TESTS_TRUE@eina_test_value.c
456 469
457@EFL_ENABLE_TESTS_TRUE@eina_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libeina.la -lm 470@EFL_ENABLE_TESTS_TRUE@eina_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libeina.la -lm
471@EFL_ENABLE_TESTS_TRUE@cxx_compile_test_SOURCES = cxx_compile_test.cxx
472@EFL_ENABLE_TESTS_TRUE@cxx_compile_test_LDADD = $(top_builddir)/src/lib/libeina.la
458@EFL_ENABLE_TESTS_TRUE@module_dummydir = $(libdir)/eina/test 473@EFL_ENABLE_TESTS_TRUE@module_dummydir = $(libdir)/eina/test
459@EFL_ENABLE_TESTS_TRUE@module_dummy_LTLIBRARIES = module_dummy.la 474@EFL_ENABLE_TESTS_TRUE@module_dummy_LTLIBRARIES = module_dummy.la
460@EFL_ENABLE_TESTS_TRUE@module_dummy_la_SOURCES = \ 475@EFL_ENABLE_TESTS_TRUE@module_dummy_la_SOURCES = \
@@ -506,7 +521,7 @@ EXTRA_DIST = eina_bench.h \
506all: all-am 521all: all-am
507 522
508.SUFFIXES: 523.SUFFIXES:
509.SUFFIXES: .c .cc .lo .o .obj 524.SUFFIXES: .c .cc .cxx .lo .o .obj
510$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 525$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
511 @for dep in $?; do \ 526 @for dep in $?; do \
512 case '$(am__configure_deps)' in \ 527 case '$(am__configure_deps)' in \
@@ -633,6 +648,9 @@ clean-checkPROGRAMS:
633 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ 648 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
634 echo " rm -f" $$list; \ 649 echo " rm -f" $$list; \
635 rm -f $$list 650 rm -f $$list
651cxx_compile_test$(EXEEXT): $(cxx_compile_test_OBJECTS) $(cxx_compile_test_DEPENDENCIES)
652 @rm -f cxx_compile_test$(EXEEXT)
653 $(AM_V_CXXLD)$(CXXLINK) $(cxx_compile_test_OBJECTS) $(cxx_compile_test_LDADD) $(LIBS)
636eina_bench$(EXEEXT): $(eina_bench_OBJECTS) $(eina_bench_DEPENDENCIES) 654eina_bench$(EXEEXT): $(eina_bench_OBJECTS) $(eina_bench_DEPENDENCIES)
637 @rm -f eina_bench$(EXEEXT) 655 @rm -f eina_bench$(EXEEXT)
638 $(AM_V_CXXLD)$(CXXLINK) $(eina_bench_OBJECTS) $(eina_bench_LDADD) $(LIBS) 656 $(AM_V_CXXLD)$(CXXLINK) $(eina_bench_OBJECTS) $(eina_bench_LDADD) $(LIBS)
@@ -647,6 +665,7 @@ distclean-compile:
647 -rm -f *.tab.c 665 -rm -f *.tab.c
648 666
649@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/city.Plo@am__quote@ 667@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/city.Plo@am__quote@
668@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cxx_compile_test.Po@am__quote@
650@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@ 669@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@
651@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_hash.Po@am__quote@ 670@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_hash.Po@am__quote@
652@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_list.Po@am__quote@ 671@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_list.Po@am__quote@
@@ -675,6 +694,7 @@ distclean-compile:
675@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_file.Po@am__quote@ 694@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_file.Po@am__quote@
676@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_fp.Po@am__quote@ 695@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_fp.Po@am__quote@
677@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_hash.Po@am__quote@ 696@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_hash.Po@am__quote@
697@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_inarray.Po@am__quote@
678@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_inlist.Po@am__quote@ 698@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_inlist.Po@am__quote@
679@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_iterator.Po@am__quote@ 699@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_iterator.Po@am__quote@
680@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_lalloc.Po@am__quote@ 700@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_lalloc.Po@am__quote@
@@ -696,6 +716,7 @@ distclean-compile:
696@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_tiler.Po@am__quote@ 716@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_tiler.Po@am__quote@
697@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_ustr.Po@am__quote@ 717@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_ustr.Po@am__quote@
698@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_ustringshare.Po@am__quote@ 718@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_ustringshare.Po@am__quote@
719@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_value.Po@am__quote@
699@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_hash.Po@am__quote@ 720@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_hash.Po@am__quote@
700@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_list.Po@am__quote@ 721@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_list.Po@am__quote@
701@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_mempool.Po@am__quote@ 722@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_mempool.Po@am__quote@
@@ -759,6 +780,30 @@ module_dummy_la-eina_test_module_dummy.lo: eina_test_module_dummy.c
759@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 780@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
760@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< 781@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
761 782
783.cxx.o:
784@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
785@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
786@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
787@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
788@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
789@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
790
791.cxx.obj:
792@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
793@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
794@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
795@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
796@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
797@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
798
799.cxx.lo:
800@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
801@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
802@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
803@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
804@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
805@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
806
762mostlyclean-libtool: 807mostlyclean-libtool:
763 -rm -f *.lo 808 -rm -f *.lo
764 809
diff --git a/libraries/eina/src/tests/cxx_compile_test.cxx b/libraries/eina/src/tests/cxx_compile_test.cxx
new file mode 100644
index 0000000..7d8af76
--- /dev/null
+++ b/libraries/eina/src/tests/cxx_compile_test.cxx
@@ -0,0 +1,34 @@
1/* EINA - EFL data type library
2 * Copyright (C) 2012 ProFUSION embedded systems
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifdef HAVE_CONFIG_H
20# include "config.h"
21#endif
22
23#include "Eina.h"
24
25#include <iostream>
26using namespace std;
27
28int main()
29{
30 eina_init();
31 cout << "Eina compiles with C++!";
32 eina_shutdown();
33 return 0;
34}
diff --git a/libraries/eina/src/tests/eina_bench.c b/libraries/eina/src/tests/eina_bench.c
index a4eadbe..03aaaf9 100644
--- a/libraries/eina/src/tests/eina_bench.c
+++ b/libraries/eina/src/tests/eina_bench.c
@@ -73,7 +73,6 @@ int
73main(int argc, char **argv) 73main(int argc, char **argv)
74{ 74{
75 Eina_Benchmark *test; 75 Eina_Benchmark *test;
76 Eina_Array *ea;
77 unsigned int i; 76 unsigned int i;
78 77
79 if (argc != 2) 78 if (argc != 2)
@@ -91,7 +90,7 @@ main(int argc, char **argv)
91 90
92 etc[i].build(test); 91 etc[i].build(test);
93 92
94 ea = eina_benchmark_run(test); 93 eina_benchmark_run(test);
95 94
96 eina_benchmark_free(test); 95 eina_benchmark_free(test);
97 } 96 }
diff --git a/libraries/eina/src/tests/eina_bench_hash.c b/libraries/eina/src/tests/eina_bench_hash.c
index 5b42318..0429097 100644
--- a/libraries/eina/src/tests/eina_bench_hash.c
+++ b/libraries/eina/src/tests/eina_bench_hash.c
@@ -139,6 +139,8 @@ eina_bench_lookup_rbtree(int request)
139 EINA_RBTREE_CMP_KEY_CB( 139 EINA_RBTREE_CMP_KEY_CB(
140 _eina_bench_rbtree_key), 140 _eina_bench_rbtree_key),
141 NULL); 141 NULL);
142 /* Suppress warnings as we really don't want to do anything. */
143 (void) tmp;
142 } 144 }
143 145
144 eina_rbtree_delete(root, EINA_RBTREE_FREE_CB(_eina_bench_rbtree_free), NULL); 146 eina_rbtree_delete(root, EINA_RBTREE_FREE_CB(_eina_bench_rbtree_free), NULL);
diff --git a/libraries/eina/src/tests/eina_bench_quad.c b/libraries/eina/src/tests/eina_bench_quad.c
index 76d6667..8401fd4 100644
--- a/libraries/eina/src/tests/eina_bench_quad.c
+++ b/libraries/eina/src/tests/eina_bench_quad.c
@@ -19,6 +19,8 @@
19#define WIDTH 720 19#define WIDTH 720
20#define HEIGHT 576 20#define HEIGHT 576
21 21
22#include <stdlib.h>
23
22#include "eina_main.h" 24#include "eina_main.h"
23#include "eina_mempool.h" 25#include "eina_mempool.h"
24#include "eina_rectangle.h" 26#include "eina_rectangle.h"
diff --git a/libraries/eina/src/tests/eina_bench_stringshare.c b/libraries/eina/src/tests/eina_bench_stringshare.c
index a2c7b38..22d18fa 100644
--- a/libraries/eina/src/tests/eina_bench_stringshare.c
+++ b/libraries/eina/src/tests/eina_bench_stringshare.c
@@ -64,6 +64,8 @@ eina_bench_stringshare_job(int request)
64 tmp = eina_stringshare_add(build); 64 tmp = eina_stringshare_add(build);
65 } 65 }
66 66
67 /* Suppress warnings as we really don't want to do anything. */
68 (void) tmp;
67 eina_shutdown(); 69 eina_shutdown();
68} 70}
69 71
@@ -125,6 +127,9 @@ eina_bench_evas_job(int request)
125 eina_convert_xtoa(rand() % request, build + 7); 127 eina_convert_xtoa(rand() % request, build + 7);
126 tmp = evas_stringshare_add(build); 128 tmp = evas_stringshare_add(build);
127 } 129 }
130
131 /* Suppress warnings as we really don't want to do anything. */
132 (void) tmp;
128} 133}
129 134
130static void 135static void
@@ -155,6 +160,9 @@ eina_bench_ecore_job(int request)
155 tmp = ecore_string_instance(build); 160 tmp = ecore_string_instance(build);
156 } 161 }
157 162
163 /* Suppress warnings as we really don't want to do anything. */
164 (void) tmp;
165
158 ecore_string_shutdown(); 166 ecore_string_shutdown();
159} 167}
160 168
diff --git a/libraries/eina/src/tests/eina_suite.c b/libraries/eina/src/tests/eina_suite.c
index 9b748fc..648a717 100644
--- a/libraries/eina/src/tests/eina_suite.c
+++ b/libraries/eina/src/tests/eina_suite.c
@@ -34,6 +34,7 @@ struct _Eina_Test_Case
34 34
35static const Eina_Test_Case etc[] = { 35static const Eina_Test_Case etc[] = {
36 { "FixedPoint", eina_test_fp }, 36 { "FixedPoint", eina_test_fp },
37 { "Inarray", eina_test_inarray },
37 { "Array", eina_test_array }, 38 { "Array", eina_test_array },
38 { "Binary Share", eina_test_binshare }, 39 { "Binary Share", eina_test_binshare },
39 { "String Share", eina_test_stringshare }, 40 { "String Share", eina_test_stringshare },
@@ -66,6 +67,7 @@ static const Eina_Test_Case etc[] = {
66 { "QuadTree", eina_test_quadtree }, 67 { "QuadTree", eina_test_quadtree },
67 { "Sched", eina_test_sched }, 68 { "Sched", eina_test_sched },
68 { "Simple Xml Parser", eina_test_simple_xml_parser}, 69 { "Simple Xml Parser", eina_test_simple_xml_parser},
70 { "Value", eina_test_value },
69 { NULL, NULL } 71 { NULL, NULL }
70}; 72};
71 73
diff --git a/libraries/eina/src/tests/eina_suite.h b/libraries/eina/src/tests/eina_suite.h
index 643d6cc..6eaaec7 100644
--- a/libraries/eina/src/tests/eina_suite.h
+++ b/libraries/eina/src/tests/eina_suite.h
@@ -24,6 +24,7 @@
24void eina_test_stringshare(TCase *tc); 24void eina_test_stringshare(TCase *tc);
25void eina_test_ustringshare(TCase *tc); 25void eina_test_ustringshare(TCase *tc);
26void eina_test_binshare(TCase *tc); 26void eina_test_binshare(TCase *tc);
27void eina_test_inarray(TCase *tc);
27void eina_test_array(TCase *tc); 28void eina_test_array(TCase *tc);
28void eina_test_log(TCase *tc); 29void eina_test_log(TCase *tc);
29void eina_test_error(TCase *tc); 30void eina_test_error(TCase *tc);
@@ -54,5 +55,6 @@ void eina_test_quadtree(TCase *tc);
54void eina_test_fp(TCase *tc); 55void eina_test_fp(TCase *tc);
55void eina_test_sched(TCase *tc); 56void eina_test_sched(TCase *tc);
56void eina_test_simple_xml_parser(TCase *tc); 57void eina_test_simple_xml_parser(TCase *tc);
58void eina_test_value(TCase *tc);
57 59
58#endif /* EINA_SUITE_H_ */ 60#endif /* EINA_SUITE_H_ */
diff --git a/libraries/eina/src/tests/eina_test_array.c b/libraries/eina/src/tests/eina_test_array.c
index 0b054ea..1929601 100644
--- a/libraries/eina/src/tests/eina_test_array.c
+++ b/libraries/eina/src/tests/eina_test_array.c
@@ -151,7 +151,7 @@ START_TEST(eina_array_remove_stuff)
151 } 151 }
152 fail_if(eina_array_remove(ea, keep_int, NULL) != EINA_TRUE); 152 fail_if(eina_array_remove(ea, keep_int, NULL) != EINA_TRUE);
153 153
154 fail_if(eina_array_count_get(ea) != 990); 154 fail_if(eina_array_count(ea) != 990);
155 EINA_ARRAY_ITER_NEXT(ea, i, tmp, it) 155 EINA_ARRAY_ITER_NEXT(ea, i, tmp, it)
156 fail_if(*tmp == 0); 156 fail_if(*tmp == 0);
157 157
@@ -165,7 +165,7 @@ START_TEST(eina_array_remove_stuff)
165 eina_array_remove(ea, keep_int, NULL); 165 eina_array_remove(ea, keep_int, NULL);
166 166
167 // Remove all items 167 // Remove all items
168 fail_if(eina_array_count_get(ea) != 980); 168 fail_if(eina_array_count(ea) != 980);
169 EINA_ARRAY_ITER_NEXT(ea, i, tmp, it) 169 EINA_ARRAY_ITER_NEXT(ea, i, tmp, it)
170 { 170 {
171 fail_if(*tmp == 0); 171 fail_if(*tmp == 0);
@@ -174,7 +174,7 @@ START_TEST(eina_array_remove_stuff)
174 174
175 eina_array_remove(ea, keep_int, NULL); 175 eina_array_remove(ea, keep_int, NULL);
176 176
177 fail_if(eina_array_count_get(ea) != 0); 177 fail_if(eina_array_count(ea) != 0);
178 178
179 eina_array_free(ea); 179 eina_array_free(ea);
180 180
diff --git a/libraries/eina/src/tests/eina_test_binbuf.c b/libraries/eina/src/tests/eina_test_binbuf.c
index 713e078..d62072e 100644
--- a/libraries/eina/src/tests/eina_test_binbuf.c
+++ b/libraries/eina/src/tests/eina_test_binbuf.c
@@ -27,8 +27,8 @@
27START_TEST(binbuf_simple) 27START_TEST(binbuf_simple)
28{ 28{
29 Eina_Binbuf *buf; 29 Eina_Binbuf *buf;
30 char *txt; 30 unsigned char *txt;
31 const char cbuf[] = "Null in the middle \0 and more text afterwards and \0 anotehr null just there and another one \0 here."; 31 const unsigned char cbuf[] = "Null in the middle \0 and more text afterwards and \0 anotehr null just there and another one \0 here.";
32 size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */ 32 size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */
33 33
34 34
@@ -69,7 +69,7 @@ END_TEST
69START_TEST(binbuf_remove) 69START_TEST(binbuf_remove)
70{ 70{
71 Eina_Binbuf *buf; 71 Eina_Binbuf *buf;
72 const char cbuf[] = "12\0 456 78\0 abcthis is some more random junk here!"; 72 const unsigned char cbuf[] = "12\0 456 78\0 abcthis is some more random junk here!";
73 size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */ 73 size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */
74 74
75 eina_init(); 75 eina_init();
@@ -98,6 +98,33 @@ START_TEST(binbuf_remove)
98} 98}
99END_TEST 99END_TEST
100 100
101START_TEST(binbuf_manage_simple)
102{
103 Eina_Binbuf *buf;
104 const char *_cbuf = "12\0 456 78\0 abcthis is some more random junk here!";
105 const unsigned char *cbuf = (const unsigned char *) _cbuf;
106 size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */
107 unsigned char *alloc_buf = malloc(size);
108 memcpy(alloc_buf, cbuf, size);
109
110 eina_init();
111
112 buf = eina_binbuf_manage_new_length(alloc_buf, size);
113 fail_if(!buf);
114
115 fail_if(memcmp(eina_binbuf_string_get(buf), cbuf, size));
116 fail_if(size != eina_binbuf_length_get(buf));
117 eina_binbuf_append_length(buf, cbuf, size);
118 fail_if(memcmp(eina_binbuf_string_get(buf), cbuf, size));
119 fail_if(memcmp(eina_binbuf_string_get(buf) + size, cbuf, size));
120 fail_if(2 * size != eina_binbuf_length_get(buf));
121
122 eina_binbuf_free(buf);
123
124 eina_shutdown();
125}
126END_TEST
127
101START_TEST(binbuf_insert) 128START_TEST(binbuf_insert)
102{ 129{
103#if 0 130#if 0
@@ -154,7 +181,7 @@ END_TEST
154START_TEST(binbuf_realloc) 181START_TEST(binbuf_realloc)
155{ 182{
156 Eina_Binbuf *buf; 183 Eina_Binbuf *buf;
157 char pattern[1024 * 16]; 184 unsigned char pattern[1024 * 16];
158 unsigned int i; 185 unsigned int i;
159 size_t sz; 186 size_t sz;
160 187
@@ -232,4 +259,5 @@ eina_test_binbuf(TCase *tc)
232 tcase_add_test(tc, binbuf_remove); 259 tcase_add_test(tc, binbuf_remove);
233 tcase_add_test(tc, binbuf_insert); 260 tcase_add_test(tc, binbuf_insert);
234 tcase_add_test(tc, binbuf_realloc); 261 tcase_add_test(tc, binbuf_realloc);
262 tcase_add_test(tc, binbuf_manage_simple);
235} 263}
diff --git a/libraries/eina/src/tests/eina_test_file.c b/libraries/eina/src/tests/eina_test_file.c
index aeb5461..55e9976 100644
--- a/libraries/eina/src/tests/eina_test_file.c
+++ b/libraries/eina/src/tests/eina_test_file.c
@@ -48,7 +48,7 @@ START_TEST(eina_file_split_simple)
48#endif 48#endif
49 49
50 fail_if(!ea); 50 fail_if(!ea);
51 fail_if(eina_array_count_get(ea) != 5); 51 fail_if(eina_array_count(ea) != 5);
52 fail_if(strcmp(eina_array_data_get(ea, 0), "this")); 52 fail_if(strcmp(eina_array_data_get(ea, 0), "this"));
53 fail_if(strcmp(eina_array_data_get(ea, 1), "is")); 53 fail_if(strcmp(eina_array_data_get(ea, 1), "is"));
54 fail_if(strcmp(eina_array_data_get(ea, 2), "a")); 54 fail_if(strcmp(eina_array_data_get(ea, 2), "a"));
@@ -66,7 +66,7 @@ START_TEST(eina_file_split_simple)
66#endif 66#endif
67 67
68 fail_if(!ea); 68 fail_if(!ea);
69 fail_if(eina_array_count_get(ea) != 6); 69 fail_if(eina_array_count(ea) != 6);
70 fail_if(strcmp(eina_array_data_get(ea, 0), "this")); 70 fail_if(strcmp(eina_array_data_get(ea, 0), "this"));
71 fail_if(strcmp(eina_array_data_get(ea, 1), "is")); 71 fail_if(strcmp(eina_array_data_get(ea, 1), "is"));
72 fail_if(strcmp(eina_array_data_get(ea, 2), "a ")); 72 fail_if(strcmp(eina_array_data_get(ea, 2), "a "));
diff --git a/libraries/eina/src/tests/eina_test_inarray.c b/libraries/eina/src/tests/eina_test_inarray.c
new file mode 100644
index 0000000..22ba763
--- /dev/null
+++ b/libraries/eina/src/tests/eina_test_inarray.c
@@ -0,0 +1,401 @@
1/* EINA - EFL data type library
2 * Copyright (C) 2012 ProFUSION embedded systems
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifdef HAVE_CONFIG_H
20# include "config.h"
21#endif
22
23#include <stdio.h>
24
25#include "eina_suite.h"
26#include "Eina.h"
27
28START_TEST(eina_inarray_test_simple)
29{
30 const int test_members = 5;
31 Eina_Inarray *array;
32 int i, pos, *member;
33 const struct spec {
34 int pos, value;
35 } *s, specs[] = {
36 {test_members, 1234},
37 {5, 0x1337},
38 {0, 0xbeef},
39 {-1, -1}
40 };
41
42 eina_init();
43
44 array = eina_inarray_new(sizeof(int), 2);
45 fail_unless(array != NULL);
46
47 for (i = 0; i < test_members; i++)
48 {
49 pos = eina_inarray_append(array, &i);
50 fail_unless(pos == i);
51 }
52 fail_unless(eina_inarray_count(array) == (unsigned)test_members);
53
54 for (i = 0; i < test_members; i++)
55 {
56 member = eina_inarray_nth(array, i);
57 fail_unless(*member == i);
58 }
59
60 for (s = specs; s->pos >= 0; s++)
61 {
62 fail_unless(eina_inarray_insert_at(array, s->pos, &s->value));
63
64 for (i = 0; i < s->pos; i++)
65 {
66 member = eina_inarray_nth(array, i);
67 fail_unless(*member == i);
68 }
69 member = eina_inarray_nth(array, s->pos);
70 fail_unless(*member == s->value);
71 for (i = s->pos + 1; i < test_members + 1; i++)
72 {
73 member = eina_inarray_nth(array, i);
74 fail_unless(*member == i - 1);
75 }
76
77 fail_unless(eina_inarray_remove_at(array, s->pos));
78 for (i = 0; i < test_members; i++)
79 {
80 member = eina_inarray_nth(array, i);
81 fail_unless(*member == i);
82 }
83 }
84
85 eina_inarray_free(array);
86 eina_shutdown();
87}
88END_TEST
89
90
91START_TEST(eina_inarray_test_alloc_at)
92{
93 Eina_Inarray *array;
94 int *member;
95 int i;
96
97 eina_init();
98
99 array = eina_inarray_new(sizeof(int), 2);
100 fail_unless(array != NULL);
101
102 member = eina_inarray_alloc_at(array, 0, 4);
103 fail_unless(member != NULL);
104 fail_unless(eina_inarray_count(array) == 4);
105
106 for (i = 0; i < 4; i++)
107 member[i] = i + 2;
108
109 member = eina_inarray_alloc_at(array, 0, 2);
110 fail_unless(member != NULL);
111 fail_unless(eina_inarray_count(array) == 6);
112 for (i = 0; i < 2; i++)
113 member[i] = i;
114
115 member = eina_inarray_alloc_at(array, 6, 2);
116 fail_unless(member != NULL);
117 fail_unless(eina_inarray_count(array) == 8);
118 for (i = 0; i < 2; i++)
119 member[i] = i + 6;
120
121 member = array->members;
122 for (i = 0; i < 8; i++)
123 fail_unless(member[i] == i);
124
125 eina_inarray_free(array);
126 eina_shutdown();
127}
128END_TEST
129
130static const short rand_numbers[] = {
131 9, 0, 2, 3, 6, 5, 4, 7, 8, 1, 10
132};
133static const int numbers_count = sizeof(rand_numbers)/sizeof(rand_numbers[0]);
134
135static void
136show_sort_array(const Eina_Inarray *array)
137{
138 int i, len = eina_inarray_count(array);
139 printf("array with %d members:\n", len);
140 for (i = 0; i < len; i++)
141 {
142 short *member = eina_inarray_nth(array, i);
143 printf("\tarray[%2d]=%5hd\n", i, *member);
144 }
145}
146
147static Eina_Bool
148check_short_sorted(const Eina_Inarray *array)
149{
150 int i;
151 for (i = 0; i < numbers_count; i++)
152 {
153 short *member = eina_inarray_nth(array, i);
154 if (*member != (short)i)
155 {
156 show_sort_array(array);
157 fprintf(stderr, "not sorted at %d: %hd\n", i, *member);
158 return EINA_FALSE;
159 }
160 }
161 return EINA_TRUE;
162}
163
164static int
165short_cmp(const void *pa, const void *pb)
166{
167 const short *a = pa, *b = pb;
168 return *a - *b;
169}
170
171START_TEST(eina_inarray_test_insert_sort)
172{
173 Eina_Inarray *array;
174 int i, pos;
175
176 eina_init();
177
178 array = eina_inarray_new(sizeof(short), 1);
179 fail_unless(array != NULL);
180
181 /* insert sorted and already sorted sequence */
182 for (i = 0; i < numbers_count; i++)
183 {
184 short val = i;
185 pos = eina_inarray_insert(array, &val, short_cmp);
186 fail_unless(pos == (int)val);
187 }
188 fail_unless(check_short_sorted(array));
189 eina_inarray_flush(array);
190
191 for (i = 0; i < numbers_count; i++)
192 {
193 short val = i;
194 pos = eina_inarray_insert_sorted(array, &val, short_cmp);
195 fail_unless(pos == (int)val);
196 }
197 fail_unless(check_short_sorted(array));
198 eina_inarray_flush(array);
199
200 /* insert sorted the reverse sequence */
201 for (i = 0; i < numbers_count; i++)
202 {
203 short val = numbers_count - i - 1;
204 pos = eina_inarray_insert(array, &val, short_cmp);
205 fail_unless(pos == 0);
206 }
207 fail_unless(check_short_sorted(array));
208 eina_inarray_flush(array);
209
210 for (i = 0; i < numbers_count; i++)
211 {
212 short val = numbers_count - i - 1;
213 pos = eina_inarray_insert_sorted(array, &val, short_cmp);
214 fail_unless(pos == 0);
215 }
216 fail_unless(check_short_sorted(array));
217 eina_inarray_flush(array);
218
219 /* insert sorted random numbers */
220 for (i = 0; i < numbers_count; i++)
221 {
222 short val = rand_numbers[i];
223 eina_inarray_insert(array, &val, short_cmp);
224 }
225 fail_unless(check_short_sorted(array));
226 eina_inarray_flush(array);
227
228 for (i = 0; i < numbers_count; i++)
229 {
230 short val = rand_numbers[i];
231 eina_inarray_insert_sorted(array, &val, short_cmp);
232 }
233 fail_unless(check_short_sorted(array));
234 eina_inarray_flush(array);
235
236 eina_inarray_free(array);
237 eina_shutdown();
238}
239END_TEST
240
241START_TEST(eina_inarray_test_sort)
242{
243 Eina_Inarray *array;
244 int i;
245
246 eina_init();
247
248 array = eina_inarray_new(sizeof(short), 1);
249 fail_unless(array != NULL);
250
251 for (i = 0; i < numbers_count; i++)
252 {
253 short val = rand_numbers[i];
254 eina_inarray_append(array, &val);
255 }
256 eina_inarray_sort(array, short_cmp);
257 fail_unless(check_short_sorted(array));
258 eina_inarray_free(array);
259 eina_shutdown();
260}
261END_TEST
262
263START_TEST(eina_inarray_test_reverse)
264{
265 Eina_Inarray *array;
266 int i;
267
268 eina_init();
269
270 array = eina_inarray_new(sizeof(short), 1);
271 fail_unless(array != NULL);
272
273 for (i = 0; i < numbers_count; i++)
274 {
275 short val = i;
276 eina_inarray_append(array, &val);
277 }
278 eina_inarray_reverse(array);
279
280 for (i = 0; i < numbers_count; i++)
281 {
282 short *member = eina_inarray_nth(array, i);
283 fail_unless(*member == (numbers_count - i - 1));
284 }
285
286 eina_inarray_free(array);
287 eina_shutdown();
288}
289END_TEST
290
291static Eina_Bool
292array_foreach(const void *array __UNUSED__, void *p, void *user_data __UNUSED__)
293{
294 short *member = p;
295 int *i = user_data;
296 fail_unless(*i == *member);
297 (*i)++;
298 return EINA_TRUE;
299}
300
301static Eina_Bool
302array_foreach_stop_2nd(const void *array __UNUSED__, void *p, void *user_data __UNUSED__)
303{
304 short *member = p;
305 int *i = user_data;
306 fail_unless(*i == *member);
307 if (*i == 1)
308 return EINA_FALSE;
309 (*i)++;
310 return EINA_TRUE;
311}
312
313START_TEST(eina_inarray_test_itr)
314{
315 Eina_Inarray *array;
316 Eina_Iterator *it;
317 Eina_Accessor *ac;
318 short *member;
319 int i;
320
321 eina_init();
322
323 array = eina_inarray_new(sizeof(short), 1);
324 fail_unless(array != NULL);
325
326 for (i = 0; i < numbers_count; i++)
327 {
328 short val = i;
329 eina_inarray_append(array, &val);
330 }
331 i = 0;
332 EINA_INARRAY_FOREACH(array, member)
333 {
334 fail_unless(*member == i);
335 i++;
336 }
337 fail_unless(i == numbers_count);
338
339 i--;
340 EINA_INARRAY_REVERSE_FOREACH(array, member)
341 {
342 fail_unless(*member == i);
343 i--;
344 }
345 fail_unless(i == -1);
346
347 i = 0;
348 fail_unless(eina_inarray_foreach(array, array_foreach, &i));
349 fail_unless(i == numbers_count);
350
351 i = 0;
352 fail_if(eina_inarray_foreach(array, array_foreach_stop_2nd, &i));
353 fail_unless(i == 1);
354
355 it = eina_inarray_iterator_new(array);
356 fail_unless(it != NULL);
357 i = 0;
358 EINA_ITERATOR_FOREACH(it, member)
359 {
360 fail_unless(*member == i);
361 i++;
362 }
363 fail_unless(i == numbers_count);
364 eina_iterator_free(it);
365
366 it = eina_inarray_iterator_reversed_new(array);
367 fail_unless(it != NULL);
368 i--;
369 EINA_ITERATOR_FOREACH(it, member)
370 {
371 fail_unless(*member == i);
372 i--;
373 }
374 fail_unless(i == -1);
375 eina_iterator_free(it);
376
377 ac = eina_inarray_accessor_new(array);
378 fail_unless(ac != NULL);
379 for (i = 0; i < numbers_count; i++)
380 {
381 fail_unless(eina_accessor_data_get(ac, i, (void **)&member));
382 fail_unless(*member == i);
383 }
384 fail_unless(i == numbers_count);
385 eina_accessor_free(ac);
386
387 eina_inarray_free(array);
388 eina_shutdown();
389}
390END_TEST
391
392void
393eina_test_inarray(TCase *tc)
394{
395 tcase_add_test(tc, eina_inarray_test_simple);
396 tcase_add_test(tc, eina_inarray_test_alloc_at);
397 tcase_add_test(tc, eina_inarray_test_insert_sort);
398 tcase_add_test(tc, eina_inarray_test_sort);
399 tcase_add_test(tc, eina_inarray_test_reverse);
400 tcase_add_test(tc, eina_inarray_test_itr);
401}
diff --git a/libraries/eina/src/tests/eina_test_value.c b/libraries/eina/src/tests/eina_test_value.c
new file mode 100644
index 0000000..2d04c2f
--- /dev/null
+++ b/libraries/eina/src/tests/eina_test_value.c
@@ -0,0 +1,1799 @@
1/* EINA - EFL data type library
2 * Copyright (C) 2012 ProFUSION embedded systems
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifdef HAVE_CONFIG_H
20# include "config.h"
21#endif
22
23#include <stdio.h>
24#include <inttypes.h>
25
26#include "eina_suite.h"
27#include "Eina.h"
28
29#define FP_ERR (0.0000001)
30#define CHECK_FP(a, b) ((a - b) < FP_ERR)
31
32START_TEST(eina_value_test_simple)
33{
34 Eina_Value *value;
35 char c;
36 short s;
37 int i;
38 long l;
39 int64_t i64;
40 unsigned char uc;
41 unsigned short us;
42 unsigned int ui;
43 unsigned long ul;
44 uint64_t u64;
45 float f;
46 double d;
47
48 eina_init();
49
50 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
51 fail_unless(value != NULL);
52 fail_unless(eina_value_set(value, 'x'));
53 fail_unless(eina_value_get(value, &c));
54 fail_unless(c == 'x');
55 eina_value_flush(value);
56
57 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_SHORT));
58 fail_unless(eina_value_set(value, 300));
59 fail_unless(eina_value_get(value, &s));
60 fail_unless(s == 300);
61 eina_value_flush(value);
62
63 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT));
64 fail_unless(eina_value_set(value, -12345));
65 fail_unless(eina_value_get(value, &i));
66 fail_unless(i == -12345);
67 eina_value_flush(value);
68
69 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_LONG));
70 fail_unless(eina_value_set(value, 0xb33f));
71 fail_unless(eina_value_get(value, &l));
72 fail_unless(l == 0xb33f);
73 eina_value_flush(value);
74
75 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT64));
76 fail_unless(eina_value_set(value, 0x0011223344556677));
77 fail_unless(eina_value_get(value, &i64));
78 fail_unless(i64 == 0x0011223344556677);
79 eina_value_flush(value);
80
81 /* unsigned: */
82
83 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UCHAR));
84 fail_unless(eina_value_set(value, 200));
85 fail_unless(eina_value_get(value, &uc));
86 fail_unless(uc == 200);
87 eina_value_flush(value);
88
89 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_USHORT));
90 fail_unless(eina_value_set(value, 65535));
91 fail_unless(eina_value_get(value, &us));
92 fail_unless(us == 65535);
93 eina_value_flush(value);
94
95 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT));
96 fail_unless(eina_value_set(value, 4000000000U));
97 fail_unless(eina_value_get(value, &ui));
98 fail_unless(ui == 4000000000U);
99 eina_value_flush(value);
100
101 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_ULONG));
102 fail_unless(eina_value_set(value, 3000000001U));
103 fail_unless(eina_value_get(value, &ul));
104 fail_unless(ul == 3000000001U);
105 eina_value_flush(value);
106
107 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT64));
108 fail_unless(eina_value_set(value, 0x1122334455667788));
109 fail_unless(eina_value_get(value, &u64));
110 fail_unless(u64 == 0x1122334455667788);
111 eina_value_flush(value);
112
113 /* floating point */
114 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_FLOAT));
115 fail_unless(eina_value_set(value, 0.1234));
116 fail_unless(eina_value_get(value, &f));
117 fail_unless(CHECK_FP(0.1234, f));
118 eina_value_flush(value);
119
120 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_DOUBLE));
121 fail_unless(eina_value_set(value, 34567.8));
122 fail_unless(eina_value_get(value, &d));
123 fail_unless(CHECK_FP(34567.8, d));
124 eina_value_flush(value);
125
126 eina_value_free(value);
127 eina_shutdown();
128}
129END_TEST
130
131START_TEST(eina_value_test_compare)
132{
133 Eina_Value *a, *b;
134
135 eina_init();
136
137 a = eina_value_new(EINA_VALUE_TYPE_CHAR);
138 fail_unless(a != NULL);
139 b = eina_value_new(EINA_VALUE_TYPE_CHAR);
140 fail_unless(b != NULL);
141
142 fail_unless(eina_value_set(a, 123));
143 fail_unless(eina_value_set(b, 123));
144 fail_unless(eina_value_compare(a, b) == 0);
145 fail_unless(eina_value_set(a, -10));
146 fail_unless(eina_value_set(b, 123));
147 fail_unless(eina_value_compare(a, b) < 0);
148 fail_unless(eina_value_set(a, 123));
149 fail_unless(eina_value_set(b, 10));
150 fail_unless(eina_value_compare(a, b) > 0);
151 eina_value_flush(a);
152 eina_value_flush(b);
153
154 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_SHORT));
155 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_SHORT));
156 fail_unless(eina_value_set(a, 1230));
157 fail_unless(eina_value_set(b, 1230));
158 fail_unless(eina_value_compare(a, b) == 0);
159 fail_unless(eina_value_set(a, -100));
160 fail_unless(eina_value_set(b, 1230));
161 fail_unless(eina_value_compare(a, b) < 0);
162 fail_unless(eina_value_set(a, 1230));
163 fail_unless(eina_value_set(b, -100));
164 fail_unless(eina_value_compare(a, b) > 0);
165 eina_value_flush(a);
166 eina_value_flush(b);
167
168 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_INT));
169 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_INT));
170 fail_unless(eina_value_set(a, 300000));
171 fail_unless(eina_value_set(b, 300000));
172 fail_unless(eina_value_compare(a, b) == 0);
173 fail_unless(eina_value_set(a, -100));
174 fail_unless(eina_value_set(b, 300000));
175 fail_unless(eina_value_compare(a, b) < 0);
176 fail_unless(eina_value_set(a, 300000));
177 fail_unless(eina_value_set(b, -100));
178 fail_unless(eina_value_compare(a, b) > 0);
179 eina_value_flush(a);
180 eina_value_flush(b);
181
182 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_LONG));
183 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_LONG));
184 fail_unless(eina_value_set(a, 300000L));
185 fail_unless(eina_value_set(b, 300000L));
186 fail_unless(eina_value_compare(a, b) == 0);
187 fail_unless(eina_value_set(a, -100L));
188 fail_unless(eina_value_set(b, 300000L));
189 fail_unless(eina_value_compare(a, b) < 0);
190 fail_unless(eina_value_set(a, 300000L));
191 fail_unless(eina_value_set(b, -100L));
192 fail_unless(eina_value_compare(a, b) > 0);
193 eina_value_flush(a);
194 eina_value_flush(b);
195
196 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_INT64));
197 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_INT64));
198 fail_unless(eina_value_set(a, (int64_t)800000));
199 fail_unless(eina_value_set(b, (int64_t)800000));
200 fail_unless(eina_value_compare(a, b) == 0);
201 fail_unless(eina_value_set(a, (int64_t)-100));
202 fail_unless(eina_value_set(b, (int64_t)8000000));
203 fail_unless(eina_value_compare(a, b) < 0);
204 fail_unless(eina_value_set(a, (int64_t)8000000));
205 fail_unless(eina_value_set(b, (int64_t)-100));
206 fail_unless(eina_value_compare(a, b) > 0);
207 eina_value_flush(a);
208 eina_value_flush(b);
209
210 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_UCHAR));
211 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_UCHAR));
212 fail_unless(eina_value_set(a, 123));
213 fail_unless(eina_value_set(b, 123));
214 fail_unless(eina_value_compare(a, b) == 0);
215 fail_unless(eina_value_set(a, 10));
216 fail_unless(eina_value_set(b, 123));
217 fail_unless(eina_value_compare(a, b) < 0);
218 fail_unless(eina_value_set(a, 123));
219 fail_unless(eina_value_set(b, 10));
220 fail_unless(eina_value_compare(a, b) > 0);
221 eina_value_flush(a);
222 eina_value_flush(b);
223
224 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_USHORT));
225 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_USHORT));
226 fail_unless(eina_value_set(a, 1230));
227 fail_unless(eina_value_set(b, 1230));
228 fail_unless(eina_value_compare(a, b) == 0);
229 fail_unless(eina_value_set(a, 100));
230 fail_unless(eina_value_set(b, 1230));
231 fail_unless(eina_value_compare(a, b) < 0);
232 fail_unless(eina_value_set(a, 1230));
233 fail_unless(eina_value_set(b, 100));
234 fail_unless(eina_value_compare(a, b) > 0);
235 eina_value_flush(a);
236 eina_value_flush(b);
237
238 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_UINT));
239 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_UINT));
240 fail_unless(eina_value_set(a, 300000));
241 fail_unless(eina_value_set(b, 300000));
242 fail_unless(eina_value_compare(a, b) == 0);
243 fail_unless(eina_value_set(a, 100));
244 fail_unless(eina_value_set(b, 300000));
245 fail_unless(eina_value_compare(a, b) < 0);
246 fail_unless(eina_value_set(a, 300000));
247 fail_unless(eina_value_set(b, 100));
248 fail_unless(eina_value_compare(a, b) > 0);
249 eina_value_flush(a);
250 eina_value_flush(b);
251
252 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_ULONG));
253 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_ULONG));
254 fail_unless(eina_value_set(a, 300000UL));
255 fail_unless(eina_value_set(b, 300000UL));
256 fail_unless(eina_value_compare(a, b) == 0);
257 fail_unless(eina_value_set(a, 100UL));
258 fail_unless(eina_value_set(b, 300000UL));
259 fail_unless(eina_value_compare(a, b) < 0);
260 fail_unless(eina_value_set(a, 300000UL));
261 fail_unless(eina_value_set(b, 100UL));
262 fail_unless(eina_value_compare(a, b) > 0);
263 eina_value_flush(a);
264 eina_value_flush(b);
265
266 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_UINT64));
267 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_UINT64));
268 fail_unless(eina_value_set(a, (uint64_t)8000000));
269 fail_unless(eina_value_set(b, (uint64_t)8000000));
270 fail_unless(eina_value_compare(a, b) == 0);
271 fail_unless(eina_value_set(a, (uint64_t)100));
272 fail_unless(eina_value_set(b, (uint64_t)8000000));
273 fail_unless(eina_value_compare(a, b) < 0);
274 fail_unless(eina_value_set(a, (uint64_t)8000000));
275 fail_unless(eina_value_set(b, (uint64_t)100));
276 fail_unless(eina_value_compare(a, b) > 0);
277 eina_value_flush(a);
278 eina_value_flush(b);
279
280 fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_STRING));
281 fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_STRING));
282 fail_unless(eina_value_set(a, "aaa"));
283 fail_unless(eina_value_set(b, "aaa"));
284 fail_unless(eina_value_compare(a, b) == 0);
285 fail_unless(eina_value_set(a, "abc"));
286 fail_unless(eina_value_set(b, "acd"));
287 fail_unless(eina_value_compare(a, b) < 0);
288 fail_unless(eina_value_set(a, "acd"));
289 fail_unless(eina_value_set(b, "abc"));
290 fail_unless(eina_value_compare(a, b) > 0);
291 eina_value_flush(a);
292 eina_value_flush(b);
293
294 fail_unless(eina_value_array_setup(a, EINA_VALUE_TYPE_CHAR, 0));
295 fail_unless(eina_value_array_setup(b, EINA_VALUE_TYPE_CHAR, 0));
296 fail_unless(eina_value_compare(a, b) == 0);
297
298 fail_unless(eina_value_array_append(a, 1));
299 fail_unless(eina_value_array_append(a, 2));
300 fail_unless(eina_value_array_append(a, 3));
301
302 fail_unless(eina_value_array_append(b, 1));
303 fail_unless(eina_value_array_append(b, 2));
304 fail_unless(eina_value_array_append(b, 3));
305
306 fail_unless(eina_value_compare(a, b) == 0);
307
308 fail_unless(eina_value_array_set(a, 0, 0));
309 fail_unless(eina_value_compare(a, b) < 0);
310
311 fail_unless(eina_value_array_set(a, 0, 10));
312 fail_unless(eina_value_compare(a, b) > 0);
313
314 fail_unless(eina_value_array_set(a, 0, 1));
315
316 fail_unless(eina_value_array_set(b, 0, 0));
317 fail_unless(eina_value_compare(a, b) > 0);
318
319 fail_unless(eina_value_array_set(b, 0, 10));
320 fail_unless(eina_value_compare(a, b) < 0);
321
322 fail_unless(eina_value_array_set(b, 0, 1));
323 fail_unless(eina_value_compare(a, b) == 0);
324
325 /* bigger arrays are greater */
326 fail_unless(eina_value_array_append(b, 0));
327 fail_unless(eina_value_compare(a, b) < 0);
328
329 fail_unless(eina_value_array_append(a, 0));
330 fail_unless(eina_value_array_append(a, 0));
331 fail_unless(eina_value_compare(a, b) > 0);
332
333 /* bigger arrays are greater, unless an element says otherwise */
334 fail_unless(eina_value_array_set(b, 0, 10));
335 fail_unless(eina_value_compare(a, b) < 0);
336
337 eina_value_flush(a);
338 eina_value_flush(b);
339
340 fail_unless(eina_value_list_setup(a, EINA_VALUE_TYPE_CHAR));
341 fail_unless(eina_value_list_setup(b, EINA_VALUE_TYPE_CHAR));
342 fail_unless(eina_value_compare(a, b) == 0);
343
344 fail_unless(eina_value_list_append(a, 1));
345 fail_unless(eina_value_list_append(a, 2));
346 fail_unless(eina_value_list_append(a, 3));
347
348 fail_unless(eina_value_list_append(b, 1));
349 fail_unless(eina_value_list_append(b, 2));
350 fail_unless(eina_value_list_append(b, 3));
351
352 fail_unless(eina_value_compare(a, b) == 0);
353
354 fail_unless(eina_value_list_set(a, 0, 0));
355 fail_unless(eina_value_compare(a, b) < 0);
356
357 fail_unless(eina_value_list_set(a, 0, 10));
358 fail_unless(eina_value_compare(a, b) > 0);
359
360 fail_unless(eina_value_list_set(a, 0, 1));
361
362 fail_unless(eina_value_list_set(b, 0, 0));
363 fail_unless(eina_value_compare(a, b) > 0);
364
365 fail_unless(eina_value_list_set(b, 0, 10));
366 fail_unless(eina_value_compare(a, b) < 0);
367
368 fail_unless(eina_value_list_set(b, 0, 1));
369 fail_unless(eina_value_compare(a, b) == 0);
370
371 /* bigger lists are greater */
372 fail_unless(eina_value_list_append(b, 0));
373 fail_unless(eina_value_compare(a, b) < 0);
374
375 fail_unless(eina_value_list_append(a, 0));
376 fail_unless(eina_value_list_append(a, 0));
377 fail_unless(eina_value_compare(a, b) > 0);
378
379 /* bigger lists are greater, unless an element says otherwise */
380 fail_unless(eina_value_list_set(b, 0, 10));
381 fail_unless(eina_value_compare(a, b) < 0);
382
383 eina_value_flush(a);
384 eina_value_flush(b);
385
386 fail_unless(eina_value_hash_setup(a, EINA_VALUE_TYPE_CHAR, 0));
387 fail_unless(eina_value_hash_setup(b, EINA_VALUE_TYPE_CHAR, 0));
388 fail_unless(eina_value_compare(a, b) == 0);
389
390 fail_unless(eina_value_hash_set(a, "abc", 1));
391 fail_unless(eina_value_hash_set(a, "xyz", 2));
392 fail_unless(eina_value_hash_set(a, "hello", 3));
393
394 fail_unless(eina_value_hash_set(b, "abc", 1));
395 fail_unless(eina_value_hash_set(b, "xyz", 2));
396 fail_unless(eina_value_hash_set(b, "hello", 3));
397
398 fail_unless(eina_value_compare(a, b) == 0);
399
400 fail_unless(eina_value_hash_set(a, "abc", 0));
401 fail_unless(eina_value_compare(a, b) < 0);
402
403 fail_unless(eina_value_hash_set(a, "abc", 10));
404 fail_unless(eina_value_compare(a, b) > 0);
405
406 fail_unless(eina_value_hash_set(a, "abc", 1));
407
408 fail_unless(eina_value_hash_set(b, "abc", 0));
409 fail_unless(eina_value_compare(a, b) > 0);
410
411 fail_unless(eina_value_hash_set(b, "abc", 10));
412 fail_unless(eina_value_compare(a, b) < 0);
413
414 fail_unless(eina_value_hash_set(b, "abc", 1));
415 fail_unless(eina_value_compare(a, b) == 0);
416
417 /* bigger hashs are greater */
418 fail_unless(eina_value_hash_set(b,"newkey", 0));
419 fail_unless(eina_value_compare(a, b) < 0);
420
421 fail_unless(eina_value_hash_set(a, "newkey", 0));
422 fail_unless(eina_value_hash_set(a, "onemorenewkey", 0));
423 fail_unless(eina_value_compare(a, b) > 0);
424
425 /* bigger hashs are greater, unless an element says otherwise */
426 fail_unless(eina_value_hash_set(b, "abc", 10));
427 fail_unless(eina_value_compare(a, b) < 0);
428
429 eina_value_free(a);
430 eina_value_free(b);
431 eina_shutdown();
432}
433END_TEST
434
435START_TEST(eina_value_test_string)
436{
437 Eina_Value *value;
438 const char *s;
439
440 eina_init();
441
442 value = eina_value_new(EINA_VALUE_TYPE_STRING);
443 fail_unless(value != NULL);
444 fail_unless(eina_value_set(value, "hello world!"));
445 fail_unless(eina_value_get(value, &s));
446 fail_unless(strcmp(s, "hello world!") == 0);
447
448 fail_unless(eina_value_set(value, "eina-value"));
449 fail_unless(eina_value_get(value, &s));
450 fail_unless(strcmp(s, "eina-value") == 0);
451
452 eina_value_flush(value);
453 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING));
454
455 fail_unless(eina_value_set(value, "profusion"));
456 fail_unless(eina_value_get(value, &s));
457 fail_unless(strcmp(s, "profusion") == 0);
458
459 eina_value_free(value);
460 eina_shutdown();
461}
462END_TEST
463
464START_TEST(eina_value_test_pvariant)
465{
466 Eina_Value *value;
467 char c, in_c;
468 short s, in_s;
469 int i, in_i;
470 long l, in_l;
471 int64_t i64, in_i64;
472 unsigned char uc, in_uc;
473 unsigned short us, in_us;
474 unsigned int ui, in_ui;
475 unsigned long ul, in_ul;
476 uint64_t u64, in_u64;
477 float f, in_f;
478 double d, in_d;
479 const char *str, *in_str;
480
481 eina_init();
482
483 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
484 fail_unless(value != NULL);
485 in_c = 'x';
486 fail_unless(eina_value_pset(value, &in_c));
487 fail_unless(eina_value_pget(value, &c));
488 fail_unless(c == 'x');
489 eina_value_flush(value);
490
491 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_SHORT));
492 in_s = 300;
493 fail_unless(eina_value_pset(value, &in_s));
494 fail_unless(eina_value_pget(value, &s));
495 fail_unless(s == 300);
496 eina_value_flush(value);
497
498 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT));
499 in_i = -12345;
500 fail_unless(eina_value_pset(value, &in_i));
501 fail_unless(eina_value_pget(value, &i));
502 fail_unless(i == -12345);
503 eina_value_flush(value);
504
505 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_LONG));
506 in_l = 0xb33f;
507 fail_unless(eina_value_pset(value, &in_l));
508 fail_unless(eina_value_pget(value, &l));
509 fail_unless(l == 0xb33f);
510 eina_value_flush(value);
511
512 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT64));
513 in_i64 = 0x0011223344556677;
514 fail_unless(eina_value_pset(value, &in_i64));
515 fail_unless(eina_value_pget(value, &i64));
516 fail_unless(i64 == 0x0011223344556677);
517 eina_value_flush(value);
518
519 /* unsigned: */
520
521 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UCHAR));
522 in_uc = 200;
523 fail_unless(eina_value_pset(value, &in_uc));
524 fail_unless(eina_value_pget(value, &uc));
525 fail_unless(uc == 200);
526 eina_value_flush(value);
527
528 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_USHORT));
529 in_us = 65535;
530 fail_unless(eina_value_pset(value, &in_us));
531 fail_unless(eina_value_pget(value, &us));
532 fail_unless(us == 65535);
533 eina_value_flush(value);
534
535 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT));
536 in_ui = 4000000000U;
537 fail_unless(eina_value_pset(value, &in_ui));
538 fail_unless(eina_value_pget(value, &ui));
539 fail_unless(ui == 4000000000U);
540 eina_value_flush(value);
541
542 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_ULONG));
543 in_ul = 3000000001U;
544 fail_unless(eina_value_pset(value, &in_ul));
545 fail_unless(eina_value_pget(value, &ul));
546 fail_unless(ul == 3000000001U);
547 eina_value_flush(value);
548
549 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT64));
550 in_u64 = 0x1122334455667788;
551 fail_unless(eina_value_pset(value, &in_u64));
552 fail_unless(eina_value_pget(value, &u64));
553 fail_unless(u64 == 0x1122334455667788);
554 eina_value_flush(value);
555
556 /* floating point */
557 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_FLOAT));
558 in_f = 0.1234;
559 fail_unless(eina_value_pset(value, &in_f));
560 fail_unless(eina_value_pget(value, &f));
561 fail_unless(CHECK_FP(0.1234, f));
562 eina_value_flush(value);
563
564 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_DOUBLE));
565 in_d = 34567.8;
566 fail_unless(eina_value_pset(value, &in_d));
567 fail_unless(eina_value_pget(value, &d));
568 fail_unless(CHECK_FP(34567.8, d));
569 eina_value_flush(value);
570
571 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING));
572 in_str = "hello world!";
573 fail_unless(eina_value_pset(value, &in_str));
574 fail_unless(eina_value_pget(value, &str));
575 fail_unless(strcmp(str, "hello world!") == 0);
576
577 in_str = "eina-value";
578 fail_unless(eina_value_pset(value, &in_str));
579 fail_unless(eina_value_pget(value, &str));
580 fail_unless(strcmp(str, "eina-value") == 0);
581
582 eina_value_flush(value);
583 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING));
584
585 in_str = "profusion";
586 fail_unless(eina_value_pset(value, &in_str));
587 fail_unless(eina_value_pget(value, &str));
588 fail_unless(strcmp(str, "profusion") == 0);
589
590 eina_value_free(value);
591 eina_shutdown();
592}
593END_TEST
594
595START_TEST(eina_value_test_to_string)
596{
597 Eina_Value *value;
598 char c, in_c;
599 short s, in_s;
600 int i, in_i;
601 long l, in_l;
602 int64_t i64, in_i64;
603 unsigned char uc, in_uc;
604 unsigned short us, in_us;
605 unsigned int ui, in_ui;
606 unsigned long ul, in_ul;
607 uint64_t u64, in_u64;
608 float f, in_f;
609 double d, in_d;
610 const char *str, *in_str;
611 char *out;
612 char buf[256];
613
614 eina_init();
615
616 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
617 fail_unless(value != NULL);
618 in_c = 'x';
619 fail_unless(eina_value_pset(value, &in_c));
620 fail_unless(eina_value_pget(value, &c));
621 fail_unless(c == 'x');
622 snprintf(buf, sizeof(buf), "%hhd", in_c);
623 out = eina_value_to_string(value);
624 fail_unless(out != NULL);
625 fail_unless(strcmp(buf, out) == 0);
626 free(out);
627 eina_value_flush(value);
628
629 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_SHORT));
630 in_s = 300;
631 fail_unless(eina_value_pset(value, &in_s));
632 fail_unless(eina_value_pget(value, &s));
633 fail_unless(s == 300);
634 snprintf(buf, sizeof(buf), "%hd", in_s);
635 out = eina_value_to_string(value);
636 fail_unless(out != NULL);
637 fail_unless(strcmp(buf, out) == 0);
638 free(out);
639 eina_value_flush(value);
640
641 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT));
642 in_i = -12345;
643 fail_unless(eina_value_pset(value, &in_i));
644 fail_unless(eina_value_pget(value, &i));
645 fail_unless(i == -12345);
646 snprintf(buf, sizeof(buf), "%d", in_i);
647 out = eina_value_to_string(value);
648 fail_unless(out != NULL);
649 fail_unless(strcmp(buf, out) == 0);
650 free(out);
651 eina_value_flush(value);
652
653 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_LONG));
654 in_l = 0xb33f;
655 fail_unless(eina_value_pset(value, &in_l));
656 fail_unless(eina_value_pget(value, &l));
657 fail_unless(l == 0xb33f);
658 snprintf(buf, sizeof(buf), "%ld", in_l);
659 out = eina_value_to_string(value);
660 fail_unless(out != NULL);
661 fail_unless(strcmp(buf, out) == 0);
662 free(out);
663 eina_value_flush(value);
664
665 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT64));
666 in_i64 = 0x0011223344556677;
667 fail_unless(eina_value_pset(value, &in_i64));
668 fail_unless(eina_value_pget(value, &i64));
669 fail_unless(i64 == 0x0011223344556677);
670 snprintf(buf, sizeof(buf), "%"PRId64, in_i64);
671 out = eina_value_to_string(value);
672 fail_unless(out != NULL);
673 fail_unless(strcmp(buf, out) == 0);
674 free(out);
675 eina_value_flush(value);
676
677 /* unsigned: */
678
679 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UCHAR));
680 in_uc = 200;
681 fail_unless(eina_value_pset(value, &in_uc));
682 fail_unless(eina_value_pget(value, &uc));
683 fail_unless(uc == 200);
684 snprintf(buf, sizeof(buf), "%hhu", in_uc);
685 out = eina_value_to_string(value);
686 fail_unless(out != NULL);
687 fail_unless(strcmp(buf, out) == 0);
688 free(out);
689 eina_value_flush(value);
690
691 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_USHORT));
692 in_us = 65535;
693 fail_unless(eina_value_pset(value, &in_us));
694 fail_unless(eina_value_pget(value, &us));
695 fail_unless(us == 65535);
696 snprintf(buf, sizeof(buf), "%hu", in_us);
697 out = eina_value_to_string(value);
698 fail_unless(out != NULL);
699 fail_unless(strcmp(buf, out) == 0);
700 free(out);
701 eina_value_flush(value);
702
703 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT));
704 in_ui = 4000000000U;
705 fail_unless(eina_value_pset(value, &in_ui));
706 fail_unless(eina_value_pget(value, &ui));
707 fail_unless(ui == 4000000000U);
708 snprintf(buf, sizeof(buf), "%u", in_ui);
709 out = eina_value_to_string(value);
710 fail_unless(out != NULL);
711 fail_unless(strcmp(buf, out) == 0);
712 free(out);
713 eina_value_flush(value);
714
715 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_ULONG));
716 in_ul = 3000000001U;
717 fail_unless(eina_value_pset(value, &in_ul));
718 fail_unless(eina_value_pget(value, &ul));
719 fail_unless(ul == 3000000001U);
720 snprintf(buf, sizeof(buf), "%lu", in_ul);
721 out = eina_value_to_string(value);
722 fail_unless(out != NULL);
723 fail_unless(strcmp(buf, out) == 0);
724 free(out);
725 eina_value_flush(value);
726
727 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT64));
728 in_u64 = 0x1122334455667788;
729 fail_unless(eina_value_pset(value, &in_u64));
730 fail_unless(eina_value_pget(value, &u64));
731 fail_unless(u64 == 0x1122334455667788);
732 snprintf(buf, sizeof(buf), "%"PRIu64, in_u64);
733 out = eina_value_to_string(value);
734 fail_unless(out != NULL);
735 fail_unless(strcmp(buf, out) == 0);
736 free(out);
737 eina_value_flush(value);
738
739 /* floating point */
740 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_FLOAT));
741 in_f = 0.1234;
742 fail_unless(eina_value_pset(value, &in_f));
743 fail_unless(eina_value_pget(value, &f));
744 fail_unless(CHECK_FP(0.1234, f));
745 snprintf(buf, sizeof(buf), "%g", in_f);
746 out = eina_value_to_string(value);
747 fail_unless(out != NULL);
748 fail_unless(strncmp(buf, out, 6) == 0); /* stupid float... */
749 free(out);
750 eina_value_flush(value);
751
752 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_DOUBLE));
753 in_d = 34567.8;
754 fail_unless(eina_value_pset(value, &in_d));
755 fail_unless(eina_value_pget(value, &d));
756 fail_unless(CHECK_FP(34567.8, d));
757 snprintf(buf, sizeof(buf), "%g", in_d);
758 out = eina_value_to_string(value);
759 fail_unless(out != NULL);
760 fail_unless(strncmp(buf, out, 7) == 0); /* stupid double... */
761 free(out);
762 eina_value_flush(value);
763
764 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING));
765 in_str = "hello world!";
766 fail_unless(eina_value_pset(value, &in_str));
767 fail_unless(eina_value_pget(value, &str));
768 fail_unless(strcmp(str, "hello world!") == 0);
769 out = eina_value_to_string(value);
770 fail_unless(out != NULL);
771 fail_unless(strcmp(in_str, out) == 0);
772 free(out);
773
774 in_str = "eina-value";
775 fail_unless(eina_value_pset(value, &in_str));
776 fail_unless(eina_value_pget(value, &str));
777 fail_unless(strcmp(str, "eina-value") == 0);
778 out = eina_value_to_string(value);
779 fail_unless(out != NULL);
780 fail_unless(strcmp(in_str, out) == 0);
781 free(out);
782
783 eina_value_flush(value);
784 fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING));
785
786 in_str = "profusion";
787 fail_unless(eina_value_pset(value, &in_str));
788 fail_unless(eina_value_pget(value, &str));
789 fail_unless(strcmp(str, "profusion") == 0);
790 out = eina_value_to_string(value);
791 fail_unless(out != NULL);
792 fail_unless(strcmp(in_str, out) == 0);
793 free(out);
794
795 eina_value_free(value);
796 eina_shutdown();
797}
798END_TEST
799
800START_TEST(eina_value_test_convert_char)
801{
802 Eina_Value *value, conv;
803 char c;
804 short s;
805 int i;
806 long l;
807 int64_t i64;
808 unsigned char uc;
809 unsigned short us;
810 unsigned int ui;
811 unsigned long ul;
812 uint64_t u64;
813 float f;
814 double d;
815 const char *str;
816
817 eina_init();
818
819 value = eina_value_new(EINA_VALUE_TYPE_CHAR);
820 fail_unless(value != NULL);
821
822 fail_unless(eina_value_set(value, 123));
823
824 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UCHAR));
825 fail_unless(eina_value_convert(value, &conv));
826 fail_unless(eina_value_get(&conv, &uc));
827 fail_unless(uc == 123);
828 eina_value_flush(&conv);
829
830 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_USHORT));
831 fail_unless(eina_value_convert(value, &conv));
832 fail_unless(eina_value_get(&conv, &us));
833 fail_unless(us == 123);
834 eina_value_flush(&conv);
835
836 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT));
837 fail_unless(eina_value_convert(value, &conv));
838 fail_unless(eina_value_get(&conv, &ui));
839 fail_unless(ui == 123);
840 eina_value_flush(&conv);
841
842 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_ULONG));
843 fail_unless(eina_value_convert(value, &conv));
844 fail_unless(eina_value_get(&conv, &ul));
845 fail_unless(ul == 123);
846 eina_value_flush(&conv);
847
848 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT64));
849 fail_unless(eina_value_convert(value, &conv));
850 fail_unless(eina_value_get(&conv, &u64));
851 fail_unless(u64 == 123);
852 eina_value_flush(&conv);
853
854 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_CHAR));
855 fail_unless(eina_value_convert(value, &conv));
856 fail_unless(eina_value_get(&conv, &c));
857 fail_unless(c == 123);
858 eina_value_flush(&conv);
859
860 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_SHORT));
861 fail_unless(eina_value_convert(value, &conv));
862 fail_unless(eina_value_get(&conv, &s));
863 fail_unless(s == 123);
864 eina_value_flush(&conv);
865
866 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_INT));
867 fail_unless(eina_value_convert(value, &conv));
868 fail_unless(eina_value_get(&conv, &i));
869 fail_unless(i == 123);
870 eina_value_flush(&conv);
871
872 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_LONG));
873 fail_unless(eina_value_convert(value, &conv));
874 fail_unless(eina_value_get(&conv, &l));
875 fail_unless(l == 123);
876 eina_value_flush(&conv);
877
878 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_INT64));
879 fail_unless(eina_value_convert(value, &conv));
880 fail_unless(eina_value_get(&conv, &i64));
881 fail_unless(i64 == 123);
882 eina_value_flush(&conv);
883
884 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_FLOAT));
885 fail_unless(eina_value_convert(value, &conv));
886 fail_unless(eina_value_get(&conv, &f));
887 fail_unless(CHECK_FP(f, 123));
888 eina_value_flush(&conv);
889
890 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_DOUBLE));
891 fail_unless(eina_value_convert(value, &conv));
892 fail_unless(eina_value_get(&conv, &d));
893 fail_unless(CHECK_FP(d, 123));
894 eina_value_flush(&conv);
895
896 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_STRING));
897 fail_unless(eina_value_convert(value, &conv));
898 fail_unless(eina_value_get(&conv, &str));
899 fail_unless(str != NULL);
900 fail_unless(strcmp(str, "123") == 0);
901 eina_value_flush(&conv);
902
903 /* negative tests */
904 fail_unless(eina_value_set(value, -123));
905
906 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UCHAR));
907 fail_if(eina_value_convert(value, &conv));
908 eina_value_flush(&conv);
909
910 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_USHORT));
911 fail_if(eina_value_convert(value, &conv));
912 eina_value_flush(&conv);
913
914 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT));
915 fail_if(eina_value_convert(value, &conv));
916 eina_value_flush(&conv);
917
918 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_ULONG));
919 fail_if(eina_value_convert(value, &conv));
920 eina_value_flush(&conv);
921
922 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT64));
923 fail_if(eina_value_convert(value, &conv));
924 eina_value_flush(&conv);
925
926 eina_value_free(value);
927 eina_shutdown();
928}
929END_TEST
930
931START_TEST(eina_value_test_convert_uchar)
932{
933 Eina_Value *value, conv;
934 char c;
935 short s;
936 int i;
937 long l;
938 int64_t i64;
939 unsigned char uc;
940 unsigned short us;
941 unsigned int ui;
942 unsigned long ul;
943 uint64_t u64;
944 float f;
945 double d;
946 const char *str;
947
948 eina_init();
949
950 value = eina_value_new(EINA_VALUE_TYPE_UCHAR);
951 fail_unless(value != NULL);
952
953 fail_unless(eina_value_set(value, 31));
954
955 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UCHAR));
956 fail_unless(eina_value_convert(value, &conv));
957 fail_unless(eina_value_get(&conv, &uc));
958 fail_unless(uc == 31);
959 eina_value_flush(&conv);
960
961 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_USHORT));
962 fail_unless(eina_value_convert(value, &conv));
963 fail_unless(eina_value_get(&conv, &us));
964 fail_unless(us == 31);
965 eina_value_flush(&conv);
966
967 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT));
968 fail_unless(eina_value_convert(value, &conv));
969 fail_unless(eina_value_get(&conv, &ui));
970 fail_unless(ui == 31);
971 eina_value_flush(&conv);
972
973 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_ULONG));
974 fail_unless(eina_value_convert(value, &conv));
975 fail_unless(eina_value_get(&conv, &ul));
976 fail_unless(ul == 31);
977 eina_value_flush(&conv);
978
979 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT64));
980 fail_unless(eina_value_convert(value, &conv));
981 fail_unless(eina_value_get(&conv, &u64));
982 fail_unless(u64 == 31);
983 eina_value_flush(&conv);
984
985 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_CHAR));
986 fail_unless(eina_value_convert(value, &conv));
987 fail_unless(eina_value_get(&conv, &c));
988 fail_unless(c == 31);
989 eina_value_flush(&conv);
990
991 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_SHORT));
992 fail_unless(eina_value_convert(value, &conv));
993 fail_unless(eina_value_get(&conv, &s));
994 fail_unless(s == 31);
995 eina_value_flush(&conv);
996
997 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_INT));
998 fail_unless(eina_value_convert(value, &conv));
999 fail_unless(eina_value_get(&conv, &i));
1000 fail_unless(i == 31);
1001 eina_value_flush(&conv);
1002
1003 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_LONG));
1004 fail_unless(eina_value_convert(value, &conv));
1005 fail_unless(eina_value_get(&conv, &l));
1006 fail_unless(l == 31);
1007 eina_value_flush(&conv);
1008
1009 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_INT64));
1010 fail_unless(eina_value_convert(value, &conv));
1011 fail_unless(eina_value_get(&conv, &i64));
1012 fail_unless(i64 == 31);
1013 eina_value_flush(&conv);
1014
1015 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_FLOAT));
1016 fail_unless(eina_value_convert(value, &conv));
1017 fail_unless(eina_value_get(&conv, &f));
1018 fail_unless(CHECK_FP(f, 31));
1019 eina_value_flush(&conv);
1020
1021 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_DOUBLE));
1022 fail_unless(eina_value_convert(value, &conv));
1023 fail_unless(eina_value_get(&conv, &d));
1024 fail_unless(CHECK_FP(d, 31));
1025 eina_value_flush(&conv);
1026
1027 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_STRING));
1028 fail_unless(eina_value_convert(value, &conv));
1029 fail_unless(eina_value_get(&conv, &str));
1030 fail_unless(str != NULL);
1031 fail_unless(strcmp(str, "31") == 0);
1032 eina_value_flush(&conv);
1033
1034 /* negative tests */
1035 fail_unless(eina_value_set(value, 200));
1036
1037 fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_CHAR));
1038 fail_if(eina_value_convert(value, &conv));
1039 eina_value_flush(&conv);
1040
1041 eina_value_free(value);
1042 eina_shutdown();
1043}
1044END_TEST
1045
1046
1047START_TEST(eina_value_test_array)
1048{
1049 Eina_Value *value, other;
1050 Eina_Value_Array desc;
1051 Eina_Inarray *inarray;
1052 char c;
1053 char buf[1024];
1054 char *str;
1055
1056 eina_init();
1057
1058 value = eina_value_array_new(EINA_VALUE_TYPE_CHAR, 0);
1059 fail_unless(value != NULL);
1060
1061 fail_unless(eina_value_array_append(value, 'k'));
1062 fail_unless(eina_value_array_append(value, '-'));
1063 fail_unless(eina_value_array_append(value, 's'));
1064
1065 fail_unless(eina_value_array_get(value, 0, &c));
1066 fail_unless(c == 'k');
1067 fail_unless(eina_value_array_get(value, 1, &c));
1068 fail_unless(c == '-');
1069 fail_unless(eina_value_array_get(value, 2, &c));
1070 fail_unless(c == 's');
1071
1072 fail_unless(eina_value_array_insert(value, 0, '!'));
1073 fail_unless(eina_value_array_get(value, 0, &c));
1074 fail_unless(c == '!');
1075 fail_unless(eina_value_array_get(value, 1, &c));
1076 fail_unless(c == 'k');
1077 fail_unless(eina_value_array_get(value, 2, &c));
1078 fail_unless(c == '-');
1079 fail_unless(eina_value_array_get(value, 3, &c));
1080 fail_unless(c == 's');
1081
1082 fail_unless(eina_value_array_set(value, 0, '*'));
1083 fail_unless(eina_value_array_get(value, 0, &c));
1084 fail_unless(c == '*');
1085 fail_unless(eina_value_array_get(value, 1, &c));
1086 fail_unless(c == 'k');
1087 fail_unless(eina_value_array_get(value, 2, &c));
1088 fail_unless(c == '-');
1089 fail_unless(eina_value_array_get(value, 3, &c));
1090 fail_unless(c == 's');
1091
1092 snprintf(buf, sizeof(buf), "[%hhd, %hhd, %hhd, %hhd]",
1093 '*', 'k', '-', 's');
1094
1095 str = eina_value_to_string(value);
1096 fail_unless(str != NULL);
1097 fail_unless(strcmp(str, buf) == 0);
1098 free(str);
1099
1100 eina_value_flush(value);
1101 fail_unless(eina_value_array_setup(value, EINA_VALUE_TYPE_STRINGSHARE, 2));
1102
1103 fail_unless(eina_value_array_append(value, "Enlightenment.org"));
1104 fail_unless(eina_value_array_append(value, "X11"));
1105 fail_unless(eina_value_array_append(value, "Pants"));
1106 fail_unless(eina_value_array_append(value, "on!!!"));
1107 fail_unless(eina_value_array_append(value, "k-s"));
1108
1109 str = eina_value_to_string(value);
1110 fail_unless(str != NULL);
1111 fail_unless(strcmp(str, "[Enlightenment.org, X11, Pants, on!!!, k-s]") == 0);
1112 free(str);
1113
1114 eina_value_flush(value);
1115 fail_unless(eina_value_array_setup(value, EINA_VALUE_TYPE_CHAR, 0));
1116 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR));
1117
1118 fail_unless(eina_value_set(&other, 100));
1119 fail_unless(eina_value_get(&other, &c));
1120 fail_unless(c == 100);
1121
1122 fail_unless(eina_value_convert(&other, value));
1123 str = eina_value_to_string(value);
1124 fail_unless(str != NULL);
1125 fail_unless(strcmp(str, "[100]") == 0);
1126 free(str);
1127
1128 fail_unless(eina_value_array_set(value, 0, 33));
1129 fail_unless(eina_value_convert(value, &other));
1130 fail_unless(eina_value_get(&other, &c));
1131 fail_unless(c == 33);
1132
1133 inarray = eina_inarray_new(sizeof(char), 0);
1134 fail_unless(inarray != NULL);
1135 c = 11;
1136 fail_unless(eina_inarray_append(inarray, &c) >= 0);
1137 c = 21;
1138 fail_unless(eina_inarray_append(inarray, &c) >= 0);
1139 c = 31;
1140 fail_unless(eina_inarray_append(inarray, &c) >= 0);
1141 desc.subtype = EINA_VALUE_TYPE_CHAR;
1142 desc.step = 0;
1143 desc.array = inarray; /* will be adopted and freed by value */
1144 fail_unless(eina_value_set(value, desc)); /* manually configure */
1145 fail_unless(eina_value_array_get(value, 0, &c));
1146 fail_unless(c == 11);
1147 fail_unless(eina_value_array_get(value, 1, &c));
1148 fail_unless(c == 21);
1149 fail_unless(eina_value_array_get(value, 2, &c));
1150 fail_unless(c == 31);
1151
1152 eina_value_free(value);
1153 eina_shutdown();
1154}
1155END_TEST
1156
1157START_TEST(eina_value_test_list)
1158{
1159 Eina_Value *value, other;
1160 Eina_Value_List desc;
1161 char c;
1162 char buf[1024];
1163 char *str;
1164 const char *s;
1165
1166 eina_init();
1167
1168 value = eina_value_list_new(EINA_VALUE_TYPE_CHAR);
1169 fail_unless(value != NULL);
1170
1171 fail_unless(eina_value_list_append(value, 'k'));
1172 fail_unless(eina_value_list_append(value, '-'));
1173 fail_unless(eina_value_list_append(value, 's'));
1174
1175 fail_unless(eina_value_list_get(value, 0, &c));
1176 fail_unless(c == 'k');
1177 fail_unless(eina_value_list_get(value, 1, &c));
1178 fail_unless(c == '-');
1179 fail_unless(eina_value_list_get(value, 2, &c));
1180 fail_unless(c == 's');
1181
1182 fail_unless(eina_value_list_insert(value, 0, '!'));
1183 fail_unless(eina_value_list_get(value, 0, &c));
1184 fail_unless(c == '!');
1185 fail_unless(eina_value_list_get(value, 1, &c));
1186 fail_unless(c == 'k');
1187 fail_unless(eina_value_list_get(value, 2, &c));
1188 fail_unless(c == '-');
1189 fail_unless(eina_value_list_get(value, 3, &c));
1190 fail_unless(c == 's');
1191
1192 fail_unless(eina_value_list_set(value, 0, '*'));
1193 fail_unless(eina_value_list_get(value, 0, &c));
1194 fail_unless(c == '*');
1195 fail_unless(eina_value_list_get(value, 1, &c));
1196 fail_unless(c == 'k');
1197 fail_unless(eina_value_list_get(value, 2, &c));
1198 fail_unless(c == '-');
1199 fail_unless(eina_value_list_get(value, 3, &c));
1200 fail_unless(c == 's');
1201
1202 snprintf(buf, sizeof(buf), "[%hhd, %hhd, %hhd, %hhd]",
1203 '*', 'k', '-', 's');
1204
1205 str = eina_value_to_string(value);
1206 fail_unless(str != NULL);
1207 fail_unless(strcmp(str, buf) == 0);
1208 free(str);
1209
1210 eina_value_flush(value);
1211 fail_unless(eina_value_list_setup(value, EINA_VALUE_TYPE_STRINGSHARE));
1212
1213 fail_unless(eina_value_list_append(value, "Enlightenment.org"));
1214 fail_unless(eina_value_list_append(value, "X11"));
1215 fail_unless(eina_value_list_append(value, "Pants"));
1216 fail_unless(eina_value_list_append(value, "on!!!"));
1217 fail_unless(eina_value_list_append(value, "k-s"));
1218
1219 str = eina_value_to_string(value);
1220 fail_unless(str != NULL);
1221 fail_unless(strcmp(str, "[Enlightenment.org, X11, Pants, on!!!, k-s]") == 0);
1222 free(str);
1223
1224 eina_value_flush(value);
1225 fail_unless(eina_value_list_setup(value, EINA_VALUE_TYPE_CHAR));
1226 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR));
1227
1228 fail_unless(eina_value_set(&other, 100));
1229 fail_unless(eina_value_get(&other, &c));
1230 fail_unless(c == 100);
1231
1232 fail_unless(eina_value_convert(&other, value));
1233 str = eina_value_to_string(value);
1234 fail_unless(str != NULL);
1235 fail_unless(strcmp(str, "[100]") == 0);
1236 free(str);
1237
1238 fail_unless(eina_value_list_set(value, 0, 33));
1239 fail_unless(eina_value_convert(value, &other));
1240 fail_unless(eina_value_get(&other, &c));
1241 fail_unless(c == 33);
1242
1243 desc.subtype = EINA_VALUE_TYPE_STRING;
1244 desc.list = NULL;
1245 desc.list = eina_list_append(desc.list, strdup("hello"));
1246 desc.list = eina_list_append(desc.list, strdup("world"));
1247 desc.list = eina_list_append(desc.list, strdup("eina"));
1248 fail_unless(eina_list_count(desc.list) == 3);
1249 fail_unless(eina_value_set(value, desc));
1250 fail_unless(eina_value_list_get(value, 0, &s));
1251 fail_unless(s != NULL);
1252 fail_unless(strcmp(s, "hello") == 0);
1253 fail_unless(eina_value_list_get(value, 1, &s));
1254 fail_unless(s != NULL);
1255 fail_unless(strcmp(s, "world") == 0);
1256 fail_unless(eina_value_list_get(value, 2, &s));
1257 fail_unless(s != NULL);
1258 fail_unless(strcmp(s, "eina") == 0);
1259
1260 eina_value_free(value);
1261 eina_shutdown();
1262}
1263END_TEST
1264
1265START_TEST(eina_value_test_hash)
1266{
1267 Eina_Value *value, other;
1268 Eina_Value_Hash desc;
1269 char c;
1270 char buf[1024];
1271 char **ptr;
1272 char *str;
1273 const char *s;
1274
1275 eina_init();
1276
1277 value = eina_value_hash_new(EINA_VALUE_TYPE_CHAR, 0);
1278 fail_unless(value != NULL);
1279
1280 fail_unless(eina_value_hash_set(value, "first", 'k'));
1281 fail_unless(eina_value_hash_set(value, "second", '-'));
1282 fail_unless(eina_value_hash_set(value, "third", 's'));
1283
1284 fail_unless(eina_value_hash_get(value, "first", &c));
1285 fail_unless(c == 'k');
1286 fail_unless(eina_value_hash_get(value, "second", &c));
1287 fail_unless(c == '-');
1288 fail_unless(eina_value_hash_get(value, "third", &c));
1289 fail_unless(c == 's');
1290
1291 fail_unless(eina_value_hash_set(value, "first", '!'));
1292 fail_unless(eina_value_hash_get(value, "first", &c));
1293 fail_unless(c == '!');
1294 fail_unless(eina_value_hash_get(value, "second", &c));
1295 fail_unless(c == '-');
1296 fail_unless(eina_value_hash_get(value, "third", &c));
1297 fail_unless(c == 's');
1298
1299 puts("testing hash to string -- may fail due hash algorithm changes!");
1300
1301 /* watchout, this is the order I got -- hash algorithm changes may change
1302 * the order!
1303 */
1304 snprintf(buf, sizeof(buf), "{first: %hhd, second: %hhd, third: %hhd}",
1305 '!', '-', 's');
1306
1307 str = eina_value_to_string(value);
1308 fail_unless(str != NULL);
1309 printf("want: %s\n", buf);
1310 printf("got.: %s\n", str);
1311 fail_unless(strcmp(str, buf) == 0);
1312 free(str);
1313
1314 eina_value_flush(value);
1315 fail_unless(eina_value_hash_setup(value, EINA_VALUE_TYPE_STRINGSHARE, 0));
1316
1317 fail_unless(eina_value_hash_set(value, "a", "Enlightenment.org"));
1318 fail_unless(eina_value_hash_set(value, "b", "X11"));
1319 fail_unless(eina_value_hash_set(value, "c", "Pants"));
1320 fail_unless(eina_value_hash_set(value, "d", "on!!!"));
1321 fail_unless(eina_value_hash_set(value, "e", "k-s"));
1322
1323 /* watchout, this is the order I got -- hash algorithm changes may change
1324 * the order!
1325 */
1326 strcpy(buf, "{e: k-s, d: on!!!, a: Enlightenment.org, b: X11, c: Pants}");
1327
1328 str = eina_value_to_string(value);
1329 fail_unless(str != NULL);
1330 printf("want: %s\n", buf);
1331 printf("got.: %s\n", str);
1332 fail_unless(strcmp(str, buf) == 0);
1333 free(str);
1334
1335 eina_value_flush(value);
1336 fail_unless(eina_value_hash_setup(value, EINA_VALUE_TYPE_CHAR, 0));
1337 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR));
1338
1339 fail_unless(eina_value_set(&other, 100));
1340 fail_unless(eina_value_get(&other, &c));
1341 fail_unless(c == 100);
1342
1343 fail_unless(eina_value_hash_set(value, "first", 33));
1344 fail_unless(eina_value_convert(value, &other));
1345 fail_unless(eina_value_get(&other, &c));
1346 fail_unless(c == 33);
1347
1348 desc.subtype = EINA_VALUE_TYPE_STRING;
1349 desc.buckets_power_size = 0;
1350 desc.hash = eina_hash_string_small_new(NULL);
1351 fail_unless(desc.hash != NULL);
1352 /* watch out hash pointer is to a size of subtype->value_size! */
1353 ptr = malloc(sizeof(char *));
1354 *ptr = strdup("there");
1355 fail_unless(eina_hash_add(desc.hash, "hi", ptr));
1356 ptr = malloc(sizeof(char *));
1357 *ptr = strdup("y");
1358 fail_unless(eina_hash_add(desc.hash, "x", ptr));
1359
1360 fail_unless(eina_value_set(value, desc));
1361
1362 fail_unless(eina_value_hash_get(value, "hi", &s));
1363 fail_unless(s != NULL);
1364 fail_unless(strcmp(s, "there") == 0);
1365
1366 fail_unless(eina_value_hash_get(value, "x", &s));
1367 fail_unless(s != NULL);
1368 fail_unless(strcmp(s, "y") == 0);
1369
1370 eina_value_free(value);
1371 eina_shutdown();
1372}
1373END_TEST
1374
1375
1376START_TEST(eina_value_test_timeval)
1377{
1378 Eina_Value *value, other;
1379 struct timeval itv, otv;
1380 char c;
1381 char *str;
1382
1383 eina_init();
1384
1385 value = eina_value_new(EINA_VALUE_TYPE_TIMEVAL);
1386 fail_unless(value != NULL);
1387
1388 itv.tv_sec = 1;
1389 itv.tv_usec = 123;
1390 fail_unless(eina_value_set(value, itv));
1391 fail_unless(eina_value_get(value, &otv));
1392 fail_unless(memcmp(&itv, &otv, sizeof(struct timeval)) == 0);
1393
1394 itv.tv_sec = 3;
1395 itv.tv_usec = -1;
1396 fail_unless(eina_value_set(value, itv));
1397 fail_unless(eina_value_get(value, &otv));
1398 itv.tv_sec = 2;
1399 itv.tv_usec = 999999;
1400 fail_unless(memcmp(&itv, &otv, sizeof(struct timeval)) == 0);
1401
1402 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR));
1403 fail_unless(eina_value_convert(value, &other));
1404 fail_unless(eina_value_get(&other, &c));
1405 fail_unless(c == 2);
1406 eina_value_flush(&other);
1407
1408 itv.tv_sec = 12345;
1409 itv.tv_usec = 6789;
1410 fail_unless(eina_value_set(value, itv));
1411 str = eina_value_to_string(value);
1412 fail_unless(str != NULL);
1413 fail_unless(strcmp(str, "12345.006789") == 0);
1414 free(str);
1415
1416 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_TIMEVAL));
1417 fail_unless(eina_value_set(&other, itv));
1418 fail_unless(eina_value_compare(value, &other) == 0);
1419
1420 itv.tv_sec++;
1421 fail_unless(eina_value_set(&other, itv));
1422 fail_unless(eina_value_compare(value, &other) < 0);
1423
1424 itv.tv_sec -= 2;
1425 fail_unless(eina_value_set(&other, itv));
1426 fail_unless(eina_value_compare(value, &other) > 0);
1427
1428 itv.tv_sec++;
1429 fail_unless(eina_value_set(&other, itv));
1430 fail_unless(eina_value_compare(value, &other) == 0);
1431
1432 itv.tv_usec++;
1433 fail_unless(eina_value_set(&other, itv));
1434 fail_unless(eina_value_compare(value, &other) < 0);
1435
1436 itv.tv_usec -= 2;
1437 fail_unless(eina_value_set(&other, itv));
1438 fail_unless(eina_value_compare(value, &other) > 0);
1439
1440 itv.tv_usec++;
1441 fail_unless(eina_value_set(&other, itv));
1442 fail_unless(eina_value_compare(value, &other) == 0);
1443
1444 eina_value_flush(&other);
1445
1446
1447 eina_value_free(value);
1448 eina_shutdown();
1449}
1450END_TEST
1451
1452
1453START_TEST(eina_value_test_blob)
1454{
1455 Eina_Value *value, other;
1456 Eina_Value_Blob in, out;
1457 unsigned char blob[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
1458 int i = 0x11223344;
1459 char *str;
1460
1461 eina_init();
1462
1463 value = eina_value_new(EINA_VALUE_TYPE_BLOB);
1464 fail_unless(value != NULL);
1465
1466 in.ops = NULL;
1467 in.memory = blob;
1468 in.size = sizeof(blob);
1469 fail_unless(eina_value_set(value, in));
1470 fail_unless(eina_value_get(value, &out));
1471 fail_unless(out.memory == blob);
1472 fail_unless(out.size == sizeof(blob));
1473 fail_unless(memcmp(&in, &out, sizeof(Eina_Value_Blob)) == 0);
1474
1475 str = eina_value_to_string(value);
1476 fail_unless(str != NULL);
1477 fail_unless(strcmp(str, "BLOB(10, [01 02 03 04 05 06 07 08 09 0a])") == 0);
1478 free(str);
1479
1480 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_INT));
1481 fail_unless(eina_value_set(&other, i));
1482 fail_unless(eina_value_convert(&other, value));
1483 fail_unless(eina_value_get(value, &out));
1484
1485 fail_unless(out.memory != NULL);
1486 fail_unless(out.size == sizeof(int));
1487 fail_unless(memcmp(&i, out.memory, sizeof(int)) == 0);
1488
1489 eina_value_flush(&other);
1490
1491 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_STRING));
1492 fail_unless(eina_value_set(&other, "hi there!"));
1493 fail_unless(eina_value_convert(&other, value));
1494 fail_unless(eina_value_get(value, &out));
1495 fail_unless(out.memory != NULL);
1496 fail_unless(out.size == sizeof("hi there!"));
1497 fail_unless(strcmp(out.memory, "hi there!") == 0);
1498
1499 str = eina_value_to_string(value);
1500 fail_unless(str != NULL);
1501 fail_unless(strcmp(str, "BLOB(10, [68 69 20 74 68 65 72 65 21 00])") == 0);
1502 free(str);
1503
1504 eina_value_flush(&other);
1505
1506 fail_unless(eina_value_array_setup(&other, EINA_VALUE_TYPE_CHAR, 0));
1507 fail_unless(eina_value_array_append(&other, 0xa));
1508 fail_unless(eina_value_array_append(&other, 0xb));
1509 fail_unless(eina_value_array_append(&other, 0xc));
1510 fail_unless(eina_value_convert(&other, value));
1511 fail_unless(eina_value_get(value, &out));
1512 fail_unless(out.memory != NULL);
1513 fail_unless(out.size == 3);
1514
1515 str = eina_value_to_string(value);
1516 fail_unless(str != NULL);
1517 fail_unless(strcmp(str, "BLOB(3, [0a 0b 0c])") == 0);
1518 free(str);
1519
1520 eina_value_flush(&other);
1521
1522 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_BLOB));
1523 fail_unless(eina_value_set(&other, in));
1524 fail_unless(eina_value_convert(value, &other));
1525 fail_unless(eina_value_get(&other, &out));
1526 fail_unless(out.memory != NULL);
1527 fail_unless(out.size == 3);
1528
1529 str = eina_value_to_string(&other);
1530 fail_unless(str != NULL);
1531 fail_unless(strcmp(str, "BLOB(3, [0a 0b 0c])") == 0);
1532 free(str);
1533
1534 eina_value_flush(&other);
1535
1536 eina_value_free(value);
1537 eina_shutdown();
1538}
1539END_TEST
1540
1541
1542START_TEST(eina_value_test_struct)
1543{
1544 struct mybigst {
1545 int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, x;
1546 };
1547 const Eina_Value_Struct_Member mybigst_members[] = {
1548 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, a),
1549 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, b),
1550 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, c),
1551 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, d),
1552 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, e),
1553 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, f),
1554 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, g),
1555 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, h),
1556 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, i),
1557 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, j),
1558 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, k),
1559 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, l),
1560 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, m),
1561 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, n),
1562 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, o),
1563 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, p),
1564 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, q),
1565 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, r),
1566 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, s),
1567 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, t),
1568 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, u),
1569 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, v),
1570 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, x),
1571 EINA_VALUE_STRUCT_MEMBER_SENTINEL
1572 };
1573 const Eina_Value_Struct_Desc mybigst_desc = {
1574 EINA_VALUE_STRUCT_DESC_VERSION,
1575 EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH,
1576 mybigst_members, 23, sizeof(struct mybigst)
1577 };
1578 struct myst {
1579 int i;
1580 char c;
1581 };
1582 const Eina_Value_Struct_Member myst_members[] = {
1583 {"i", EINA_VALUE_TYPE_INT, 0},
1584 {"c", EINA_VALUE_TYPE_CHAR, 4},
1585 {NULL, NULL, 0}
1586 };
1587 const Eina_Value_Struct_Desc myst_desc = {
1588 EINA_VALUE_STRUCT_DESC_VERSION,
1589 NULL, myst_members, 2, sizeof(struct myst)
1590 };
1591 Eina_Value *value, other;
1592 int i;
1593 char c;
1594 char *str;
1595
1596 eina_init();
1597
1598 value = eina_value_struct_new(&myst_desc);
1599 fail_unless(value != NULL);
1600
1601 fail_unless(eina_value_struct_set(value, "i", 5678));
1602 fail_unless(eina_value_struct_set(value, "c", 0xf));
1603
1604 fail_unless(eina_value_struct_get(value, "i", &i));
1605 fail_unless(i == 5678);
1606 fail_unless(eina_value_struct_get(value, "c", &c));
1607 fail_unless(c == 0xf);
1608
1609 str = eina_value_to_string(value);
1610 fail_unless(str != NULL);
1611 fail_unless(strcmp(str, "{i: 5678, c: 15}") == 0);
1612 free(str);
1613
1614 fail_if(eina_value_struct_get(value, "x", 1234));
1615
1616 i = 0x11223344;
1617 fail_unless(eina_value_struct_pset(value, "i", &i));
1618 i = -1;
1619 fail_unless(eina_value_struct_pget(value, "i", &i));
1620 fail_unless(i == 0x11223344);
1621
1622 fail_unless(eina_value_copy(value, &other));
1623 str = eina_value_to_string(&other);
1624 fail_unless(str != NULL);
1625 fail_unless(strcmp(str, "{i: 287454020, c: 15}") == 0);
1626 free(str);
1627
1628 eina_value_flush(&other);
1629
1630 fail_unless(eina_value_struct_setup(&other, &mybigst_desc));
1631 fail_unless(eina_value_struct_set(&other, "a", 1) );
1632 fail_unless(eina_value_struct_set(&other, "b", 2));
1633 fail_unless(eina_value_struct_set(&other, "c", 3));
1634 fail_unless(eina_value_struct_set(&other, "d", 4));
1635 fail_unless(eina_value_struct_set(&other, "e", 5));
1636 fail_unless(eina_value_struct_set(&other, "f", 6));
1637 fail_unless(eina_value_struct_set(&other, "g", 7));
1638 fail_unless(eina_value_struct_set(&other, "h", 8));
1639 fail_unless(eina_value_struct_set(&other, "i", 9));
1640 fail_unless(eina_value_struct_set(&other, "j", 10));
1641 fail_unless(eina_value_struct_set(&other, "k", 12));
1642 fail_unless(eina_value_struct_set(&other, "l", 13));
1643 fail_unless(eina_value_struct_set(&other, "m", 14));
1644 fail_unless(eina_value_struct_set(&other, "n", 15));
1645 fail_unless(eina_value_struct_set(&other, "o", 16));
1646 fail_unless(eina_value_struct_set(&other, "p", 17));
1647 fail_unless(eina_value_struct_set(&other, "q", 18));
1648 fail_unless(eina_value_struct_set(&other, "r", 19));
1649 fail_unless(eina_value_struct_set(&other, "s", 20));
1650 fail_unless(eina_value_struct_set(&other, "t", 21));
1651 fail_unless(eina_value_struct_set(&other, "u", 22));
1652 fail_unless(eina_value_struct_set(&other, "v", 23));
1653 fail_unless(eina_value_struct_set(&other, "x", 24));
1654
1655 fail_unless(eina_value_struct_get(&other, "a", &i));
1656 fail_unless(i == 1);
1657 fail_unless(eina_value_struct_get(&other, "b", &i));
1658 fail_unless(i == 2);
1659 fail_unless(eina_value_struct_get(&other, "c", &i));
1660 fail_unless(i == 3);
1661 fail_unless(eina_value_struct_get(&other, "d", &i));
1662 fail_unless(i == 4);
1663 fail_unless(eina_value_struct_get(&other, "e", &i));
1664 fail_unless(i == 5);
1665 fail_unless(eina_value_struct_get(&other, "f", &i));
1666 fail_unless(i == 6);
1667 fail_unless(eina_value_struct_get(&other, "g", &i));
1668 fail_unless(i == 7);
1669 fail_unless(eina_value_struct_get(&other, "h", &i));
1670 fail_unless(i == 8);
1671 fail_unless(eina_value_struct_get(&other, "i", &i));
1672 fail_unless(i == 9);
1673 fail_unless(eina_value_struct_get(&other, "j", &i));
1674 fail_unless(i == 10);
1675 fail_unless(eina_value_struct_get(&other, "k", &i));
1676 fail_unless(i == 12);
1677 fail_unless(eina_value_struct_get(&other, "l", &i));
1678 fail_unless(i == 13);
1679 fail_unless(eina_value_struct_get(&other, "m", &i));
1680 fail_unless(i == 14);
1681 fail_unless(eina_value_struct_get(&other, "n", &i));
1682 fail_unless(i == 15);
1683 fail_unless(eina_value_struct_get(&other, "o", &i));
1684 fail_unless(i == 16);
1685 fail_unless(eina_value_struct_get(&other, "p", &i));
1686 fail_unless(i == 17);
1687 fail_unless(eina_value_struct_get(&other, "q", &i));
1688 fail_unless(i == 18);
1689 fail_unless(eina_value_struct_get(&other, "r", &i));
1690 fail_unless(i == 19);
1691 fail_unless(eina_value_struct_get(&other, "s", &i));
1692 fail_unless(i == 20);
1693 fail_unless(eina_value_struct_get(&other, "t", &i));
1694 fail_unless(i == 21);
1695 fail_unless(eina_value_struct_get(&other, "u", &i));
1696 fail_unless(i == 22);
1697 fail_unless(eina_value_struct_get(&other, "v", &i));
1698 fail_unless(i == 23);
1699 fail_unless(eina_value_struct_get(&other, "x", &i));
1700 fail_unless(i == 24);
1701
1702 str = eina_value_to_string(&other);
1703 fail_unless(str != NULL);
1704 fail_unless(strcmp(str, "{a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9, j: 10, k: 12, l: 13, m: 14, n: 15, o: 16, p: 17, q: 18, r: 19, s: 20, t: 21, u: 22, v: 23, x: 24}") == 0);
1705 free(str);
1706
1707 eina_value_free(value);
1708 eina_shutdown();
1709}
1710END_TEST
1711
1712
1713START_TEST(eina_value_test_array_of_struct)
1714{
1715 struct myst {
1716 int a, b, c;
1717 const char *s;
1718 };
1719 const Eina_Value_Struct_Member myst_members[] = {
1720 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct myst, a),
1721 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct myst, b),
1722 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct myst, c),
1723 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_STRING, struct myst, s),
1724 EINA_VALUE_STRUCT_MEMBER_SENTINEL
1725 };
1726 const Eina_Value_Struct_Desc myst_desc = {
1727 EINA_VALUE_STRUCT_DESC_VERSION,
1728 EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH,
1729 myst_members, 4, sizeof(struct myst)
1730 };
1731 Eina_Value *value;
1732 char *str;
1733 int i;
1734
1735 eina_init();
1736
1737 value = eina_value_array_new(EINA_VALUE_TYPE_STRUCT, 0);
1738 fail_unless(value != NULL);
1739
1740 for (i = 0; i < 10; i++)
1741 {
1742 Eina_Value_Struct desc;
1743 struct myst *st;
1744 char buf[64];
1745
1746 snprintf(buf, sizeof(buf), "item%02d", i);
1747 st = malloc(sizeof(struct myst));
1748 fail_unless(st != NULL);
1749 st->a = i;
1750 st->b = i * 10;
1751 st->c = i * 100;
1752 st->s = strdup(buf);
1753 fail_unless(st->s != NULL);
1754
1755 desc.desc = &myst_desc;
1756 desc.memory = st;
1757 fail_unless(eina_value_array_append(value, desc));
1758 }
1759
1760 str = eina_value_to_string(value);
1761 fail_unless(str != NULL);
1762 fail_unless(strcmp(str, "["
1763 "{a: 0, b: 0, c: 0, s: item00}, "
1764 "{a: 1, b: 10, c: 100, s: item01}, "
1765 "{a: 2, b: 20, c: 200, s: item02}, "
1766 "{a: 3, b: 30, c: 300, s: item03}, "
1767 "{a: 4, b: 40, c: 400, s: item04}, "
1768 "{a: 5, b: 50, c: 500, s: item05}, "
1769 "{a: 6, b: 60, c: 600, s: item06}, "
1770 "{a: 7, b: 70, c: 700, s: item07}, "
1771 "{a: 8, b: 80, c: 800, s: item08}, "
1772 "{a: 9, b: 90, c: 900, s: item09}"
1773 "]") == 0);
1774 free(str);
1775
1776 eina_value_free(value);
1777 eina_shutdown();
1778}
1779END_TEST
1780
1781void
1782eina_test_value(TCase *tc)
1783{
1784 tcase_add_test(tc, eina_value_test_simple);
1785 tcase_add_test(tc, eina_value_test_string);
1786 tcase_add_test(tc, eina_value_test_pvariant);
1787 tcase_add_test(tc, eina_value_test_compare);
1788 tcase_add_test(tc, eina_value_test_to_string);
1789 tcase_add_test(tc, eina_value_test_convert_char);
1790 tcase_add_test(tc, eina_value_test_convert_uchar);
1791 // TODO: other converters...
1792 tcase_add_test(tc, eina_value_test_array);
1793 tcase_add_test(tc, eina_value_test_list);
1794 tcase_add_test(tc, eina_value_test_hash);
1795 tcase_add_test(tc, eina_value_test_timeval);
1796 tcase_add_test(tc, eina_value_test_blob);
1797 tcase_add_test(tc, eina_value_test_struct);
1798 tcase_add_test(tc, eina_value_test_array_of_struct);
1799}
diff --git a/libraries/eina/src/tests/evas_list.c b/libraries/eina/src/tests/evas_list.c
index 55e301f..3df15ed 100644
--- a/libraries/eina/src/tests/evas_list.c
+++ b/libraries/eina/src/tests/evas_list.c
@@ -962,7 +962,7 @@ evas_list_sort(Evas_List *list, int size, int (*func)(void *, void *))
962 Evas_List *last; 962 Evas_List *last;
963 unsigned int list_number; 963 unsigned int list_number;
964 unsigned int middle; 964 unsigned int middle;
965 int list_size; 965 unsigned int list_size;
966 966
967 if (!list || !func) 967 if (!list || !func)
968 return NULL; 968 return NULL;
diff --git a/libraries/eina/src/tests/evas_mempool.c b/libraries/eina/src/tests/evas_mempool.c
index fbc48fa..7098214 100644
--- a/libraries/eina/src/tests/evas_mempool.c
+++ b/libraries/eina/src/tests/evas_mempool.c
@@ -56,7 +56,7 @@ _evas_mp_pool_free(Pool *p)
56} 56}
57 57
58void * 58void *
59evas_mempool_malloc(Evas_Mempool *pool, int size) 59evas_mempool_malloc(Evas_Mempool *pool, int size __UNUSED__)
60{ 60{
61#ifdef NOPOOL 61#ifdef NOPOOL
62 return malloc(size); 62 return malloc(size);