Commit Graph

589 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri 3a8741c75e more docs for strbuf
SVN revision: 46518
2010-02-26 20:25:09 +00:00
Gustavo Sverzut Barbieri 2511972dde documentation improvements for eina_strbuf.
SVN revision: 46517
2010-02-26 20:23:12 +00:00
Gustavo Sverzut Barbieri f32672764d add eina_strbuf_append_length()
SVN revision: 46516
2010-02-26 20:09:36 +00:00
Gustavo Sverzut Barbieri ff6532a1bd minor documentation fixes.
still needs someone to read and review that.


SVN revision: 46499
2010-02-26 00:57:20 +00:00
Gustavo Sverzut Barbieri 7c8ca04def Remove eina_error deprecated functions.
There were deprecated looooooooong ago, use eina_log if there are some
alien users out there.



SVN revision: 46496
2010-02-26 00:28:58 +00:00
Christopher Michael 140de33a79 Fix some doxy typos.
SVN revision: 46450
2010-02-24 23:58:27 +00:00
Vincent Torri 2e004582d7 add mempool description in the doc
SVN revision: 46307
2010-02-19 13:42:34 +00:00
Sebastian Dransfeld 0b3bea06ec Include safety checks before function include
SVN revision: 46169
2010-02-14 19:01:51 +00:00
Sebastian Dransfeld 7ae4c793e7 safety checks
SVN revision: 46155
2010-02-13 19:26:34 +00:00
Sebastian Dransfeld 5c49be6e01 Add const where we don't modify pointer
SVN revision: 46153
2010-02-13 19:06:16 +00:00
Sebastian Dransfeld d7b706e4f6 Add eina unlikely to alloc errors
SVN revision: 46152
2010-02-13 18:55:47 +00:00
Iván Briano 071969c41f Use length of source string to copy.
SVN revision: 46114
2010-02-12 14:58:00 +00:00
Sebastian Dransfeld 852f9e8ac5 We always need to null terminate
SVN revision: 46107
2010-02-12 06:33:31 +00:00
Sebastian Dransfeld fb8d1dc110 Since we know we have enough space, use memcpy
SVN revision: 46103
2010-02-11 22:00:02 +00:00
Sebastian Dransfeld 9df3524f3a Good coverage for strbuf
SVN revision: 46101
2010-02-11 21:53:00 +00:00
Vincent Torri b49d61f502 missing "
SVN revision: 46087
2010-02-11 18:54:04 +00:00
Gustavo Sverzut Barbieri 9cce47d3b8 let's not return NULL but a more useful result.
SVN revision: 46086
2010-02-11 18:49:12 +00:00
Christopher Michael e9bc23874c Fix typo in doc.
SVN revision: 46083
2010-02-11 17:38:24 +00:00
Vincent Torri b64d398ffd warnings--
SVN revision: 46079
2010-02-11 15:29:20 +00:00
Vincent Torri f8e1057fc0 warning--
SVN revision: 46078
2010-02-11 15:22:41 +00:00
Sebastian Dransfeld 229e5de19d remove trailing whitespace
SVN revision: 46029
2010-02-09 21:12:03 +00:00
Sebastian Dransfeld 5847c6f245 string_remove -> string_steal
Better naming

SVN revision: 46028
2010-02-09 21:06:27 +00:00
Sebastian Dransfeld fe99f062e9 Check whether alloc works, return false on error
SVN revision: 46027
2010-02-09 21:06:16 +00:00
Sebastian Dransfeld 459fef8aea unset eina magic on free
SVN revision: 46026
2010-02-09 21:06:06 +00:00
Cedric BAIL 13df61db0d * eina: Remove warning in eina_stringshare.
SVN revision: 46009
2010-02-09 12:59:31 +00:00
Gustavo Sverzut Barbieri c52d867527 delete trailing whitespace.
SVN revision: 46002
2010-02-09 03:00:47 +00:00
Gustavo Sverzut Barbieri 728f10a269 delete trailing whitespace.
SVN revision: 46001
2010-02-09 02:51:23 +00:00
Gustavo Sverzut Barbieri 7e043d87c8 apply global log level if global domain exists.
This allows setting global log level after eina_init() and have it to
behave properly.



