Re: [E-devel] Was: Re: NOTICE: svn feature freeze this weekend (Sep 4-6)
I plan to change what I can, but I'll certainly need help. Basically we need to eina_log_init() and eina_log_shutdown() (some places are only using macros directly and not init'ing - won't work with new API). Also, you can't just replace eina_error_init() because these apps also use eina_error API for error messages and codes (that will be kept). On Tue, Sep 1, 2009 at 6:28 AM, Rocco Carbone ro...@tecsiel.it wrote: On 1 September 11:15 2009 Cedric BAIL spoke: | On Tue, Sep 1, 2009 at 12:22 AM, Gustavo Sverzut | Barbieribarbi...@profusion.mobi wrote: |  - fixing bugs reported by Luis Felipe's LLVM/Clang: | http://local.profusion.mobi:8081/~lfelipe/output-efl/ |  - moving code from fprintf/printf to eina_log (prefer to do this | BEFORE this weekend!) | | eina_log should also be used more inside eina, I don't know if André | Dieb plan to do it, but you can do a file by file hunt of eina_error | and replace it with eina_log. Perhaps André you can do one small | commit so others can understand what needs to be done. | | Enlightenment DR17 is quite stable these days, the release items are | almost all done. Items under Reorganize, Layout and Visual Changes | are the biggest pending, but Raster already talked about postponing | those. But in turn, Edje received new Lua scripting support, that | really needs to be improved so Edje and thus E17 can be released. | | Well, Edje received a lot of internal improvement during the past | week, not only lua, but the way all edje_recalc is done also. | Apparently all breakage are fixed now, but if you see anything | strange, don't hesitate to report. | | Cedric wished to release Eina last time but we were missing eina_log, | just introduced by André Dieb some weeks ago. Probably with some love | we can make it 1.0 and be happy to release another important building | block. | | Yep, just need a little bit of work around eina_log and we will be | ready for a release of Eina. If people can take time for a last API | review it would be nice. | | Have fun :-) | -- | Cedric BAIL | | -- | Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day | trial. Simplify your report design, integration and deployment - and focus on | what you do best, core application coding. Discover what's new with | Crystal Reports now. http://p.sf.net/sfu/bobj-july | ___ | enlightenment-devel mailing list | enlightenment-devel@lists.sourceforge.net | https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Rocco Carbone mail-to: rocco /at/ tecsiel /dot/ it Pisa Italy Life is in the details -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Was: Re: NOTICE: svn feature freeze this weekend (Sep 4-6)
Hello, On the beginning of a module, program or library, you must call eina_log_init() for initializing the library. After that, you should call eina_log_domain_register(domain_name, color) for registering a new domain, note that this call returns an index associated with the created domain. When your program is shutting down, it must unregister registered domains and call eina_log_shutdown(). Almost all files under http://trac.enlightenment.org/e/browser/trunk/PROTO/eupnp/src/lib have this pattern (init, register/save, shutdown). Also, note on eupnp_log.c that I defined a global logging domain for the project. There's a native global domain to which macros without DOM apply, but if you want things customized like I do, you should do that way. We also recommend to define your own macros, do not use EINA_LOG_DOM_* or EINA_LOG_* directly, for example (from eupnp_log.h): // Here we declare a variable to save the global logging domain EAPI extern int EUPNP_LOGGING_DOM_GLOBAL; // Define your own macros based on EINA_LOG_DOM_* #define WARN(...) EINA_LOG_DOM_WARN(EUPNP_LOGGING_DOM_GLOBAL, __VA_ARGS__) #define DEBUG(...) EINA_LOG_DOM_DBG(EUPNP_LOGGING_DOM_GLOBAL, __VA_ARGS__) #define INFO(...) EINA_LOG_DOM_INFO(EUPNP_LOGGING_DOM_GLOBAL, __VA_ARGS__) #define ERROR(...) EINA_LOG_DOM_ERR(EUPNP_LOGGING_DOM_GLOBAL, __VA_ARGS__) #define CRIT(...) EINA_LOG_DOM_CRIT(EUPNP_LOGGING_DOM_GLOBAL, __VA_ARGS__) #define WARN_D(DOM, ...) EINA_LOG_DOM_WARN(DOM, __VA_ARGS__) #define DEBUG_D(DOM, ...) EINA_LOG_DOM_DBG(DOM, __VA_ARGS__) #define INFO_D(DOM, ...) EINA_LOG_DOM_INFO(DOM, __VA_ARGS__) #define ERROR_D(DOM, ...) EINA_LOG_DOM_ERR(DOM, __VA_ARGS__) #define CRIT_D(DOM, ...) EINA_LOG_DOM_CRIT(DOM, __VA_ARGS__) And on eupnp_log.c, we initialize and save the domain index: if (!eina_log_init()) { fprintf(stderr, Failed to initialize eina error module.\n); return 0; } EUPNP_LOGGING_DOM_GLOBAL = eina_log_domain_register(Eupnp, EINA_COLOR_RESET); if (EUPNP_LOGGING_DOM_GLOBAL 0) { fprintf(stderr, Failed to register global error domain.\n); eina_log_shutdown(); return 0; } A basic migration approach follows: 1. Find EINA_ERROR_P* macros and change them to the new ones: EINA_LOG_DOM_* (grep :-)) 2. Check if eina_error_set(), eina_error_msg_register() are being used. If they aren't, you can remove eina_error_init() and eina_error_shutdown(). Note that I found some libs using EINA_ERROR_ macros and not calling eina_error_init(). Hope this and code examples are enough. Any doubts please post on the ML. Thanks, On Tue, Sep 1, 2009 at 12:26 PM, Mathieu Taillefumier mathieu.taillefum...@free.fr wrote: Hi, I am willing to help if needed. It is a good way to enter into the details of the library. So I think I need a very small example how it works and I might be able to do these changes. best Mathieu On 09/01/2009 11:58 AM, Andre Dieb wrote: I plan to change what I can, but I'll certainly need help. Basically we need to eina_log_init() and eina_log_shutdown() (some places are only using macros directly and not init'ing - won't work with new API). Also, you can't just replace eina_error_init() because these apps also use eina_error API for error messages and codes (that will be kept). On Tue, Sep 1, 2009 at 6:28 AM, Rocco Carbonero...@tecsiel.it wrote: On 1 September 11:15 2009 Cedric BAIL spoke: | On Tue, Sep 1, 2009 at 12:22 AM, Gustavo Sverzut | Barbieribarbi...@profusion.mobi wrote: |  - fixing bugs reported by Luis Felipe's LLVM/Clang: | http://local.profusion.mobi:8081/~lfelipe/output-efl/ |  - moving code from fprintf/printf to eina_log (prefer to do this | BEFORE this weekend!) | | eina_log should also be used more inside eina, I don't know if André | Dieb plan to do it, but you can do a file by file hunt of eina_error | and replace it with eina_log. Perhaps André you can do one small | commit so others can understand what needs to be done. | | Enlightenment DR17 is quite stable these days, the release items are | almost all done. Items under Reorganize, Layout and Visual Changes | are the biggest pending, but Raster already talked about postponing | those. But in turn, Edje received new Lua scripting support, that | really needs to be improved so Edje and thus E17 can be released. | | Well, Edje received a lot of internal improvement during the past | week, not only lua, but the way all edje_recalc is done also. | Apparently all breakage are fixed now, but if you see anything | strange, don't hesitate to report. | | Cedric wished to release Eina last time but we were missing eina_log, | just introduced by André Dieb some weeks ago. Probably with some love | we can make it 1.0 and be happy to release another important building | block. | | Yep, just need a little bit of work around eina_log and we will be | ready for a release of Eina. If people can take time for a last API
Re: [E-devel] E SVN: dieb IN trunk/PROTO/eupnp: . src/lib
I included it for EAPI. Should I define it somewhere else? On Mon, Aug 31, 2009 at 5:37 PM, Vincent Torri vto...@univ-evry.fr wrote: Hey, 1) it is useless to include Eupnp.h in the exported header files. Just include what is needed. 2) if you include Eupnp.h in source files, then it is useless to include the other exported header files. Usually, in source files, it is sufficient to do: #include Eupnp.h #include eupnp_private.h (if needed) and if you want to be more efficient (that is, to have a faster compilation), just include the needed exported header files (like eina) Vincent -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] eina won't compile with c++ compilers
Please confirm it's fixed. On Thu, Aug 27, 2009 at 1:05 PM, Vincent Torri vto...@univ-evry.fr wrote: On Thu, 27 Aug 2009, Gustavo Sverzut Barbieri wrote: On Thu, Aug 27, 2009 at 12:01 PM, Vincent Torrivto...@univ-evry.fr wrote: On Thu, 27 Aug 2009, Gustavo Sverzut Barbieri wrote: On Wed, Aug 26, 2009 at 4:13 PM, Vincent Torrivto...@univ-evry.fr wrote: On Wed, 26 Aug 2009, Andre Dieb wrote: On Wed, Aug 26, 2009 at 3:52 PM, Vincent Torri vto...@univ-evry.fr wrote: hey, eina_log defines EINA_LOG_LEVEL_UNKNOWN to INT32_MIN (btw, why _MIN ?). The problem is that, stdint.h, INT32_MIN is defined if the compiler is not a c++ one. Which, btw, that the compilation on Windows fails. It is INT32_MIN (negative) so that the compiler won't set the enum typedef as unsigned int and forbid users to provide negative logging levels. and just -1 ? then user want to create a more critical level and he is believed to be undefined/unknown? the idea is us to pre-define some leves, from critical (0) to debug (4), but users are free to extend that. For example, in our set-top boxes we have EDBG (extra debug) to dump DVB tables and often we define more than critical levels just to reduce debug to it and avoid all warnings/messages BUT those. what about -1 : unknown -1 : ignored 0...4 : the predefined 4: user defined of course, all this should be documented. similar to this, but -1 as unknown is not good, and -1 is ignored is bad! You should ignore or not based on EVS_LOG_LEVEL. why -1 is not good ? why not forcing levels being non negative ? Anyway, it must be fixed. Currently, every code using eina and compiled by a c++ compiler will fail. Vincent -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] eina won't compile with c++ compilers
On Wed, Aug 26, 2009 at 3:52 PM, Vincent Torri vto...@univ-evry.fr wrote: hey, eina_log defines EINA_LOG_LEVEL_UNKNOWN to INT32_MIN (btw, why _MIN ?). The problem is that, stdint.h, INT32_MIN is defined if the compiler is not a c++ one. Which, btw, that the compilation on Windows fails. It is INT32_MIN (negative) so that the compiler won't set the enum typedef as unsigned int and forbid users to provide negative logging levels. why not just putting EINA_LOG_LEVEL_UNKNOWN as the last value of the enum ? Is that value really needed ? That value is used for logging domains that haven't got their level set yet, which will tell eina_log to set it to the global logger level. We need a special value for the unknown level. Maybe #ifdef would fix it? Vincent -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: cedric trunk/ecore/src/lib/ecore_con
Hi, Could someone please apply the attached patch? It removes an annoying debug message I've put there when testing. Thanks. On Mon, Aug 24, 2009 at 6:41 AM, Enlightenment SVN no-re...@enlightenment.org wrote: Log: * ecore_con_url: Add a way to retrieve request response headers. Patch from Andre Dieb andre.mart...@ee.ufcg.edu.br. Author: cedric Date: 2009-08-24 02:41:07 -0700 (Mon, 24 Aug 2009) New Revision: 41951 Modified: trunk/ecore/src/lib/ecore_con/ecore_con_private.h trunk/ecore/src/lib/ecore_con/ecore_con_url.c Modified: trunk/ecore/src/lib/ecore_con/ecore_con_private.h === --- trunk/ecore/src/lib/ecore_con/ecore_con_private.h 2009-08-24 09:17:54 UTC (rev 41950) +++ trunk/ecore/src/lib/ecore_con/ecore_con_private.h 2009-08-24 09:41:07 UTC (rev 41951) @@ -103,6 +103,7 @@ CURL *curl_easy; struct curl_slist *headers; Eina_List *additional_headers; + Eina_List *response_headers; char *url; Ecore_Con_Url_Time condition; Modified: trunk/ecore/src/lib/ecore_con/ecore_con_url.c === --- trunk/ecore/src/lib/ecore_con/ecore_con_url.c 2009-08-24 09:17:54 UTC (rev 41950) +++ trunk/ecore/src/lib/ecore_con/ecore_con_url.c 2009-08-24 09:41:07 UTC (rev 41951) @@ -73,6 +73,7 @@ #ifdef HAVE_CURL static int _ecore_con_url_fd_handler(void *data, Ecore_Fd_Handler *fd_handler); static int _ecore_con_url_perform(Ecore_Con_Url *url_con); +static size_t _ecore_con_url_header_cb(void *ptr, size_t size, size_t nitems, void *stream); static size_t _ecore_con_url_data_cb(void *buffer, size_t size, size_t nitems, void *userp); static int _ecore_con_url_progress_cb(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow); static size_t _ecore_con_url_read_cb(void *ptr, size_t size, size_t nitems, void *stream); @@ -187,9 +188,20 @@ } /** - * Creates and initializes a new Ecore_Con_Url. - * @return NULL on error, a new Ecore_Con_Url on success. + * Creates and initializes a new Ecore_Con_Url connection object. + * + * Creates and initializes a new Ecore_Con_Url connection object that can be + * uesd for sending requests. + * + * @param url URL that will receive requests. Can be changed using + *ecore_con_url_url_set. + * + * @return NULL on error, a new Ecore_Con_Url on success. + * * @ingroup Ecore_Con_Url_Group + * + * @see ecore_con_url_custom_new() + * @see ecore_con_url_url_set() */ EAPI Ecore_Con_Url * ecore_con_url_new(const char *url) @@ -222,6 +234,9 @@ curl_easy_setopt(url_con-curl_easy, CURLOPT_PROGRESSDATA, url_con); curl_easy_setopt(url_con-curl_easy, CURLOPT_NOPROGRESS, FALSE); + curl_easy_setopt(url_con-curl_easy, CURLOPT_HEADERFUNCTION, _ecore_con_url_header_cb); + curl_easy_setopt(url_con-curl_easy, CURLOPT_HEADERDATA, url_con); + /* * FIXME: Check that these timeouts are sensible defaults * FIXME: Provide a means to change these timeouts @@ -235,6 +250,7 @@ url_con-fd = -1; url_con-write_fd = -1; url_con-additional_headers = NULL; + url_con-response_headers = NULL; return url_con; #else @@ -244,12 +260,21 @@ } /** + * Creates a custom connection object. + * * Creates and initializes a new Ecore_Con_Url for a custom request (e.g. HEAD, * SUBSCRIBE and other obscure HTTP requests). This object should be used like * one created with ecore_con_url_new(). * - * @return NULL on error, a new Ecore_Con_Url on success. + * @param url URL that will receive requests + * @param custom_request Custom request (e.g. GET, POST, HEAD, PUT, etc) + * + * @return NULL on error, a new Ecore_Con_Url on success. + * * @ingroup Ecore_Con_Url_Group + * + * @see ecore_con_url_new() + * @see ecore_con_url_url_set() */ EAPI Ecore_Con_Url * ecore_con_url_custom_new(const char *url, const char *custom_request) @@ -275,9 +300,11 @@ } /** - * Frees the Ecore_Con_Url. - * @return FIXME: To be documented. + * Destroys a Ecore_Con_Url connection object. + * * @ingroup Ecore_Con_Url_Group + * + * @see ecore_con_url_new() */ EAPI void ecore_con_url_destroy(Ecore_Con_Url *url_con) @@ -312,6 +339,8 @@ curl_slist_free_all(url_con-headers); EINA_LIST_FREE(url_con-additional_headers, s) free(s); + EINA_LIST_FREE(url_con-response_headers, s) + free(s); free(url_con-url); free(url_con); #else @@ -321,8 +350,13 @@ } /** - * FIXME: To be documented. - * @return FIXME: To be documented. + * Sets the URL to send the request to. + * + * @param url_con Connection object through which the request will be sent. + * @param url URL that will receive the request + * + * @return 1 on success, 0 on error. + * * @ingroup Ecore_Con_Url_Group */ EAPI int
[E-devel] [PATCH] Ecore con API for retrieving response headers, docs
Attached patch adds a way of retrieving request response headers. Also adds some doc. Thanks. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/ecore_con/ecore_con_url.c === --- src/lib/ecore_con/ecore_con_url.c (revision 41944) +++ src/lib/ecore_con/ecore_con_url.c (working copy) @@ -73,6 +73,7 @@ #ifdef HAVE_CURL static int _ecore_con_url_fd_handler(void *data, Ecore_Fd_Handler *fd_handler); static int _ecore_con_url_perform(Ecore_Con_Url *url_con); +static size_t _ecore_con_url_header_cb(void *ptr, size_t size, size_t nitems, void *stream); static size_t _ecore_con_url_data_cb(void *buffer, size_t size, size_t nitems, void *userp); static int _ecore_con_url_progress_cb(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow); static size_t _ecore_con_url_read_cb(void *ptr, size_t size, size_t nitems, void *stream); @@ -187,9 +188,20 @@ } /** - * Creates and initializes a new Ecore_Con_Url. - * @return NULL on error, a new Ecore_Con_Url on success. + * Creates and initializes a new Ecore_Con_Url connection object. + * + * Creates and initializes a new Ecore_Con_Url connection object that can be + * uesd for sending requests. + * + * @param url URL that will receive requests. Can be changed using + *ecore_con_url_url_set. + * + * @return NULL on error, a new Ecore_Con_Url on success. + * * @ingroup Ecore_Con_Url_Group + * + * @see ecore_con_url_custom_new() + * @see ecore_con_url_url_set() */ EAPI Ecore_Con_Url * ecore_con_url_new(const char *url) @@ -222,6 +234,9 @@ curl_easy_setopt(url_con-curl_easy, CURLOPT_PROGRESSDATA, url_con); curl_easy_setopt(url_con-curl_easy, CURLOPT_NOPROGRESS, FALSE); + curl_easy_setopt(url_con-curl_easy, CURLOPT_HEADERFUNCTION, _ecore_con_url_header_cb); + curl_easy_setopt(url_con-curl_easy, CURLOPT_HEADERDATA, url_con); + /* * FIXME: Check that these timeouts are sensible defaults * FIXME: Provide a means to change these timeouts @@ -235,6 +250,7 @@ url_con-fd = -1; url_con-write_fd = -1; url_con-additional_headers = NULL; + url_con-response_headers = NULL; return url_con; #else @@ -244,12 +260,21 @@ } /** + * Creates a custom connection object. + * * Creates and initializes a new Ecore_Con_Url for a custom request (e.g. HEAD, * SUBSCRIBE and other obscure HTTP requests). This object should be used like * one created with ecore_con_url_new(). * - * @return NULL on error, a new Ecore_Con_Url on success. + * @param url URL that will receive requests + * @param custom_request Custom request (e.g. GET, POST, HEAD, PUT, etc) + * + * @return NULL on error, a new Ecore_Con_Url on success. + * * @ingroup Ecore_Con_Url_Group + * + * @see ecore_con_url_new() + * @see ecore_con_url_url_set() */ EAPI Ecore_Con_Url * ecore_con_url_custom_new(const char *url, const char *custom_request) @@ -275,9 +300,11 @@ } /** - * Frees the Ecore_Con_Url. - * @return FIXME: To be documented. + * Destroys a Ecore_Con_Url connection object. + * * @ingroup Ecore_Con_Url_Group + * + * @see ecore_con_url_new() */ EAPI void ecore_con_url_destroy(Ecore_Con_Url *url_con) @@ -312,6 +339,8 @@ curl_slist_free_all(url_con-headers); EINA_LIST_FREE(url_con-additional_headers, s) free(s); + EINA_LIST_FREE(url_con-response_headers, s) + free(s); free(url_con-url); free(url_con); #else @@ -321,8 +350,13 @@ } /** - * FIXME: To be documented. - * @return FIXME: To be documented. + * Sets the URL to send the request to. + * + * @param url_con Connection object through which the request will be sent. + * @param url URL that will receive the request + * + * @return 1 on success, 0 on error. + * * @ingroup Ecore_Con_Url_Group */ EAPI int @@ -351,9 +385,17 @@ } /** - * FIXME: To be documented. - * @return FIXME: To be documented. + * Associates data with a connection object. + * + * Associates data with a connection object, which can be retrieved later with + * ecore_con_url_data_get()). + * + * @param url_con Connection object to associate data. + * @param data Data to be set. + * * @ingroup Ecore_Con_Url_Group + * + * @see ecore_con_url_data_get() */ EAPI void ecore_con_url_data_set(Ecore_Con_Url *url_con, void *data) @@ -373,6 +415,21 @@ #endif } +/** + * Adds an additional header to the request connection object. + * + * Adds an additional header to the request connection object. This addition + * will be valid for only one ecore_con_url_send() call. + * + * @param url_con Connection object + * @param key Header key + * @param value Header value + * + * @ingroup Ecore_Con_Url_Group + * + * @see ecore_con_url_send() + * @see
[E-devel] [PATCH] Remove ecore con url debug
Attached. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: ecore_con_url.c === --- ecore_con_url.c (revision 41890) +++ ecore_con_url.c (working copy) @@ -563,7 +563,6 @@ /* Additional headers */ EINA_LIST_FOREACH(url_con-additional_headers, l, s) { - fprintf(stderr, ECORE appending header %s\n, s); url_con-headers = curl_slist_append(url_con-headers, s); } -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Eina logging domains
This new module doesn't break old code, it doesn't delete eina_error. Also, changing everything is not so easy, as lots of people use EINA_ERROR macros without calling eina_error_init() (that is, we can't just sed the macros as eina_log won't be init'd and it will break everything). As the patch doesn't break but deprecate eina_error, my lazy suggestion is to let people change to the new API. It's actually a lot of code that would need to be changed. On Tue, Aug 18, 2009 at 11:21 AM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: This feels all right, prepare a commit changing other SVN stuff to this new system and mail me so I don't leave svn broken for too long. Ready to commit as soon as you send the patch converting other stuff. Regards, On Sun, Aug 16, 2009 at 9:32 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: - Added eina_log to Eina.h - Removed debug fprintf, do not use eina_safety for (level d-level) check, it floods the screen On Sun, Aug 16, 2009 at 8:54 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Another attempt attached, see modifications list and inline comments below. - DOM is now a prefix: EINA_LOG_DOM_(level) - renamed EINA_COLOR_NOTHING to EINA_COLOR_RESET - fixed loop problem at pending domains parse - removed eina_log_msg_* funcs, they're kept on eina_error - removed trailing whitespaces - changed colors - domain free happens now on unregister() - shutdown ignores deleted entries - added a test case for level color normalization (if negative, show it with the lowest color possible - crit. If higher than debug, show it with light blue) I couldn't avoid ##__VA_ARGS__ on macros, help would be good. On Sun, Aug 16, 2009 at 11:50 AM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sun, Aug 16, 2009 at 5:45 AM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: One more thing, On Sun, Aug 16, 2009 at 5:26 AM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Sorry for the HTML! :) On Sat, Aug 15, 2009 at 10:39 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sat, Aug 15, 2009 at 5:55 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: Changes: Module name is now eina_log (but I didn't delete eina_error yet, as we should delete it only when the transition is completed) Docs on header and basic doc on .c file, but there's a lot of room for doc improvement Save name on domains Clean realloc code Keep parsing EINA_LOG_LEVELS even when user types wrong (e.g. domain1:level1,domain2:,domain3,domain:5) Migrate old global logger code to global logger (i.e. remove old deprecated functions) arghh... HTML MAIL! now to the points - _DOM is not a suffix, rather a prefix namespace... like EINA_LOG_ERR and EINA_LOG_DOM_ERR... - I remember Sun compiler barfing at ##__VA_ARGS__, maybe we need to avoid that? Vincent?? (avoid that is define just as (...) and user is obligated to give at least one parameter, fmt. That makes things uglier IMHO) That == define as ... ? Should it be done with ... ? I'm sorry, I didn't follow. ## is a hack to remove the last , if no arguments are provided. So these would work similarly X(a, ...) bla(a, ##__VA_ARGS__) X(...) bla(__VA_ARGS__) tests X(1, 2, 4) bla(1, 2, 4) X(1) bla(1) Here's how it is now. Could you please point how to avoid ## ? #define EINA_LOG(DOM, LEVEL, fmt, ...) \ eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__) #define EINA_LOG_DOM_CRIT(DOM, fmt, ...) \ EINA_LOG(DOM, EINA_LOG_LEVEL_CRITICAL, fmt, ##__VA_ARGS__) - _Eina_Log_Level define a value 0 (EINA_LOG_LEVEL_MIN = INT32_MIN) so compilers don't optimize that enum as an unsigned integer, causing problems for users trying to specify something like -1 for more critical - +typedef int Eina_Log; too much, I'd use it as integer, no need to typedef. This typedef was already on the code, it was for Eina_Error (a handle for registered errors). Just remove it ? argh... if it was there, keep it. - keep these as eina_error, you're fixing error-log, but having error codes as log codes is too much, like broking and not fixing =) This holds true for eina_log_msg_register and friends... Put these eina_error_msg_* functions into eina_log or keep eina_error only for that? keep it for these things +/** + * @var EINA_LOG_OUT_OF_MEMORY + * Log identifier corresponding to a lack of memory. + */ +EAPI extern Eina_Log EINA_LOG_MSG_OUT_OF_MEMORY; - colors should be improved, for example (even the old code is not good) +static const char *_colors[EINA_LOG_LEVELS] = { + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_CRITICAL + EINA_COLOR_RED, // EINA_LOG_LEVEL_ERR
Re: [E-devel] [PATCH] Eina logging domains
Sorry for the HTML! :) On Sat, Aug 15, 2009 at 10:39 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sat, Aug 15, 2009 at 5:55 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: Changes: Module name is now eina_log (but I didn't delete eina_error yet, as we should delete it only when the transition is completed) Docs on header and basic doc on .c file, but there's a lot of room for doc improvement Save name on domains Clean realloc code Keep parsing EINA_LOG_LEVELS even when user types wrong (e.g. domain1:level1,domain2:,domain3,domain:5) Migrate old global logger code to global logger (i.e. remove old deprecated functions) arghh... HTML MAIL! now to the points - _DOM is not a suffix, rather a prefix namespace... like EINA_LOG_ERR and EINA_LOG_DOM_ERR... - I remember Sun compiler barfing at ##__VA_ARGS__, maybe we need to avoid that? Vincent?? (avoid that is define just as (...) and user is obligated to give at least one parameter, fmt. That makes things uglier IMHO) That == define as ... ? Should it be done with ... ? I'm sorry, I didn't follow. - _Eina_Log_Level define a value 0 (EINA_LOG_LEVEL_MIN = INT32_MIN) so compilers don't optimize that enum as an unsigned integer, causing problems for users trying to specify something like -1 for more critical - +typedef int Eina_Log; too much, I'd use it as integer, no need to typedef. This typedef was already on the code, it was for Eina_Error (a handle for registered errors). Just remove it ? - keep these as eina_error, you're fixing error-log, but having error codes as log codes is too much, like broking and not fixing =) This holds true for eina_log_msg_register and friends... +/** + * @var EINA_LOG_OUT_OF_MEMORY + * Log identifier corresponding to a lack of memory. + */ +EAPI extern Eina_Log EINA_LOG_MSG_OUT_OF_MEMORY; - colors should be improved, for example (even the old code is not good) +static const char *_colors[EINA_LOG_LEVELS] = { + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_CRITICAL + EINA_COLOR_RED, // EINA_LOG_LEVEL_ERR + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_WARN + EINA_COLOR_NOTHING, // EINA_LOG_LEVEL_INFO + EINA_COLOR_GREEN, // EINA_LOG_LEVEL_DBG +}; for me, the more red, more dangerous... more green better... So I usually use as rule in my debugs: - light (\033[1m) red = critical - regular (dark) red = error - yellow = warning - green = info - light blue = debug - regular blue = more than debug things I told you in previous mails: - trailing whitespaces!!! I couldn't find any trailing whitespaces, could you please point them? - have you tested the parse of broken EINA_LOG_LEVELS? Note this + level = strtol((char *)(end + 1), tmp, 10); + if (tmp == (end + 1)) continue; you do not change start, what happens? infinite loops... you need to have start = next pair, so need to search for , and update start to that or add an end label right after appending to pending list and goto end instead of continue. - eina_log_shutdown() should ignore already deleted entries. - eina_log_domain_register() should not free domains, they should be freed in eina_log_domain_unregister() -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 Thanks a lot for the patience, I hope I can learn with these mistakes :-). Cheers, -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Eina logging domains
One more thing, On Sun, Aug 16, 2009 at 5:26 AM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: Sorry for the HTML! :) On Sat, Aug 15, 2009 at 10:39 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sat, Aug 15, 2009 at 5:55 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: Changes: Module name is now eina_log (but I didn't delete eina_error yet, as we should delete it only when the transition is completed) Docs on header and basic doc on .c file, but there's a lot of room for doc improvement Save name on domains Clean realloc code Keep parsing EINA_LOG_LEVELS even when user types wrong (e.g. domain1:level1,domain2:,domain3,domain:5) Migrate old global logger code to global logger (i.e. remove old deprecated functions) arghh... HTML MAIL! now to the points - _DOM is not a suffix, rather a prefix namespace... like EINA_LOG_ERR and EINA_LOG_DOM_ERR... - I remember Sun compiler barfing at ##__VA_ARGS__, maybe we need to avoid that? Vincent?? (avoid that is define just as (...) and user is obligated to give at least one parameter, fmt. That makes things uglier IMHO) That == define as ... ? Should it be done with ... ? I'm sorry, I didn't follow. - _Eina_Log_Level define a value 0 (EINA_LOG_LEVEL_MIN = INT32_MIN) so compilers don't optimize that enum as an unsigned integer, causing problems for users trying to specify something like -1 for more critical - +typedef int Eina_Log; too much, I'd use it as integer, no need to typedef. This typedef was already on the code, it was for Eina_Error (a handle for registered errors). Just remove it ? - keep these as eina_error, you're fixing error-log, but having error codes as log codes is too much, like broking and not fixing =) This holds true for eina_log_msg_register and friends... Put these eina_error_msg_* functions into eina_log or keep eina_error only for that? +/** + * @var EINA_LOG_OUT_OF_MEMORY + * Log identifier corresponding to a lack of memory. + */ +EAPI extern Eina_Log EINA_LOG_MSG_OUT_OF_MEMORY; - colors should be improved, for example (even the old code is not good) +static const char *_colors[EINA_LOG_LEVELS] = { + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_CRITICAL + EINA_COLOR_RED, // EINA_LOG_LEVEL_ERR + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_WARN + EINA_COLOR_NOTHING, // EINA_LOG_LEVEL_INFO + EINA_COLOR_GREEN, // EINA_LOG_LEVEL_DBG +}; for me, the more red, more dangerous... more green better... So I usually use as rule in my debugs: - light (\033[1m) red = critical - regular (dark) red = error - yellow = warning - green = info - light blue = debug - regular blue = more than debug things I told you in previous mails: - trailing whitespaces!!! I couldn't find any trailing whitespaces, could you please point them? - have you tested the parse of broken EINA_LOG_LEVELS? Note this + level = strtol((char *)(end + 1), tmp, 10); + if (tmp == (end + 1)) continue; you do not change start, what happens? infinite loops... you need to have start = next pair, so need to search for , and update start to that or add an end label right after appending to pending list and goto end instead of continue. - eina_log_shutdown() should ignore already deleted entries. - eina_log_domain_register() should not free domains, they should be freed in eina_log_domain_unregister() -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 Thanks a lot for the patience, I hope I can learn with these mistakes :-). Cheers, -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Eina logging domains
Another attempt attached, see modifications list and inline comments below. - DOM is now a prefix: EINA_LOG_DOM_(level) - renamed EINA_COLOR_NOTHING to EINA_COLOR_RESET - fixed loop problem at pending domains parse - removed eina_log_msg_* funcs, they're kept on eina_error - removed trailing whitespaces - changed colors - domain free happens now on unregister() - shutdown ignores deleted entries - added a test case for level color normalization (if negative, show it with the lowest color possible - crit. If higher than debug, show it with light blue) I couldn't avoid ##__VA_ARGS__ on macros, help would be good. On Sun, Aug 16, 2009 at 11:50 AM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sun, Aug 16, 2009 at 5:45 AM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: One more thing, On Sun, Aug 16, 2009 at 5:26 AM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Sorry for the HTML! :) On Sat, Aug 15, 2009 at 10:39 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sat, Aug 15, 2009 at 5:55 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Changes: Module name is now eina_log (but I didn't delete eina_error yet, as we should delete it only when the transition is completed) Docs on header and basic doc on .c file, but there's a lot of room for doc improvement Save name on domains Clean realloc code Keep parsing EINA_LOG_LEVELS even when user types wrong (e.g. domain1:level1,domain2:,domain3,domain:5) Migrate old global logger code to global logger (i.e. remove old deprecated functions) arghh... HTML MAIL! now to the points - _DOM is not a suffix, rather a prefix namespace... like EINA_LOG_ERR and EINA_LOG_DOM_ERR... - I remember Sun compiler barfing at ##__VA_ARGS__, maybe we need to avoid that? Vincent?? (avoid that is define just as (...) and user is obligated to give at least one parameter, fmt. That makes things uglier IMHO) That == define as ... ? Should it be done with ... ? I'm sorry, I didn't follow. ## is a hack to remove the last , if no arguments are provided. So these would work similarly X(a, ...) bla(a, ##__VA_ARGS__) X(...) bla(__VA_ARGS__) tests X(1, 2, 4) bla(1, 2, 4) X(1) bla(1) Here's how it is now. Could you please point how to avoid ## ? #define EINA_LOG(DOM, LEVEL, fmt, ...) \ eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__) #define EINA_LOG_DOM_CRIT(DOM, fmt, ...) \ EINA_LOG(DOM, EINA_LOG_LEVEL_CRITICAL, fmt, ##__VA_ARGS__) - _Eina_Log_Level define a value 0 (EINA_LOG_LEVEL_MIN = INT32_MIN) so compilers don't optimize that enum as an unsigned integer, causing problems for users trying to specify something like -1 for more critical - +typedef int Eina_Log; too much, I'd use it as integer, no need to typedef. This typedef was already on the code, it was for Eina_Error (a handle for registered errors). Just remove it ? argh... if it was there, keep it. - keep these as eina_error, you're fixing error-log, but having error codes as log codes is too much, like broking and not fixing =) This holds true for eina_log_msg_register and friends... Put these eina_error_msg_* functions into eina_log or keep eina_error only for that? keep it for these things +/** + * @var EINA_LOG_OUT_OF_MEMORY + * Log identifier corresponding to a lack of memory. + */ +EAPI extern Eina_Log EINA_LOG_MSG_OUT_OF_MEMORY; - colors should be improved, for example (even the old code is not good) +static const char *_colors[EINA_LOG_LEVELS] = { + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_CRITICAL + EINA_COLOR_RED, // EINA_LOG_LEVEL_ERR + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_WARN + EINA_COLOR_NOTHING, // EINA_LOG_LEVEL_INFO + EINA_COLOR_GREEN, // EINA_LOG_LEVEL_DBG +}; for me, the more red, more dangerous... more green better... So I usually use as rule in my debugs: - light (\033[1m) red = critical - regular (dark) red = error - yellow = warning - green = info - light blue = debug - regular blue = more than debug things I told you in previous mails: - trailing whitespaces!!! I couldn't find any trailing whitespaces, could you please point them? grep -n '[ ]\+$' eina_logging_domains5.diff | cut -d: -f1 | tr '\n' ',' 10,26,450,1314 neat! - have you tested the parse of broken EINA_LOG_LEVELS? Note this + level = strtol((char *)(end + 1), tmp, 10); + if (tmp == (end + 1)) continue; you do not change start, what happens? infinite loops... you need to have start = next pair, so need to search for , and update start to that or add an end label right after appending to pending list and goto end instead of continue. - eina_log_shutdown() should ignore already deleted entries. - eina_log_domain_register() should not free domains, they should be freed
Re: [E-devel] [PATCH] Eina logging domains
- Added eina_log to Eina.h - Removed debug fprintf, do not use eina_safety for (level d-level) check, it floods the screen On Sun, Aug 16, 2009 at 8:54 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: Another attempt attached, see modifications list and inline comments below. - DOM is now a prefix: EINA_LOG_DOM_(level) - renamed EINA_COLOR_NOTHING to EINA_COLOR_RESET - fixed loop problem at pending domains parse - removed eina_log_msg_* funcs, they're kept on eina_error - removed trailing whitespaces - changed colors - domain free happens now on unregister() - shutdown ignores deleted entries - added a test case for level color normalization (if negative, show it with the lowest color possible - crit. If higher than debug, show it with light blue) I couldn't avoid ##__VA_ARGS__ on macros, help would be good. On Sun, Aug 16, 2009 at 11:50 AM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sun, Aug 16, 2009 at 5:45 AM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: One more thing, On Sun, Aug 16, 2009 at 5:26 AM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Sorry for the HTML! :) On Sat, Aug 15, 2009 at 10:39 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sat, Aug 15, 2009 at 5:55 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Changes: Module name is now eina_log (but I didn't delete eina_error yet, as we should delete it only when the transition is completed) Docs on header and basic doc on .c file, but there's a lot of room for doc improvement Save name on domains Clean realloc code Keep parsing EINA_LOG_LEVELS even when user types wrong (e.g. domain1:level1,domain2:,domain3,domain:5) Migrate old global logger code to global logger (i.e. remove old deprecated functions) arghh... HTML MAIL! now to the points - _DOM is not a suffix, rather a prefix namespace... like EINA_LOG_ERR and EINA_LOG_DOM_ERR... - I remember Sun compiler barfing at ##__VA_ARGS__, maybe we need to avoid that? Vincent?? (avoid that is define just as (...) and user is obligated to give at least one parameter, fmt. That makes things uglier IMHO) That == define as ... ? Should it be done with ... ? I'm sorry, I didn't follow. ## is a hack to remove the last , if no arguments are provided. So these would work similarly X(a, ...) bla(a, ##__VA_ARGS__) X(...) bla(__VA_ARGS__) tests X(1, 2, 4) bla(1, 2, 4) X(1) bla(1) Here's how it is now. Could you please point how to avoid ## ? #define EINA_LOG(DOM, LEVEL, fmt, ...) \ eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__) #define EINA_LOG_DOM_CRIT(DOM, fmt, ...) \ EINA_LOG(DOM, EINA_LOG_LEVEL_CRITICAL, fmt, ##__VA_ARGS__) - _Eina_Log_Level define a value 0 (EINA_LOG_LEVEL_MIN = INT32_MIN) so compilers don't optimize that enum as an unsigned integer, causing problems for users trying to specify something like -1 for more critical - +typedef int Eina_Log; too much, I'd use it as integer, no need to typedef. This typedef was already on the code, it was for Eina_Error (a handle for registered errors). Just remove it ? argh... if it was there, keep it. - keep these as eina_error, you're fixing error-log, but having error codes as log codes is too much, like broking and not fixing =) This holds true for eina_log_msg_register and friends... Put these eina_error_msg_* functions into eina_log or keep eina_error only for that? keep it for these things +/** + * @var EINA_LOG_OUT_OF_MEMORY + * Log identifier corresponding to a lack of memory. + */ +EAPI extern Eina_Log EINA_LOG_MSG_OUT_OF_MEMORY; - colors should be improved, for example (even the old code is not good) +static const char *_colors[EINA_LOG_LEVELS] = { + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_CRITICAL + EINA_COLOR_RED, // EINA_LOG_LEVEL_ERR + EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_WARN + EINA_COLOR_NOTHING, // EINA_LOG_LEVEL_INFO + EINA_COLOR_GREEN, // EINA_LOG_LEVEL_DBG +}; for me, the more red, more dangerous... more green better... So I usually use as rule in my debugs: - light (\033[1m) red = critical - regular (dark) red = error - yellow = warning - green = info - light blue = debug - regular blue = more than debug things I told you in previous mails: - trailing whitespaces!!! I couldn't find any trailing whitespaces, could you please point them? grep -n '[ ]\+$' eina_logging_domains5.diff | cut -d: -f1 | tr '\n' ',' 10,26,450,1314 neat! - have you tested the parse of broken EINA_LOG_LEVELS? Note this + level = strtol((char *)(end + 1), tmp, 10); + if (tmp == (end + 1)) continue; you do not change start, what happens? infinite loops... you need to have start = next pair, so need to search for , and update start to that or add an end label right after
Re: [E-devel] [PATCH] Ecore_Con_Url additional headers feature for POST
Hello, As you guys noticed, the code was forcing headers = NULL without destroying it (maybe some precaution for preventing mixed headers on successive send() calls). As send() cleans headers on the beginning and destroy() frees the list, we may not set it to NULL. If the user finishes using and destroy()'s it, the list will get freed. On the other possible case, if the user do successive calls to send(), the list will always be cleaned for the next. Another leak we had was that curl_slist_append() copies the string, according to their doc (and valgrind). I also fixed those copy leaks. On Thu, Aug 13, 2009 at 12:31 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: André, did you investigated this any further? I guess cedric is correct and we'd need to check for headers. On Wed, Aug 12, 2009 at 6:48 AM, Cedric BAILcedric.b...@free.fr wrote: On Mon, Aug 10, 2009 at 11:19 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: This new version of the patch also enables ecore_con_url to make custom HTTP requests (such as HEAD, SUBSCRIBE, UNSUBSCRIBE and other obscure stuff). Ok, it's in svn. I have just a question regarding the possible leak of the headers structure as you force it to NULL without destroying it. Did you test your program with valgrind ? -- Cedric BAIL -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/ecore_con/ecore_con_url.c === --- src/lib/ecore_con/ecore_con_url.c (revision 41746) +++ src/lib/ecore_con/ecore_con_url.c (working copy) @@ -536,9 +536,11 @@ { sprintf(tmp, Content-type: %s, content_type); url_con-headers = curl_slist_append(url_con-headers, tmp); + free(tmp); // Curl copies the string } sprintf(tmp, Content-length: %zu, length); url_con-headers = curl_slist_append(url_con-headers, tmp); + free(tmp); // Curl copies the string } switch (url_con-condition) @@ -571,9 +573,6 @@ url_con-received = 0; - /* FIXME: Check if curl will leak memory or correctly destroy the headers */ - url_con-headers = NULL; - return _ecore_con_url_perform(url_con); #else return 0; -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Ecore con leaks
Hello, I'm experiencing these leaks when using ecore_con: ==29553== 864 bytes in 36 blocks are still reachable in loss record 2 of 3 ==29553==at 0x4026FDE: malloc (vg_replace_malloc.c:207) ==29553==by 0x426A41F: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266837: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266A5C: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x426B14D: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x426BC9F: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x426BD63: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266D64: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4267451: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4265E3C: gcry_check_version (in /lib/libgcrypt.so.11.4.4) ==29553==by 0x41DF29D: gnutls_global_init (in /usr/lib/libgnutls.so.26.4.6) ==29553==by 0x41AB94B: ecore_con_ssl_init (ecore_con_ssl.c:168) ==29553== ==29553== ==29553== 1,328 bytes in 2 blocks are still reachable in loss record 3 of 3 ==29553==at 0x4026FDE: malloc (vg_replace_malloc.c:207) ==29553==by 0x42667FF: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266A5C: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266A8F: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266B1C: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x427A4B1: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x427B67E: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4263DFA: gcry_randomize (in /lib/libgcrypt.so.11.4.4) ==29553==by 0x41F995B: (within /usr/lib/libgnutls.so.26.4.6) ==29553==by 0x41F0222: _gnutls_rnd_init (in /usr/lib/libgnutls.so.26.4.6) ==29553==by 0x41DF324: gnutls_global_init (in /usr/lib/libgnutls.so.26.4.6) ==29553==by 0x41AB94B: ecore_con_ssl_init (ecore_con_ssl.c:168) ==29553== is this already known? -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore con leaks
Yes. On Thu, Aug 13, 2009 at 4:25 PM, Vincent Torri vto...@univ-evry.fr wrote: On Thu, 13 Aug 2009, Andre Dieb wrote: Hello, I'm experiencing these leaks when using ecore_con: ==29553== 864 bytes in 36 blocks are still reachable in loss record 2 of 3 ==29553==at 0x4026FDE: malloc (vg_replace_malloc.c:207) ==29553==by 0x426A41F: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266837: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266A5C: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x426B14D: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x426BC9F: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x426BD63: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266D64: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4267451: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4265E3C: gcry_check_version (in /lib/libgcrypt.so.11.4.4) ==29553==by 0x41DF29D: gnutls_global_init (in /usr/lib/libgnutls.so.26.4.6) ==29553==by 0x41AB94B: ecore_con_ssl_init (ecore_con_ssl.c:168) ==29553== ==29553== ==29553== 1,328 bytes in 2 blocks are still reachable in loss record 3 of 3 ==29553==at 0x4026FDE: malloc (vg_replace_malloc.c:207) ==29553==by 0x42667FF: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266A5C: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266A8F: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4266B1C: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x427A4B1: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x427B67E: (within /lib/libgcrypt.so.11.4.4) ==29553==by 0x4263DFA: gcry_randomize (in /lib/libgcrypt.so.11.4.4) ==29553==by 0x41F995B: (within /usr/lib/libgnutls.so.26.4.6) ==29553==by 0x41F0222: _gnutls_rnd_init (in /usr/lib/libgnutls.so.26.4.6) ==29553==by 0x41DF324: gnutls_global_init (in /usr/lib/libgnutls.so.26.4.6) ==29553==by 0x41AB94B: ecore_con_ssl_init (ecore_con_ssl.c:168) ==29553== is this already known? is ecore_con_shutdown() called ? Vincent -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Ecore_Con_Url additional headers feature for POST
Stupid me, those free() are absurdly wrong, there are no leaks there. Attached patch fixes the header leaks. On Thu, Aug 13, 2009 at 4:02 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: Hello, As you guys noticed, the code was forcing headers = NULL without destroying it (maybe some precaution for preventing mixed headers on successive send() calls). As send() cleans headers on the beginning and destroy() frees the list, we may not set it to NULL. If the user finishes using and destroy()'s it, the list will get freed. On the other possible case, if the user do successive calls to send(), the list will always be cleaned for the next. Another leak we had was that curl_slist_append() copies the string, according to their doc (and valgrind). I also fixed those copy leaks. On Thu, Aug 13, 2009 at 12:31 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: André, did you investigated this any further? I guess cedric is correct and we'd need to check for headers. On Wed, Aug 12, 2009 at 6:48 AM, Cedric BAILcedric.b...@free.fr wrote: On Mon, Aug 10, 2009 at 11:19 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: This new version of the patch also enables ecore_con_url to make custom HTTP requests (such as HEAD, SUBSCRIBE, UNSUBSCRIBE and other obscure stuff). Ok, it's in svn. I have just a question regarding the possible leak of the headers structure as you force it to NULL without destroying it. Did you test your program with valgrind ? -- Cedric BAIL -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/ecore_con/ecore_con_url.c === --- src/lib/ecore_con/ecore_con_url.c (revision 41746) +++ src/lib/ecore_con/ecore_con_url.c (working copy) @@ -571,9 +571,6 @@ url_con-received = 0; - /* FIXME: Check if curl will leak memory or correctly destroy the headers */ - url_con-headers = NULL; - return _ecore_con_url_perform(url_con); #else return 0; -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [PATCH] Ecore ecore_con_init() does not initialize ecore_con_url
As ecore_con_url is a submodule of ecore_con, I think it should be initialized on ecore_con_init() (and therefore shut down on ecore_con_shutdown()). Thanks, -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/ecore_con/ecore_con.c === --- src/lib/ecore_con/ecore_con.c (revision 41572) +++ src/lib/ecore_con/ecore_con.c (working copy) @@ -97,6 +97,7 @@ ecore_con_ssl_init(); ecore_con_dns_init(); ecore_con_info_init(); + ecore_con_url_init(); return init_count; } @@ -115,6 +116,7 @@ while (servers) _ecore_con_server_free(eina_list_data_get(servers)); + ecore_con_url_shutdown(); ecore_con_info_shutdown(); ecore_con_dns_shutdown(); ecore_con_ssl_shutdown(); -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Ecore ecore_con_init() does not initialize ecore_con_url
Maybe we could do: (on ecore_con_init()) if (HAVE_CURL !ecore_con_url_init()) { // Curl is available but the module still failed to load } This way you only try to initialize url if you have curl. On Tue, Aug 11, 2009 at 7:09 PM, Vincent Torri vto...@univ-evry.fr wrote: On Tue, 11 Aug 2009, Andre Dieb wrote: As ecore_con_url is a submodule of ecore_con, I think it should be initialized on ecore_con_init() (and therefore shut down on ecore_con_shutdown()). the problem is that, currently, ecore_con_url_init() returns 0 if curl is not detected or if it is disabled. Hence, ecore_con_init() would always return 0 in that case, that is, would always fail (as we must test the returned value of all the _init() functions). Vincent -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Ecore_Con_Url additional headers feature for POST
Hello, This new version of the patch also enables ecore_con_url to make custom HTTP requests (such as HEAD, SUBSCRIBE, UNSUBSCRIBE and other obscure stuff). On Thu, Aug 6, 2009 at 5:59 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: This patch adds to ecore_con_url the ability to insert additional headers for POST messages. It is basically two functions (add() and clear()) because that's what I need for now, but I think the correct API should be add(), del(), clear() (which I'll try to contribute in the near future, but not high priority). PS: one thing you might wonder when reading the patch is why I didn't use url_con-headers directly. I did this way because that list gets cleaned up (free and =NULL) on the begginning of every send(), and I would lose the additional headers. Maybe if this cleanup is moved someplace else, I can use url_con-headers directly. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/ecore_con/ecore_con_url.c === --- src/lib/ecore_con/ecore_con_url.c (revision 41572) +++ src/lib/ecore_con/ecore_con_url.c (working copy) @@ -234,6 +234,7 @@ url_con-fd = -1; url_con-write_fd = -1; + url_con-additional_headers = NULL; return url_con; #else @@ -243,6 +244,37 @@ } /** + * Creates and initializes a new Ecore_Con_Url for a custom request (e.g. HEAD, + * SUBSCRIBE and other obscure HTTP requests). This object should be used like + * one created with ecore_con_url_new(). + * + * @return NULL on error, a new Ecore_Con_Url on success. + * @ingroup Ecore_Con_Url_Group + */ +EAPI Ecore_Con_Url * +ecore_con_url_custom_new(const char *url, const char *custom_request) +{ +#ifdef HAVE_CURL + if (!url) return NULL; + if (!custom_request) return NULL; + + Ecore_Con_Url *url_con; + + url_con = ecore_con_url_new(url); + + if (!url_con) return NULL; + + curl_easy_setopt(url_con-curl_easy, CURLOPT_CUSTOMREQUEST, custom_request); + + return url_con; +#else + return NULL; + url = NULL; + custom_request = NULL; +#endif +} + +/** * Frees the Ecore_Con_Url. * @return FIXME: To be documented. * @ingroup Ecore_Con_Url_Group @@ -276,6 +308,7 @@ } _url_con_list = eina_list_remove(_url_con_list, url_con); curl_slist_free_all(url_con-headers); + curl_slist_free_all(url_con-additional_headers); free(url_con-url); free(url_con); #else @@ -337,6 +370,46 @@ #endif } +EAPI void +ecore_con_url_additional_header_add(Ecore_Con_Url *url_con, const char *key, const char *value) +{ +#ifdef HAVE_CURL + if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) + { + ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, ecore_con_url_additional_header_add); + return; + } + + char tmp[256]; + sprintf(tmp, %s: %s, key, value); + url_con-additional_headers = curl_slist_append(url_con-additional_headers, tmp); +#else + return; + url_con = NULL; + key = NULL; + value = NULL; +#endif +} + +EAPI void +ecore_con_url_additional_headers_clear(Ecore_Con_Url *url_con) +{ +#ifdef HAVE_CURL + if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) + { + ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, ecore_con_url_additional_headers_clear); + return; + } + + if (url_con-additional_headers) + curl_slist_free_all(url_con-additional_headers); + url_con-additional_headers = NULL; +#else + return; + url_con = NULL; +#endif +} + /** * FIXME: To be documented. * @return FIXME: To be documented. @@ -478,9 +551,18 @@ break; } + /* Additional headers */ + struct curl_slist *s; + for (s = url_con-additional_headers; s; s = s-next) + { + fprintf(stderr, ECORE appending header %s\n, s-data); + url_con-headers = curl_slist_append(url_con-headers, s-data); + } + curl_easy_setopt(url_con-curl_easy, CURLOPT_HTTPHEADER, url_con-headers); url_con-received = 0; + url_con-headers = NULL; return _ecore_con_url_perform(url_con); #else Index: src/lib/ecore_con/Ecore_Con.h === --- src/lib/ecore_con/Ecore_Con.h (revision 41572) +++ src/lib/ecore_con/Ecore_Con.h (working copy) @@ -208,9 +208,12 @@ EAPI int ecore_con_url_init(void); EAPI int ecore_con_url_shutdown(void); EAPI Ecore_Con_Url*ecore_con_url_new(const char *url); + EAPI Ecore_Con_Url*ecore_con_url_custom_new(const char *url, const char *custom_request); EAPI void
[E-devel] [PATCH] Ecore_Con_Url additional headers feature for POST
This patch adds to ecore_con_url the ability to insert additional headers for POST messages. It is basically two functions (add() and clear()) because that's what I need for now, but I think the correct API should be add(), del(), clear() (which I'll try to contribute in the near future, but not high priority). PS: one thing you might wonder when reading the patch is why I didn't use url_con-headers directly. I did this way because that list gets cleaned up (free and =NULL) on the begginning of every send(), and I would lose the additional headers. Maybe if this cleanup is moved someplace else, I can use url_con-headers directly. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/ecore_con/ecore_con_url.c === --- src/lib/ecore_con/ecore_con_url.c (revision 41402) +++ src/lib/ecore_con/ecore_con_url.c (working copy) @@ -234,6 +234,7 @@ url_con-fd = -1; url_con-write_fd = -1; + url_con-additional_headers = NULL; return url_con; #else @@ -276,6 +277,7 @@ } _url_con_list = eina_list_remove(_url_con_list, url_con); curl_slist_free_all(url_con-headers); + curl_slist_free_all(url_con-additional_headers); free(url_con-url); free(url_con); #else @@ -337,6 +339,46 @@ #endif } +EAPI void +ecore_con_url_additional_header_add(Ecore_Con_Url *url_con, const char *key, const char *value) +{ +#ifdef HAVE_CURL + if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) + { + ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, ecore_con_url_additional_header_add); + return; + } + + char tmp[256]; + sprintf(tmp, %s: %s, key, value); + url_con-additional_headers = curl_slist_append(url_con-additional_headers, tmp); +#else + return; + url_con = NULL; + key = NULL; + value = NULL; +#endif +} + +EAPI void +ecore_con_url_additional_headers_clear(Ecore_Con_Url *url_con) +{ +#ifdef HAVE_CURL + if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) + { + ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, ecore_con_url_additional_headers_clear); + return; + } + + if (url_con-additional_headers) + curl_slist_free_all(url_con-additional_headers); + url_con-additional_headers = NULL; +#else + return; + url_con = NULL; +#endif +} + /** * FIXME: To be documented. * @return FIXME: To be documented. @@ -478,9 +520,18 @@ break; } + /* Additional headers */ + struct curl_slist *s; + for (s = url_con-additional_headers; s; s = s-next) + { + fprintf(stderr, ECORE appending header %s\n, s-data); + url_con-headers = curl_slist_append(url_con-headers, s-data); + } + curl_easy_setopt(url_con-curl_easy, CURLOPT_HTTPHEADER, url_con-headers); url_con-received = 0; + url_con-headers = NULL; return _ecore_con_url_perform(url_con); #else Index: src/lib/ecore_con/Ecore_Con.h === --- src/lib/ecore_con/Ecore_Con.h (revision 41402) +++ src/lib/ecore_con/Ecore_Con.h (working copy) @@ -211,6 +211,8 @@ EAPI void ecore_con_url_destroy(Ecore_Con_Url *url_con); EAPI void ecore_con_url_data_set(Ecore_Con_Url *url_con, void *data); EAPI void *ecore_con_url_data_get(Ecore_Con_Url *url_con); + EAPI void ecore_con_url_additional_header_add(Ecore_Con_Url *url_con, const char *key, const char *value); + EAPI void ecore_con_url_additional_headers_clear(Ecore_Con_Url *url_con); EAPI int ecore_con_url_url_set(Ecore_Con_Url *url_con, const char *url); EAPI void ecore_con_url_fd_set(Ecore_Con_Url *url_con, int fd); EAPI int ecore_con_url_received_bytes_get(Ecore_Con_Url *url_con); Index: src/lib/ecore_con/ecore_con_private.h === --- src/lib/ecore_con/ecore_con_private.h (revision 41402) +++ src/lib/ecore_con/ecore_con_private.h (working copy) @@ -102,6 +102,7 @@ ECORE_MAGIC; CURL *curl_easy; struct curl_slist *headers; + struct curl_slist *additional_headers; char *url; Ecore_Con_Url_Time condition; -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Eina logging domains
Newer version: fix EINA_ERROR_LEVELS parsing issue. On Sat, Jul 25, 2009 at 10:44 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: Removing workaround with unused variable.. On Sat, Jul 25, 2009 at 10:30 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Fix a missing free() spotted by Sachiel. On Sat, Jul 25, 2009 at 9:21 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: The new patch is attached (hope it works now). On Sat, Jul 25, 2009 at 9:04 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: The new patch is attached. On Sat, Jul 18, 2009 at 1:57 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Fri, Jul 17, 2009 at 6:55 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Hello, This patch contains an initial implementation of logging domains for eina error module. Please be aware that this a very rough version and there are lots of things that must be improved. The patch is also with lots of fprintf's that I was using for debugging, please ignore them. When we're ready to apply, I'll cleanup everything. For testing the new domain features, I added three unit tests and fixed eina_rectangle test that was preventing me from building eina_error test. You can also see examples of how logging domains will be used on these tests (registering, logging, unregistering). Okay, couple of issues. One of them was already spotted by Sachiel, but other follows: Header: +typedef int Eina_Error_Domain_Index; this typedef is a bit too much. +struct _Eina_Error_Domain +{ + EINA_INLIST; ouch, this is legacy and not being used! Remove it. + unsigned int level; /** Max level to log */ + const char *name; /** Domain name */ + const char *domain_str; /** Formatted string with color to print */ + const char *color; + + /* Private */ + int deleted : 1; /** Flags deletion of domain, a free slot */ Eina_Bool, otherwise deleted is just the sign bit and deleted is (-1, 0), not (1, 0) +typedef struct _Eina_Error_Domain_Level_Pending Eina_Error_Domain_Level_Pending +struct _Eina_Error_Domain_Level_Pending These are private to eina_error.c +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + const char *name; + unsigned int level; +}; change to the following and get the pointer arithmetic for free, also saving one pointer access and sizeof(char*) bytes.: +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + unsigned int level; char name[]; +}; +typedef void (*Eina_Error_Dom_Print_Cb)(Eina_Error_Domain_Index i, Eina_Error_Level level, const char *file, +const char *fnc, int line, const char *fmt, void *data, + va_list args); + and all other callbacks: domain index is useless, you should give it the pointer to domain! Imagine I want to implement my own logging in my program, how could I access the log domain? Other than that, domain index is pretty much useless. Code: +static Eina_Error_Domain **_error_domains = NULL; Sachiel spotted you're misusing the _error_domains by allocating sizeof(Eina_Error_Domain) instead of pointer. But I guess this should be really an array of domains and not an array of pointers. So just change that to Eina_Error_Domain *_error_domains. That's why you need domain-deleted, otherwise just free and set to NULL. The other option is to remove deleted and keep this as a pointer, but I guess it's marginally worse. +static int _error_domains_count = 0; see eina_array, you need 2 counters, one for current size (count) and another for allocated size. Then you do not need to memset()/NULL-ify remaining slots. If you want to avoid useless walks in this array, you can keep an extra free count, that would say the number of free slots inside _error_domains_count. It would increase when you remove elements before last. If you remove last, just decrease error_domains_count. If want to bit super-correct, when you remove last you'd walk backwards checking for already freed slots and move that amount from _free to _count. Ie: [x###], count=5, size=8, free=0 [xxx#x###], count=5, size=8, free=1 [xxx#], count=3, size=8, free=0 +static int _pending_list_count = 0; remove, this is useless. + d = malloc(sizeof(char) * (color_len + name_len + strlen(EINA_COLOR_WHITE) + 1)); oops, don't assume everybody uses dark terminals! You should use EINA_COLOR_NOTHING. And while compiler should optimize strlen() for that string, you can remove that with sizeof(), and it already accounts trailing \0. Same for memcpy(), just give it sizeof() and it will copy the null terminator. + d-color = malloc(sizeof(char)*(strlen(color)+1)); + memcpy((char *)d-color, color, strlen(color)); you can just strdup() here. And while most compilers would optimize strlen(), keeping a variable with that value would make your code easier to read. if you allocate
Re: [E-devel] [PATCH] Eina logging domains
The new patch is attached. On Sat, Jul 18, 2009 at 1:57 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Fri, Jul 17, 2009 at 6:55 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: Hello, This patch contains an initial implementation of logging domains for eina error module. Please be aware that this a very rough version and there are lots of things that must be improved. The patch is also with lots of fprintf's that I was using for debugging, please ignore them. When we're ready to apply, I'll cleanup everything. For testing the new domain features, I added three unit tests and fixed eina_rectangle test that was preventing me from building eina_error test. You can also see examples of how logging domains will be used on these tests (registering, logging, unregistering). Okay, couple of issues. One of them was already spotted by Sachiel, but other follows: Header: +typedef int Eina_Error_Domain_Index; this typedef is a bit too much. +struct _Eina_Error_Domain +{ + EINA_INLIST; ouch, this is legacy and not being used! Remove it. + unsigned int level; /** Max level to log */ + const char *name; /** Domain name */ + const char *domain_str; /** Formatted string with color to print */ + const char *color; + + /* Private */ + int deleted : 1; /** Flags deletion of domain, a free slot */ Eina_Bool, otherwise deleted is just the sign bit and deleted is (-1, 0), not (1, 0) +typedef struct _Eina_Error_Domain_Level_Pending Eina_Error_Domain_Level_Pending +struct _Eina_Error_Domain_Level_Pending These are private to eina_error.c +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + const char *name; + unsigned int level; +}; change to the following and get the pointer arithmetic for free, also saving one pointer access and sizeof(char*) bytes.: +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + unsigned int level; char name[]; +}; +typedef void (*Eina_Error_Dom_Print_Cb)(Eina_Error_Domain_Index i, Eina_Error_Level level, const char *file, +const char *fnc, int line, const char *fmt, void *data, + va_list args); + and all other callbacks: domain index is useless, you should give it the pointer to domain! Imagine I want to implement my own logging in my program, how could I access the log domain? Other than that, domain index is pretty much useless. Code: +static Eina_Error_Domain **_error_domains = NULL; Sachiel spotted you're misusing the _error_domains by allocating sizeof(Eina_Error_Domain) instead of pointer. But I guess this should be really an array of domains and not an array of pointers. So just change that to Eina_Error_Domain *_error_domains. That's why you need domain-deleted, otherwise just free and set to NULL. The other option is to remove deleted and keep this as a pointer, but I guess it's marginally worse. +static int _error_domains_count = 0; see eina_array, you need 2 counters, one for current size (count) and another for allocated size. Then you do not need to memset()/NULL-ify remaining slots. If you want to avoid useless walks in this array, you can keep an extra free count, that would say the number of free slots inside _error_domains_count. It would increase when you remove elements before last. If you remove last, just decrease error_domains_count. If want to bit super-correct, when you remove last you'd walk backwards checking for already freed slots and move that amount from _free to _count. Ie: [x###], count=5, size=8, free=0 [xxx#x###], count=5, size=8, free=1 [xxx#], count=3, size=8, free=0 +static int _pending_list_count = 0; remove, this is useless. + d = malloc(sizeof(char) * (color_len + name_len + strlen(EINA_COLOR_WHITE) + 1)); oops, don't assume everybody uses dark terminals! You should use EINA_COLOR_NOTHING. And while compiler should optimize strlen() for that string, you can remove that with sizeof(), and it already accounts trailing \0. Same for memcpy(), just give it sizeof() and it will copy the null terminator. + d-color = malloc(sizeof(char)*(strlen(color)+1)); + memcpy((char *)d-color, color, strlen(color)); you can just strdup() here. And while most compilers would optimize strlen(), keeping a variable with that value would make your code easier to read. if you allocate all the strings in a single memory blob, it's even better. +static void +eina_error_domain_free(Eina_Error_Domain *d) +{ + if (!d) return; + + if (d-name) + free((char *)d-name); + if (d-domain_str) + free((char *)d-domain_str); + + free(d); +} how about color? that's the benefit of using a single blob, just free the pointer that is the head, everything else goes aways automatically. + // Form name:level,name1:level1,name2:level2,... ... + p-level = strtol((char *)(end + 1), tmp, 10);
Re: [E-devel] [PATCH] Eina logging domains
The new patch is attached (hope it works now). On Sat, Jul 25, 2009 at 9:04 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: The new patch is attached. On Sat, Jul 18, 2009 at 1:57 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Fri, Jul 17, 2009 at 6:55 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: Hello, This patch contains an initial implementation of logging domains for eina error module. Please be aware that this a very rough version and there are lots of things that must be improved. The patch is also with lots of fprintf's that I was using for debugging, please ignore them. When we're ready to apply, I'll cleanup everything. For testing the new domain features, I added three unit tests and fixed eina_rectangle test that was preventing me from building eina_error test. You can also see examples of how logging domains will be used on these tests (registering, logging, unregistering). Okay, couple of issues. One of them was already spotted by Sachiel, but other follows: Header: +typedef int Eina_Error_Domain_Index; this typedef is a bit too much. +struct _Eina_Error_Domain +{ + EINA_INLIST; ouch, this is legacy and not being used! Remove it. + unsigned int level; /** Max level to log */ + const char *name; /** Domain name */ + const char *domain_str; /** Formatted string with color to print */ + const char *color; + + /* Private */ + int deleted : 1; /** Flags deletion of domain, a free slot */ Eina_Bool, otherwise deleted is just the sign bit and deleted is (-1, 0), not (1, 0) +typedef struct _Eina_Error_Domain_Level_Pending Eina_Error_Domain_Level_Pending +struct _Eina_Error_Domain_Level_Pending These are private to eina_error.c +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + const char *name; + unsigned int level; +}; change to the following and get the pointer arithmetic for free, also saving one pointer access and sizeof(char*) bytes.: +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + unsigned int level; char name[]; +}; +typedef void (*Eina_Error_Dom_Print_Cb)(Eina_Error_Domain_Index i, Eina_Error_Level level, const char *file, +const char *fnc, int line, const char *fmt, void *data, + va_list args); + and all other callbacks: domain index is useless, you should give it the pointer to domain! Imagine I want to implement my own logging in my program, how could I access the log domain? Other than that, domain index is pretty much useless. Code: +static Eina_Error_Domain **_error_domains = NULL; Sachiel spotted you're misusing the _error_domains by allocating sizeof(Eina_Error_Domain) instead of pointer. But I guess this should be really an array of domains and not an array of pointers. So just change that to Eina_Error_Domain *_error_domains. That's why you need domain-deleted, otherwise just free and set to NULL. The other option is to remove deleted and keep this as a pointer, but I guess it's marginally worse. +static int _error_domains_count = 0; see eina_array, you need 2 counters, one for current size (count) and another for allocated size. Then you do not need to memset()/NULL-ify remaining slots. If you want to avoid useless walks in this array, you can keep an extra free count, that would say the number of free slots inside _error_domains_count. It would increase when you remove elements before last. If you remove last, just decrease error_domains_count. If want to bit super-correct, when you remove last you'd walk backwards checking for already freed slots and move that amount from _free to _count. Ie: [x###], count=5, size=8, free=0 [xxx#x###], count=5, size=8, free=1 [xxx#], count=3, size=8, free=0 +static int _pending_list_count = 0; remove, this is useless. + d = malloc(sizeof(char) * (color_len + name_len + strlen(EINA_COLOR_WHITE) + 1)); oops, don't assume everybody uses dark terminals! You should use EINA_COLOR_NOTHING. And while compiler should optimize strlen() for that string, you can remove that with sizeof(), and it already accounts trailing \0. Same for memcpy(), just give it sizeof() and it will copy the null terminator. + d-color = malloc(sizeof(char)*(strlen(color)+1)); + memcpy((char *)d-color, color, strlen(color)); you can just strdup() here. And while most compilers would optimize strlen(), keeping a variable with that value would make your code easier to read. if you allocate all the strings in a single memory blob, it's even better. +static void +eina_error_domain_free(Eina_Error_Domain *d) +{ + if (!d) return; + + if (d-name) + free((char *)d-name); + if (d-domain_str) + free((char *)d-domain_str); + + free(d); +} how about color? that's the benefit of using a single blob, just free the pointer that is the head, everything else goes aways
Re: [E-devel] [PATCH] Eina logging domains
Removing workaround with unused variable.. On Sat, Jul 25, 2009 at 10:30 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: Fix a missing free() spotted by Sachiel. On Sat, Jul 25, 2009 at 9:21 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: The new patch is attached (hope it works now). On Sat, Jul 25, 2009 at 9:04 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: The new patch is attached. On Sat, Jul 18, 2009 at 1:57 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Fri, Jul 17, 2009 at 6:55 PM, Andre Dieb andre.mart...@ee.ufcg.edu.br wrote: Hello, This patch contains an initial implementation of logging domains for eina error module. Please be aware that this a very rough version and there are lots of things that must be improved. The patch is also with lots of fprintf's that I was using for debugging, please ignore them. When we're ready to apply, I'll cleanup everything. For testing the new domain features, I added three unit tests and fixed eina_rectangle test that was preventing me from building eina_error test. You can also see examples of how logging domains will be used on these tests (registering, logging, unregistering). Okay, couple of issues. One of them was already spotted by Sachiel, but other follows: Header: +typedef int Eina_Error_Domain_Index; this typedef is a bit too much. +struct _Eina_Error_Domain +{ + EINA_INLIST; ouch, this is legacy and not being used! Remove it. + unsigned int level; /** Max level to log */ + const char *name; /** Domain name */ + const char *domain_str; /** Formatted string with color to print */ + const char *color; + + /* Private */ + int deleted : 1; /** Flags deletion of domain, a free slot */ Eina_Bool, otherwise deleted is just the sign bit and deleted is (-1, 0), not (1, 0) +typedef struct _Eina_Error_Domain_Level_Pending Eina_Error_Domain_Level_Pending +struct _Eina_Error_Domain_Level_Pending These are private to eina_error.c +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + const char *name; + unsigned int level; +}; change to the following and get the pointer arithmetic for free, also saving one pointer access and sizeof(char*) bytes.: +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + unsigned int level; char name[]; +}; +typedef void (*Eina_Error_Dom_Print_Cb)(Eina_Error_Domain_Index i, Eina_Error_Level level, const char *file, +const char *fnc, int line, const char *fmt, void *data, + va_list args); + and all other callbacks: domain index is useless, you should give it the pointer to domain! Imagine I want to implement my own logging in my program, how could I access the log domain? Other than that, domain index is pretty much useless. Code: +static Eina_Error_Domain **_error_domains = NULL; Sachiel spotted you're misusing the _error_domains by allocating sizeof(Eina_Error_Domain) instead of pointer. But I guess this should be really an array of domains and not an array of pointers. So just change that to Eina_Error_Domain *_error_domains. That's why you need domain-deleted, otherwise just free and set to NULL. The other option is to remove deleted and keep this as a pointer, but I guess it's marginally worse. +static int _error_domains_count = 0; see eina_array, you need 2 counters, one for current size (count) and another for allocated size. Then you do not need to memset()/NULL-ify remaining slots. If you want to avoid useless walks in this array, you can keep an extra free count, that would say the number of free slots inside _error_domains_count. It would increase when you remove elements before last. If you remove last, just decrease error_domains_count. If want to bit super-correct, when you remove last you'd walk backwards checking for already freed slots and move that amount from _free to _count. Ie: [x###], count=5, size=8, free=0 [xxx#x###], count=5, size=8, free=1 [xxx#], count=3, size=8, free=0 +static int _pending_list_count = 0; remove, this is useless. + d = malloc(sizeof(char) * (color_len + name_len + strlen(EINA_COLOR_WHITE) + 1)); oops, don't assume everybody uses dark terminals! You should use EINA_COLOR_NOTHING. And while compiler should optimize strlen() for that string, you can remove that with sizeof(), and it already accounts trailing \0. Same for memcpy(), just give it sizeof() and it will copy the null terminator. + d-color = malloc(sizeof(char)*(strlen(color)+1)); + memcpy((char *)d-color, color, strlen(color)); you can just strdup() here. And while most compilers would optimize strlen(), keeping a variable with that value would make your code easier to read. if you allocate all the strings in a single memory blob, it's even better. +static void +eina_error_domain_free(Eina_Error_Domain *d) +{ + if (!d
Re: [E-devel] [PATCH] Eina logging domains
Fix a missing free() spotted by Sachiel. On Sat, Jul 25, 2009 at 9:21 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: The new patch is attached (hope it works now). On Sat, Jul 25, 2009 at 9:04 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: The new patch is attached. On Sat, Jul 18, 2009 at 1:57 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Fri, Jul 17, 2009 at 6:55 PM, Andre Diebandre.mart...@ee.ufcg.edu.br wrote: Hello, This patch contains an initial implementation of logging domains for eina error module. Please be aware that this a very rough version and there are lots of things that must be improved. The patch is also with lots of fprintf's that I was using for debugging, please ignore them. When we're ready to apply, I'll cleanup everything. For testing the new domain features, I added three unit tests and fixed eina_rectangle test that was preventing me from building eina_error test. You can also see examples of how logging domains will be used on these tests (registering, logging, unregistering). Okay, couple of issues. One of them was already spotted by Sachiel, but other follows: Header: +typedef int Eina_Error_Domain_Index; this typedef is a bit too much. +struct _Eina_Error_Domain +{ + EINA_INLIST; ouch, this is legacy and not being used! Remove it. + unsigned int level; /** Max level to log */ + const char *name; /** Domain name */ + const char *domain_str; /** Formatted string with color to print */ + const char *color; + + /* Private */ + int deleted : 1; /** Flags deletion of domain, a free slot */ Eina_Bool, otherwise deleted is just the sign bit and deleted is (-1, 0), not (1, 0) +typedef struct _Eina_Error_Domain_Level_Pending Eina_Error_Domain_Level_Pending +struct _Eina_Error_Domain_Level_Pending These are private to eina_error.c +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + const char *name; + unsigned int level; +}; change to the following and get the pointer arithmetic for free, also saving one pointer access and sizeof(char*) bytes.: +struct _Eina_Error_Domain_Level_Pending +{ + EINA_INLIST; + + unsigned int level; char name[]; +}; +typedef void (*Eina_Error_Dom_Print_Cb)(Eina_Error_Domain_Index i, Eina_Error_Level level, const char *file, +const char *fnc, int line, const char *fmt, void *data, + va_list args); + and all other callbacks: domain index is useless, you should give it the pointer to domain! Imagine I want to implement my own logging in my program, how could I access the log domain? Other than that, domain index is pretty much useless. Code: +static Eina_Error_Domain **_error_domains = NULL; Sachiel spotted you're misusing the _error_domains by allocating sizeof(Eina_Error_Domain) instead of pointer. But I guess this should be really an array of domains and not an array of pointers. So just change that to Eina_Error_Domain *_error_domains. That's why you need domain-deleted, otherwise just free and set to NULL. The other option is to remove deleted and keep this as a pointer, but I guess it's marginally worse. +static int _error_domains_count = 0; see eina_array, you need 2 counters, one for current size (count) and another for allocated size. Then you do not need to memset()/NULL-ify remaining slots. If you want to avoid useless walks in this array, you can keep an extra free count, that would say the number of free slots inside _error_domains_count. It would increase when you remove elements before last. If you remove last, just decrease error_domains_count. If want to bit super-correct, when you remove last you'd walk backwards checking for already freed slots and move that amount from _free to _count. Ie: [x###], count=5, size=8, free=0 [xxx#x###], count=5, size=8, free=1 [xxx#], count=3, size=8, free=0 +static int _pending_list_count = 0; remove, this is useless. + d = malloc(sizeof(char) * (color_len + name_len + strlen(EINA_COLOR_WHITE) + 1)); oops, don't assume everybody uses dark terminals! You should use EINA_COLOR_NOTHING. And while compiler should optimize strlen() for that string, you can remove that with sizeof(), and it already accounts trailing \0. Same for memcpy(), just give it sizeof() and it will copy the null terminator. + d-color = malloc(sizeof(char)*(strlen(color)+1)); + memcpy((char *)d-color, color, strlen(color)); you can just strdup() here. And while most compilers would optimize strlen(), keeping a variable with that value would make your code easier to read. if you allocate all the strings in a single memory blob, it's even better. +static void +eina_error_domain_free(Eina_Error_Domain *d) +{ + if (!d) return; + + if (d-name) + free((char *)d-name); + if (d-domain_str) + free((char *)d-domain_str); + + free(d
[E-devel] [PATCH] Eina logging domains
Hello, This patch contains an initial implementation of logging domains for eina error module. Please be aware that this a very rough version and there are lots of things that must be improved. The patch is also with lots of fprintf's that I was using for debugging, please ignore them. When we're ready to apply, I'll cleanup everything. For testing the new domain features, I added three unit tests and fixed eina_rectangle test that was preventing me from building eina_error test. You can also see examples of how logging domains will be used on these tests (registering, logging, unregistering). There are also a few things that I wasn't sure and I'd really appreciate some help: - Logging priorities (EINA_ERROR_LEVEL and domain level): is the code with the correct priorities? (lines 1064 to 1071 of eina_error.c) - Domain slots: from the tests results, it looks like the slot code is working, but I'm not sure it doesn't have a case which will break - Levels: is INT32_MAX a good value for the UNKNOWN level (which is basically just a placeholder. Whenever you log and it's UNKNOWN, your domain will use global level) - Old API: I redirected the old API to a global logger which is registered on eina_error_init(). Is this OK? -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/tests/eina_test_rectangle.c === --- src/tests/eina_test_rectangle.c (revision 41406) +++ src/tests/eina_test_rectangle.c (working copy) @@ -36,7 +36,7 @@ eina_rectangle_init(); - pool = eina_rectangle_pool_add(256, 256); + pool = eina_rectangle_pool_new(256, 256); fail_if(pool == NULL); eina_rectangle_pool_data_set(pool, rects); @@ -66,7 +66,7 @@ fail_if(eina_rectangle_pool_request(pool, 16, 16) == NULL); - eina_rectangle_pool_delete(pool); + eina_rectangle_pool_free(pool); eina_rectangle_shutdown(); } Index: src/tests/eina_test_error.c === --- src/tests/eina_test_error.c (revision 41406) +++ src/tests/eina_test_error.c (working copy) @@ -77,10 +77,85 @@ } END_TEST +START_TEST(eina_error_domains_macros) +{ + eina_error_init(); + + Eina_Error_Domain_Index i = eina_error_domain_register(MyDomain, EINA_COLOR_GREEN); + fail_if(i == -1); + + EINA_ERROR_PERR_DOM(i, An error\n); + EINA_ERROR_PINFO_DOM(i, An info\n); + EINA_ERROR_PWARN_DOM(i, A warning\n); + EINA_ERROR_PDBG_DOM(i, A debug\n); + + eina_error_shutdown(); +} +END_TEST + +START_TEST(eina_error_domains_registry) +{ + eina_error_init(); + + int i; + Eina_Error_Domain_Index idx[50]; + + for (i = 0; i 50; i++) + { + idx[i] = eina_error_domain_register(Test, EINA_COLOR_GREEN); + fail_if(idx[i] == -1); + } + + for (i = 0; i 50; i++) + eina_error_domain_unregister(idx[i]); + + eina_error_shutdown(); +} +END_TEST + +START_TEST(eina_error_domains_slot_reuse) +{ + eina_error_init(); + + // Create 9 domains + Eina_Error_Domain_Index idx[9]; + int i; + + for (i = 0; i 9; i++) + { + idx[i] = eina_error_domain_register(Test1, EINA_COLOR_GREEN); + fail_if(idx[i] == -1); + } + + // Slot 0 by default contains the global logger. The above code created + // domains for slots indexes from 1 to 9. + // + // The global logger allocated the first 8 initial slots. The 8th domain + // registered on the for loop will create 8 more slots. + // + // Test will just unregister a domain between 1 and 9 and assure that a new + // domain register will be placed on the available slot and not at the end. + + Eina_Error_Domain_Index removed = idx[5]; + eina_error_domain_unregister(removed); + + Eina_Error_Domain_Index new = eina_error_domain_register(Test1, EINA_COLOR_GREEN); + + // Check for slot reuse + fail_if(new != idx[5]); + + eina_error_shutdown(); +} +END_TEST + + void eina_test_error(TCase *tc) { tcase_add_test(tc, eina_error_init_shutdown); tcase_add_test(tc, eina_error_errno); tcase_add_test(tc, eina_error_macro); + tcase_add_test(tc, eina_error_domains_macros); + tcase_add_test(tc, eina_error_domains_registry); + tcase_add_test(tc, eina_error_domains_slot_reuse); } Index: src/include/eina_error.h === --- src/include/eina_error.h (revision 41406) +++ src/include/eina_error.h (working copy) @@ -20,9 +20,19 @@ #define EINA_ERROR_H_ #include stdarg.h +#include stdint.h #include eina_types.h +#include eina_inlist.h +#define EINA_COLOR_RED \033[31;1m +#define EINA_COLOR_BLUE \033[34;1m +#define EINA_COLOR_GREEN \033[32;1m +#define EINA_COLOR_YELLOW\033[33;1m +#define EINA_COLOR_WHITE \033[37;1m
Re: [E-devel] [PATCH] Eina logging domains
I'd also suggest renaming the env var EINA_ERROR_DOMAIN_LEVELS to EINA_ERROR_LEVELS. It's smaller and more compatible with the global one (EINA_ERROR_LEVEL). On Fri, Jul 17, 2009 at 6:55 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: Hello, This patch contains an initial implementation of logging domains for eina error module. Please be aware that this a very rough version and there are lots of things that must be improved. The patch is also with lots of fprintf's that I was using for debugging, please ignore them. When we're ready to apply, I'll cleanup everything. For testing the new domain features, I added three unit tests and fixed eina_rectangle test that was preventing me from building eina_error test. You can also see examples of how logging domains will be used on these tests (registering, logging, unregistering). There are also a few things that I wasn't sure and I'd really appreciate some help: - Logging priorities (EINA_ERROR_LEVEL and domain level): is the code with the correct priorities? (lines 1064 to 1071 of eina_error.c) - Domain slots: from the tests results, it looks like the slot code is working, but I'm not sure it doesn't have a case which will break - Levels: is INT32_MAX a good value for the UNKNOWN level (which is basically just a placeholder. Whenever you log and it's UNKNOWN, your domain will use global level) - Old API: I redirected the old API to a global logger which is registered on eina_error_init(). Is this OK? -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Fix eina build error with --disable-magic-debug, unified patch for my yesterday patches
Hello, As the --disable-magic-debug thingy was fixed by someone else, I just rebased the patch and it goes attached again, fixing the same things listed on the original mail. On Sun, Jun 7, 2009 at 7:01 AM, Cedric BAIL cedric.b...@free.fr wrote: On Sat, Jun 6, 2009 at 11:33 PM, Vincent Torrivto...@univ-evry.fr wrote: On Sat, 6 Jun 2009, Cedric BAIL wrote: On Sat, Jun 6, 2009 at 7:42 PM, Peter Wehrfritzpeter.wehrfr...@web.de wrote: Cedric BAIL schrieb: On Sat, Jun 6, 2009 at 5:48 PM, Albin Tonnerre albin.tonne...@gmail.com wrote: On Sat, Jun 06, 2009 at 12:12:49PM -0300, Andre Dieb wrote : This patch contains my other two previous patches: - [PATCH] Fix eina mempool leak, init error handling, remove consumed TODO msg - [PATCH] Add checks to eina_module_new Also fixes the build error with --disable-magic-debug. I still think that when ecore_magic is disabled, it would be better to use functions rather than preprocessor macros for things like eina_magic_string_init(). Indeed, that would avoid exporting different symbols depending on whether eina has magic-debug enabled or not. If you use macros, an application using magic debug compiled against eina without magic-debug will have to be recompiled to benefit from it if it gets enabled in eina at a later point. If you use functions, this is no longer an issue. Thoughts ? I strongly disagree, when you disable magic debug in eina, you want to avoid it's cost at all. This include the call of the function call. And from my test, it does have a big impact to just enter an empty function. When we are speaking about performance, I think we can accept the little tradeoff of needing to recompile application using eina for maximum performance. Are you kidding? How often do you call this function? Maybe 20 times, even if you call it 100 or 1000 times, I strongly doubt that you can measure a performance difference. No, I am not. That's why we have a way to disable magic debug in evas (evas doesn't currently use eina magic debug, but will in the futur). Without this option some of my application are loosing around 10% of their time inside this magic debug stuff. I think that Peter is saying that you do not call the eina_magic_string_init() function o lot of time. The question is about that specific function, not the whole magic debug stuff Oh, sorry, I didn't understood that. In that case, sounds ok to me. -- Cedric BAIL -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/eina_mempool.c === --- src/lib/eina_mempool.c (revision 40980) +++ src/lib/eina_mempool.c (working copy) @@ -123,8 +123,16 @@ { char *path; - eina_hash_init(); - eina_module_init(); + if (!eina_hash_init()) + { + fprintf(stderr, Could not initialize eina hash module.\n); + return 0; + } + if (!eina_module_init()) + { + fprintf(stderr, Could not initialize eina module module.\n); + goto module_init_error; + } EINA_ERROR_NOT_MEMPOOL_MODULE = eina_error_msg_register(Not a memory pool module.); _backends = eina_hash_string_superfast_new(NULL); @@ -147,7 +155,8 @@ if (!_modules) { EINA_ERROR_PERR(ERROR: no mempool modules able to be loaded.\n); - abort(); + eina_hash_free(_backends); + goto mempool_init_error; } eina_module_list_load(_modules); /* builtin backends */ @@ -165,6 +174,14 @@ #endif } return ++_init_count; + + mempool_init_error: + eina_module_shutdown(); + module_init_error: + eina_hash_shutdown(); + + return 0; + } /** @@ -190,9 +207,15 @@ ememoa_fixed_shutdown(); #endif /* dynamic backends */ - eina_module_list_unload(_modules); + eina_module_list_delete(_modules); + if (_modules) + eina_array_free(_modules); + eina_module_shutdown(); - /* TODO delete the _modules list */ + + if (_backends) + eina_hash_free(_backends); + eina_hash_shutdown(); return 0; } Index: src/lib/eina_module.c === --- src/lib
[E-devel] [PATCH] Fix eina build error with --disable-magic-debug, unified patch for my yesterday patches
This patch contains my other two previous patches: - [PATCH] Fix eina mempool leak, init error handling, remove consumed TODO msg - [PATCH] Add checks to eina_module_new Also fixes the build error with --disable-magic-debug. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/include/eina_magic.h === --- src/include/eina_magic.h (revision 40917) +++ src/include/eina_magic.h (working copy) @@ -52,8 +52,8 @@ #define eina_magic_string_get(Magic) (NULL) #define eina_magic_string_set(Magic, Magic_Name) ((void) 0) #define eina_magic_fail(d, m, req_m, file, fnx, line) ((void) 0) -#define eina_magic_string_init() do {} while(0) -#define eina_magic_string_shutdown() do {} while(0) +#define eina_magic_string_init() ((int) 1) +#define eina_magic_string_shutdown() ((int) 0) #endif Index: src/lib/eina_mempool.c === --- src/lib/eina_mempool.c (revision 40917) +++ src/lib/eina_mempool.c (working copy) @@ -123,8 +123,16 @@ { char *path; - eina_hash_init(); - eina_module_init(); + if (!eina_hash_init()) + { + fprintf(stderr, Could not initialize eina hash module.\n); + return 0; + } + if (!eina_module_init()) + { + fprintf(stderr, Could not initialize eina module module.\n); + goto module_init_error; + } EINA_ERROR_NOT_MEMPOOL_MODULE = eina_error_msg_register(Not a memory pool module.); _backends = eina_hash_string_superfast_new(NULL); @@ -147,7 +155,8 @@ if (!_modules) { EINA_ERROR_PERR(ERROR: no mempool modules able to be loaded.\n); - abort(); + eina_hash_free(_backends); + goto mempool_init_error; } eina_module_list_load(_modules); /* builtin backends */ @@ -165,6 +174,14 @@ #endif } return ++_init_count; + + mempool_init_error: + eina_module_shutdown(); + module_init_error: + eina_hash_shutdown(); + + return 0; + } /** @@ -190,9 +207,15 @@ ememoa_fixed_shutdown(); #endif /* dynamic backends */ - eina_module_list_unload(_modules); + eina_module_list_delete(_modules); + if (_modules) + eina_array_free(_modules); + eina_module_shutdown(); - /* TODO delete the _modules list */ + + if (_backends) + eina_hash_free(_backends); + eina_hash_shutdown(); return 0; } Index: src/lib/eina_module.c === --- src/lib/eina_module.c (revision 40917) +++ src/lib/eina_module.c (working copy) @@ -28,6 +28,7 @@ #include sys/types.h #include dirent.h #include string.h +#include sys/stat.h #ifdef HAVE_ALLOCA_H # include alloca.h @@ -260,11 +261,25 @@ EAPI Eina_Module * eina_module_new(const char *file) { Eina_Module *m; + struct stat stat_info; EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); - /* TODO check that the file exists */ + if (stat(file, stat_info) != 0) + { + // Could not retrieve information about the file + eina_error_set(EINA_ERROR_WRONG_MODULE); + return NULL; + } + m = malloc(sizeof(Eina_Module)); + + if (!m) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return NULL; + } + /* TODO add the magic */ m-file = strdup(file); m-ref = 0; Index: src/lib/eina_error.c === --- src/lib/eina_error.c (revision 40917) +++ src/lib/eina_error.c (working copy) @@ -530,7 +530,6 @@ { char *level; /* TODO register the eina's basic errors */ - /* TODO load the environment variable for getting the log level */ if ((level = getenv(EINA_ERROR_LEVEL))) { _error_level = atoi(level); -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Fix eina build error with --disable-magic-debug, unified patch for my yesterday patches
I agree. But maybe we can have more thoughts on this. Anyone? On Sat, Jun 6, 2009 at 12:48 PM, Albin Tonnerre albin.tonne...@gmail.comwrote: On Sat, Jun 06, 2009 at 12:12:49PM -0300, Andre Dieb wrote : This patch contains my other two previous patches: - [PATCH] Fix eina mempool leak, init error handling, remove consumed TODO msg - [PATCH] Add checks to eina_module_new Also fixes the build error with --disable-magic-debug. I still think that when ecore_magic is disabled, it would be better to use functions rather than preprocessor macros for things like eina_magic_string_init(). Indeed, that would avoid exporting different symbols depending on whether eina has magic-debug enabled or not. If you use macros, an application using magic debug compiled against eina without magic-debug will have to be recompiled to benefit from it if it gets enabled in eina at a later point. If you use functions, this is no longer an issue. Thoughts ? Regards, -- Albin Tonnerre -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBCAAGBQJKKo/ZAAoJEBEG8gBbtuSlg2EQAJuv4Q3oxSywbadvWWjNTpRA iAOhtbABiWcRTnRbuK54RsGBrl+Z+BIjXJSStchY8Et2FFJzpZcd9HrWewHSbf3m XcTC9usC9J3k8jTBzlsP1nvSz2br50yJDmzdu2uZA16XcySQGYBJxseiju6MhKsp Kc6qfUSKCcml3Ovh0G2RjSjmWCPDodVvMNeu/2hofi03rtWdMnMXw6EtSB2VDkkb GndGz9S2yxKDu6bbn/JnelqQ2N7gSw0d6wlAkKr1hlQFZ4RMACQFWhBlL2k7YSIU JaUPBevrZ5KwWyQlnKcy2d7WTUNgUVTfY2c445wEMmEUQUEftPUNlAWHgTyVtWZ+ bIv3A3qb/Ypk0qdrZ6ipIlFEHI+t6zow8VRtepBslEFIHqHXvBNFOQbXwbI5qzyr 9KmTn7gfMpMDc6jUf9NMlx6Z1tsabaQzheKn7Ni3CWM5bDQtO2s+QDSBdy138lv2 8opXVWi7N3WVyK3yrLJ8zirFobsZPaKrAU7si8NEupm1haMXFSqWqjZLFxsdrVEK bcNXYKtMKgfQtMrq4u9LYVAAWK3v7jhgBU/hrVwELCGC16dulhcRaspgfaedi7sU 19qOUhvWB02TiqYM04hz+AxM3TKnx8CORSuMoQTA1LfyNR2z+DM3+J56aPK7R+kt EARZRhLTlje9ue7PpU1R =p47M -END PGP SIGNATURE- -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Eina init/shutdown fixes
Fixes the same thing for the remaining modules. On Thu, Jun 4, 2009 at 1:46 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: Fixes init error handling on eina_array, eina_main and eina_stringshare. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/eina_benchmark.c === --- src/lib/eina_benchmark.c (revision 40896) +++ src/lib/eina_benchmark.c (working copy) @@ -145,11 +145,29 @@ if (_eina_benchmark_count 1) return _eina_benchmark_count; - eina_error_init(); - eina_array_init(); - eina_counter_init(); + if (!eina_error_init()) + { + fprintf(stderr, Could not initialize eina error module.\n); + return 0; + } + if (!eina_array_init()) + { + EINA_ERROR_PERR(Could not initialize eina array module.\n); + goto array_init_error; + } + if (!eina_counter_init()) + { + EINA_ERROR_PERR(Could not initialize eina counter module.\n); + goto counter_init_error; + } return _eina_benchmark_count; + + counter_init_error: + eina_array_shutdown(); + array_init_error: + eina_error_shutdown(); + return 0; } /** Index: src/lib/eina_counter.c === --- src/lib/eina_counter.c (revision 40896) +++ src/lib/eina_counter.c (working copy) @@ -252,7 +252,11 @@ if (_eina_counter_init_count == 1) { - eina_error_init(); + if (!eina_error_init()) + { + fprintf(stderr, Could not initialize eina error module.\n); + return 0; + } #ifdef _WIN32 if (!QueryPerformanceFrequency(_eina_counter_frequency)) { Index: src/lib/eina_rectangle.c === --- src/lib/eina_rectangle.c (revision 40896) +++ src/lib/eina_rectangle.c (working copy) @@ -20,6 +20,7 @@ # include config.h #endif +#include stdio.h #include stdlib.h #include eina_rectangle.h @@ -353,8 +354,16 @@ if (_eina_rectangle_init_count 1) return _eina_rectangle_init_count; - eina_error_init(); - eina_mempool_init(); + if (!eina_error_init()) + { + fprintf(stderr, Could not initialize eina error module.\n); + return 0; + } + if (!eina_mempool_init()) + { + EINA_ERROR_PERR(Could not initialize eina mempool module.\n); + goto mempool_init_error; + } #ifdef EINA_DEFAULT_MEMPOOL choice = pass_through; @@ -368,10 +377,17 @@ if (!_eina_rectangle_mp) { EINA_ERROR_PERR(ERROR: Mempool for rectangle cannot be allocated in list init.\n); - abort(); + goto init_error; } return _eina_rectangle_init_count; + + init_error: + eina_mempool_shutdown(); + mempool_init_error: + eina_error_shutdown(); + + return 0; } EAPI int -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [PATCH] Fix eina mempool leak, init error handling, remove consumed TODO msg
With this patch, the only leaks left that I detected are these: ==20488== 20 bytes in 1 blocks are still reachable in loss record 1 of 3 ==20488==at 0x4025092: calloc (vg_replace_malloc.c:397) ==20488==by 0x4233085: (within /lib/tls/i686/cmov/libdl-2.9.so) ==20488==by 0x4232B20: dlopen (in /lib/tls/i686/cmov/libdl-2.9.so) ==20488==by 0x4057B71: eina_module_load (eina_module.c:214) ==20488==by 0x4057C6C: eina_module_list_load (eina_module.c:420) ==20488==by 0x4054CAD: eina_mempool_init (eina_mempool.c:161) ==20488==by 0x40563AC: eina_list_init (eina_list.c:461) ==20488==by 0x4030DA4: eupnp_event_bus_init (eupnp_event_bus.c:89) ==20488==by 0x402E004: eupnp_init (eupnp.c:40) ==20488==by 0x80489D3: main (eupnp_basic_control_point.c:44) ==20488== ==20488== ==20488== 362 (72 direct, 290 indirect) bytes in 6 blocks are definitely lost in loss record 2 of 3 ==20488==at 0x4026FDE: malloc (vg_replace_malloc.c:207) ==20488==by 0x40576DC: eina_module_new (eina_module.c:267) ==20488==by 0x405782A: _dir_list_cb (eina_module.c:138) ==20488==by 0x405453D: eina_file_dir_list (eina_file.c:134) ==20488==by 0x40572BF: eina_module_list_get (eina_module.c:403) ==20488==by 0x4054B9D: eina_mempool_init (eina_mempool.c:141) ==20488==by 0x40563AC: eina_list_init (eina_list.c:461) ==20488==by 0x4030DA4: eupnp_event_bus_init (eupnp_event_bus.c:89) ==20488==by 0x402E004: eupnp_init (eupnp.c:40) ==20488==by 0x80489D3: main (eupnp_basic_control_point.c:44) ==20488== ==20488== ==20488== 290 bytes in 6 blocks are indirectly lost in loss record 3 of 3 ==20488==at 0x4026FDE: malloc (vg_replace_malloc.c:207) ==20488==by 0x411734F: strdup (in /lib/tls/i686/cmov/libc-2.9.so) ==20488==by 0x40576E6: eina_module_new (eina_module.c:269) ==20488==by 0x405782A: _dir_list_cb (eina_module.c:138) ==20488==by 0x405453D: eina_file_dir_list (eina_file.c:134) ==20488==by 0x40572BF: eina_module_list_get (eina_module.c:403) ==20488==by 0x4054B9D: eina_mempool_init (eina_mempool.c:141) ==20488==by 0x40563AC: eina_list_init (eina_list.c:461) ==20488==by 0x4030DA4: eupnp_event_bus_init (eupnp_event_bus.c:89) ==20488==by 0x402E004: eupnp_init (eupnp.c:40) ==20488==by 0x80489D3: main (eupnp_basic_control_point.c:44) -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/eina_mempool.c === --- src/lib/eina_mempool.c (revision 40899) +++ src/lib/eina_mempool.c (working copy) @@ -123,8 +123,16 @@ { char *path; - eina_hash_init(); - eina_module_init(); + if (!eina_hash_init()) + { + fprintf(stderr, Could not initialize eina hash module.\n); + return 0; + } + if (!eina_module_init()) + { + fprintf(stderr, Could not initialize eina module module.\n); + goto module_init_error; + } EINA_ERROR_NOT_MEMPOOL_MODULE = eina_error_msg_register(Not a memory pool module.); _backends = eina_hash_string_superfast_new(NULL); @@ -147,7 +155,8 @@ if (!_modules) { EINA_ERROR_PERR(ERROR: no mempool modules able to be loaded.\n); - abort(); + eina_hash_free(_backends); + goto mempool_init_error; } eina_module_list_load(_modules); /* builtin backends */ @@ -165,6 +174,14 @@ #endif } return ++_init_count; + + mempool_init_error: + eina_module_shutdown(); + module_init_error: + eina_hash_shutdown(); + + return 0; + } /** @@ -191,8 +208,13 @@ #endif /* dynamic backends */ eina_module_list_unload(_modules); + if (_modules) + eina_array_free(_modules); eina_module_shutdown(); - /* TODO delete the _modules list */ + + if (_backends) + eina_hash_free(_backends); + eina_hash_shutdown(); return 0; } Index: src/lib/eina_error.c === --- src/lib/eina_error.c (revision 40899) +++ src/lib/eina_error.c (working copy) @@ -530,7 +530,6 @@ { char *level; /* TODO register the eina's basic errors */ - /* TODO load the environment variable for getting the log level */ if ((level = getenv(EINA_ERROR_LEVEL))) { _error_level = atoi(level); -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net
[E-devel] [PATCH] Add checks to eina_module_new
Check if malloc failed, if the file exists/can be accessed and set the appropriate error codes. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Index: src/lib/eina_module.c === --- src/lib/eina_module.c (revision 40899) +++ src/lib/eina_module.c (working copy) @@ -28,6 +28,7 @@ #include sys/types.h #include dirent.h #include string.h +#include sys/stat.h #ifdef HAVE_ALLOCA_H # include alloca.h @@ -260,11 +261,25 @@ EAPI Eina_Module * eina_module_new(const char *file) { Eina_Module *m; + struct stat stat_info; EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); - /* TODO check that the file exists */ + if (stat(file, stat_info) != 0) + { + // Could not retrieve information about the file + eina_error_set(EINA_ERROR_WRONG_MODULE); + return NULL; + } + m = malloc(sizeof(Eina_Module)); + + if (!m) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return NULL; + } + /* TODO add the magic */ m-file = strdup(file); m-ref = 0; -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] Eina list and array chained init failure handling
Sorry, I meant eina_hash instead of eina_array. On Tue, Jun 2, 2009 at 1:28 PM, Andre Dieb andre.mart...@ee.ufcg.edu.brwrote: Hello, This patch adds failure handling on eina_array_init() and eina_list_init() by shutting down and cleaning up what was used up to the failure point. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [PATCH] Eina list and array chained init failure handling
Hello, This patch adds failure handling on eina_array_init() and eina_list_init() by shutting down and cleaning up what was used up to the failure point. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com Index: src/lib/eina_list.c === --- src/lib/eina_list.c (revision 40872) +++ src/lib/eina_list.c (working copy) @@ -446,10 +446,24 @@ if (!_eina_list_init_count) { - eina_error_init(); - eina_magic_string_init(); - eina_mempool_init(); + if (!eina_error_init()) + { + fprintf(stderr, Could not initialize eina error module\n); + return 0; + } + if (!eina_magic_string_init()) + { + EINA_ERROR_PERR(ERROR: Could not initialize eina magic string module.\n); + goto on_magic_string_fail; + } + + if (!eina_mempool_init()) + { + EINA_ERROR_PERR(ERROR: Could not initialize eina mempool module.\n); + goto on_mempool_fail; + } + #ifdef EINA_DEFAULT_MEMPOOL choice = pass_through; #else @@ -462,14 +476,15 @@ if (!_eina_list_mp) { EINA_ERROR_PERR(ERROR: Mempool for list cannot be allocated in list init.\n); - abort(); + goto on_init_fail; } _eina_list_accounting_mp = eina_mempool_new(choice, list_accounting, NULL, sizeof (Eina_List_Accounting), 80); if (!_eina_list_accounting_mp) { EINA_ERROR_PERR(ERROR: Mempool for list accounting cannot be allocated in list init.\n); - abort(); + eina_mempool_delete(_eina_list_mp); + goto on_init_fail; } eina_magic_string_set(EINA_MAGIC_ITERATOR, @@ -487,6 +502,14 @@ } return ++_eina_list_init_count; + + on_init_fail: + eina_mempool_shutdown(); + on_mempool_fail: + eina_magic_string_shutdown(); + on_magic_string_fail: + eina_error_shutdown(); + return 0; } /** Index: src/lib/eina_hash.c === --- src/lib/eina_hash.c (revision 40872) +++ src/lib/eina_hash.c (working copy) @@ -21,6 +21,7 @@ # include config.h #endif +#include stdio.h #include stdlib.h #include string.h #ifdef _MSC_VER @@ -664,7 +665,11 @@ eina_hash_init(void) { if (!_eina_hash_init_count) - eina_error_init(); + if (!eina_error_init()) + { + fprintf(stderr, Could not initialize eina error module\n); + return 0; + } return ++_eina_hash_init_count; } -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [GSoC] Adding blog to planet e
Hello list, I'm one of the students for this year E's GSoC and I'm reporting project progress on my blog. Could you please add it to planet-e? The rss feed of the specific project label is http://genuinepulse.blogspot.com/feeds/posts/default/-/eupnp. Thanks in advance. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [e-users] [GSoC] Google Summer of Code Accepted Student Proposals....
Thanks for the warm welcome! I'd like to briefly introduce myself to the community: Hello, I'm André Die*b* Martins and my project for GSoC is called eupnp (you can contact me or barbieri for more information about it). I'm an undergraduate student in Electrical Engineering from Campina Grande - PB, Brazil. I'll be reporting my progress on my blog http://genuinepulse.blogspot.comand code will be at http://github.com/dieb/eupnp/tree/master for anyone interested on it. Thanks and good coding for all students! On Tue, Apr 21, 2009 at 3:10 AM, Viktor Kojouharov vkojouha...@gmail.comwrote: On Mon, 2009-04-20 at 19:50 -0500, Ravenlock wrote: All, Enlightenment is pleased to announce this years Google Summer of Code 2009 students! We had many great proposals to choose from again this year. Some stemming from our own ideas list and some originating with the students. We would like to offer our congratulations to the following accepted students and their proposals: Andre Died Martins : Eupnp - Bringing UPnP support into E Emmanuel Boudreault : Enlightenment Compositing Hannes Janetzek : Exebuf extensions for quicksilver functionality Brief descriptions of the projects can be found here: http://tinyurl.com/gsoc09-enlightenment-eupnp http://tinyurl.com/gsoc09-enlightenment-composite http://tinyurl.com/gsoc09-enlightenment-exebuf Today marks the beginning of the Community Bonding Period in which students are given an opportunity to spend time getting to know their mentor and integrate with the community. Coding officially begins May 23rd. We look forward to the opportunity to work with our students over the next few months. excellent. thanks for keeping the rest of us updated. I hope the students will occasionally keep us updated on their progress (screenshots and videos are always nice) -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ enlightenment-users mailing list enlightenment-us...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [PATCH] fix etk build fail
After cleaning up, etk wouldn't finish building on r:40244 because it was missing a generated Makefile on data/themes/b_and_w. I don't know if it was removed on purpose or if this is the correct fix, but works for me. It just adds back what was removed on r:40299. -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com Index: configure.ac === --- configure.ac (revision 40244) +++ configure.ac (working copy) @@ -181,6 +181,8 @@ data/themes/default/fonts/Makefile data/themes/default/images/Makefile data/themes/default/macros/Makefile +data/themes/b_and_w/Makefile +data/themes/b_and_w/img/Makefile data/wm/Makefile data/wm/default/Makefile data/wm/default/fonts/Makefile -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] ecore aborts on EBADF
Attached patch removes the fprintfs. On Fri, Apr 17, 2009 at 8:01 PM, Marco Trevisan (Treviño) m...@3v1n0.netwrote: Andre Dieb wrote: Here's a patch for handling EBADF (Bad file descriptor) error after select() (following the thread random abort caused by ecore). It uses fcntl() for finding which fd raises EBADF. I tested the patch with the attached program (somehow dirty but maybe shows the patch works). Please mail me with any suggestions. The patch seems ok, but are really needed all those fprintf(stderr, .? I guess they were there just for debugging... Please could someone remove them from upstream? :P -- Treviño's World - Life and Linux http://www.3v1n0.net/ -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com Index: src/lib/ecore/ecore_main.c === --- src/lib/ecore/ecore_main.c (revision 40154) +++ src/lib/ecore/ecore_main.c (working copy) @@ -422,7 +422,6 @@ static void _ecore_main_fd_handlers_bads_rem(void) { - fprintf(stderr, Removing bad fds\n); Ecore_Fd_Handler *fdh; Eina_Inlist *l; @@ -434,13 +433,10 @@ if ((fcntl(fdh-fd, F_GETFD) 0) (errno == EBADF)) { - fprintf(stderr, Found bad fd at index %d\n, fdh-fd); if (fdh-flags ECORE_FD_ERROR) { - fprintf(stderr, Fd set for error! calling user\n); if (!fdh-func(fdh-data, fdh)) { - fprintf(stderr, Fd function err returned 0, remove it\n); fdh-delete_me = 1; fd_handlers_delete_me = 1; _ecore_main_fd_handlers_cleanup(); @@ -448,7 +444,6 @@ } else { - fprintf(stderr, Problematic fd found at %d! setting it for delete\n, fdh-fd); fdh-delete_me = 1; fd_handlers_delete_me = 1; _ecore_main_fd_handlers_cleanup(); @@ -472,7 +467,6 @@ l = l-next; if (fdh-delete_me) { - fprintf(stderr, Removing fd %d\n, fdh-fd); fd_handlers = (Ecore_Fd_Handler *) eina_inlist_remove(EINA_INLIST_GET(fd_handlers), EINA_INLIST_GET(fdh)); ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE); -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] edje_editor and edje_decc issue
That's a known issue. Edje_Editor is not yet fully capable of exporting the complete edc. On Sun, Sep 21, 2008 at 3:21 PM, Diogo Dutra [EMAIL PROTECTED] wrote: Hi guys, I created a file .edc and put some things, after I use edje_editor to edit this file, ok, the edje_editor works fine. But when I used the edje_decc in the .edj created by edje_editor it extract the old .edc, the edc before I edit with edje_editor! And when I run my C application the interface is equal to the edj in edje_editor! Why I cant get the .edc of the files created by edje_editor? -- === Diogo Dutra Albuquerque Meu Curriculum Lattes: http://lattes.cnpq.br/3624796077679922 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] missing .c file(s) in python-evas
You need cython installed so that the .c can be generated. 2008/8/22 Mathieu Prevot [EMAIL PROTECTED] Hi, I'm making ports of e17 applications and libraries for FreeBSD from svn sources. It seems file(s) are missing in python-evas (and other python-e* packages) cc -DNDEBUG -O2 -pipe -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x2 -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -fPIC -I/usr/local/include -Iinclude -I/usr/local/include/python2.5 -c evas/evas.c_evas.c -o build/temp.freebsd-8.0-CURRENT-amd64-2.5/evas/evas.c_evas.o cc: evas/evas.c_evas.c: No such file or directory I'll be intensively using many parts of the framework for several FreeBSD projects, and I may consider documenting e17/freebsd on the e17 wiki. Tell me who/where/how if you are interested :) Thanks, Mathieu - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] undefined functions in edje_editor (svn 35614)
yes. those functions are part of the edje_edit API (edje_edit.c and Edje_Edit.h). Installing latest edje should work 2008/8/22 raoul [EMAIL PROTECTED] Hi, It seems that your edje installation is not up to date. Le vendredi 22 août 2008, Mathieu Prevot a écrit : Hi, I'm building the edje_editor on FreeBSD, and it seems several definitions are missing. Error appears while compiling the executable edje_editor. `edje_edit_spectra_add' `edje_edit_spectra_del' `edje_edit_spectra_name_set' `edje_edit_spectra_stop_color_get' `edje_edit_spectra_stop_color_set' `edje_edit_spectra_stop_num_get' `edje_edit_spectra_stop_num_set' `edje_edit_spectrum_list_get' `edje_edit_state_fill_origin_offset_x_get' `edje_edit_state_fill_origin_offset_x_set' `edje_edit_state_fill_origin_offset_y_get' `edje_edit_state_fill_origin_offset_y_set' `edje_edit_state_fill_origin_relative_x_get' `edje_edit_state_fill_origin_relative_x_set' `edje_edit_state_fill_origin_relative_y_get' `edje_edit_state_fill_origin_relative_y_set' `edje_edit_state_fill_size_offset_x_get' `edje_edit_state_fill_size_offset_x_set' `edje_edit_state_fill_size_offset_y_get' `edje_edit_state_fill_size_offset_y_set' `edje_edit_state_fill_size_relative_x_get' `edje_edit_state_fill_size_relative_x_set' `edje_edit_state_fill_size_relative_y_get' `edje_edit_state_fill_size_relative_y_set' `edje_edit_state_gradient_rel1_offset_x_get' `edje_edit_state_gradient_rel1_offset_x_set' `edje_edit_state_gradient_rel1_offset_y_get' `edje_edit_state_gradient_rel1_offset_y_set' `edje_edit_state_gradient_rel1_relative_x_get' `edje_edit_state_gradient_rel1_relative_x_set' `edje_edit_state_gradient_rel1_relative_y_get' `edje_edit_state_gradient_rel1_relative_y_set' `edje_edit_state_gradient_rel2_offset_x_get' `edje_edit_state_gradient_rel2_offset_x_set' `edje_edit_state_gradient_rel2_offset_y_get' `edje_edit_state_gradient_rel2_offset_y_set' `edje_edit_state_gradient_rel2_relative_x_get' `edje_edit_state_gradient_rel2_relative_x_set' `edje_edit_state_gradient_rel2_relative_y_get' `edje_edit_state_gradient_rel2_relative_y_set' `edje_edit_state_gradient_spectra_get' `edje_edit_state_gradient_spectra_set' `edje_edit_state_gradient_type_get' `edje_edit_state_gradient_type_set' `edje_edit_state_gradient_use_fill_get' Thanks, Mathieu - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Raoul Hecky - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Embedded Systems and Pervasive Computing Lab (Embedded) Electrical Engineering Department (DEE) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) Blog: http://genuinepulse.blogspot.com/ Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] evas_object_image rotation?
Here's some example code: https://garage.maemo.org/plugins/scmsvn/viewcvs.php/branches/prototypes_0.7/ui/gauges/evasutil.c?root=carmanview=markup I used it once for testing and worked. Maybe I'm dead wrong but AFAIK evas doesn't support rotation yet, this is third party. 2008/8/6 Yong Ma [EMAIL PROTECTED] Hi all, I want to know if there are some ways to rotate an image object to a custom angle with C language API of EFL, here is some Python code I googled, but I could not find the corresponding function in Ecore_Evas/Evas C language API documents. I really appreciate if anyone can tell me how to or send me some example code. The Python code is as following: #!/usr/bin/env python import sys import ecore import evas import ecore.evas if 'x11' in sys.argv: ee = ecore.evas.SoftwareX11(w=800, h=480) else: ee = ecore.evas.SoftwareX11_16(w=800, h=480) bg = ee.evas.Rectangle(color=(255, 255, 255, 255)) bg.size = ee.evas.size bg.show() img = ee.evas.Image() img.file_set(icon.png) img.move(380, 200) w, h = img.image_size_get() img.resize(w, h) img.fill_set(0, 0, w, h) img.show() rotation = [evas.EVAS_IMAGE_ROTATE_90] def rotate_img(rotation): img.rotate(rotation[0]) rotation[0] += 1 return rotation[0] = evas.EVAS_IMAGE_ROTATE_270 ee.fullscreen = False ee.show() ecore.timer_add(2.0, rotate_img, rotation) ecore.main_loop_begin() # prevent segfault del ee Thank you very much! -- Be Yourself @ mail.com! Choose From 200+ Email Addresses Get a Free Account at www.mail.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [website] What would you like to see on the new site?
There are a bunch of articles, but you won't reach them easily (like in a list). (I always need to consult something on the wiki or docs and it's always a pain to find related links). I think a list of related links (such as wikipedia.org ones) at the bottom would be really useful. Cheersm 2008/8/1 Veli Ogla Sungutay [EMAIL PROTECTED] Articles friends. We need lots of them. Even a small tutorial, small usage examples would do. On Fri, Aug 1, 2008 at 9:04 PM, Ian Caldwell [EMAIL PROTECTED] wrote: What would you like to see on the new website? What goals do you think it should have. My personal views are this is what we need to see differently. Feel free to chime in and add to what you'd like to see on the new site *1. Create links to all the software ( wiki, bug tracker, forums, source browser etc)* *2. Make the website more user oriented. A lot of the content can be moved to the wiki. We need the website to be a lot more static. * *3. Separate developer sections from user.* *4. Create a feature list page in order to make E more of a product that we're trying to talk about* *5. weekly or biweekly articles* *a. We will have a submission article system in which we will stack up articles and release one a week regarding E. * *b. This will allow users who aren't good at coding or able to help in that way to keep track of what's happening and write articles regarding the progress.* *c. This will also help people who are writing applications be able to follow development and get inspiration from other application developers.* *d. Or just content such as user guides for different things* *6.Translations* *a. Allow people to have the website content translated into multiple languages.* *7. One login to rule them all* *a. Having 10 different logins for all the different software isn't working it would be really nice to see a lot of them consolidated into a login api such as openid or google accounts.* All in all the website needs to me more of a pamphlet than a handbook for everything under the sun. *Note* Please do not start on any designs That will come later and we have plans for making prizes for it. Stay tuned. --Ian Inc - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Veli Ogla Sungutay http://gui-rd.org - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] e17 : segmentation fault when forecast or weather module are loading
Hi, I had a similar problem and the main problem was that my dbus daemon wasn't correctly set up. I also had a similar warning You should just open it... and after edje_decc'ing it and compiling it again (and moving the new .edj to the folder) and it worked. I don't know if this is your case (looks like your warning is for a cfg file, weird), but I hope this helps :) 2008/7/21 _doof [EMAIL PROTECTED]: hi i run e17 on nevada 91 and it's work very well I have only one problem. When i try to loa forecast module or weather module, e17 segfault does someone have same problem ? thanks 578: stat(/home/doof/.e/e/modules/forecasts/solaris2.11-i386/module.so, 0xFD7FFFDB9C60) Err#2 ENOENT 578: stat(/opt/e17/lib/enlightenment/modules/forecasts/solaris2.11-i386/module.so, 0xFD7FFFDB9C60) = 0 578: stat(/opt/e17/lib/enlightenment/modules/forecasts/solaris2.11-i386/module.so, 0xFD7FFFDB96D0) = 0 578: resolvepath(/opt/e17/lib/enlightenment/modules/forecasts/solaris2.11-i386/module.so, /opt/e17/lib/enlightenment/modules/forecasts/solaris2.11-i386/module.so, 1023) = 71 578: open(/opt/e17/lib/enlightenment/modules/forecasts/solaris2.11-i386/module.so, O_RDONLY) = 93 578:mmap(0x0001, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 93, 0) = 0xFD7FFC18 578:mmap(0x0001, 98304, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, 4294967295, 0) = 0xFD7FFC16 578:mmap(0xFD7FFC16, 29288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 93, 0) = 0xFD7FFC16 578:mmap(0xFD7FFC177000, 2352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 93, 28672) = 0xFD7FFC177000 578:munmap(0xFD7FFC168000, 61440) = 0 578:mmap(0x, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFD7FFD4C 578:memcntl(0xFD7FFC16, 13344, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 578:close(93) = 0 578:munmap(0xFD7FFC18, 32768) = 0 578:open(/home/doof/.e/e/config/default/module.forecasts.cfg, O_RDONLY) = 93 578:fstat(93, 0xFD7FFFDBA330) = 0 578:fcntl(93, F_SETFD, 0x0001) = 0 578:mmap(0x, 202, PROT_READ, MAP_SHARED, 93, 0) = 0xFD7FFC18 578:fstat(2, 0xFD7FFFDB8FA0)= 0 578:write(2, 0xFD7FFEEBF248, 20)= 20 578: E E T f i l e f o r m a t o f ' 578:write(2, 0x010D2EC0, 51)= 51 578: / h o m e / d o o f / . e / e / c o n f i g / d e f a u l t / m 578: o d u l e . f o r e c a s t s . c f g 578:write(2, 0xFD7FFEEBF25E, 109) = 109 578: ' i s d e p r e c a t e d . Y o u s h o u l d j u s t 578: o p e n i t o n e t i m e w i t h m o d e = = E 578: E T _ F I L E _ M O D E _ R E A D _ W R I T E t o s o l v e 578: t h i s i s s u e .\n 578:Incurred fault #6, FLTBOUNDS %pc = 0xFD7FFEAE2AE0 578: siginfo: SIGSEGV SEGV_MAPERR addr=0x 578:Received signal #11, SIGSEGV [caught] 578: siginfo: SIGSEGV SEGV_MAPERR addr=0x 578:lwp_sigmask(SIG_SETMASK, 0x, 0x) = 0xFFBFFEFF [0x] 578:write(2, 0x0050FCB2, 29)= 29 578: * * * * S E G M E N T A T I O N F A U L T * * * *\n 578:write(3, 0x005338B0, 24)= 24 578: 1B0302\0\0\0\0\0 \b02\0\0\0\0\0 %\001\0 +\001\0 578:read(3, 0xFD7FFFDB9BA0, 32) = 32 578: 0101AA Z\0\0\0\0E5\bA0\0\0\0\0\0808E82\0\0\0\0\0\0\0\0\0\0\0\0\0 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- André Dieb Martins - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel