Commit Graph

6691 Commits

Author SHA1 Message Date
Vincent Torri ac3bcc3fa9 * src/bin/evil_test_environment.c:
check returned value
	* src/bin/evil_test_memcpy.c:
	define getpagesize() for vc++
	* src/lib/evil_unistd.c:
	move inclusion of time.h after windsock2.h
	include direct.h for vc++
	use _WIN32_WCE for Windows CE compilers in evil_getcwd()
	* src/lib/Evil.h:
	* src/lib/evil_unistd.h:
	move getcwd() define from Evil.h to evil_unistd.h
	add some C99 types to Evil.h for vc++ (will be used in eina)
	* src/lib/evil_fcntl.c:
	include io.h for vc++
	* src/lib/evil_link_xp.cpp:
	use full name for symlink(). Fix symlink on Windows XP with
	the DOS prompt or the debugger of Visual Studio.
	* src/lib/evil_mman.c:
	don't include unistd.h if vc++ is used
	* src/lib/evil_stdio.h:
	formatting
	* src/lib/evil_stdlib.h:
	* src/lib/evil_stdlib.c:
	define putenv only for mingw32ce
	move the returned value of setenv()



SVN revision: 38333
2008-12-27 18:53:56 +00:00
Gustavo Sverzut Barbieri b6e27a739f oops, it's EINA_SAFETY_CHECKS, not just SAFETY_CHECKS.
SVN revision: 38328
2008-12-26 19:14:57 +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 363ddc283d fix locking around entry_surface_alloc.
we must make sure flags are consistent with actual values, so lock
around use and set of these variables as well.



SVN revision: 38322
2008-12-26 12:50:55 +00:00
Carsten Haitzler 297858d10c calloc not malloc! bad patches!
SVN revision: 38318
2008-12-25 08:35:51 +00:00
Carsten Haitzler 8b4a02c601 use correct #ifdef
SVN revision: 38314
2008-12-23 23:54:51 +00:00
Gustavo Sverzut Barbieri f4ccaaa15d Cancel preload if file a new file is set.
SVN revision: 38313
2008-12-23 23:15:53 +00:00
Gustavo Sverzut Barbieri 68bd5fb68b Possible last try to fix async imagre preload race conditions.
1 - use inlist as regular list uses non-thread safe mempool;
 2 - lock around image loading, so if main thread requests pixels right
     before worker thread is loading them, you don't get ie->info.module
     to NULL while it would be used (triggered from engines/common).
     Maybe this should be handled by a global mutex elsewhere instead of
     per-image mutex, but it has more granularity now.
 3 - emit "preloaded" callback if it was canceled to be loaded from main
     thread.

Please someone review these changes.



SVN revision: 38312
2008-12-23 23:07:48 +00:00
Gustavo Sverzut Barbieri 48d7998c6e attempt to fix image preload thread bugs 1: module refcount.
image preload will use modules from threads, there is a possibility to
crash due wrong reference counting.

actually much more can fail, we need to check modules don't keep that
needs exclusive access in globals or per-Evas_Module, but that's
another issue.

TODO: replace spinlocks with atomic operations.



SVN revision: 38309
2008-12-23 21:20:43 +00:00
Gustavo Sverzut Barbieri de8b6a7bbd fix possible errors with pointer/offset calculation.
it works on gcc, but maybe it would break in other compilers, so make
it safe.



SVN revision: 38302
2008-12-23 20:05:44 +00:00
Gustavo Sverzut Barbieri 7eb0826e29 remove dead stores and reduce some variable scope.
from clang report.


SVN revision: 38294
2008-12-23 19:17:55 +00:00
Gustavo Sverzut Barbieri 586979c07b fix bugs spotted by clang static analyser.
We had some problems with preload and after running LLVM's CLang
Static Analyser we found out that current->target could be NULL after
loop.

Also fixed some GCC and CLang warnings, kudos to these wonderful tools
that "Saved The Day".

PS: we should put some CLang Static Analyser results so others can
help fix other parts of E.



SVN revision: 38293
2008-12-23 18:14:16 +00:00
Cedric BAIL fb238897e5 Use float instead of double.
SVN revision: 38292
2008-12-23 17:23:35 +00:00
Cedric BAIL e006567cb0 Make it compile on Solaris.
SVN revision: 38290
2008-12-23 13:33:11 +00:00
Cedric BAIL 2c9ac0bd82 Remove now uneeded header.
SVN revision: 38289
2008-12-23 13:23:10 +00:00
Cedric BAIL 889d40abf8 Remove PATH_MAX use.
SVN revision: 38288
2008-12-23 13:12:06 +00:00
Cedric BAIL 6a87ca7590 Make code understandable by Visual Studio.
SVN revision: 38287
2008-12-23 10:04:46 +00:00
Cedric BAIL c8714d04cc Declaration should be done before any code.
SVN revision: 38286
2008-12-23 10:02:27 +00:00
dm 80e15cbeef Evas Win32 VS8 projects added
SVN revision: 38284
2008-12-22 23:24:22 +00:00
dm 729bf1a8e5 Eet Win32 VS8 project modified
SVN revision: 38283
2008-12-22 23:21:49 +00:00
dm 77dedbca06 Eina Win32 VS8 project added
SVN revision: 38282
2008-12-22 23:20:52 +00:00
dm 7ad6bb42fc Evil Win32 VS8 projects modified
SVN revision: 38281
2008-12-22 23:18:41 +00:00
Cedric BAIL 61199e56ee Fix sdl engine.
SVN revision: 38277
2008-12-22 11:16:26 +00:00
Ulisses Furquim c2651a9f31 Fix segfault when double freeing a string.
This fix makes it work again. However, ecore plugin should really be rewritten
or we should start considering eina_module instead.