SVN revision: 45999
2010-02-09 02:14:40 +00:00
Gustavo Sverzut Barbieri ebed1f20fe minor matching speedups.
keep log level name size (namelen) and use it before strcmp().



SVN revision: 45998
2010-02-09 02:13:55 +00:00
Gustavo Sverzut Barbieri 0b2b716214 just try fnmatch (glob) if no specific level was set.
SVN revision: 45997
2010-02-09 01:47:52 +00:00
Gustavo Sverzut Barbieri 191d87d78a eina log level utilities.
couple of functions that are useful outside and should be fast.



SVN revision: 45996
2010-02-09 01:43:58 +00:00
Gustavo Sverzut Barbieri f7cd9786f1 eina log parameters getters and setters.
allow external users to check or set flags that are initialized based
on environment variables such as EINA_LOG_COLOR_DISABLE.



SVN revision: 45995
2010-02-09 00:52:00 +00:00
Iván Briano 752a730b38 More parentheses so the macro works inside if()
SVN revision: 45992
2010-02-08 21:20:28 +00:00
Gustavo Sverzut Barbieri c87dbf93ab disable color based on $TERM and isatty().
Smarter eina log that disables color automatically based on $TERM and
isatty of output file descriptor.



SVN revision: 45988
2010-02-08 17:53:22 +00:00
Vincent Torri 8840ed4118 on some platform, iconv.h defines iconv() with a macro,
hence the check with AC_SEARCH_LIBS s not sufficient. So
we link a complete program.


SVN revision: 45981
2010-02-08 13:14:30 +00:00
Vincent Torri 6ac6ee026c * fix compilation when iconv.h is detected but libiconv is not
* fix warning and clang report


SVN revision: 45970
2010-02-07 20:46:39 +00:00
Sebastian Dransfeld f285bc7ae9 And since resize adds + 1 to size, grow must do to
SVN revision: 45969
2010-02-07 19:31:26 +00:00
Sebastian Dransfeld 216aabeaa0 And add () for increased safety
SVN revision: 45968
2010-02-07 19:30:01 +00:00
Sebastian Dransfeld 95d903dab7 And correct return type
SVN revision: 45967
2010-02-07 19:24:28 +00:00
Sebastian Dransfeld 69368ae6bd Fix return values
If we don't need to grow, return EINA_TRUE.
Use EINA_TRUE and EINA_FALSE where possible.

SVN revision: 45966
2010-02-07 19:22:04 +00:00
dieb 470188ca4f Eina: fix compilation on strbuf.
SVN revision: 45965
2010-02-07 17:33:26 +00:00
Sebastian Dransfeld 0cead88ce8 Don't change size, since we don't realloc
Thanks Peter

SVN revision: 45964
2010-02-07 12:23:27 +00:00
Sebastian Dransfeld 5408dedfe7 Don't shrink when we append
SVN revision: 45963
2010-02-07 12:21:28 +00:00
Sebastian Dransfeld 5b5107471f Work with escaped string
SVN revision: 45962
2010-02-07 12:21:07 +00:00
Sebastian Dransfeld 2587c28d9a Add eina_strbuf_reset
Function to reset the internal string, so we can reuse the allocated
mem.

SVN revision: 45952
2010-02-06 21:43:22 +00:00
Sebastian Dransfeld 522a0ab1ab Add eina_strbuf_append_escaped for edje
SVN revision: 45950
2010-02-06 21:43:02 +00:00
Sebastian Dransfeld 72fccca0eb Add eina_str_escape
SVN revision: 45949
2010-02-06 21:42:51 +00:00
Sebastian Dransfeld da1b1ee801 Add shrink buffer code
SVN revision: 45946
2010-02-06 20:42:14 +00:00
Sebastian Dransfeld f99d9ccf4b Simpler to use _eina_strbuf_resize
Add space for '\0' in _eina_strbuf_resize, so that we alwyas just pass
inn the wanted string space as requirement.

Correct len in eina_strbuf_append_n, we needed +1 for '\0' for resize
and strlcpy, but not for ->len

SVN revision: 45945
2010-02-06 20:42:03 +00:00
Sebastian Dransfeld 4a1ac380b1 Add functions to match evas strbuf
SVN revision: 45943
2010-02-06 20:41:43 +00:00
Sebastian Dransfeld 99536f0736 Include own header to be sure prototypes match
SVN revision: 45941
2010-02-06 20:41:17 +00:00
Carsten Haitzler 75ea198b66 ints!!! have found a case where.. yes. we have massive strings.. and shit
fucks-up badly! ints it is... 2gb of string - per string. that should be
enouhg for anybody! (also references went up to int too)



