Commit Graph

58 Commits

Author SHA1 Message Date
Carsten Haitzler 3b167a62f5 populate optional.
SVN revision: 58792
2011-04-21 11:54:16 +00:00
Vincent Torri 2816a9b59d Eina: eina_file.c: use fcntl instead of O_CLOEXEC
SVN revision: 58649
2011-04-14 05:52:24 +00:00
Vincent Torri 644bf855f4 Eina: eina_file.c replace ACCESSPERMS, which is not protable, by its value
SVN revision: 58648
2011-04-14 05:39:09 +00:00
Carsten Haitzler cd1c9be1f9 errrr.. how about we DONT make every eina using app spew out:
ERR<23281>:eina eina_main.c:173 _eina_shutdown_from_desc() Problems
shutting down eina module 'file', ignored.

now there's a bright idea eh?



SVN revision: 58645
2011-04-13 21:50:23 +00:00
Vincent Torri 3d26976ef8 move doxy tag
SVN revision: 58641
2011-04-13 17:03:24 +00:00
Vincent Torri 4ae466a30c put __UNUSED__ where we usually put it : after the parameter name
SVN revision: 58638
2011-04-13 16:29:29 +00:00
Cedric BAIL 8a8153bf2d eina: add Eina_File API.
NOTE: the purpose of this API is to replace mmap user in the
EFL, share cache and more code across them. The potential user
are eet, evas, efreet, eio and enlil. More patch are needed for
them to use this infra. Help welcome :-)

NOTE2: this API also need more test and is waiting for some
more pthread infra before being thread safe. But at the end
it will be thread safe if eina thread safety is requested.


SVN revision: 58637
2011-04-13 16:15:30 +00:00
Carsten Haitzler 4ba040a35c more dox -> .h
SVN revision: 58425
2011-04-07 12:04:24 +00:00
Cedric BAIL 385e1b08f2 eina: refactoring.
SVN revision: 57993
2011-03-22 16:33:34 +00:00
Cedric BAIL b5e8b3d28f eina: better fix for large file.
SVN revision: 57627
2011-03-09 14:59:48 +00:00
Cedric BAIL e8ca19f09c eina: fix stat failure when size, blocks count or serial number didn't
fit in 32bits.


SVN revision: 57624
2011-03-09 14:49:35 +00:00
Vincent Torri f2474ddf7c revert non wanted changes
SVN revision: 55939
2011-01-06 18:26:40 +00:00
Vincent Torri 5a36e40473 move AC_GNU_SOURCE before libtool init
SVN revision: 55938
2011-01-06 18:19:42 +00:00
Gustavo Sverzut Barbieri ef5c356153 Use EINA_PATH_MAX where it makes sense.
All the access to Eina_File_Direct_Info::path should be using the
actual size (EINA_PATH_MAX) and not another constant (PATH_MAX).



SVN revision: 55403
2010-12-09 10:14:11 +00:00
Vincent Torri 899983412b * port eina_file_*_ls() on Windows and put the code in another file
* on Windows eina_file_stat_ls() is the same that eina_file_direct_ls()

SVN revision: 54250
2010-11-06 21:00:58 +00:00
Vincent Torri eccd70139b formatting, whitespaces--
SVN revision: 54221
2010-11-06 07:37:52 +00:00
Cedric BAIL 64aa07c793 * eina: fix typos.
SVN revision: 54127
2010-11-03 17:32:07 +00:00
Cedric BAIL c40d642b02 * eina: fix possible race condition between opendir/readdir_r/pathconf.
See http://womble.decadent.org.uk/readdir_r-advisory.html .


SVN revision: 54117
2010-11-03 10:19:55 +00:00
Cedric BAIL 19bce347b0 * eina: use fstatat when available.
Maybe we could add an eina_file_lstat_ls.


SVN revision: 54108
2010-11-02 17:47:19 +00:00
Cedric BAIL 17973f336e * eina: add eina_file_stat_ls and guaranty that eina_file_direct_ls
will not call anything else than readdir_r.


