Commit Graph

1022 Commits

Author SHA1 Message Date
Cedric Bail 0aa77d7dde eina: use Eina_Spinlock in Eina_Stringshare instead of Eina_Lock. 2013-10-11 11:08:17 +09:00
Cedric Bail 82d86ea42d eina: use Eina_Spinlock for Eina_Log. 2013-10-11 11:08:17 +09:00
Cedric Bail 1b07350a46 eina: add Eina_Spinlock API. 2013-10-11 11:08:17 +09:00
Cedric Bail fe25608edd eina: handle more compiler strangeness for bswap.
So current order is :
- __builtin_bswap*() for compiler that provide it
- _byteswap_*() for MSVC
- bswap_*() for older Linux and some BSD
- own C code when everything else fall appart.

The reason for this order is that the builtin will always generate
the best assembly possible. On my system bswap_*() are not changing
in all version to the best solution as they are almost equivalent to
the C macro.
2013-10-04 12:49:02 +09:00
Cedric Bail d52f825de6 eina: in case of an error we should exit not continue and manipulate dead data.
This should fix a warning catched by LLVM/Clang.
2013-10-04 10:56:05 +09:00
ChunEon Park 18be4c50d9 eina/eina_file - fix eina_file_map_lines() to not drop of one character in the last line. 2013-10-04 01:58:35 +09:00
Cedric Bail ff3d2a68d5 eina: add infrastructure to handle more CPU and compiler builtin information. 2013-10-02 20:54:50 +09:00
Tom Hacohen de6f57fac0 Eina inlist: Removed redundant if in EINA_INLIST_FOREACH_SAFE.
If it is not NULL, so will EINA_INLIST_GET. As that returns a pointer to an
area after it.
2013-09-30 14:28:38 +01:00
Cedric Bail 295babadb1 eina: check if the complete hash match before checking if the key match during children walk.
This give an interesting +15% for all Eina_Hash user whatever hash function they use. The inlined
djb2 is still the fastest one and all other give very close result.

This idea was given by Lucas De Marchi's blog :
http://www.politreco.com/2013/09/optimizing-hash-table-with-kmod-as-testbed/

I do believe that rolling a crc32 implementation as a hash function should give interesting result
in our test.
2013-09-26 15:51:25 +09:00
Lucas De Marchi ad76ce025c Revert "eina: add functions to alloc strings from a printf fmt"
This reverts commit b5fce696c7 and fixes
to NEWS and @since that came later.

These functions are pretty trivial and their functionality can be
obtained with asprintf() and snprintf. The first is not available only
on windows, but there's an implementation for that one on Evil, that
should be used instead.
2013-09-25 22:51:03 -03:00
Tae-Hwan Kim 54551defa6 eina: add EINA_INLIST_REVERSE_FOREACH_FROM. 2013-09-25 18:29:23 +09:00
Cedric Bail a7fe49139d eina: fix @since to be a proper revision number. 2013-09-24 15:03:24 +09:00
Jorge Zapata b5fce696c7 eina: add functions to alloc strings from a printf fmt 2013-09-24 12:20:27 +09:00
Jorge Zapata b98ee971f3 eina: add a substraction in rectangles and more helpers
Also add functions to cut a rectangle in the different
lengths/coordinates.
Add helper macros to printf a rectangle
2013-09-24 12:20:27 +09:00
Jorge Zapata 538821f09d eina: add double_from/to and helper defines in f16p16 2013-09-24 12:20:27 +09:00
Carsten Haitzler c1556b7112 eina - remove deadlock from share-common + remove extra lock/unlock 2013-09-08 10:03:35 +09:00
Carsten Haitzler f2885306dc eina - stringshare - strlen already would deal with optimization cases 2013-09-05 12:46:06 +09:00
Cedric Bail d7c8d221b0 eina: forgotten lock, thanks coverity. 2013-09-03 12:58:51 +09:00
Cedric Bail caf934e005 eina: don't try close dummy handle. 2013-09-02 12:33:21 +09:00
Cedric Bail 64823141f6 eina: fix typo and use the right refcount. 2013-09-02 11:16:59 +09:00
Jean-Philippe Andre deacfdce24 eina: Fix invalid check on Eina_File::global_map
global_map is set to MAP_FAILED in case of error after mmap.
So, it is initialized to MAP_FAILED and considered valid
otherwise.

So, we don't want to set the map to NULL or even check again NULL.
2013-08-27 17:31:12 +09:00
Daniel Juyung Seo a7399da8f6 Eina.h: bump up year. 2013-08-20 03:11:48 +09:00
Cedric Bail d72239a118 eina: remove a warning. 2013-08-12 12:11:56 +09:00
Cedric Bail 861823848a eina: change eina_file_virtualize to be able to provide a fake name. 2013-08-09 20:50:54 +09:00
Carsten Haitzler fb3159c48e eina module - minor addition ot allowing lazy loading if env var set 2013-08-08 20:18:08 +09:00
Cedric Bail 464c58a1c9 eina: another fix for windows build. 2013-08-08 17:17:58 +09:00
Cedric Bail c4beec0127 eina: fix compilation of Eina_File on windows. 2013-08-08 17:05:14 +09:00
Carsten Haitzler bdb19cd974 eina-file - adapt to bsd version of MADV_REMOVE 2013-08-06 16:13:03 +09:00
Cedric Bail c90179ce86 eina: fix build on FreeBSD. 2013-08-06 15:44:22 +09:00
Chris Michael a97f3c0b9b Fix eina_file_virtual_map_new function (/me glares at Frenchie).
- Spank Cedric !!!!!