SVN revision: 45832
2010-02-03 15:23:32 +00:00
Vincent Torri e373b2c376 * remove useless iconv_cflags
* put iconv_libs to the correct libtool var


SVN revision: 45794
2010-02-02 06:48:52 +00:00
Vincent Torri b413db68cd * fix configure.ac
* remove debug



SVN revision: 45793
2010-02-02 06:18:59 +00:00
Sebastian Dransfeld eb29a86306 copy ecore_txt_convert to eina_str_convert
SVN revision: 45790
2010-02-02 04:49:38 +00:00
Vincent Torri 9b5ea1110b eina_str:
* return Eina_Bool instead of int when necessary
 * improve documentation
 * formatting


SVN revision: 45753
2010-01-31 12:27:41 +00:00
Sebastian Dransfeld 315c920f68 EAPI
SVN revision: 45739
2010-01-30 22:02:08 +00:00
Vincent Torri 4da59fea04 fix header inclusion
SVN revision: 45655
2010-01-28 10:03:31 +00:00
Sebastian Dransfeld c6ca24216c Add EINA_MAGIC to strbuf
SVN revision: 45651
2010-01-27 20:48:27 +00:00
Sebastian Dransfeld 436249c412 Move ecore_str and ecore_strbuf to eina
SVN revision: 45650
2010-01-27 20:47:47 +00:00
Carsten Haitzler 735ad48c39 eina - does modules like the rest of efl, so it's able to be installed with
multiple versions at the same time. eventually will neeed to also include
major number in release name too.



SVN revision: 45594
2010-01-26 15:54:28 +00:00
Sebastian Dransfeld 0ba3822213 Add patch from bug #479
Eina installs its modules in /usr/lib/eina/mp/<module>.so, which makes it impossible to install two different versions of eina at the same time. Please consider using something to make this path specific to a particular release of eina, just as you do for the include files.

SVN revision: 45562
2010-01-25 19:07:52 +00:00
Christopher Michael 2517fbeb35 Fix remaining "shadowed declaration" warnings.
SVN revision: 45528
2010-01-24 19:59:35 +00:00
Christopher Michael 029111a9b8 Use different variable names. This was giving "shadowed declarations"
warnings during compile.



SVN revision: 45527
2010-01-24 19:51:22 +00:00
Cedric BAIL a9a3813966 * eina: Allow compilation with -Wshadow.
Patch from Albin Tonerre.


SVN revision: 45497
2010-01-23 19:53:27 +00:00
Vincent Torri 52fa8ddd47 get the shared library extension name from the autotools, as
it is more portable


SVN revision: 45229
2010-01-16 16:46:39 +00:00
Vincent Torri e2a2448461 basename() can modify its argument, so get a copy first
SVN revision: 45228
2010-01-16 16:41:24 +00:00
Jorge Luis Zapata Muga f3fb3dea17 + [Eina] API change. eina_module_list_flush() -> eina_module_list_free()
as we are on the modules context not the array.
  All the referenced projects are changed too. Remember that the list_free()
  already calls the unload() on each module so no need to call list_unload()



SVN revision: 44978
2010-01-08 12:22:23 +00:00
Jorge Luis Zapata Muga 6183c3716e + Add the efl-research buddy allocator here
SVN revision: 44976
2010-01-08 12:10:14 +00:00
Gustavo Sverzut Barbieri db52717d88 Fix compile on GNU/Hurd, by Lutin.
SVN revision: 44898
2010-01-04 21:50:31 +00:00
Cedric BAIL fe0b8b4b36 * eina_benchmark: Little cleanup.
SVN revision: 44831
2009-12-31 10:26:41 +00:00
Vincent Torri 8e85a71f03 Simplify the use of eina_benchmark:
* Free the inlined list returned by one (or several) calls of
   eina_benchmark_run() automatically in eina_benchmark_free()
   instead of letting the user doing it.

 * Update tutorial and benchmark binary accordingly


