Commit Graph

393 Commits

Author SHA1 Message Date
Ghislain Loaec 55a1edbb78 eina: Eina_Rectangle API documentation 2014-10-20 18:13:38 +02:00
Tae-Hwan Kim ad2c51c034 eina: remove macros referencing to absent functions.
Summary: eina_ustrbuf_insert_printf and eina_ustrbuf_insert_vprintf are absent

@fix

Reviewers: huchi, raster, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1510

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-08 18:58:35 +02:00
Vincent Torri 788d4d6c3f eina: open files in read-onnly for eina_file_open() on Windows
A previous fix added the read-write access of files with eina_file_open,
so revert that part

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-03 11:05:38 +02:00
Shinwoo Kim 448cd69ab7 eina : check whether the file exists or not, before memory allocation of Eina_Module
Summary:
Please refer to https://phab.enlightenment.org/D1200

Reviewers: raster, jpeg, zmike, cedric

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1334
2014-09-30 16:46:52 +02:00
Amitesh Singh be7a64b6e3 eina: Eina_Inlist - remove obvious if() check.
Reviewers: seoz, raster, cedric

Reviewed By: cedric

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1503
2014-09-29 20:20:18 +02:00
Amitesh Singh d25747c7f8 eina: Eina_List - remove obvious if() check.
Summary:
if (cmp == 0) - in false branch, cmp can not be equal to 0
else if (cmp < 0) - in false branch, cmp is atleast 1.
else if (cmp > 0) - it is abvious that cmp > 0.

Reviewers: cedric, seoz, raster

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1502

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-29 20:20:17 +02:00
Vincent Torri 6c2ec01d39 Evil: add strptime()
@feature
2014-09-28 12:29:54 -04:00
Jérémy Zurcher 65b2dd391a eina_value_util_type_offset: abs(unsigned int) is nonsense 2014-09-24 11:15:58 +02:00
Mike Blumenkrantz cbcd9c3718 +eina_strdup(), eina_streq()
there are macros/inlines for these in most efl projects I've seen, may as well have them standardized here

@feature
2014-09-23 16:15:34 -04:00
Mike Blumenkrantz 3dd8fb8a55 move eina_value_util_time_string_new() to not inline
uses strptime which will cause warnings for people who don't do includes correctly
2014-09-23 15:56:46 -04:00
Mike Blumenkrantz d7f729343b add eina_value_util.h to Eina.h 2014-09-23 15:56:46 -04:00
Mike Blumenkrantz 8dffde69d1 rename eina_value_util_timestamp_new -> eina_value_util_time_string_new 2014-09-23 14:57:10 -04:00
Mike Blumenkrantz 77ba1c2761 +eina_value_util api
merged from maelstrom/azy. commonly used functionality for eina_value with _util_ namespace to make them easier to find in the value header nightmare

@feature
2014-09-23 14:37:48 -04:00
Vincent Torri 291c546143 eina: do no use umask on Windows in eina_file_mkstemp()
umask() sets the permissions of the file to read-only on Windows
(see umask documentation on MSDN).
This breaks the creation of .edj file (epp needs to modify the
created file).
Anyway, on Windows, permissions should be given to anybody.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-23 16:41:32 +02:00
Stefan Schmidt 61478af3a6 eina_file: Try to use XDG_RUNTIME_DIR for tmp dir first
Instead using $TMPDIR and falling back to /tmp we now try $XDG_RUNTIME_DIR
first.

"$XDG_RUNTIME_DIR defines the base directory relative to which user-specific
non-essential runtime files and other file objects (such as sockets, named
pipes, ...) should be stored. The directory MUST be owned by the user, and
he MUST be the only one having read and write access to it. Its Unix access
mode MUST be 0700."

While improving our security by isolating these files from other users this
has the potential to break things. I have not seen any breakage in testing
but keep this commit in mind if something strange happens on your system.
2014-09-12 09:12:52 +02:00
Andrii Kroitor 38147da036 eina_file: fixing wrong return value on access problems in file copy process
Summary:
when dest directory is protected from writing success value was returned
@fix