NB: How about we actually fill in "map" after allocation ??

NB: Previously we would malloc "map" and immediately exit without
filling it in, without adding it to the hash....nothing. Just allocate
and get out. Bad Frenchie !!!

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 13:01:52 +01:00
Cedric Bail 4dd259f3b1 eina: add eina_file_refresh(). 2013-07-31 17:16:40 +09:00
Cedric Bail f2de8970a1 eina: add support for in memory only Eina_File. 2013-07-31 11:51:51 +09:00
Cedric Bail fa57dd8b2a eina: seems like all the compiler we support do support __typeof__. 2013-07-29 16:28:07 +09:00
Ryuan Choi f6ba1f69e7 eina: use __typeof__ for public headers to build applications with c++0x. 2013-07-26 14:00:16 +09:00
Carsten Haitzler a8e80514dc fix clang bad free complaint to deal with data magic value 2013-07-16 18:11:50 +09:00
Cedric Bail 9d2249c1a8 eina: fix Eina_Log restart. 2013-07-15 17:04:34 +09:00
Daniel Juyung Seo fe914c069c eina_stringshare.h: added more description to eina_stringshare_add_length(). 2013-07-15 13:39:57 +09:00
Cedric Bail f07d4c17e9 eina: add eina_tiler_empty. 2013-07-11 14:01:06 +09:00
Cedric Bail 5479da04b6 eina: Eina_Tiler formatting. 2013-07-11 14:01:06 +09:00
Cedric Bail d2b94729bc eina: don't insert the same rectangle multiple time in a row. 2013-07-11 14:01:06 +09:00
Cedric Bail 2e347b5e22 eina: let's not complain for nothing. 2013-07-11 14:01:06 +09:00
Chris Michael a144495daa Initialize 'd' to -1 so we can check on 'end' if it needs closing
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-07-08 16:05:12 +01:00
Chris Michael 2aa12782b6 If we open a file for copying, then we should also Close that file
when the copy is done.

NB: Fixes Coverity CID1039181

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 11:13:56 +01:00
Mike Blumenkrantz b8e16b8f4a +eina_tiler_area_size_get
also fix docs for eina_tiler_area_size_set
2013-07-08 09:08:04 +01:00
Carsten Haitzler d15d86e26f eina: add eina_file_map_populate() 2013-07-06 22:01:23 +09:00
Cedric Bail 0453cd16b4 eina: revert that simplification as compiler are now to dumb to handle it. 2013-07-05 14:59:43 +09:00
Cedric Bail f825bebcdb eina: improve Eina_Tiler to be in par with Evas_Tilebuf. 2013-07-04 13:02:48 +09:00
Stefan Schmidt 9c1ed31c76 eina_list: Avoid NULL pointer deref in eina_list_shuffle.
If we have a valid but empty, n = 0, list we never enter the loop
and shuffled_last might still be NULL. Avoid this case by checking
explicitly for n = 0 before.
2013-06-25 15:18:33 +01:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Sebastian Dransfeld 068f1ddc62 efl: formatting 2013-06-20 13:08:36 +02:00
Jérémy Zurcher 0baf4b3561 eina_str_split_full_helper: indent 2013-06-12 23:34:40 +02:00
Jérémy Zurcher bc182253a7 eina_str_split_full_helper: check params, set NULL at the end of token array 2013-06-12 23:34:40 +02:00
Boris Faure e0372fc54d eina_log: screen-256color also support colors 2013-06-09 15:50:11 +02:00
Boris Faure 55b66a93d7 eina-log: xterm-256 (or terminology someday…) supports colors 2013-06-08 21:07:22 +02:00
Cedric Bail 06cd16548c eina: add eina_file_dup. 2013-06-04 15:04:19 +09:00
Mike Blumenkrantz 29a4edb274 improve eina_str_convert_len docs 2013-05-30 07:41:55 +01:00
Mike Blumenkrantz 37aa26b977 add eina_str_convert_len() for converting from encodings which contain '\0' characters
eina_str_convert() is GUARANTEED to break when doing any such encoding (eg. UTF16->UTF8). I don't know who added the original function, but this is very bad, and we should almost certainly deprecate eina_str_convert() so people are not surprised when they are unable to convert strings as expected.
2013-05-29 13:46:11 +01:00
Daniel Juyung Seo 3c9856f9e0 eina_list.h: fixed documentation source formatting while reading the code. 2013-05-23 20:26:48 +09:00
Daniel Willmann 5f1614e1d5 eina_fp: Fix eina_f32p32_mul rounding issues
Previous multiplication just truncated the fraction part to 16 bits. If
we round properly we can actually increase accuracy a bit.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-05-17 17:15:27 +01:00
Cedric Bail 2c8ff31788 eina: add EINA_INLIST_FREE. 2013-05-09 09:57:19 +09:00
Daniel Juyung Seo c886845a1b eina_str.c: fixed formatting. 2013-05-08 20:53:45 +09:00
Galatsanos 'godfath3r' Panagiotis c8b9e0540b eina: fix a clang warning in eina_cow.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-05-08 18:17:00 +09:00
Cedric Bail 674f612c3b eina: more meaningful message. 2013-05-08 18:17:00 +09:00
Cedric Bail 574e9015f1 eina: whitespace--; 2013-05-08 18:17:00 +09:00
Daniel Juyung Seo 436d63e01a eina_unicode.H: be nice. add more documentation for deprecated api. 2013-04-20 19:01:02 +09:00
Cedric Bail 495088caf4 eina: make eina_mempool_alignof a little bit faster. 2013-04-11 18:07:09 +09:00
Cedric Bail 9547166878 eina: little speed improvement by reducing chance to call function. 2013-04-11 18:07:09 +09:00
Jérémy Zurcher 2036f7d344 eina: add eina_inlist_first and eina_inlist_last
- both as static inline functions
   - test added in eina_inlist_simple