SVN revision: 44830
2009-12-31 09:17:28 +00:00
Vincent Torri 09d1853ea0 * finish benchmark tutorial
* move internal _init and _shutdown functions in the Global
   part of the code, as it is where they belong
 * fix minor documentation stuff


SVN revision: 44730
2009-12-27 08:45:30 +00:00
Vincent Torri 8c14ca031e minor fixes
SVN revision: 44720
2009-12-25 16:22:13 +00:00
Vincent Torri c9975bc818 add benchmark tutoriel
SVN revision: 44719
2009-12-25 11:59:40 +00:00
Vincent Torri 0fda2ab7c8 use new spinlock detection
SVN revision: 44718
2009-12-25 11:30:41 +00:00
Vincent Torri a39d637027 support of Debian/kFreeBSD (FreeBSD using the glibc on top of a FreeBSD kernel)
SVN revision: 44597
2009-12-20 10:02:41 +00:00
Vincent Torri 29b4cccab6 include Evil.h so that getenv is declared on Windows CE
SVN revision: 44563
2009-12-19 10:30:49 +00:00
Cedric BAIL 63d651b7ad * eina: Improve precision of f32p32 sinus/cosinus.
SVN revision: 44322
2009-12-09 13:03:23 +00:00
Vincent Torri 04a156cda0 useless variable if pthread is not used
SVN revision: 44319
2009-12-09 08:34:09 +00:00
Vincent Torri 63610435c3 add always config.h in source file so that EAPI is correctly defined,
especially on Windows (otherwise, ICE in gcc... and vc++ is not
happy at all)

SVN revision: 44317
2009-12-09 08:23:34 +00:00
Cedric BAIL 274ab1e01e * eina: Add sin and cos fixed point fonction.
SVN revision: 44287
2009-12-08 18:30:41 +00:00
Vincent Torri cee693572e * Fix compilation with vc++
* Fix Visual Studio project files

SVN revision: 44250
2009-12-07 17:15:28 +00:00
Cedric BAIL 759426ceda * eina: Fix atofp when exponent is negativ.
SVN revision: 44244
2009-12-07 13:08:16 +00:00
Gustavo Sverzut Barbieri 4e817e8ecd eina_module: more constness.
Thanks to Fabiano Fidencio for spotting those.



SVN revision: 43921
2009-11-23 13:24:48 +00:00
Gustavo Sverzut Barbieri d2fd0b36e0 eina_module_find: constness and gcc attribute.
Mark both array and module as const as we'll not modify them anyhow
inside this function.

Also mark this function as pure, so gcc will know how to optimize
multiple calls of it. Not that important for this function, but
doesn't hurt either.



SVN revision: 43918
2009-11-23 13:20:34 +00:00
Cedric BAIL ffb0bf8830 * eina_module: Add eina_module_find. Thanks to Fabiano Fidêncio <fidencio@profusion.mobi>.
SVN revision: 43847
2009-11-20 20:46:24 +00:00
Cedric BAIL 899b488741 * eina: Now it's possible set a level when eina should abort on log.
SVN revision: 43669
2009-11-13 17:52:43 +00:00
Gustavo Sverzut Barbieri 7df346f50e fix stringshare of small strings.
_eina_stringshare_small_bucket_find() was receiving the plength with
size -1 since the first character is the same, but inside it was not
doing the same, thus it was always failing the first test based on
size.



SVN revision: 43634
2009-11-12 19:41:02 +00:00
Raoul HECKY 279e0dde28 Initialize value for correct counting of # cpu on macosx
SVN revision: 43571
2009-11-09 10:39:49 +00:00
Raoul HECKY 7eb75cbd63 Add __MACH__ and __APPLE__ guards to compile on macosx
SVN revision: 43568
2009-11-09 09:07:10 +00:00
Sebastian Dransfeld a60aeb07a3 function defined as void, don't return a value
SVN revision: 43535
2009-11-08 19:52:31 +00:00
Vincent Torri 12f9e2f515 fix compilation on OpenBSD
SVN revision: 43516
2009-11-07 19:44:39 +00:00
Vincent Torri 2ccaf85b59 fix compilation of eina_amalgamation.c on Windows
SVN revision: 43513
2009-11-07 16:09:58 +00:00
Vincent Torri 7c24994f18 fix dist/distcheck rule
SVN revision: 43474
2009-11-06 01:02:35 +00:00
Vincent Torri a4d3d53e0d disable amalgamation by default
SVN revision: 43434
2009-11-03 16:52:45 +00:00
Jonathan Atton cbe78d32f2 Eina log : check main thread in eina_log_threads_shutdown
SVN revision: 43415
2009-11-02 10:08:57 +00:00
Vincent Torri 199400bc7d remove useless $(builddir)/ (also confirmed by a autoconf dev),
as anyway, '$(builddir)' is always '.' make distcheck passes.

