Commit Graph

53 Commits

Author SHA1 Message Date
Jonas M. Gastal c0d8ef9ede Eina: Adding images for latex docs.
SVN revision: 60452
2011-06-17 14:20:59 +00:00
Jonas M. Gastal aab43b7ead eina: A few fixes for the Eina_List doc.
SVN revision: 60288
2011-06-13 17:46:22 +00:00
Daniel Juyung Seo bb41b4530a eina: Fixed doxygen.
SVN revision: 60228
2011-06-11 09:16:45 +00:00
Jonas M. Gastal 29a7fddf18 eina: Documentation for Eina_List.
SVN revision: 60191
2011-06-10 13:40:50 +00:00
Fabiano Fidêncio 989da2f5c1 Ooops! Fixing eina_list_sorted doc, again!
SVN revision: 60162
2011-06-10 03:41:48 +00:00
Fabiano Fidêncio 59023e6b9d Fixing eina_list_sort docs
SVN revision: 60161
2011-06-10 03:33:01 +00:00
Carsten Haitzler b8b576afa9 more doxy -> .h
SVN revision: 58430
2011-04-07 12:26:24 +00:00
Mike Blumenkrantz e06df9182c +eina_list_move* for moving list node data to another list
SVN revision: 57110
2011-02-17 07:29:12 +00:00
Vincent Torri 7ee0e4655b * improve doc
* remove eina_binshare_init() and eina_binshare_shutdown()
   from eina_binshare.h as they must not be exported


SVN revision: 54223
2010-11-06 12:34:55 +00:00
Mike Blumenkrantz 7d03bcd110 3 hours and a lot of bugfixing later, uncrustify can now align the * for function prototypes
SVN revision: 53781
2010-10-22 19:58:49 +00:00
Mike Blumenkrantz cb4e0c8a75 this is the second test of my new uncrustify+config
*all struct members are aligned and spaced
*all post-function macros are force-spaced
*all post-function macros are parsed
*all macro definitions are backslash aligned


SVN revision: 53775
2010-10-22 17:30:54 +00:00
Iván Briano 8374dea693 Evil patch from Evil vtorri. Some improvements to Eina docs.
Yup, docs.. truly evil.


SVN revision: 51993
2010-09-08 17:41:05 +00:00
Cedric BAIL c45c36bd80 * eina: attempt to improve a little bit more the header.
Mainly trailing space and macro indentation.


SVN revision: 51217
2010-08-16 15:02:37 +00:00
Mike Blumenkrantz 224f7d3b55 formatting
SVN revision: 50913
2010-08-08 20:49:26 +00:00
Carsten Haitzler bed21c315d errrr... hmmm why did this change?
SVN revision: 50574
2010-07-28 02:48:11 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +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
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
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
Gustavo Sverzut Barbieri 425ebc47f5 improve docs and simplify macro, by kubo.
Kubo just found that docs could be improved and macro could be
simplified during his learning of EFL. Big bonus he did the
improvements =)



SVN revision: 41799
2009-08-16 00:47:23 +00:00
Gustavo Sverzut Barbieri 944be7e745 Bugfix eina_list_search_sorted_near_list() add sorted_insert.
eina_list_search_sorted_near_list() was broken and barfed at my face
during development of eina_list_sorted_insert(), so I rewrote it
following more traditional approach, also adding special cases for
head/tail remembering that random access in lists is not as fast as
array. I also simplified that code.

eina_list_sorted_insert() should be fast, O(log2 n) insert, with
special cases to insert already sorted arrays forwards or backwards,
however I believe that it's better to simply append/prepend in those
cases (if known).



SVN revision: 41625
2009-08-06 22:31:45 +00:00
Gustavo Sverzut Barbieri 4f39f6861a API BREAK: eina_list_search_sorted_near_list() gets one more parameter.
This should not impact anybody, at least in SVN I got no hits for this
function.

The new parameter contains the result of the last call to func(), so
we can know if the node is smaller, bigger or exactly the requested
value and don't need to call func() on node to know for sure.



SVN revision: 41623
2009-08-06 19:01:47 +00:00
Vincent Torri 9110d8d574 fix a bit the documentation, but there are still
a lot of doc to write...