2013-04-09 12:03:05 +02:00
Jérémy Zurcher 1231faf8d9 eina_inlist: fix eina_inlist_sort doc 2013-04-05 23:58:46 +02:00
Cedric Bail dd4a5215d7 eina: add some more debug information. 2013-04-04 23:50:18 +09:00
Cedric BAIL a11fe38afc eina: remove the most costly boolean ever.
We did use this 'begin' boolean to make eina_hash always allocate only
once per item it push in the hash. This boolean was alone at the end of
a structure. It would have costed us 4bytes on 32bits system and 8bytes
on 64bits. Removing it make elemines consume 100KB less on 32bits system.

We may have a speed impact on hash insertion here, but I don't think we
do use eina_hash_add and friends in any hot path, at the moment. If that
was the case there would be some way to mitigate this, just not worth it
at the moment.
2013-04-04 11:22:43 +09:00
Cedric BAIL 7ebe7373e6 eina: make it possible to disable Eina_Cow GC at instantiation time. 2013-04-02 17:11:05 +09:00
Cedric BAIL 7e004cea85 eina: let's not run the GC on memcpy things. 2013-04-02 13:41:47 +09:00
Daniel Juyung Seo b8395bd119 eina_stringshare.h: more acurate documentation for Eina_Stringshare. 2013-04-01 20:57:57 +09:00
Cedric BAIL 78984b9e7a eina: correctly remove reference from hash and make cow garbage collector work. 2013-04-01 18:38:24 +09:00
Cedric Bail 5da94cfc89 eina: add <errno.h> for build on Win32. 2013-03-30 18:20:19 +09:00
Cedric BAIL ad406d7353 eina: use a global variable to hold the same string accross other library. 2013-03-29 11:44:48 +09:00
Vladislav Brovko 7584a7e84d eina: add eina_file_mkdtemp and tests for Eina_File.
Test added for :
eina_file_direct_ls_simple
eina_file_ls_simple

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-03-27 22:45:34 +09:00
Cedric BAIL 6f6d425f0d eina: do not report timing for already stopped domain. 2013-03-27 22:37:15 +09:00
Cedric BAIL 1d5692baa6 eina: add eina_log_timing. 2013-03-27 21:43:45 +09:00
Cedric BAIL 70f8bd50eb eina: add eina_file_mkstemp. 2013-03-25 18:45:42 +09:00
Cedric BAIL 7dfa9af0f4 eina: add some documentation for Eina_Cow. 2013-03-25 18:45:42 +09:00
Cedric BAIL 4a584fcc32 eina: correctly advertise to valgrind Eina_Cow memory size. 2013-03-22 20:15:05 +09:00
Boris 'billiob' Faure 61c50e9d1c eina-cow: fix valgrind instrumentation 2013-03-20 21:18:49 +01:00
Daniel Willmann 7f5ea979c3 Hush clang warnings for EINA_INLIST_FOREACH_SAFE
As cedric said a couple years ago in commit 17c820ae:
"This initialisation is not needed, but will reduce llvm warning noise."

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-03-20 17:05:27 +00:00
Jérémy Zurcher b4cad3c370 eina: add eina_list_shuffle
Summary: add uniform shuffle to Eina_List

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D27
2013-03-20 12:19:13 +01:00
Jérémy Zurcher d0f3357f77 TES
Conflicts:
	src/lib/eina/eina_list.c
	src/lib/eina/eina_types.h
2013-03-20 11:48:44 +01:00
Cedric BAIL a40c41b1bd eina: fix use of Valgrind macro in Eina_Cow. 2013-03-20 11:01:03 +09:00
Cedric BAIL e02bb36e3a eina: improve speed of Eina_Cow.
* Use an Eina_Hash for the garbage collector list.
* Turn off garbage collection on object that are unlikely to match.

This patch make 1.8 as fast as 1.7 again.
2013-03-20 10:59:56 +09:00
Tom Hacohen d84de4adf1 Disable cow magic in dev profile, instead of a hack in the source.
Well played cedric, making me revert your patch and thus breaking the build.
2013-03-19 15:45:44 +00:00
Tom Hacohen 60c9ba4a8f Revert "eina: reenable them as it was a bug from Tasn."
This reverts commit a9041777d4.

Re-disable them as it was a bug from Cedric.