Thanks to cantona who reported it.


SVN revision: 43401
2009-11-01 21:00:22 +00:00
Jonathan Atton 9191a1dfa3 Eina: renawe _threads_activated for amalgation
SVN revision: 43400
2009-11-01 20:13:12 +00:00
Jonathan Atton 4bfc091f41 Eina : add a prefix to STRINGSHARE_LOCK and LOG_LOCK
SVN revision: 43399
2009-11-01 20:09:26 +00:00
Jonathan Atton 6ea6dc0856 Eina : now eina stringshare is thread safe if eina_threads_init() is called. Eina log which was thread safe is now thread safe only if the previous functions is called
SVN revision: 43398
2009-11-01 19:50:18 +00:00
Christopher Michael af793b05d5 Patch to allow a quieter eina when using eina_log in your own libs/apps.
Approved by k-s.

Added some doxy to describe the new env variable. 
(Eina authors may want to reword this...up to you)



SVN revision: 43326
2009-10-28 12:48:04 +00:00
Jonathan Atton cc1863fc96 Eina: add eina_list_split_list()
SVN revision: 43307
2009-10-27 10:26:20 +00:00
Carsten Haitzler b2228247e1 warning--
SVN revision: 43259
2009-10-25 08:57:41 +00:00
Carsten Haitzler f78bded776 warning--
SVN revision: 43258
2009-10-25 08:52:47 +00:00
Carsten Haitzler ca7859168b shh warning
SVN revision: 43257
2009-10-25 08:45:36 +00:00
Iván Briano 044f05ca69 Fix docs for hash_free
SVN revision: 43237
2009-10-24 04:30:52 +00:00
Vincent Torri 568f723401 Add some more headers at the top of eina_amalgamation.c.
Fix compilation on Windows CE


SVN revision: 43054
2009-10-13 17:14:50 +00:00
Vincent Torri aa56214d0b Fix compilation on Windows wrt changes in fixed point code
SVN revision: 42822
2009-09-30 17:29:30 +00:00
Cedric BAIL 7a51d7bf39 * eina: Cleanup Eina fixed point implementation.
SVN revision: 42798
2009-09-29 12:04:50 +00:00
Vincent Torri 47e25ab257 * really export symbols on Windows (EFL_EINA_BUILD not
correctly defined)
 * add evil in the Requires.private field of eina-0.pc.in

SVN revision: 42702
2009-09-25 15:39:53 +00:00
Cedric BAIL 568acf4705 * eina_atofp: Always return EINA_TRUE on valid input string.
SVN revision: 42700
2009-09-25 12:02:14 +00:00
Vincent Torri 1079703690 return false if fp is NULL, update doc accordingly
SVN revision: 42699
2009-09-25 11:51:52 +00:00
Vincent Torri b2bda6edb2 * convert string to fp only if fp is not NULL
* add doc of eina_convert_atofp()
 * minor doc cleanup

SVN revision: 42697
2009-09-25 11:23:37 +00:00
Cedric BAIL 6a284f8178 * eina: Add eina_atofp.
SVN revision: 42694
2009-09-25 10:03:19 +00:00
Vincent Torri 7c47dc2c65 * add documentation for eina_convert_fptoa()
* fix typo in doc

SVN revision: 42691
2009-09-25 08:44:04 +00:00
Cedric BAIL 4ddba5724d * eina: Add eina_fptoa.
This is a small piece of code, but a big one for an edje fixed point implementation.


SVN revision: 42646
2009-09-23 16:47:08 +00:00
Vincent Torri e2b34b41ee * fix compilation on Windows when using amalgamation
* put alloca declaration at the beginning