Reviewers: seoz, cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D1366
2014-08-27 19:47:16 +09:00
Carsten Haitzler 479c0f37a4 fix efl deadlock with thread queues
@fix
2014-08-24 22:19:05 +09:00
Cedric BAIL 1a571fc689 eina: add documentation for the tricky eina_hash_pointer_new 2014-08-21 13:47:59 +02:00
Jean Guyomarc'h f449f0ddb6 eina: port Eina_Spinlock for OSX
Summary: Support of Spinlocks in Eina (Eina_Spinlock) for OSX, which does not implement them in pthread.
@feature

Reviewers: raster, raoulh, naguirre, cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1151

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-08-21 12:04:53 +02:00
Daniel Juyung Seo 8ba2cc6fe9 doc: fixed typo. 2014-08-18 01:10:39 +09:00
Carsten Haitzler 90bbc73c6e eina unicode - remove pointless operands
fixes CID 1039676
2014-08-14 19:18:46 +09:00
Carsten Haitzler 13917c8769 eina_inlist_sorted_state_insert - fix logically dead code
this fixes CID 1039938
2014-08-14 18:53:39 +09:00
Carsten Haitzler 9767fa2b9c eina list insert sorted - fix logically dead code
this fixes CID 1039941
2014-08-14 18:53:39 +09:00
Carsten Haitzler f93fb3c7f6 eina thread queue - check write return
this addresses CID 1226191. this should never have an error as the fd
should always be valid as long as needed.
2014-08-13 19:06:40 +09:00
Carsten Haitzler 6f0f046b83 fix eina unicode realloc fix of coverity complaints - return right buf. 2014-08-13 18:01:48 +09:00
Carsten Haitzler c012e6939c eina thread queue - fix possible deadlock
coverity pointed out a deadlock - CID 1226193. i hope this fixes it
(need to wait days for a coverity re-run). tests pass and real life
usage works, so i assume its ok. in theory i see no problem either.
2014-08-13 17:36:00 +09:00
Carsten Haitzler dcc55bbfd4 eina - and follow-on calloc fixup - 0 terminate first calloced string
this follows on from 6dc52db881
2014-08-13 11:52:59 +09:00
Carsten Haitzler 6dc52db881 eina unicode - fix calloc stupidity
in looking at CID 1230994 i noticed that eina_unicode_unicode_to_utf8
and eina_unicode_utf8_to_unicode are really dumb. they calloc an array
of bytes then proceed to fill them all in anyway. why? also the
realloc handing in eina_unicode_unicode_to_utf8 wasn't strictly corect
and could leak memory. so this just fixes silly slow code and a leak.
2014-08-13 09:05:37 +09:00
Cedric BAIL 3fbe90ae53 eina: rename to eina_module_symbol_global_set
As discussed on the ML, eina_module_global_set should become eina_module_symbol_global_set.
2014-08-11 14:52:51 +02:00
Stefan Schmidt f70c750cfc eina_tile: Add missing since version tags for union, substract, etc
Merged directly after 1.10 release so mark it as since 1.11
2014-08-07 12:16:57 +02:00
bluezery 8f30d8a949 Eina: Change from "" to <> for header inclusion
Summary:
All eina_xxx.h are expored headers.
Using system path to search eina headers seems to be better.

Reviewers: raster, stefan_schmidt, stefan, cedric

Subscribers: stefan_schmidt, cedric

Differential Revision: https://phab.enlightenment.org/D1079
2014-08-02 21:10:37 +02:00
Mike Blumenkrantz 6817717ee4 Revert "eina: Eina_Module - check whether the file exists or not, before memory allocation of Eina_Module"
This reverts commit 971589bf56.