This is the cause for the huge slowdown.
2013-03-19 15:37:55 +00:00
Cedric Bail a9041777d4 eina: reenable them as it was a bug from Tasn. 2013-03-20 00:16:12 +09:00
Cedric Bail 68213b7f78 eina: disable Eina_Cow magic completely for the moment. 2013-03-19 23:42:12 +09:00
Mike Blumenkrantz ef3c57aa08 fix magic failure in eina_value_array_count when array has not been allocated 2013-03-19 14:07:28 +00:00
Stefan Schmidt b3c1a6c1c5 eina: Add execinfo.h to avoid implicit declarations.
If we have backtrace support we should also add the header before
using the backtrace and backtrace_symbols_fd functions.
2013-03-19 08:38:11 +00:00
Cedric Bail 9e745d4a2c efl: add macro to swap Windows and Unix path separators. 2013-03-19 15:15:46 +09:00
Cedric BAIL 5f2ec224e9 eina: speed up Eina_Cow.
* Use Eina_Hash instead of Eina_List to remember what memory did change.
* Turn off Eina_Cow use of Eina_Magic when doing a release as it is only
used internaly and we should not make any mistake there.
2013-03-19 15:11:50 +09:00
Daniel Juyung Seo 0dba1e9b8a eina eina_inlist.c: fixed formatting while reading the code. 2013-03-17 19:00:49 +09:00
Cedric Bail 06ce7c2ede eina: add support for Systemd journal in Eina_Log.
NOTE: if you start your process with Systemd it will automatically use
Journald API. You will need to overide the default logging function to
change that behavior.
2013-03-16 22:49:32 +09:00
Cedric BAIL 6b4ba5cead eina: a little bit sleepy, put that in the right file. 2013-03-15 16:47:05 +09:00
Cedric BAIL 352ed3cfa4 eina: add evil in. 2013-03-15 16:41:46 +09:00
Cedric BAIL 0dde9a6574 eina: share eina_file_copy code accross platform. 2013-03-15 16:05:39 +09:00
Cedric BAIL e70502f1a1 eina: improve portability of Eina_File. 2013-03-15 11:05:25 +09:00
Daniel Willmann f90726cf35 Revert "eina: improve portability of Eina_File."
This reverts commit c002d113f1.

This commit reliably breaks builds with clang. Please test with
export CC=clang before you commit again.

export CC=clang
./autogen.sh --enable-multisense && make -j 10

The error Jenkins gets (I confirmed locally):

/bin/bash: line 1: 13549 Segmentation fault      (core dumped) EFL_RUN_IN_TREE=1 ./bin/edje/edje_cc -id . -fd . -id ./tests/emotion/data tests/emotion/data/theme.edc tests/emotion/data/theme.edj
2013-03-14 17:21:48 +00:00
Cedric BAIL 49887271d2 eina: remove duplicated declaration. 2013-03-14 21:00:03 +09:00
Cedric BAIL c002d113f1 eina: improve portability of Eina_File. 2013-03-14 20:52:37 +09:00
Cedric BAIL 81f739da84 eina: improve usability of Eina_Tmpstr.
Added eina_tmpstr_add_length and eina_tmpstr_strlen.
2013-03-14 20:52:37 +09:00
Cedric Bail 709b975ca3 check fchmod existence for portabilityy 2013-03-13 17:04:32 +09:00
Vladislav Brovko 8cac00fc66 eina: prevent space stripping of CDATA in Eina_Simple_XML.
Prevent stripping spaces (after [CDATA[ and before ]]>) in XML like:
<![CDATA[ <foo>bar</foo> ]]>

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-03-11 11:03:05 +09:00
Cedric Bail 8d5e33077e efl: use HAVE_FCNTL around call to fcntl. 2013-03-10 23:10:27 +09:00
Cedric Bail 5fc7829c96 eina, evil: fix warning on 64 bits 2013-03-10 20:32:53 +09:00
Daniel Juyung Seo 5d20302c35 eina eina_hash.h,eina_list.h: fixed a typo.
ilustrate -> illustrate
2013-03-09 14:38:36 +09:00
Cedric BAIL 1c9470e071 eina: improve logging and debugging infra for Eina_Cow. 2013-03-04 11:08:21 +09:00
Cedric BAIL fde00d91a8 eina: eina_strlcat now work with NULL src. 2013-02-28 07:49:16 +09:00
Daniel Willmann 7f63a74251 eina: Lets allocate space for the terminating \0 as well
Off-by-1 in string copy, found by klocwork

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-02-18 13:18:04 +00:00
Cedric BAIL 884c31df41 eina: fix siginfo detection.
Signal are not a portable way to detect memory mapped file corruption.
So let's disable it for system without signal and later find a way to
detect it on other system.
2013-02-18 16:46:52 +09:00
Cedric BAIL 1e916e44f7 eina: improve Eina_Clist support for 64bits system.
This warning are triggered by a cross compilation as previously stated.
2013-02-16 10:54:36 +01:00
Cedric BAIL ed58d0dd05 efl/eina: let's do all include.
SVN revision: 83833
2013-02-12 01:42:47 +00:00
Stefan Schmidt 6467f60395 efl/eina_xattr: Fix memory leak in eina_xattr_value_ls.
In the error case we freed the iterator but not the attribute.