SVN revision: 42517
2009-09-16 17:22:01 +00:00
Gustavo Sverzut Barbieri 5b68d0be34 minor fixes.
SVN revision: 42504
2009-09-15 22:32:24 +00:00
Vincent Torri 9b9c496175 move the declaration of variables at the beginning of the block
SVN revision: 42499
2009-09-15 21:20:08 +00:00
Cedric BAIL 8e6a393cf9 * eina_log: Fallback to mutex when spinlock doesn't exist.
SVN revision: 42489
2009-09-14 16:06:18 +00:00
Cedric BAIL d117093a55 * eina: Add explanation around compiler false positiv warning.
SVN revision: 42488
2009-09-14 15:28:55 +00:00
Rafael Antognolli 52de9e33cd Added the Eina_Tile_Grid_Slicer iterator.
This new iterator receives a rectangle as argument and tile_w X tile_h sized
tile, and slices the rectangle iterating over it on each iteration.



SVN revision: 42427
2009-09-11 23:51:47 +00:00
Gustavo Sverzut Barbieri 7d1745e3c1 constness++
SVN revision: 42426
2009-09-11 23:10:57 +00:00
Rafael Antognolli 0e716d559b EINA: Fix compilation when builddir != srcdir.
SVN revision: 42369
2009-09-09 20:37:23 +00:00
Vincent Torri 2d3021f128 * add amalgation support in configure output
* remove a warning when eina_amalgamation.c is deleted but does not exist
 * delete eina_amalgamation.c when doing 'make clean'


SVN revision: 42363
2009-09-09 07:42:08 +00:00
Gustavo Sverzut Barbieri 2de7c52bd1 remove easy warnings, 2 still left that I need someone else to check
proper fix.