SVN revision: 38275
2008-12-22 02:30:17 +00:00
Gustavo Sverzut Barbieri c36a5f23c3 and we must always pre_free, otherwise we end being called after canvas free.
SVN revision: 38272
2008-12-21 22:33:35 +00:00
Gustavo Sverzut Barbieri 0ec59ba102 must dissociate even if we will not delete the canvas.
otherwise subsequent associate requests will crash on us by using stale pointer.



SVN revision: 38271
2008-12-21 22:29:50 +00:00
Gustavo Sverzut Barbieri b1f00aa9d5 edjeL convert error code to string.
SVN revision: 38268
2008-12-21 18:39:36 +00:00
Gustavo Sverzut Barbieri aa3cd47bf2 oops, fix doc example.
SVN revision: 38267
2008-12-21 18:19:33 +00:00
Gustavo Sverzut Barbieri 765b770f82 oops, eina_stringshare_strlen() should never account '\0'.
SVN revision: 38260
2008-12-21 06:45:09 +00:00
Gustavo Sverzut Barbieri 15a2b2aaf2 force recalc after set_tween_state().
SVN revision: 38258
2008-12-21 02:17:31 +00:00
Vincent Torri d945c93a08 use ecore_pipe in gstreamer module
SVN revision: 38251
2008-12-20 16:31:55 +00:00
Gustavo Sverzut Barbieri 02ced33a33 Oops! ecore must not depend on ecore-evas!
move helper function inside ecore-evas.



SVN revision: 38250
2008-12-20 15:19:48 +00:00
Vincent Torri e66e9cc905 * ecore_win32_window.c:
fix fullscreen

 * ecore_evas_win32.c:
   add fullscreen (d3d and ddraw) and shape (d3d) support
   minor formatting

 * configure.ac:
   enable direct3d support



SVN revision: 38248
2008-12-20 14:37:04 +00:00
Gustavo Sverzut Barbieri 1fc336c2ee ecore_getopt: common callbacks go in.
ecore_evas_list_engines and geometry_parse, they're used in almost all
applications using ecore_getopt, let's avoid replicating code.



SVN revision: 38247
2008-12-20 14:29:45 +00:00
Gustavo Sverzut Barbieri 089b1c7925 fix image preload signature and make it callback if already preloaded.
evas_object_image_preload() should not use object as const because it
will mdofiy the object state (so it's semantic makes more sense).

if data was already loaded, then callback before ignored it (return).



SVN revision: 38246
2008-12-20 13:39:15 +00:00
Vincent Torri 4f96f46169 useless file
SVN revision: 38245
2008-12-20 13:24:27 +00:00
Vincent Torri c989841ab6 * src/modules/engines/direct3d/:
fast direct3d engine written by Dmitriy Mazovka. You rock !

 * m4/evas_check_engine.m:
 * m4/evas_check_loader.m4:
   use m4_popdef for each macro (otherwise, fail if aclocal is too old)

 * src/lib/canvas/evas_font_dir.c:
   include evas_common.h and evas_private.h after Eet.h and Evil.h
   so that EAPI is correctly defined



SVN revision: 38244
2008-12-20 13:22:46 +00:00
Vincent Torri 8b5ff6cb40 make compilation work on Windows XP
SVN revision: 38243
2008-12-20 13:18:27 +00:00
Gustavo Sverzut Barbieri 4821dcf1f8 always call image preloaded callback.
if image was already preloaded, inform user.

regular use case is to have image hidden, ask for preload and then
show image on callback, if there is no callback, image is never shown.



SVN revision: 38236
2008-12-19 21:56:31 +00:00
Jonathan Atton e58ac7064c missing parenthesis
from caro.



SVN revision: 38235
2008-12-19 21:28:32 +00:00
Jonathan Atton 11c671429e include the headers in the correct order so that EAPI is correctly defined on Windows
from caro


SVN revision: 38234
2008-12-19 20:54:13 +00:00
Cedric BAIL 5383cabf2b Fix EINA_ARRAY_ITER_NEXT off by one bug. With this fix you can no longer push
NULL pointer inside an array.


SVN revision: 38232
2008-12-19 17:55:57 +00:00
Carsten Haitzler a38ab7590d doc++
SVN revision: 38229
2008-12-19 14:44:47 +00:00
Carsten Haitzler d3f645a37a add del flag to associate
SVN revision: 38225
2008-12-19 14:30:03 +00:00
Carsten Haitzler 8da641854b dont resize/move fullscreen canvases
SVN revision: 38224
2008-12-19 13:11:21 +00:00
Viktor Kojouharov fa95a224da a vimball script for edc (and embryo). It includes an up-to-date syntax files for edc and embryo, indent and omni-completion scripts
SVN revision: 38207
2008-12-18 10:37:11 +00:00
Iván Briano d413635b56 More proper fix for the infinite calculate in evas box.
SVN revision: 38205
2008-12-18 03:04:15 +00:00
Iván Briano 7f3dfc66f2 And finally, edje table goes in
SVN revision: 38204
2008-12-18 02:43:20 +00:00
Iván Briano 31658d4f1e Added iterator and accessor to box and table
SVN revision: 38203
2008-12-18 02:39:09 +00:00