SVN revision: 83791
2013-02-08 15:49:59 +00:00
Daniel Juyung Seo 48a06f1252 eina eina_inlist.c: Fixed formatting while reading the code.
SVN revision: 83714
2013-02-07 08:03:44 +00:00
Cedric BAIL e684f5a823 efl/eina: Eina_Tiler take tile size into account.
SVN revision: 83708
2013-02-07 07:32:45 +00:00
Cedric BAIL d9cafa2052 eina: disable randomisation for Eina_Hash superfast.
SVN revision: 83698
2013-02-07 03:07:32 +00:00
Cedric BAIL 1cb8c3c006 efl/eina: fix map leak in Eina_File.
SVN revision: 83668
2013-02-06 09:28:00 +00:00
Cedric BAIL 01dba3fbc0 efl/eina: prevent denial of service on eina_hash.
Thanks goes to Thiago Macieira for sharing the issue. This
is the result of the cross-desktop talk at fosdem. A lot more
comming in the futur !


SVN revision: 83578
2013-02-04 07:52:56 +00:00
Mike Blumenkrantz afa9c0ab97 fix typo in stringshare_refplace doc
SVN revision: 83565
2013-02-01 12:57:44 +00:00
Mike Blumenkrantz 1f9a84b9cc add eina_stringshare_refplace(): same as replace(), but calls ref instead of add
also fixed a small doc error


SVN revision: 83549
2013-02-01 11:12:33 +00:00
Mike Blumenkrantz bfc76668f4 finally addressing complaints regarding eina_list_last_data_get() not being a function. well now it is
SVN revision: 83547
2013-02-01 11:02:53 +00:00
Cedric BAIL 6414b0864f efl/eina: fix some memleak and improve speed of eina_cow_memcpy.
SVN revision: 83375
2013-01-28 00:22:21 +00:00
Boris Faure fb3c280a95 efl: more valgrind related fixes on eina_cow
SVN revision: 83311
2013-01-24 21:42:18 +00:00
Boris Faure 8d13c5ce3e efl: eina_cow: fix some valgrind instrumentation
SVN revision: 83308
2013-01-24 21:06:41 +00:00
Cedric BAIL eff597ea1e eina: fix some warning.
SVN revision: 83196
2013-01-24 02:58:00 +00:00
Cedric BAIL 05b4d1b3cd efl/eina: improve Eina_Cow.
- Add valgrind macro arround Eina_Cow internal data.
- Add a #define for Eina_Magic on Eina_Cow returned pointer.
- Fix a bug done during free on a mempool data (Need to improve
mempool to catch this one more easily next time).


SVN revision: 83191
2013-01-24 01:42:20 +00:00
Cedric BAIL d282e075ef efl/eina: don't over align when the structure is already aligned.
SVN revision: 83189
2013-01-24 01:38:12 +00:00
Cedric BAIL 65344d7a7f efl/eina: let us know where that wrong Eina_Magic was in memory.
SVN revision: 83188
2013-01-24 01:37:20 +00:00
Cedric BAIL 4d8dffc411 efl: remove useless code.
SVN revision: 83065
2013-01-22 09:58:36 +00:00
Cedric BAIL 94b31ce5da efl: simplify logic of eina_cow.
SVN revision: 83051
2013-01-22 03:52:55 +00:00
Cedric BAIL a102b14686 efl: not sure of that one, but remove use of eina_safety_check in inline function.
SVN revision: 83050
2013-01-22 02:14:57 +00:00
Cedric BAIL d32ee023e3 efl: missing deprecated user.
SVN revision: 83049
2013-01-22 02:14:07 +00:00
Cedric BAIL 336e0c5e38 efl: deprecate eina_unicode_utf8_get_next, add eina_unicode_utf8_next_get.
SVN revision: 83048
2013-01-22 02:00:55 +00:00
Cedric BAIL 066543089d efl: inline eina_unicode_utf8_get_next.
SVN revision: 83035
2013-01-21 09:37:14 +00:00
Cedric BAIL 5bd8b33906 efl: add eina_cow helper macro.
SVN revision: 83025
2013-01-21 03:11:29 +00:00
Cedric BAIL 41b70693b7 efl: fix leak in eina_cow.
Patch by Paulo Alcantara <pcacjr@zytor.com>.


SVN revision: 83014
2013-01-20 11:02:48 +00:00
Gustavo Sverzut Barbieri 5f8c760406 fix eina_binshare_add_length() using EINA_PURE.
Amazingly this was caught by a test (eina_binshare_small) that was
failing... Who said we didn't had test?! :-P



SVN revision: 82946
2013-01-17 20:10:15 +00:00
Cedric BAIL c8ff22bf5b efl: let's be nice on NULL.
SVN revision: 82930
2013-01-17 10:29:31 +00:00
Cedric BAIL 515282006f efl: Add Eina_Cow_Data...
SVN revision: 82923
2013-01-17 06:51:35 +00:00
Cedric BAIL c7aead6fdc efl: fix cow after review by k-s.
NOTE: I didn't find a way to tell valgrind that some memory is read only.


SVN revision: 82742
2013-01-14 03:34:19 +00:00
Gustavo Sverzut Barbieri e21bfbbbb2 eina: add missing ifdef around splice code.
SVN revision: 82735
2013-01-14 00:00:37 +00:00
Lucas De Marchi 4af2647d05 efl: remove check for libgen.h
SVN revision: 82582
2013-01-10 20:25:48 +00:00
Lucas De Marchi 23b741699f efl: remove check for inttypes.h and stdint.h
SVN revision: 82580
2013-01-10 20:25:39 +00:00
Lucas De Marchi f60bfe38d6 efl: Remove check for siginfo.h and siginfo_t
SVN revision: 82579
2013-01-10 20:25:35 +00:00
Lucas De Marchi db395ef7eb efl: Remove check for unistd.h
* unistd.h: is very useful, very old and very standard.



