Commit Graph

60 Commits

Author SHA1 Message Date
Sebastian Dransfeld 92b5baaea4 efreet: fix alloca
SVN revision: 79629
2012-11-24 06:43:00 +00:00
Lucas De Marchi 2a8b05eb03 efreet: Fix efreet_init_parse for non existent file
The conversion to eina_file_map() in r78179 broke the error path of
efreet_init_parse(). Particularly if file doesn't exist. Since the variables
were not initialized it was trying to operate on random values from the stack.
So I got the following crash on E17:

#0  0x00007f238b0bbd67 in waitpid () from /usr/lib/libpthread.so.0
#1  0x00000000004397a3 in e_alert_show ()
#2  0x0000000000526392 in e_sigseg_act ()
#3  <signal handler called>
#4  0x0000000000000031 in ?? ()
#5  0x00007f239315df0f in efreet_ini_parse (file=file@entry=0x7fff39ce46f0 "/home/lucas/local/share/enlightenment/applications/defaults.list")
    at /home/lucas/p/e-svn/trunk/efreet/src/lib/efreet_ini.c:245
#6  0x00007f239315e100 in efreet_ini_new (file=0x7fff39ce46f0 "/home/lucas/local/share/enlightenment/applications/defaults.list")
    at /home/lucas/p/e-svn/trunk/efreet/src/lib/efreet_ini.c:82
#7  0x0000000000538174 in _e_util_default_terminal_get ()
#8  0x00000000005382dc in e_util_terminal_desktop_get ()
#9  0x00007f23706a1065 in e_fwin_init () from /home/lucas/local/lib/enlightenment/modules/fileman/linux-gnu-x86_64-ver-pre-svn-08/module.so
#10 0x00007f237069b524 in e_modapi_init () from /home/lucas/local/lib/enlightenment/modules/fileman/linux-gnu-x86_64-ver-pre-svn-08/module.so
#11 0x000000000050420d in e_module_enable ()
#12 0x0000000000504e77 in _e_module_cb_idler ()
#13 0x00007f238da22739 in _ecore_call_task_cb (data=<optimized out>, func=<optimized out>) at /home/lucas/p/e-svn/trunk/ecore/src/lib/ecore/ecore_private.h:265
#14 _ecore_idle_enterer_call () at /home/lucas/p/e-svn/trunk/ecore/src/lib/ecore/ecore_idle_enterer.c:234
#15 0x00007f238da24c1b in _ecore_main_loop_iterate_internal (once_only=once_only@entry=0) at /home/lucas/p/e-svn/trunk/ecore/src/lib/ecore/ecore_main.c:1826
#16 0x00007f238da252c7 in ecore_main_loop_begin () at /home/lucas/p/e-svn/trunk/ecore/src/lib/ecore/ecore_main.c:934
#17 0x0000000000436167 in main ()

Besides initializing the variables, there's no need to "goto" if the file
doesn't exist.... just return.




SVN revision: 78272
2012-10-19 23:33:05 +00:00
Sebastian Dransfeld 4468ee3a7f efreet: use eina_file_map
SVN revision: 78179
2012-10-18 11:19:28 +00:00
Carsten Haitzler c7bf0ff14a segv-- on parsing garbage ini files.
SVN revision: 74542
2012-07-29 07:57:41 +00:00
Sebastian Dransfeld f419175657 efreet: Add parameter checking to exported API
Some efreet APIs do not check input parameters.  So I add checking by
using EINA_SAFETY_ON_XXX().
ISO/IEC statndards says that "If an argument to a function has an
invalid value, behavior is undefined" . But this is  just for the
primitive functions such as libc.  I think that parameter checking is
needed in at least EFL exported APIs to prevent run-time abnormal
behavior.
EINA_SAFTETY_ON_XXX are better than "if (xxx) return" because it gives
error message and can be maintainable.

Patch by Bluezery, modified by me

SVN revision: 71366
2012-05-23 20:10:27 +00:00
Sebastian Dransfeld 93ed956adf efreet: Remove unneeded headers
SVN revision: 67403
2012-01-20 19:54:20 +00:00
Sebastian Dransfeld 56f3b3b278 efreet: Clean headers
Might affect other systems, please just add the needed headers and don't
complain.

SVN revision: 62557
2011-08-18 07:35:48 +00:00
Carsten Haitzler 39a63149cf enable mmap safety in efreet.
SVN revision: 60978
2011-07-04 09:35:39 +00:00
Sebastian Dransfeld 4262dd6285 Efreet: Fail on invalid ini file
SVN revision: 58605
2011-04-12 22:42:15 +00:00
Sebastian Dransfeld 649229a695 Efreet: Correct log domain name for efreet_ini
SVN revision: 58604
2011-04-12 22:42:01 +00:00
Carsten Haitzler 71b7acde90 doxy -> h files.
SVN revision: 58487
2011-04-08 11:01:08 +00:00
Mike Blumenkrantz 96be628d43 use eina_log more effectively: replace all printfs with appropriate log functions and use EINA_LOG_ERR instead of ERR when log dom fails to init
SVN revision: 57858
2011-03-18 19:47:57 +00:00
Sebastian Dransfeld da2c871e24 Remove duplicate logging macros
SVN revision: 56732
2011-02-05 19:07:07 +00:00
Sebastian Dransfeld accd246c72 Set EFREET_MODULE_LOG_DOM to -1 after unregister
SVN revision: 56731
2011-02-05 19:06:55 +00:00
Sebastian Dransfeld 6ed10251db Remove global log domain
SVN revision: 56729
2011-02-05 19:05:55 +00:00
Sebastian Dransfeld 978741a789 doc
SVN revision: 56326
2011-01-27 17:49:45 +00:00
Vincent Torri 42f57e9fc3 put alloca declaration after config.h
SVN revision: 55001
2010-11-25 23:48:59 +00:00
Gustavo Sverzut Barbieri bc2c59746d log domains in lower-case only please.
let's make it a standard so we don't have to look at the code
everytime to figure out the name...



SVN revision: 53171
2010-10-07 22:22:33 +00:00
Lucas De Marchi 5a8a8c9014 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Lucas De Marchi 0a4617ae38 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Sebastian Dransfeld 7bf67b046b key and value aren't const
SVN revision: 50809
2010-08-04 12:33:58 +00:00
Sebastian Dransfeld 0a3f53c3b1 Check for null return
SVN revision: 50808
2010-08-04 12:33:48 +00:00
Sebastian Dransfeld 1576311af3 alloc the right amount of mem
sizeof(char) is 1, and sizeof(char *) is wrong for strings

SVN revision: 50782
2010-08-03 19:31:24 +00:00
Sebastian Dransfeld 69d0626265 use alloca for in function mem
SVN revision: 50781
2010-08-03 19:31:14 +00:00
Sebastian Dransfeld 31c6799a7e goto not needed anymore with alloca
SVN revision: 50496
2010-07-25 20:38:28 +00:00
Sebastian Dransfeld b76d9490dc Fix errors reported by clang
SVN revision: 50492
2010-07-25 20:25:40 +00:00
Sebastian Dransfeld 31f73712f3 efreet: stringshare
SVN revision: 47668
2010-04-01 19:41:03 +00:00
Sebastian Dransfeld 3b546516c3 efreet: fancy alloca include in common header
SVN revision: 47664
2010-04-01 19:32:41 +00:00
Sebastian Dransfeld f72d4f9342 Eet cache for efreet desktop
SVN revision: 46726
2010-03-01 18:16:32 +00:00
Sebastian Dransfeld 6f2038b6e7 Create path to file if not exists
Fixes bug #513

SVN revision: 45990
2010-02-08 19:27:58 +00:00
Sebastian Dransfeld 0423e1ea99 Formatting
SVN revision: 45865
2010-02-04 09:12:35 +00:00
Sebastian Dransfeld af22e351b2 Fix compiler warnings
SVN revision: 45199
2010-01-15 20:51:23 +00:00
Davide Andreoli a59b9655b2 *Efreet_Ini: Add a new API call:
EAPI void efreet_ini_key_unset(Efreet_Ini *ini, const char *key);

With this you can remove keys from ini files



SVN revision: 43245
2009-10-24 09:23:51 +00:00
Davide Andreoli c9533023ad Efreet_ini: remove ending withespaces
SVN revision: 43244
2009-10-24 09:02:56 +00:00
Vincent Torri 285297dcdd * API break: _shutdown() functions return an int, now
* simplify a bit and fix init/shutdown functions