SVN revision: 42358
2009-09-09 01:27:30 +00:00
Gustavo Sverzut Barbieri c98bf92366 replace UNLIKELY() with EINA_UNLIKELY()
SVN revision: 42354
2009-09-08 21:42:17 +00:00
dieb 073dd0542c Fix segv reported by Peter Wehrfritz on eina init/shutdown (specifically on
eina_log init/shutdown as it wasn't resetting domains counters properly).


SVN revision: 42334
2009-09-07 23:23:03 +00:00
Gustavo Sverzut Barbieri 9b3e482ad2 --enable-amalgamation
This will concatenate all source files in the hope compiler will do a
better job. On my test with static/built in mempools it saves me 4k, I
guess some intra module calls can be saved.



SVN revision: 42315
2009-09-07 05:54:42 +00:00
Gustavo Sverzut Barbieri b84e3424fe use quotes to include config.h
SVN revision: 42314
2009-09-07 04:32:49 +00:00
Gustavo Sverzut Barbieri 8318f4c1f2 allow amalgamation of files, at least symbols don't clash anymore.
more related to amalgamation later.



SVN revision: 42312
2009-09-07 04:23:05 +00:00
Gustavo Sverzut Barbieri a4bd77905d malloc--: error and magic can take statically defined strings so no
need to strdup them.



SVN revision: 42311
2009-09-07 03:32:22 +00:00
Gustavo Sverzut Barbieri 404e3e09fb API BREAK: eina_magic_string_set() does not change existing strings anymore.
It's pointless to be able to change magic number string after it's
created, so let's avoid walking the existing list and just remove
places where strings were being duplicated (list/array both inited
magic strings for accessor/iterators).

Also an optimization, register using an array and sort it before
searching. Sort will just happen when array was changed, and this is
just done when eina_magic_string_get() is called.




SVN revision: 42310
2009-09-07 02:33:54 +00:00
Gustavo Sverzut Barbieri 4baa70798c eina_inlist.h is not required anymore.
SVN revision: 42305
2009-09-06 22:56:34 +00:00
Gustavo Sverzut Barbieri 777e74ce7d eina_error: improvements to make it faster.
Use a simple array instead of inlist, error get is now much faster
using direct index access.



SVN revision: 42304
2009-09-06 22:54:49 +00:00
Gustavo Sverzut Barbieri f98bf21da7 allocate more buckets on init to save couple of reallocs during startup.
SVN revision: 42303
2009-09-06 22:34:38 +00:00
Gustavo Sverzut Barbieri 205e0fe399 fix macro positioning of '\'
SVN revision: 42302
2009-09-06 22:25:36 +00:00
Gustavo Sverzut Barbieri e4af7c100c EINA API BREAK: no more individual modules init/shutdown.
Being able to indivually initialize individual modules was initially
"good", but at end it's putting complexities on users that would try
to "optimize" by doing just what they used, but in the end most people
would get them wrong, users would have to do lots of code and etc. At
the end it does not worth.

Most module init just register handful errors and log domains, so are
cheap. The exception is mempool users, that would dlopen() stuff, but
people that are concerned (embedded) can just compile those statically
in eina.

Since at the end any real application would use most of modules, we
actually end saving lots of function calls that would do nothing other
than increment a global counter.

I also did the init/shutdown use an array, making it easier to
maintain. The inital dependencies were analysed by a script I wrote, I
hope it's all right.

Please fix any breakages you find!



SVN revision: 42300
2009-09-06 22:21:56 +00:00
Vincent Torri 718873e00c shut down safety checks in the log module
Note : currently, because of a circular calls of
eina_log_init() and eina_safety_checks_init(), eina
is not correctly shut down. Imho, eina_log should not
depend on the safety checks module. That would mean
some fprintf in eina_log_domain_new(), eina_log_domain_free(),
eina_log_domain_register()and eina_log_domain_unregister().


SVN revision: 42292
2009-09-06 15:25:35 +00:00
Vincent Torri e780763aa0 shutdown array module
SVN revision: 42287
2009-09-06 08:39:04 +00:00
Gustavo Sverzut Barbieri 5846195caf eina_log: be able to disable function or line.
write down specialized cases for threads or not, function or file,
color or not. Maybe it's not even an optimization since we add yet
another indirection/function call, but each case is simpler.

 * EINA_LOG_FILE_DISABLE=1: disables show of file:line in
   stderr/stdout messages.
 * EINA_LOG_FUNCTION_DISABLE=1: disables show of function() in
   stderr/stdout messages.

one must not use the two options at the same time, if that's the case
code will ignore EINA_LOG_FILE_DISABLE=1 and use just function
disable.



SVN revision: 42272
2009-09-04 23:45:16 +00:00
Vincent Torri d56568b7f9 eina_log uses pthreads now (if enabled), so link libeina against pthread
SVN revision: 42248
2009-09-04 16:25:18 +00:00
Gustavo Sverzut Barbieri eef2d35ea6 eina_matrixsparse: loggify, install header, remove warnings and coding style.
* use eina_log
 * install eina_matrixsparse.h
 * remove unused variable
 * fix coding style issue reported by Vincent



SVN revision: 42246
2009-09-04 14:18:05 +00:00
Gustavo Sverzut Barbieri 643958705b eina_matrixsparse: welcome sparse matrix implementation and tests.
Sparse Matrix was implemented and tested by Rafael Antognolli and
myself in order to implement optimized large sparse matrix walk in
some products, one of them WebKit-EFL optimizations.

We have done extensive tests, with good code coverage. Similar to
lists/inlists, we keep pointer to last known element and similar to
iterators we keep reference to last accessed row and cell inside
rows. This allows fast sequential access (for i... for j... m[i,j]),
that is our most common usage case.

Rows are kept in a list, with cells inside that row as another
list. It's not similar to most book implementations where cells keep
reference to their sibling cells in other rows as well, we opted to
not do that to save some pointers and make algorithms simpler, still
do great for our use case.

This code was developed on behalf of our client, that wants to remain
unnamed so far. Thanks client ;-)



SVN revision: 42243
2009-09-04 13:43:44 +00:00
Gustavo Sverzut Barbieri e88b62b295 oops! thanks Vincent.
SVN revision: 42230
2009-09-04 03:52:05 +00:00
Gustavo Sverzut Barbieri 4d5fbb7742 loggify array.
this is the last eina module to be converted to eina_log! :-)


SVN revision: 42228
2009-09-04 02:35:24 +00:00
Gustavo Sverzut Barbieri 5ea9ceeafc eina_module must initialize eina_array as it is used.
SVN revision: 42227
2009-09-04 02:34:48 +00:00
Gustavo Sverzut Barbieri dfee09d6b0 make it easier to spot wrong users of eina_log_print()
SVN revision: 42226
2009-09-04 02:34:10 +00:00
Gustavo Sverzut Barbieri 9f8dfea129 loggify rectangle.
SVN revision: 42225
2009-09-04 02:11:44 +00:00