SVN revision: 82577
2013-01-10 20:25:26 +00:00
Lucas De Marchi 3dc661e710 efl: Remove check for strings.h
* strings.h: is very useful, very old and very standard. The only place
that checks for that is simple_xml_parser and I have no idea why



SVN revision: 82576
2013-01-10 20:25:21 +00:00
Gustavo Sverzut Barbieri 8ac159bfe2 efl/eina_prefix: whitespace cleanup as pointed by kuri at #edevelop
trailing whitespacesd and mixed tabs (old style) are gone.


SVN revision: 82470
2013-01-09 16:00:39 +00:00
Gustavo Sverzut Barbieri 37ab81a620 efl/eina_prefix: fix _try_proc() location.
_try_proc() is how to find a symbol based on /proc/self/maps, not
related to argv0.

change _try_proc() to ifdef inside... avoiding the need to ifdef at
definition and call site.



SVN revision: 82469
2013-01-09 15:57:28 +00:00
Gustavo Sverzut Barbieri da5a568f68 efl/eina_prefix: simplify common prefix lookup.
SVN revision: 82467
2013-01-09 15:46:05 +00:00
Gustavo Sverzut Barbieri ba461e9467 efl/eina_prefix: use eina_safety to be loud on NULL pointers.
SVN revision: 82466
2013-01-09 15:38:42 +00:00
Gustavo Sverzut Barbieri 2f49e495ee efl/eina_prefix: cleanup and review logs.
there shouldn't be behavior changes at this point, just minor cleanups
and simplifications, particularly to the log.



SVN revision: 82464
2013-01-09 15:21:40 +00:00
Gustavo Sverzut Barbieri 65aae8f181 efl/eina: fix debian multilib detection without magic file.
The algorithm will now consider valid bin, data orlocale as well if
magic file was not provided.



SVN revision: 82429
2013-01-08 23:57:14 +00:00
Cedric BAIL 0e50f122e5 efl: Add eina copy on write infrastructure.
SVN revision: 82396
2013-01-08 09:17:56 +00:00
Jérémy Zurcher 1424ac7d4d From: Jérémy Zurcher <jeremy@asynk.ch>
Subject: [E-devel] 2 steps eina_share_common_del speed up

builtin node is never unlinked even if empty, always is the last of the queue,
so that it can be used to get a pointer to head.
      
cost: never unlink or promote builtin node.
benefit: no need to hash and search rbtree to unlink an empty node,
only to remove an empty head.

store full hash in Eina_Share_Common_Head, so we only hash once
use 8 lower bits as node hash, use next 8 bits as bucket index.
    
cost: have to apply 0xFF mask on hash in rbtree callbacks.
benefit: no need to hash when removing an empty head.
        


SVN revision: 82161
2013-01-04 08:41:47 +00:00
Gustavo Sverzut Barbieri 0a2d116119 efl: eina_alloca.h to simplify alloca() usage.
having to replicate 18 lines per file just to access alloca() is
insane. Let's do that in Eina.h and avoid that crap :-/



SVN revision: 82082
2013-01-03 15:10:34 +00:00
Gustavo Sverzut Barbieri 43eb232d38 oops: remove printf
SVN revision: 81943
2012-12-31 23:42:25 +00:00
Gustavo Sverzut Barbieri 6ae6f925a4 efl: add eina_file_copy()
it's useful to copy file from one place to another and this will be
used in eio' s implementation.

NOTE: did not use mmap here as mmap faults may be cumbersome to handle
(Eina_File itself does that, but in a nasty way) and the
implementation would be severely different as there is no Eina_File
from FD, and there is no way to inject custom memory/fd into the
Eina_File's fault handling. The performance would not be that
different anyways and the splice() is already in there for systems
with good performance (read: Linux).



SVN revision: 81942
2012-12-31 23:17:18 +00:00
Gustavo Sverzut Barbieri 678727aae4 efl: missing api for xattr.
SVN revision: 81941
2012-12-31 21:05:58 +00:00
Gustavo Sverzut Barbieri 9161f83a3e efl: make xattr stuff work.
* fix eina_xattr_value_ls() and eina_xattr_value_fd_ls() to not loop
   infinitely.

 * NULL terminate the retrieved xattr values, at least they'll be
   easier to handle in our programs and less error prone.



SVN revision: 81940
2012-12-31 20:41:54 +00:00
Gustavo Sverzut Barbieri 09748cfb15 efl: beef thread documentation and error reporting.
eina_thread_join() is nasty and didn't report errors :-(

I'm using Eina_Error here, but it's global to the application and not
thread-local. Maybe we should make eina_error_get() and
eina_error_set() thread-local storage?



SVN revision: 81936
2012-12-31 17:26:33 +00:00
Gustavo Sverzut Barbieri 4668d04f04 efl: cleanup HAVE_THREADS and pthread usage outside of eina.
Eina now abstracts threads, so use that.

the touched files had the EFL_HAVE_THREADS as it's mandatory now.



