Commit Graph

20 Commits

Author SHA1 Message Date
Vincent Torri f7c560c311 replace hton and ntoh family functions with ones defined in eina
Summary: This fixes especially the execution of edje_cc on Windows

Test Plan: execution of edje_cc

Reviewers: cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7834
2019-02-01 14:25:35 +00:00
Vincent Torri 0c96d9e8cf Efreet_Mime: update comment about symlinks on Windows 2018-01-30 16:52:24 +09:00
Subodh Kumar 8070051789 efreet: unsigned int cannot be compared to less than zero.
Summary:
Wrong camparision with less than zero for unsigned integer.
@fix

Test Plan: NA

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-10-06 09:53:17 -07:00
Cedric BAIL 6da2fbc9c4 efreet: make mime type evaluation way faster by using mmap. 2016-11-14 15:17:12 -08:00
Jean Guyomarc'h 1ab1e3697d efreet: mime types database can be empty
When the mime types database is empty, the file will
be exactly 28 bytes.

Fixes T4426
2016-08-26 21:16:39 +02:00
Carsten Haitzler 510c093602 efreet - convert crash into NULL mimes when no mime db found
so ok - efreet crashed letting you know you have a missing mimedb...
return NULL instead fixes T4425 :) - rememebr to kill your efreetd's
to get a new mimedb - log out and in will do that.
2016-08-24 10:00:50 +09:00
Carsten Haitzler 561f8eaa8f efreet - save about 240-300k or so of memory used by efreet mime
so efreet mime was loading a bunch of mime type info files, parsing
them on startup and allocating memory to store all this mime info -
globs, mimetype strings and more. all a big waste of memory as its
allocated on the heap per process where its the SAME data files loaded
every time.

so make an efreet mime cache file and a tool to create it from mime
files. mmap this file with all the hashes/strings in it so all that
data is mmaped once in memory and shared between all processes and it
is only paged in on demand - as actually read/needed so if your
process doesnt need to know about mime stuff.. it wont touch it anyway.

this saves about 240-300k or so of memory in my tests. this has not
covered the mime MAGIC files which still consume memory and are on the
heap. this is more complex so it will take more time to come up with a
nice file format for the data that is nicely mmaped etc.

@optimize
2016-08-23 12:04:06 +09:00
Carsten Haitzler 2ca5075193 efreet - fix mime file path messing with short paths like /
this fixes T4015

@fix
2016-07-05 16:28:52 +09:00
Vincent Torri 3b44645363 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01:00
Wonguk Jeong e32f033853 efreet: check magic only for file which has size
Summary:
Due to unnecessary magic checking, there was freezing in /proc in efm.
Proc file's st_size is zero, but, it's readable. therfore, it takes unnecessary time in magic checking. And, there is no need to check magic in case of 0 sized regular files as well.

Therefore, skip magic check in case of st_size is zero.

Fixes T1173

Test Plan: enlightenment -> file browser (efm) -> get int /proc --> check whether efm freezes or not

Reviewers: raster, cedric, zmike

CC: seoz, cedric

Maniphest Tasks: T1173

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-04-17 19:34:38 +02:00
Sebastian Dransfeld 8327903b99 efreet: fgetc returns int
CID: #1039720
2013-08-07 13:02:53 +02:00
Sebastian Dransfeld 7d1703ea0d efreet: Be paranoid about '\0' termination
CID: #1039722
2013-08-07 13:02:53 +02:00
Carsten Haitzler 27553f0500 fix clang sizeof complaint 2013-07-16 19:49:31 +09:00
Cedric Bail 61396654a5 efreet: cleanup code by using Eina_File infra. 2013-06-27 15:19:43 +09:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Cedric Bail b4becd5d7a efreet: fix compilation on Windows. 2013-03-16 15:40:32 +09:00
Lucas De Marchi 06ff74834f efl: remove checks for socket.h, net/*, arpa/*
SVN revision: 82585
2013-01-10 20:26:02 +00:00
Gustavo Sverzut Barbieri f57968f158 efl/efreet: improve tests, fix bogus warning.
* tests will run locally now, not just from installed files.
 * efreet_init_new(NULL) is valid, actually used by efreet_desktop_save()



SVN revision: 82428
2013-01-08 23:45:48 +00:00
Gustavo Sverzut Barbieri 0a2d116119 efl: eina_alloca.h to simplify alloca() usage.
having to replicate 18 lines per file just to access alloca() is
insane. Let's do that in Eina.h and avoid that crap :-/



SVN revision: 82082
2013-01-03 15:10:34 +00:00
Gustavo Sverzut Barbieri 4bc0210bd3 efl: merge efreet.
seems to be fine, pass distcheck and friends. please report.

changes:
 - documentation hierarchy fixes
 - replaced __UNUSED__ with EINA_UNUSED
 - replaced PKG_DATA_DIR with PACKAGE_DATA_DIR"/efreet"



SVN revision: 81889
2012-12-29 23:04:40 +00:00