SVN revision: 41164
2009-06-22 20:03:58 +00:00
Vincent Torri 46836c875f fix documentation
SVN revision: 40914
2009-06-06 03:55:32 +00:00
Cedric BAIL e027bb8a6e * eina_list: Add a eina_list_search_sorted_near_list. Usefull if you want to build
a sorted list.


SVN revision: 39550
2009-03-18 15:00:52 +00:00
Cedric BAIL 9fab9595b5 * eina_list: Add eina_list_search_sorted_list and eina_list_search_unsorted_list.
SVN revision: 39546
2009-03-18 13:29:36 +00:00
Gustavo Sverzut Barbieri bd6ef0cce1 add missing prototype.
SVN revision: 39516
2009-03-17 13:05:02 +00:00
Gustavo Sverzut Barbieri 56d1e979ce fix docs and add clone and reversed iterator calls.
* docs: be clear if it's a copy or in-place.

 * clone: add some apis to create a copy while operates, sort should
   do the same.

 * reversed iterator: new call to walk the list reversed, will make
   life easier in some cases.



SVN revision: 39515
2009-03-17 12:52:38 +00:00
Gustavo Sverzut Barbieri e3cce7b79d New macros, documentation and consistency for iterators and accessors.
EINA_ITERATOR_FOREACH() and EINA_ACCESSOR_FOREACH() are new macros to
help us forget about nasty C details (like cast to (void **)).

Document most iterators and accessors.

All iterators now set EINA_ERROR_OUT_OF_MEMORY if it's the case.



SVN revision: 39267
2009-02-27 16:32:22 +00:00
Gustavo Sverzut Barbieri aff2f5ebcf Add reverse iterator macros for eina list.
SVN revision: 39218
2009-02-25 20:19:32 +00:00
Cedric BAIL b496774e9e * eina/src/include/eina_list.h: Add a macro for freeing each element of an Eina_List.
SVN revision: 39109
2009-02-20 16:44:26 +00:00
Cedric BAIL 1caa0562ad Add new set of usefull fonctions for eina list.
SVN revision: 38791
2009-01-26 14:46:02 +00:00
Cedric BAIL 0dda30daf6 * eina/src/include/eina_array.h,
* eina/src/include/eina_f16p16.h,
	* eina/src/include/eina_accessor.h,
	* eina/src/include/eina_list.h,
	* eina/src/include/eina_iterator.h,
	* eina/src/lib/eina_rectangle.c,
	* eina/src/lib/eina_list.c,
	* eina/src/lib/eina_array.c,
	* eina/src/lib/eina_hash.c,
	* eina/src/lib/eina_module.c,
	* eina/src/lib/eina_stringshare.c,
	* eina/src/lib/eina_benchmark.c: Fix for windows compilation.



SVN revision: 38663
2009-01-20 15:56:48 +00:00
Gustavo Sverzut Barbieri ab95d9183d eina safety checks.
safety checks will report null pointers and other error conditions on
public api's and can be disabled by compile time check.

note that in order to have these checks working we need to make
EINA_ARG_NONNULL() void, otherwise GCC can remove these checks since
they're known to be false.

This commit also make two minor changes:

  * list and hash accessors and iterators are created even for empty
    entities. This is correct in my point of view since NULL should
    indicate error. Having these in were an optimziation, but not
    worth it, these are not the most common case and hitting this path
    is not of much cost.

 * unmarked some parameters as nonnull, mainly on list and inlist.



SVN revision: 38327
2008-12-26 18:31:14 +00:00
Gustavo Sverzut Barbieri b0ee5696a6 eina gets lots of gcc attributes to its api.
this should help with optimizations and code correctness, please see
"info gcc" for detailed explanation on these.

if you experience some functions not working as expected, please
double check if they're not marked with EINA_PURE or EINA_CONST, maybe
I misused them. Remove the macro and try again.