SVN revision: 81935
2012-12-31 16:14:40 +00:00
Cedric BAIL 209347f148 efl: rename eina_inarray_add to eina_inarray_grow.
SVN revision: 81918
2012-12-31 01:27:58 +00:00
Cedric BAIL 375be85b27 efl: add a way to allocate without memcpy data in an Eina_Inarray.
SVN revision: 81913
2012-12-31 00:05:02 +00:00
Gustavo Sverzut Barbieri 2608f68571 efl/docs: clean-up and make it more uniform.
now unified docs are bit more uniform in their start pages, overall
improved but much to do :-(



SVN revision: 81851
2012-12-28 23:26:05 +00:00
Gustavo Sverzut Barbieri e86d9e0dd9 efl/eina: fix doc for content access
SVN revision: 81831
2012-12-28 19:08:42 +00:00
Cedric BAIL 0d86917bbe efl: when you remove option at least make the default sane or don't do it.
SVN revision: 81731
2012-12-27 06:46:29 +00:00
Mike Blumenkrantz f5a98df8de eina_magic_fail now only ERRs on NULL instead of CRI, making debugging much easier
SVN revision: 81666
2012-12-24 09:16:56 +00:00
Boris Faure d7b55afca2 eina: fix code indentation
SVN revision: 81660
2012-12-23 17:30:56 +00:00
Jonas M. Gastal a6b491fc01 efl: Created Eina group and added existing Eina groups to it.
SVN revision: 81290
2012-12-18 18:38:25 +00:00
Jonas M. Gastal d41d76ca38 efl: Modified section names as doxygen reuses titles for same named sections in different pages.
SVN revision: 81279
2012-12-18 16:18:28 +00:00
Jonas M. Gastal 65a7188905 efl: Unifying authors page.
SVN revision: 81277
2012-12-18 16:18:19 +00:00
Jonas M. Gastal 6ecaa33f22 efl: Adding a unified main page that links to the "mainpage" of libs.
SVN revision: 81273
2012-12-18 16:12:56 +00:00
Cedric BAIL 498b46802c eina: fix Eina_Barrier when pthread doesn't provide one.
Patch by Ulisses Furquim <ulisses@profusion.mobi>


SVN revision: 80907
2012-12-14 02:18:02 +00:00
Cedric BAIL 88ba56d9d5 efl: don't leak fd on exec.
SVN revision: 80434
2012-12-07 11:01:41 +00:00
Gustavo Sverzut Barbieri 81bd007e5b efl: share HAVE_ATFILE_SOURCE between eina_file, ecore_file...
SVN revision: 80391
2012-12-06 21:15:30 +00:00
Jérémy Zurcher 9aa23128b6 [eina] path sanitizing now takes care of '/./' and
breaks loop on '/..$'



Patch by: Jérémy Zurcher <jeremy@asynk.ch>



SVN revision: 79449
2012-11-19 13:13:31 +00:00
Gustavo Lima Chaves a4b2a48dc0 [eina] Better pretty printing of eina_value timeval buddies.
SVN revision: 79154
2012-11-12 12:26:07 +00:00
Mike Blumenkrantz 43eb9749ab @since for eina_list_last_data_get
SVN revision: 79149
2012-11-12 10:53:10 +00:00
Mike Blumenkrantz 7ba993749d add eina_list_last_data_get() macro to simplify calling eina_list_data_get(eina_list_last())
SVN revision: 79142
2012-11-12 09:58:48 +00:00
Vincent Torri 650d3d723c Eina: Fix build on Solaris 10
Patch by Robert David


SVN revision: 79085
2012-11-10 08:35:11 +00:00
Vincent Torri 60bdd4c22e unused variable
SVN revision: 79067
2012-11-09 21:35:03 +00:00
Vincent Torri db5c257d1a Eina: Compilation on cygwin
Patch by Yaakov Selkowitz, thanks :)


SVN revision: 78953
2012-11-07 00:48:10 +00:00
Vincent Torri 58a9a0ad57 merge: don't use recursive subdirs. Compilation should be faster.
Please check.

note1: Only lib and bin for now, but should be extended to other stuff
note2: distcheck does not work because eo_suite is failing.


SVN revision: 78758
2012-11-01 12:56:52 +00:00
Vincent Torri 0b211e0c20 eina: formatting
SVN revision: 78756
2012-11-01 12:36:20 +00:00
Cedric BAIL 4cf317b877 eina: fix typo.
SVN revision: 78586
2012-10-28 13:02:14 +00:00
Cedric BAIL 5fd68084c9 eina: try to fix my own mess.
SVN revision: 78585
2012-10-28 12:10:36 +00:00
Vincent Torri 124e0d4afd merge: add a holdall variable
SVN revision: 78503
2012-10-26 06:57:11 +00:00
Vincent Torri aac3e95ccf merge: -Wl,--enable-auto-import is useless with recent versions of gcc on Windows
SVN revision: 78495
2012-10-25 22:01:28 +00:00
Vincent Torri ea213c2ea4 fix++
SVN revision: 78473
2012-10-25 21:25:59 +00:00
Vincent Torri e082ab0e74 Eina: add affinity to win32 code.
It's not working yet:
 * eina_thread.c:152:33: error: 'index' undeclared (first use in this function)
 * eina_thread.c:295:4: warning: passing argument 3 of '_eina_thread_win32_create' from incompatible pointer type [enabled by default]

also:

 * line 142, is it normal that we call eina_list_append() with tw being NULL ?
 * is what I did in the close_thread label correct ?