this completely breaks existing eina_module usage. elm_test->image remote
2014-07-27 18:53:20 -04:00
Daniel Kolesa 987cde5f35 Revert "eina: new API: eina_file_path_basename"
This reverts commit 68282f8c42.

This is actually not needed because of presence of basename in Evil.
2014-07-23 19:38:08 +01:00
Daniel Kolesa 68282f8c42 eina: new API: eina_file_path_basename 2014-07-23 17:04:04 +01:00
Shinwoo Kim 971589bf56 eina: Eina_Module - check whether the file exists or not, before memory allocation of Eina_Module
Summary:
I got an issue from emotion_basic_example, because my machine has following directories.

/usr/local/lib/emotion/modules/
├── gstreamer
│   ├── linux-gnu-i686-1.7.99
│   ├── linux-gnu-i686-1.8.0
│   └── linux-gnu-i686-1.8.99
└── gstreamer1
    ├── linux-gnu-i686-1.8.99
    └── v-1.10

The defined MODULE_ARCH is v-1.10, and the _emotion_modules which is returned by eina_module_arch_list_get(); has two items.
Because eina_module_new(); creates Eina_Module, even though the "/usr/local/lib/emotion/modules/gstreamer/v-1.10/module.so"
does not exist.

Test Plan: Create directory without MODULE_ARCH, run emotion_basic_example, and check whether it works properly or not.

Reviewers: raster, seoz, Hermet, woohyun, jpeg, cedric

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1200

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-21 19:33:27 +02:00
Gwanglim Lee 3d534e87c3 eina: Eina_Tiler - return a NULL if intersection of two tilers doesn't exist
Summary:
change eina_tiler_intersection to return a NULL if intersection
of two tilers doesn't exist. and add test case to check it.

This doesn't break ABI/API as this call could already return a NULL value and it
should have been handled by the caller anyway. This just make an expected behavior
more correct.

Test Plan: run eina_suite after building eina test suite

Reviewers: cedric, raster, torori, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1205

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-21 19:33:27 +02:00
Carsten Haitzler 7a7d3be140 eina - fix eina-module warning with global + stop using gcc extn for file 2014-07-18 08:05:25 +09:00
Cedric BAIL 1eccc2824f eina: forgotten return value. 2014-07-17 17:51:22 +02:00
Vincent Torri f61f8d30fc eina: make error message more precise. 2014-07-17 17:51:22 +02:00
Carsten Haitzler 45f01bd11c eina - thread queue - fix block pool shutdown 2014-07-16 20:43:32 +09:00
Carsten Haitzler 3c130836ad new eina api/object - eina thread queues
@feature

This is a new feature for eina (and EFL) - a zero-copy thread message
queue for sending messages from one thread to another or from the
ecore mainloop to or back to the mainloop from threads. It has a
complete test suite too.
2014-07-15 20:39:13 +09:00
Cedric BAIL 72aca66f8d eina: win32 and linux version code are the same. Sharing code is better. 2014-07-14 15:46:54 +02:00
Cedric BAIL f15fc9b0a5 eina: simplify logic. 2014-07-14 15:46:54 +02:00
Vincent Torri 4d68dfe603 eina: (Windows) fix creation of files with eina_file_open() in some cases
@fix
2014-07-13 15:17:46 +02:00
Vincent Torri ea8b4c82ed eina: call the function, then return 2014-07-13 15:17:34 +02:00
Vincent Torri 9631585f24 efl: remove Windows CE support 2014-07-13 15:17:17 +02:00
Cedric BAIL 8062d5d7e9 eina: make it possible to load module symbol into the global namespace. 2014-07-11 15:32:51 +02:00
ChunEon Park cc68ef1f22 eina - fixed typo 2014-07-07 20:22:06 +09:00
Cedric BAIL 201d9b567d windows: make those warning explicit about what they imply. 2014-06-27 17:00:23 +02:00
Cedric BAIL 546af159ff eina: silence warning of unused parameter on Windows. 2014-06-27 13:24:39 +02:00