SVN revision: 54105
2010-11-02 17:07:04 +00:00
Cedric BAIL eb4cd21f0c * eina: remove dirent so apps don't rely on non portable code.
SVN revision: 54103
2010-11-02 15:11:05 +00:00
Carsten Haitzler a08524ea65 aaagh. dirent... bad! too many things in dirent that are not portable
- d_type for example... so put that into the direct_info struct and
handle the compat in eina.



SVN revision: 54015
2010-10-30 05:48:07 +00:00
Cedric BAIL 2794a9afc9 * eina: fix usage of eina_file_*ls in thread.
SVN revision: 53948
2010-10-28 09:59:27 +00:00
Cedric BAIL 4d36ee36e2 * eina: make eina_file_ls and eina_file_direct_ls container be DIR*.
SVN revision: 53862
2010-10-25 12:25:24 +00:00
Eduardo de Barros Lima a5a3fc18e5 Eina: Don't #define _GNU_SOURCE
Instead use AC_GNU_SOURCE macro in configure.ac



SVN revision: 53157
2010-10-07 19:29:32 +00:00
Vincent Torri 72c7182a15 fix
SVN revision: 52882
2010-09-29 08:12:08 +00:00
Vincent Torri e06c65f79d NAME_MAX defined to 255 on sun (if not defined).
SVN revision: 52881
2010-09-29 06:37:56 +00:00
Mike Blumenkrantz f7bf462ef4 revert whoops
SVN revision: 52537
2010-09-21 06:52:10 +00:00
Mike Blumenkrantz 005cf69302 ecore_con_url_free migration
SVN revision: 52536
2010-09-21 06:51:07 +00:00
Lucas De Marchi 33dcb37afe Fix common misspellings
The following misspellings were fixed:

asociated->associated
convertion->conversion
exemple->example
existant->existent
immediatly->immediately
isnt->isn't
loosing->losing
memeber->member
occured->occurred
occurence->occurrence
occurences->occurrences
ocurred->occurred
recomended->recommended
sucess->success
teh->the
tiem->time
usefull->useful




SVN revision: 51962
2010-09-08 03:21:16 +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
Cedric BAIL e6f9cee051 * eina: fix structure content to be more futur proof and reduce
risk of ABI breakage.


SVN revision: 51390
2010-08-19 12:02:28 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +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 c012d2e7f6 fix compilation on Windows
SVN revision: 50179
2010-07-11 11:52:43 +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
Christopher Michael e9bc23874c Fix typo in doc.
SVN revision: 46083
2010-02-11 17:38:24 +00:00
Gustavo Sverzut Barbieri b84e3424fe use quotes to include config.h
SVN revision: 42314
2009-09-07 04:32:49 +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
Vincent Torri 72b87160a2 * add eina_config.h in all source files. Fix linking with Visual Studio
* move eina_private.h and eina_safety_checks.h just after eina_config.h


SVN revision: 42077
2009-08-28 12:03:34 +00:00
Vincent Torri 6e7aecc7c0 * Put definition of alloca before any standard header
files according to the doc
 * define _GNU_SOURCE before the inclusion of alloca
   as features.h inclued by alloca.h, defines some
   macros according to _GNU_SOURCE.



SVN revision: 41940
2009-08-23 09:18:14 +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 29befb161d put macro after declarations, otherwise vc++ is not happy
SVN revision: 38741
2009-01-23 16:43:14 +00:00
Vincent Torri c166854ae1 * minor formatting
* add some doc in eina_array
 * in eina_main.c, include only the necessary headers
 * fix some warnings (size_t <-> int)


SVN revision: 38740
2009-01-23 16:11:45 +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
Cedric BAIL e006567cb0 Make it compile on Solaris.
SVN revision: 38290
2008-12-23 13:33:11 +00:00
Vincent Torri f196383f8f finish doc of the file module. Add a warning if eina_file_split() is used
SVN revision: 36122
2008-09-20 08:42:35 +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
Cedric BAIL a257cf02f3 Add a routine to extract path information.
SVN revision: 35814
2008-09-03 14:40:12 +00:00