SVN revision: 78416
2012-10-25 05:21:58 +00:00
Vincent Torri 77d90bd45e merge: pass directly to the preprocessor the Windows macro instead of using autotools
SVN revision: 78350
2012-10-23 05:43:57 +00:00
Nicholas Hughart 3b8464fa83 Backport 78258/78259 to fix Eina amalgamation build.
SVN revision: 78260
2012-10-19 16:19:33 +00:00
Sebastian Dransfeld 35d28817db eina: Always do opendir first
SVN revision: 78238
2012-10-19 09:03:14 +00:00
Carsten Haitzler 786544b73d fix dirp leak
SVN revision: 78235
2012-10-19 08:18:59 +00:00
Cedric BAIL 97dc017571 efl: change a little bit API.
SVN revision: 78229
2012-10-19 07:13:08 +00:00
Cedric BAIL 903bbfba82 efl: add Eina_Thread API.
SVN revision: 78225
2012-10-19 05:47:33 +00:00
Cedric BAIL 4b14ea628c eina: handle properly case where str != NULL and slen == 0
SVN revision: 78222
2012-10-19 04:38:08 +00:00
Cedric BAIL 7a132e9c08 efl: backport r78215.
SVN revision: 78217
2012-10-19 01:51:07 +00:00
Cedric BAIL df8fb6d989 efl: backport r78213.
SVN revision: 78216
2012-10-19 01:49:06 +00:00
Cedric BAIL c93ae85eb4 efl: backport r78209.
SVN revision: 78211
2012-10-19 01:31:22 +00:00
Sebastian Dransfeld b6add7a518 eina: Check if we can open dir first
SVN revision: 78172
2012-10-18 09:12:14 +00:00
Carsten Haitzler afdd3f4a39 add tmpstr to efl eina tree... this is for the future so not going
into eina tree.



SVN revision: 78112
2012-10-17 10:24:03 +00:00
Carsten Haitzler 42a59387a6 add eina barrier to efl tree.
SVN revision: 78100
2012-10-17 03:55:35 +00:00
Gustavo Sverzut Barbieri adfcc2112e efl: cleanup unused conditional and always-enabled features.
SVN revision: 77817
2012-10-10 21:32:45 +00:00
Gustavo Sverzut Barbieri 3cf32cca3f efl: 'fix' support for exotic library.
it's still not merged into EFL single tree, but once it is we should
use "HAVE_EXOTIC" define to work with it.

Before we had: EINA_HAVE_EXOTIC (not used), HAVE_EXOTIC_H (used by
eina_module.c). Since the other libs are all defined as HAVE_LIBNAME,
we're using HAVE_EXOTIC everywhere now.



SVN revision: 77816
2012-10-10 21:24:22 +00:00
Gustavo Sverzut Barbieri 3acb5dde8b efl: remove EINA_HAVE_ON_OFF_THREADS support.
it's still in the code, but not configurable anymore. We may remove it
later if not really needed.



SVN revision: 77802
2012-10-10 20:30:39 +00:00
Gustavo Sverzut Barbieri a6acf1b2d0 efl: simplify threads step 1 - make it mandatory.
remove the eina_inline_lock_void.x fallback as it's not used anymore.

still keep the EINA_HAVE_THREADS in the source code.



SVN revision: 77796
2012-10-10 20:24:45 +00:00
Gustavo Sverzut Barbieri 4d35e4ca03 efl: simplify mempools, nuke some and make remaining statically built.
Now we always build the following memory pools statically:
 - pass_through: calls malloc/free directly, useful to debug.
 - chained_pool: default for ages.
 - one_big: used by some embedded systems (should we remove?)

Removed:
 - ememoa_fixed and ememoa_unknown: depends on a separate lib, not supported?
 - buddy: nobody uses it?

NOTE: we do not need the src/modules/eina/mp/*/Makefile.am anymore
since they are statically built. But I'll keep these and the
references in src/modules/eina/mp/Makefile.am



SVN revision: 77792
2012-10-10 19:57:53 +00:00
Vincent Torri 7fe3d35994 merge: __UNUSED__ --> EINA_UNUSED and some fixes in eo.
SVN revision: 77542
2012-10-05 20:09:47 +00:00
Vincent Torri 1c96844922 Eina: backport rev. 77445
SVN revision: 77446
2012-10-04 17:16:18 +00:00
Cedric BAIL 1000f350e3 efl: backport Igor's eina patch.
SVN revision: 77415
2012-10-04 09:31:46 +00:00
Carsten Haitzler 36ef0cdc92 and esnure we have all the right include paths.
SVN revision: 77121
2012-09-27 04:08:48 +00:00
Carsten Haitzler 0a5ba96837 move eina headers into lib/eina like the rest of efl - at least be
consistent with the majority.



SVN revision: 77119
2012-09-27 04:02:37 +00:00
Carsten Haitzler fbfb3ec61a port mmap safety fix to efl tree.
SVN revision: 77115
2012-09-27 03:46:03 +00:00
Vincent Torri ab144cb474 merge: fix compilation when no EFL is installed...
tested on linux and windows.
And disable valgrind as there's a link problem in eet binary,
i'll check that later


SVN revision: 76938
2012-09-21 08:15:58 +00:00
Vincent Torri 785f2a6b3a merge : add eina
currently, examples, tests and benchmark are not set. That's the next things i'll do


SVN revision: 76710
2012-09-16 10:57:48 +00:00