SVN revision: 42996
2009-10-10 06:19:13 +00:00
Cedric BAIL 05126826a3 * efreet: Use eina_log.
Patch from Matthieu.


SVN revision: 42599
2009-09-21 16:36:29 +00:00
Gustavo Sverzut Barbieri 992936af22 Update to match new EINA init/shutdown.
SVN revision: 42301
2009-09-06 22:23:04 +00:00
Gustavo Sverzut Barbieri 44d66495ca more valgrind fixes on efreet.
SVN revision: 41121
2009-06-20 06:50:01 +00:00
Vincent Torri 1bf086809e * move header files in efree_provate.h to the source files
* fix compilation on Windows XP (not sure that Windows CE port is needed...)

note that, as ecore_exe is not available on Windows, some code have
been disables for that platform in src/lib/efreet_desktop.c. Also, a new Evil
version should be used (not in svn yet)

The compilation on Windows is needed for Ewl (icon and mime)



SVN revision: 40257
2009-04-20 23:20:40 +00:00
Gustavo Sverzut Barbieri ab2e35127f Fix most compiler & clang warnings.
Left warnings regarding signed and unsigned comparison since
eina_list_count() returns unsigned, can use a cast in this return, but
not big deal for now.


By: Luis Felipe Strano Moraes & myself.



SVN revision: 39260
2009-02-26 22:35:38 +00:00
Cedric BAIL 6978e98dc6 * estickies,
* etk,
	* PROTO/exalt,
	* E-MODULES-EXTRA/diskio,
	* E-MODULES-EXTRA/drawer,
	* E-MODULES-EXTRA/penguins,
	* E-MODULES-EXTRA/slideshow,
	* E-MODULES-EXTRA/mail,
	* E-MODULES-EXTRA/forecasts,
	* E-MODULES-EXTRA/iiirk,
	* E-MODULES-EXTRA/places,
	* e,
	* ewl,
	* ecore,
	* elitaire,
	* entrance,
	* e_dbus,
	* efreet: Here we go, move from Ecore_List to Eina_List.

	NOTE: This patch is huge, I did test it a lot, and I hope nothing is
	broken. But if you think something change after this commit, please
	contact me ASAP.


SVN revision: 39200
2009-02-25 11:03:47 +00:00
Cedric BAIL 35540b3a3b This commit is huge. I did test it a lot on my computer, and it run fine here.
But is so big i fear i could have broken some piece of code. So report any wrong
behaviour to me (cedric on #edevelop).

So moving e17 and efreet to eina_hash. With a little efreet API break so they
must come together.


SVN revision: 38185
2008-12-17 15:33:43 +00:00
Cedric BAIL 01befd2b67 Switch ecore_strings to eina_stringshare.
SVN revision: 36676
2008-10-15 14:48:03 +00:00
Miculcy Brian cf33734edf enable failback when empty localisation string are found
SVN revision: 35184
2008-07-22 13:30:25 +00:00
Carsten Haitzler 43821d36e4 * add efreet garbage data check
* remove printfs that clutter output
* add efreet file type check - only parse regular files
* chekc mmap returns correctly for MAP_FAILED results
* edje has some stubs for adding script-only objecvts - but nothing useful
right now


SVN revision: 34689
2008-05-29 02:00:04 +00:00
Dan Sinclair cecac6f9d6 - add comments
- fix formatting


SVN revision: 34512
2008-05-08 14:22:21 +00:00
Carsten Haitzler 69a1a1a2e0 slackdood seems to report creating new apps is broken. this may be it.
SVN revision: 34508
2008-05-08 07:11:48 +00:00
Dan Sinclair 3322ce3b12 - deal with blank lines outside the invalid file checks
- this fixes the warning about a missing = sign
- you can have a blank value set on a key
  - this fixes the warnings about invalid key=value pairs
- formatting changes


SVN revision: 34496
2008-05-07 04:14:45 +00:00
Dan Sinclair 3624e4e923 - if we can't parse the INI file we can't set ini->data so return NULL
instead of an invalid ini file


SVN revision: 34493
2008-05-07 03:04:58 +00:00
Dan Sinclair 74b5878da7 - fix warnings
SVN revision: 34490
2008-05-07 02:16:50 +00:00