Mike Blumenkrantz
9276378041
+eina_strbuf_string_free to free string in strbuf without freeing strbuf
...
SVN revision: 50316
2010-07-18 06:21:50 +00:00
Mike Blumenkrantz
d3982d4b5c
+eina_hash_free_buckets to free buckets without freeing a hash
...
SVN revision: 50315
2010-07-18 04:24:24 +00:00
Vincent Torri
c7bb6d41f5
include sys/syslimits.h on mac os x for PATH_MAX and NAME_MAX
...
i really dislike having PATH_MAX in a header file...
SVN revision: 50231
2010-07-13 19:17:35 +00:00
Vincent Torri
971f0800ca
useless headers now
...
SVN revision: 50221
2010-07-13 13:57:21 +00:00
Vincent Torri
c97a897584
use Win32 native mutex on Windows. To use it, pass the following option
...
to configure:
--enable-win32-threads
By default, pthreads are used
SVN revision: 50220
2010-07-13 13:51:00 +00:00
Vincent Torri
c012d2e7f6
fix compilation on Windows
...
SVN revision: 50179
2010-07-11 11:52:43 +00:00
Lucas De Marchi
442fe3afae
Add missing macros
...
Add missing EINA_SAFETY_ON_NULL_GOTO and define all the *GOTOs macros when
safety checks are disabled.
SVN revision: 50138
2010-07-09 03:27:04 +00:00
Lucas De Marchi
93f03880bd
Do not purify what's impure
...
Two tests were failing, but no more.
SVN revision: 50067
2010-07-06 15:50:15 +00:00
Gustavo Sverzut Barbieri
5b03bc86ec
add some gcc modifiers: non-null args, warn unused results and malloc.
...
SVN revision: 50066
2010-07-06 15:48:24 +00:00
Gustavo Sverzut Barbieri
ed15713785
add eina_file_direct_ls()
...
Similar to eina_file_ls(), but useful when one wants to apply some
filters to the names before using them as it provides sizes of the
whole path and basename, index of the basename inside the path, dirent
structure for reference (skip directories, etc) and last but not
least, it is faster as it does not stringshare or even builds the full
path at each iteration, instead it keeps the invariant prefix
untouched and just copy the filename.
All in all this is a faster version of eina_file_ls(), use it as
possible as it will avoid overheads.
SVN revision: 50065
2010-07-06 15:45:12 +00:00
Cedric BAIL
d4059c7107
* eina: rename ecore_file_ls_iterator to eina_file_ls.
...
SVN revision: 50002
2010-07-02 17:23:05 +00:00
Cedric BAIL
cf128ea0e4
* eina: improve quadtree to support more stuff needed by evas.
...
SVN revision: 49784
2010-06-21 13:17:09 +00:00
Carsten Haitzler
02503dd152
eina gets version thing ala eet.
...
SVN revision: 49267
2010-05-29 03:05:04 +00:00
Vincent Torri
247674b26c
do not declare inlined functions in the source file,
...
fix a bit the doc of inlined functions
SVN revision: 49253
2010-05-28 19:03:26 +00:00
Cedric BAIL
6caac50006
* eina: improve QuadTree API.
...
SVN revision: 48482
2010-04-30 17:04:28 +00:00
Lucas De Marchi
c98e00eec0
Define new error handling macros
...
EINA_SAFETY_ON_TRUE_GOTO and EINA_SAFETY_ON_FALSE_GOTO are now defined
to ease error handling. Functions might need to take actions before
returning upon safety checks fail.
SVN revision: 48478
2010-04-30 14:54:05 +00:00
Cedric BAIL
d239b6c524
* eina: oops forgotten file.
...
SVN revision: 48425
2010-04-29 17:30:18 +00:00
Cedric BAIL
9367b5f7c7
* eina: Add first version of a Quad Tree data type.
...
NOTE: consider the API experimental and subject to change.
SVN revision: 48424
2010-04-29 17:21:14 +00:00
Cedric BAIL
e5abb9bfbe
* eina: fix rounding issue with different size of fixed point.
...
SVN revision: 48053
2010-04-16 14:32:18 +00:00
Vincent Torri
8f36c8075e
explicit cast
...
SVN revision: 47907
2010-04-10 23:23:26 +00:00
Tiago Rezende Campos Falcao
b7e410d621
Adding strbuf printfs
...
SVN revision: 47877
2010-04-09 15:56:20 +00:00
Vincent Torri
8126debb06
fix most compilation errors with vc++ (there are still a
...
problem with eina_log and output of the log messages:
STDERR_FILENO, STDOUT_FILENO and isatty())
fix some warnings and header files inclusion
update vcproj files
SVN revision: 47384
2010-03-23 06:41:17 +00:00
Gustavo Sverzut Barbieri
9839906150
stringshare: optimization suggested by rasterman, docs.
...
SVN revision: 47193
2010-03-14 01:06:52 +00:00
Vincent Torri
85b56aebd5
update string buffer documentation
...
SVN revision: 47084
2010-03-09 16:36:14 +00:00
Vincent Torri
42dcade4b2
more supported OS
...
SVN revision: 46953
2010-03-07 16:01:00 +00:00
Vincent Torri
248ecd4a13
update TOC
...
SVN revision: 46949
2010-03-07 14:38:14 +00:00
Vincent Torri
b3019e3d4b
* fix more str doc
...
* move static stringshare functions to the 'private'
part of the file (hence doc fixes)
SVN revision: 46933
2010-03-07 07:11:13 +00:00
Vincent Torri
993b4a6960
fix doc for eina_str
...
SVN revision: 46931
2010-03-07 06:59:28 +00:00
Vincent Torri
3648f0ed3e
the 4th parameter should not be NULL, not the 3rd
...
patch by Lionel Orry
SVN revision: 46837
2010-03-03 17:25:07 +00:00
Cedric BAIL
cf5a3517b9
* eina: Add eina_list_data_set.
...
SVN revision: 46724
2010-03-01 17:46:15 +00:00
Gustavo Sverzut Barbieri
61f65ae20a
Allow user to redefine the default logging level used by
...
EINA_LOG_ERR(), EINA_LOG_DBG() and other macros.
This will help us to avoid the cumbersome work of having to define the
local macros. I still find the 3-letter macros handy, but we are not
forced to use them now.
I did a small modification to keep the EINA_LOG_DOMAIN_GLOBAL and use
a different symbol for the define, it is EINA_LOG_DOMAIN_DEFAULT. The
documentation was updated to highlight the 2 usage scenario and care
that must be used.
By: Peter Johnson <tam@hiddenrock.com>
SVN revision: 46700
2010-03-01 15:08:40 +00:00
Cedric BAIL
99f4054ce5
* eina: Don't variable name that could shadow math symbols.
...
Patch requested by Albin "Lutin" Tonnerre.
SVN revision: 46694
2010-03-01 13:50:35 +00:00
Gustavo Sverzut Barbieri
0cece24af2
remove stupid letter I introduced by mistake.
...
SVN revision: 46671
2010-02-28 21:56:33 +00:00
Gustavo Sverzut Barbieri
90c5c1daaa
doc improvements.
...
SVN revision: 46670
2010-02-28 21:29:30 +00:00
Gustavo Sverzut Barbieri
66ff799e5e
Fix other EINA_PURE/EINA_CONST.
...
Some of them were working because they were inline, so the compiler
would know an just ignore the flag.
For lists and rbtree there is no problem as after each operation we
must change the pointer to the new head, thus the compiler will
consider it changed.
SVN revision: 46583
2010-02-27 15:17:15 +00:00
Gustavo Sverzut Barbieri
8daa98f42e
ouch, SPANK SPANK SPANK... me :-( wrong function attributes.
...
I forgot that EINA_CONST refer to the pointer itself, not to its
contents, as such the pointer did not changed, so gcc was optimizing
subsequent fetches of the value.
There should be another optimization to check for this... but then I
guess it's just c++
SVN revision: 46580
2010-02-27 14:51:52 +00:00
Gustavo Sverzut Barbieri
f98c65afcc
missing useful warnings for eina_str
...
SVN revision: 46549
2010-02-27 03:49:13 +00:00
Gustavo Sverzut Barbieri
08127ecc3e
eina_str speedups.
...
* eina_str_split() now does the minimum number of passes and
allocations. The first pass figures out the string size (strlen())
and number of delimiters, so we can allocate the exact number of
elements in array. The second repeats the loop copying elements to
string and also setting them to the result array.
* eina_str_split_full() is a variation of eina_str_split() that
returns also the number of elements in array, in the case you need
to pre-allocate another array to copy.
* eina_strlen_bounded() is introduced to limit strlen() results, this
is used in has_prefix and has_suffix, but possibly other use cases
where string must be of a maximum size as we don't do useless
iterations;
SVN revision: 46547
2010-02-27 03:42:27 +00:00
Gustavo Sverzut Barbieri
6769ba3b45
optimization attributes for functions.
...
SVN revision: 46523
2010-02-26 21:42:03 +00:00
Gustavo Sverzut Barbieri
7dfc83a627
add missing macro for prepend.
...
SVN revision: 46522
2010-02-26 21:34:28 +00:00
Gustavo Sverzut Barbieri
bba70aef2e
eina_strbuf_insert variants and fix leak with eina_strbuf_append_escaped()
...
SVN revision: 46521
2010-02-26 21:33:17 +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
e3c9d3f62a
TRUE/FALSE are gone, use EINA_TRUE/EINA_FALSE instead.
...
SVN revision: 46500
2010-02-26 00:59:11 +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
Sebastian Dransfeld
5c49be6e01
Add const where we don't modify pointer
...
SVN revision: 46153
2010-02-13 19:06:16 +00:00
Vincent Torri
1213602ae5
constants should be unsigned
...
SVN revision: 46108
2010-02-12 07:27:27 +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
dca87fdf87
Typo
...
SVN revision: 46025
2010-02-09 21:05:56 +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
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
Sebastian Dransfeld
95d903dab7
And correct return type
...
SVN revision: 45967
2010-02-07 19:24:28 +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
4a1ac380b1
Add functions to match evas strbuf
...
SVN revision: 45943
2010-02-06 20:41:43 +00:00
Sebastian Dransfeld
ac60497dbf
EINA_ARG_NONNULL
...
SVN revision: 45942
2010-02-06 20:41:32 +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
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
Cedric BAIL
a9a3813966
* eina: Allow compilation with -Wshadow.
...
Patch from Albin Tonerre.
SVN revision: 45497
2010-01-23 19:53:27 +00:00
Mikhail Gusarov
4f7ae8764a
eina: fix eina_module_list_get prototype: 'path' argument can be NULL
...
SVN revision: 45246
2010-01-17 06:01:20 +00:00
Sebastian Dransfeld
a1270e5796
Remove unused defines
...
SORT_MIN and SORT_MAX are not used in eina, and will result in errors if
used. eina_list_sort(list, EINA_SORT_MAX, ...) will not give the
expexted result.
SVN revision: 45222
2010-01-16 13:54:38 +00:00
Vincent Torri
990576cd0e
news is a valid stringshare
...
SVN revision: 45095
2010-01-13 21:20:32 +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
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
Cedric BAIL
63d651b7ad
* eina: Improve precision of f32p32 sinus/cosinus.
...
SVN revision: 44322
2009-12-09 13:03:23 +00:00
Vincent Torri
efc50c5541
including Evil.h here cause big troubles with vc++ and EAPI. So
...
typedef here the needed types
SVN revision: 44318
2009-12-09 08:25:58 +00:00
Vincent Torri
abe9190501
fix parenthesis order. Thanks, vc++ !! :p
...
SVN revision: 44316
2009-12-09 08:20:37 +00:00
Carsten Haitzler
1f5c54b2f4
shut up llabs!
...
SVN revision: 44312
2009-12-09 07:25:41 +00:00
Cedric BAIL
274ab1e01e
* eina: Add sin and cos fixed point fonction.
...
SVN revision: 44287
2009-12-08 18:30:41 +00:00
Cedric BAIL
b6183fe571
* eina: Fix negativ case and handle div with more accuracy.
...
SVN revision: 44281
2009-12-08 16:02:10 +00:00
Cedric BAIL
78d547c505
* eina: Fix precision of eina_f32p32_div.
...
SVN revision: 44252
2009-12-07 17:48:40 +00:00
Cedric BAIL
5a5d81812c
* eina_fp: Fix rounding with Eina_F32p32 multiplaction, add
...
operation to multiply a FP with an int.
SVN revision: 44238
2009-12-07 09:27:53 +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
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
Jonathan Atton
cc1863fc96
Eina: add eina_list_split_list()
...
SVN revision: 43307
2009-10-27 10:26:20 +00:00
Cedric BAIL
96437266c8
* eina: Fix EINA_LIST_REVERSE_FOREACH_SAFE typo from Gustavo Chaves.
...
SVN revision: 43186
2009-10-21 19:02:52 +00:00
Cedric BAIL
a9413206ef
* eina_hash: First parameter could be NULL.
...
SVN revision: 43053
2009-10-13 17:11:58 +00:00
Cedric BAIL
17c820aef7
* eina: This initialisation is not needed, but will reduce llvm warning noise.
...
SVN revision: 42935
2009-10-07 12:06:52 +00:00
Cedric BAIL
7a51d7bf39
* eina: Cleanup Eina fixed point implementation.
...
SVN revision: 42798
2009-09-29 12:04:50 +00:00
Rafael Antognolli
ea4efcb441
Fix eina_tile_grid_slicer_setup when a 0x0 rectangle was given as argument.
...
In this case slc->first wasn't being set, as well as the info.col and
info.row. This could bring some strange behavior like a call to
eina_tile_grid_slicer_next() not returning false.
SVN revision: 42783
2009-09-28 20:03:56 +00:00
Cedric BAIL
340ac0ee30
* eina: Fix build without amalgamation.
...
SVN revision: 42698
2009-09-25 11:36:56 +00:00
Cedric BAIL
6a284f8178
* eina: Add eina_atofp.
...
SVN revision: 42694
2009-09-25 10:03:19 +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
0ba193bae0
move EINA_DEPRECATED at the beginning of the declaration,
...
because it's more visible, and vc++ does not like it at
the end.
SVN revision: 42498
2009-09-15 21:19:15 +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
Gustavo Sverzut Barbieri
f98cb6e5f5
fix lighblue and add cyan.
...
SVN revision: 42410
2009-09-11 14:22:24 +00:00
Iván Briano
bbce7b5e0d
Avoid clashes.
...
SVN revision: 42368
2009-09-09 15:53:50 +00:00
Iván Briano
555de0f914
Support EINA_INLIST to be anywhere in the struct with _FOREACH macros.
...
Fix pointer arithmetic with EINA_CONTAINER_GET.
Change Inlist test to have the int first and not assume a direct cast works.
SVN revision: 42366
2009-09-09 14:05:31 +00:00
Gustavo Sverzut Barbieri
c98bf92366
replace UNLIKELY() with EINA_UNLIKELY()
...
SVN revision: 42354
2009-09-08 21:42:17 +00:00