brief explanation:

 * EINA_WARN_UNUSED_RESULT: if you forgot to use the return of some
   function, it will emit a warning (and -Werror will make it an
   error). This way it will be harder to miss the attribution
   "l = eina_list_append(l, v)".

 * EINA_ARG_NONNULL(index, index...): if you give it an explicit NULL
   argument, or some tool (ie: clang) finds it could get a NULL but
   this is not accepted by API, then a warning will be emitted.  This
   will help those that still use eina_hash_add() as if it is
   evas_hash_add().

 * EINA_MALLOC: any non-NULL pointer it returns cannot alias any other
   pointer valid when function returns.

 * EINA_PURE: function have no effects other than the return and this
   return just depend on parameters and/or globals. You might call
   this function in a loop a thousand times and it will return the
   same value, thus you may move this function outside the loop and
   remove it.

 * EINA_CONST: stricter version of EINA_PURE, it will not check for
   global parameters, that is, you cannot consider pointer
   arguments. Use it for math things like "int sqrt(int)".

 * EINA_PRINTF(fmt, arg): will check format parameter specified in
   position "fmt" and passed arguments starting at position "arg", it
   will check for things like giving integers where short or strings
   were expected.

 * EINA_SCANF(fmt, arg): similar to eina_printf().

 * EINA_FORMAT(fmt): for use with things like dgettext(), it will get
   a printf-like format string and modifies it.

Please review and test it with your software, make sure you make clean
before you install the new version so it has any effect.

If you find some functions are missing EINA_WARN_UNUSED_RESULT and
EINA_ARG_NONNULL or others, please add them.



SVN revision: 38323
2008-12-26 13:17:51 +00:00
Gustavo Sverzut Barbieri 09924b54e5 Let valgrind help with EINA_MAGIC.
Keep EINA_MAGIC at the end of the structure (WHEN POSSIBLE! Watch out
flexible arrays like char str[] at the end!)

this way if parts use EINA_MAGIC and others do not, it will possible overflow and valgrind can help us.

WARNING: make uninstall before update! Then make clean and make install, check if everything is working with "make check".



SVN revision: 37961
2008-12-06 06:53:14 +00:00
Gustavo Sverzut Barbieri 03fca99e56 Add safe Eina list walk function.
SVN revision: 37949
2008-12-06 02:13:01 +00:00
Vincent Torri c8e2f1f51f small doc fix
SVN revision: 37407
2008-11-02 09:41:14 +00:00
Cedric BAIL 430fb672cd Rename EINA_LIST_ITER_NEXT to EINA_LIST_FOREACH.
SVN revision: 36930
2008-10-21 12:49:29 +00:00
Cedric BAIL 1950725606 Add merge function to list data type.
SVN revision: 36922
2008-10-21 11:28:38 +00:00
Cedric BAIL 6f5b3584dd Store build information inside eina_config.h, and fix magic use.
SVN revision: 36263
2008-09-26 11:41:55 +00:00
Cedric BAIL 8b85ce70d4 Patch from quarium.
Add magic to array and list.

Need to patch autotools to generate something like eina_config.h.



SVN revision: 36256
2008-09-25 14:46:16 +00:00
Cedric BAIL e8b25fb405 Add a sort benchmark.
SVN revision: 36250
2008-09-25 12:41:49 +00:00
Vincent Torri 4313d2b084 * fix list doc
* minor other doc fixes
 * link the mempool modules statically to libeina when requested
 * don't compile static lib of mempool when they are built as shared lib


SVN revision: 36178
2008-09-23 05:17:49 +00:00
Vincent Torri f50feadeae * add benchmark and file documentation
* reorganize a bit more. it's not finished
 * fix spellingg and formatting 
 * gnuplot file names generated by our bechmarks tests have an
   absolute time description and not H:M:S description, as this
   breaks the check out of the repo on Windows.


SVN revision: 36090
2008-09-19 05:22:43 +00:00
Vincent Torri 4485f06f66 fix a bit list documentation. Not finished yet.
SVN revision: 35702
2008-08-28 06:31:18 +00:00
Cedric BAIL 911cd4deda Add iterator/accessor to eina list.
Change list size type to unsigned int.


SVN revision: 35454
2008-08-13 09:19:34 +00:00
Cedric BAIL ce23f3c2a9 After benchmarking, providing inline does impact performance of list and array user.
SVN revision: 35406
2008-08-08 14:20:11 +00:00
Cedric BAIL f193096aa8 Add eina_list test suite. Cleanup list implementation and share out of memory error.
SVN revision: 35378
2008-08-07 13:09:09 +00:00