Re: [E-devel] E CVS: enna captainigloo
Nicolas Aguirre schrieb: Le mardi 22 janvier 2008 à 19:48 +0100, Peter Wehrfritz a écrit : Wouldn't it be better, if ecore_str_has_suffix() were case-insensitive, because it is most time used to check for extensions? Or maybe to have another function that does the same job, but that use strcasecmp instead strcmp? Peter Agree with you, but maybe have another function would be better. You'll find a patch attached, that adds ecore_str_has_extentsion() which uses strcasecmp() instead of strcmp(). If there are no objections, I'm going to commit it in some days Peter Index: Ecore_Str.h === RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/Ecore_Str.h,v retrieving revision 1.9 diff -u -r1.9 Ecore_Str.h --- Ecore_Str.h 15 Mar 2007 22:21:26 - 1.9 +++ Ecore_Str.h 23 Jan 2008 09:29:42 - @@ -46,6 +46,8 @@ EAPI int ecore_str_has_prefix(const char *str, const char *prefix); EAPI int ecore_str_has_suffix(const char *str, const char *suffix); +EAPI int ecore_str_has_extension(const char *str, const char *ext); + EAPI char **ecore_str_split(const char *string, const char *delimiter, int max_tokens); Index: ecore_str.c === RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_str.c,v retrieving revision 1.9 diff -u -r1.9 ecore_str.c --- ecore_str.c 22 Aug 2007 17:44:04 - 1.9 +++ ecore_str.c 23 Jan 2008 09:29:42 - @@ -23,6 +23,8 @@ #include ecore_private.h #include Ecore_Str.h +static int ecore_str_has_suffix_helper(const char *str, const char *suffix, + int (*cmp)(const char *, const char *)); /** * @param dst the destination * @param src the source @@ -140,18 +142,47 @@ int ecore_str_has_suffix(const char *str, const char *suffix) { - size_t str_len; - size_t suffix_len; - CHECK_PARAM_POINTER_RETURN(str, str, 0); CHECK_PARAM_POINTER_RETURN(suffix, suffix, 0); + + return ecore_str_has_suffix_helper(str, suffix, strcmp); +} + +/** + * This function does the same like ecore_str_has_suffix(), but with a + * case insensitive compare. + * + * @param str the string to work with + * @param ext the extension to check for + * @return true if str has the given extension + * @brief checks if the string has the given extension + */ +int +ecore_str_has_extension(const char *str, const char *ext) +{ + CHECK_PARAM_POINTER_RETURN(str, str, 0); + CHECK_PARAM_POINTER_RETURN(ext, ext, 0); + + return ecore_str_has_suffix_helper(str, ext, strcasecmp); +} + +/* + * Internal helper function used by ecore_str_has_suffix() and + * ecore_str_has_extension() + */ +static int +ecore_str_has_suffix_helper(const char *str, const char *suffix, + int (*cmp)(const char *, const char *)) +{ + size_t str_len; + size_t suffix_len; str_len = strlen(str); suffix_len = strlen(suffix); if (suffix_len str_len) return 0; - return (strncmp(str + str_len - suffix_len, suffix, suffix_len) == 0); + return cmp(str + str_len - suffix_len, suffix) == 0; } /** - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [Patch] evas stringshare and e modules
Hello, while working on a module I somehow screwed up my E config. After that my E was trying to load a NULL module, which caused various segfaults. So I added a few more security checks and everything ran fine. Samuel 'lok' Mendes Index: e_module.c === RCS file: /cvs/e/e17/apps/e/src/bin/e_module.c,v retrieving revision 1.85 diff -u -r1.85 e_module.c --- e_module.c 31 Oct 2007 12:21:01 - 1.85 +++ e_module.c 23 Jan 2008 09:42:28 - @@ -198,7 +198,7 @@ E_Config_Module *em; em = l-data; - if (!strcmp(em-name, m-name)) + if (em em-name !strcmp(em-name, m-name)) { in_list = 1; break; @@ -440,7 +440,7 @@ E_Config_Module *em; em = l-data; - if (!strcmp(em-name, m-name)) + if (em em-name !strcmp(em-name, m-name)) { e_config-modules = evas_list_remove(e_config-modules, em); if (em-name) evas_stringshare_del(em-name); Index: evas_stringshare.c === RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_stringshare.c,v retrieving revision 1.12 diff -u -r1.12 evas_stringshare.c --- evas_stringshare.c 4 May 2007 08:18:05 - 1.12 +++ evas_stringshare.c 23 Jan 2008 09:41:52 - @@ -58,6 +58,8 @@ char *el_str; Evas_Stringshare_El *el, *pel = NULL; + if (!str) return NULL; + hash_num = _evas_stringshare_hash_gen(str, slen); for (el = share.buckets[hash_num]; el; pel = el, el = el-next) { @@ -90,6 +92,8 @@ int hash_num, slen; char *el_str; Evas_Stringshare_El *el, *pel = NULL; + + if (!str) return NULL; hash_num = _evas_stringshare_hash_gen(str, slen); for (el = share.buckets[hash_num]; el; pel = el, el = el-next) - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] E17 under OpenBSD and other goodies.
Hi, A long over due mail with the OpenBSD specific patches inlined. The files can be checked directly from http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/e17/ This in the -current system (http://www.openbsd.org/faq/faq5.html#Flavors). This is based on a snapshot from 20071211. In eet: --- src/lib/eet_lib.c.orig Mon Nov 12 11:14:04 2007 +++ src/lib/eet_lib.c Mon Nov 12 11:15:11 2007 @@ -497,6 +497,10 @@ eet_open(const char *file, Eet_File_Mode mode) else return NULL; } + else if (file_stat.st_size == 0) + { + return NULL; + } /* We found one */ if (ef (file_stat.st_mtime != ef-mtime)) Warnings: Four warnings:about HAVE_STDLIB_H being redefined. Two warning about unsafe function : strcpy and sprintf instead of strlcpy and snprintf In Evas: $OpenBSD: patch-configure_in,v 1.1 2007/12/06 19:47:08 bernd Exp $ --- configure.in.orig Wed Dec 5 22:13:29 2007 +++ configure.inWed Dec 5 22:13:42 2007 @@ -31,7 +31,7 @@ AC_SUBST(version_info) AC_FUNC_ALLOCA -MODULE_ARCH=$host_os-$host_cpu +MODULE_ARCH= AC_SUBST(MODULE_ARCH) AC_DEFINE_UNQUOTED(MODULE_ARCH, $MODULE_ARCH, Module architecture) $OpenBSD: patch-src_lib_include_evas_common_h,v 1.1 2007/12/07 09:49:58 mbalmer Exp $ --- src/lib/include/evas_common.h.orig Fri Dec 7 10:34:46 2007 +++ src/lib/include/evas_common.h Fri Dec 7 10:34:59 2007 @@ -46,6 +46,7 @@ #include stdio.h #include stdlib.h #include unistd.h +#include stdint.h #include string.h #include signal.h #include setjmp.h Warnings: evas_convert_rgb_8.c: In function `evas_common_convert_rgba_to_8bpp_rgb_221_dith': evas_convert_rgb_8.c:162: warning: right shift count is negative evas_convert_rgb_8.c: In function `evas_common_convert_rgba_to_8bpp_rgb_121_dith': evas_convert_rgb_8.c:195: warning: right shift count is negative evas_convert_rgb_8.c: In function `evas_common_convert_rgba_to_8bpp_rgb_111_dith': evas_convert_rgb_8.c:228: warning: right shift count is negative and: evas_outbuf.c: In function `evas_buffer_outbuf_buf_push_updated_region': evas_outbuf.c:268: warning: assignment from incompatible pointer type evas_outbuf.c:284: warning: assignment from incompatible pointer type evas_outbuf.c:310: warning: assignment from incompatible pointer type evas_outbuf.c:341: warning: assignment from incompatible pointer type And: evas_engine.c: In function `eng_font_draw': evas_engine.c:855: warning: passing arg 3 of `evas_common_draw_context_font_ext_set' from incompatible pointer type evas_engine.c:855: warning: passing arg 4 of `evas_common_draw_context_font_ext_set' from incompatible pointer type evas_engine.c:855: warning: passing arg 5 of `evas_common_draw_context_font_ext_set' from incompatible pointer type evas_engine.c: In function `module_open': evas_engine.c:926: warning: assignment from incompatible pointer type and: evas_engine_font.c: In function `_xre_font_surface_draw': evas_engine_font.c:178: warning: comparison is always false due to limited range of data type evas_engine_font.c:178: warning: comparison is always false due to limited range of data type and:a couple of warnings about HAVE_STDLIB_H being redefined in the jpg folder. In ecore: It seems ecore does not respect :--disable-ecore-evas-sdl --disable-ecore-sdl and still links to SDL if it exist, can someone please test this under linux. Unsafe functions strcpy,sprintf and strcat instead of strlcpy,snprintf and strlcat In edje: edje_data.c: In function `_edje_edd_setup': edje_data.c:70: warning: assignment from incompatible pointer type edje_data.c:72: warning: assignment from incompatible pointer type edje_data.c:73: warning: assignment from incompatible pointer type edje_data.c:74: warning: assignment from incompatible pointer type edje_data.c:75: warning: assignment from incompatible pointer type edje_data.c:76: warning: assignment from incompatible pointer type edje_data.c:77: warning: assignment from incompatible pointer type edje_data.c:78: warning: assignment from incompatible pointer type Unsafe functions:strcpy and strcat. In embryo: unsafe functions: strcpy,sprintf and strcat. In E: --- configure.in.orig Wed Nov 7 11:45:47 2007 +++ configure.inWed Dec 5 21:29:17 2007 @@ -70,7 +70,7 @@ AC_CHECK_HEADERS(security/pam_appl.h, [ AC_SUBST(VALGRIND_CFLAGS) AC_SUBST(VALGRIND_LIBS) -MODULE_ARCH=$host_os-$host_cpu +MODULE_ARCH= AC_SUBST(MODULE_ARCH) AC_DEFINE_UNQUOTED(MODULE_ARCH, $MODULE_ARCH, Module architecture) @@ -148,6 +148,9 @@ AC_SUBST(ALL_LINGUAS) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.12.1]) +LIBICONV=$LTLIBICONV +LIBINTL=$LTLIBINTL +INTLLIBS=$LTLIBINTL if test x$LIBINTL = x; then LIBINTL=$INTLLIBS fi --- src/bin/Makefile.am.origFri Nov 9 16:20:53 2007 +++ src/bin/Makefile.am Fri Nov 9 16:21:15 2007 @@ -345,7 +345,7 @@ e_xinerama.c enlightenment_init_LDFLAGS = @e_libs@ -setuid_root_mode = a=rx,u+xs +setuid_root_mode = a=rx,u+x install-exec-hook: @chmod
Re: [E-devel] E17 under OpenBSD and other goodies.
On Wednesday 23 January 2008, laurent FANIS wrote: --- src/lib/eet_lib.c.orig Mon Nov 12 11:14:04 2007 +++ src/lib/eet_lib.c Mon Nov 12 11:15:11 2007 @@ -497,6 +497,10 @@ eet_open(const char *file, Eet_File_Mode mode) else return NULL; } + else if (file_stat.st_size == 0) + { + return NULL; + } /* We found one */ if (ef (file_stat.st_mtime != ef-mtime)) should be an issue on all systems ... could you elaborate on what this fixes ? if you look up a few lines, there's already a stat size check. Warnings: Four warnings:about HAVE_STDLIB_H being redefined. *when* and *where* ... please post real build errors instead of describing them in snippets which lack context Two warning about unsafe function : strcpy and sprintf instead of strlcpy and snprintf all of these strl* warnings are bsd-specific obviously as they are bsd-specific functions --- configure.in.orig Wed Dec 5 22:13:29 2007 +++ configure.inWed Dec 5 22:13:42 2007 @@ -31,7 +31,7 @@ AC_SUBST(version_info) AC_FUNC_ALLOCA -MODULE_ARCH=$host_os-$host_cpu +MODULE_ARCH= AC_SUBST(MODULE_ARCH) AC_DEFINE_UNQUOTED(MODULE_ARCH, $MODULE_ARCH, Module architecture) ugh, this cant possibly be correct. can you explain what you're trying to fix. same goes for all the configure scripts you modified like this. --- src/lib/include/evas_common.h.orig Fri Dec 7 10:34:46 2007 +++ src/lib/include/evas_common.h Fri Dec 7 10:34:59 2007 @@ -46,6 +46,7 @@ #include stdio.h #include stdlib.h #include unistd.h +#include stdint.h #include string.h #include signal.h #include setjmp.h stdint.h should be everywhere ;) and:a couple of warnings about HAVE_STDLIB_H being redefined in the jpg folder. that is a bug with libjpeg, not e17 In ecore: It seems ecore does not respect :--disable-ecore-evas-sdl --disable-ecore-sdl and still links to SDL if it exist, can someone please test this under linux. there is no --disable-ecore-sdl option ... maybe that is why it doesnt work for you ;) In edje: edje_data.c: In function `_edje_edd_setup': edje_data.c:70: warning: assignment from incompatible pointer type edje_data.c:72: warning: assignment from incompatible pointer type edje_data.c:73: warning: assignment from incompatible pointer type edje_data.c:74: warning: assignment from incompatible pointer type edje_data.c:75: warning: assignment from incompatible pointer type edje_data.c:76: warning: assignment from incompatible pointer type edje_data.c:77: warning: assignment from incompatible pointer type edje_data.c:78: warning: assignment from incompatible pointer type looks like simple prototype desyncs ... should be fixed, but shouldnt be a serious problem In E: --- src/bin/Makefile.am.origFri Nov 9 16:20:53 2007 +++ src/bin/Makefile.am Fri Nov 9 16:21:15 2007 @@ -345,7 +345,7 @@ e_xinerama.c enlightenment_init_LDFLAGS = @e_libs@ -setuid_root_mode = a=rx,u+xs +setuid_root_mode = a=rx,u+x install-exec-hook: @chmod $(setuid_root_mode) $(DESTDIR)$(bindir)/enlightenment_sys$(EXEEXT) || true clearly this is not correct. --- src/bin/e_fm.c.orig Wed Nov 7 11:45:43 2007 +++ src/bin/e_fm.c Fri Dec 7 15:44:09 2007 @@ -104,7 +104,7 @@ struct _E_Fm2_Smart_Data E_Drop_Handler *drop_handler; E_Fm2_Icon *drop_icon; E_Fm2_Mount*mount; - chardrop_after; + signed char drop_after; unsigned char drop_show : 1; unsigned char drop_in_show : 1; unsigned char drop_all : 1; either everything should be char or not ... inserting signed here without an explanation as to why doesnt seem like a good idea. @@ -3214,7 +3214,7 @@ _e_fm2_uri_parse(const char *val) p = val + 7; if (*p != '/') { - for (i = 0; *p != '/' *p != '\0' i _POSIX_HOST_NAME_MAX; p++, i++) + for (i = 0; *p != '/' *p != '\0' i MAXHOSTNAMELEN; p++, i++) hostname[i] = *p; } hostname[i] = '\0'; @@ -3247,9 +3247,9 @@ _e_fm2_uri_path_list_get(Evas_List *uri_list) { E_Fm2_Uri *uri; Evas_List *l, *path_list = NULL; - char current_hostname[_POSIX_HOST_NAME_MAX]; + char current_hostname[MAXHOSTNAMELEN]; move this to autotools as a build time test as this ugly churn of defines will simply break some systems while fixing others. - if (gethostname(current_hostname, _POSIX_HOST_NAME_MAX) == -1) + if (gethostname(current_hostname, MAXHOSTNAMELEN) == -1) sizeof(current_hostname) should be used instead --- src/bin/e_main.c.orig Mon Dec 3 13:59:16 2007 +++ src/bin/e_main.cMon Dec 3 13:59:48 2007 @@ -1088,13 +1088,13 @@ _e_main_dirs_init(void) { snprintf(buf, sizeof(buf), gzip -d -c %s/data/other/desktop_files.tar.gz | -(cd %s/applications/ ; tar -xkf -), +(cd %s/applications/ ; /bin/pax -rk),
Re: [E-devel] Current status of e_nm
On Tue, Jan 22, 2008 at 09:36:23PM +0100, Stefan Schmidt wrote: o Anybody else working on this atm? (At least a bit coordination makes sense sometimes. ;)) A few months back I did some work that implemented additional functionality for E and NetworkManager. dbus related implementations were the big thing, and I got that working with some additional NM related functionality. I began work on a client application that use the EFLs to communicate with NM. I started with a simple EWL app that would display status, but ran into a showstopping bug with NM on my Laptop's distro that was causing NM to segfault when reading the status of wireless networks via dbus. The library code I believe was all committed to CVS. The sample client I started playing with is probably still on my workstation at home, but because of the NM bug that (afaik) is still unresolved, only really works for trivial cases like a desktop with a single wired connection. -- Ross Vandegrift [EMAIL PROTECTED] The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell. --St. Augustine, De Genesi ad Litteram, Book II, xviii, 37 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Current status of e_nm
Hello. On Wed, 2008-01-23 at 15:06, Ross Vandegrift wrote: On Tue, Jan 22, 2008 at 09:36:23PM +0100, Stefan Schmidt wrote: o Anybody else working on this atm? (At least a bit coordination makes sense sometimes. ;)) A few months back I did some work that implemented additional functionality for E and NetworkManager. Cool dbus related implementations were the big thing, and I got that working with some additional NM related functionality. OK, that's the next step on my agenda. I began work on a client application that use the EFLs to communicate with NM. I started with a simple EWL app that would display status, but ran into a showstopping bug with NM on my Laptop's distro that was causing NM to segfault when reading the status of wireless networks via dbus. Do you remember which svn version from NM that was? Today I tested NM 3302 and 425 for the gnome applet. Not the newest stuff but known to work quite good. I tested it with the ipw2915 wifi card in my notebook and found no problem so far. Connected to an open, a WEP encrypted, a WPA-PSK and a WPA2-PSK encrypted AP. Next step is to test this version with e_nm, get some basic communication running and then make my way to a newer version. Let's see if I can find your bug on this way. It needs to get fixed. ;) The library code I believe was all committed to CVS. The sample client I started playing with is probably still on my workstation at home, but because of the NM bug that (afaik) is still unresolved, only really works for trivial cases like a desktop with a single wired connection. Still your sample code would be nice to read for me. If you don't mind uploading it would be nice. Are you still interested in working on this? If yes let me know, then I'll try to keep something like a public todo list of my work fopr better coordination. regards Stefan Schmidt signature.asc Description: Digital signature - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Current status of e_nm
On Wed, Jan 23, 2008 at 09:26:21PM +0100, Stefan Schmidt wrote: with NM. I started with a simple EWL app that would display status, but ran into a showstopping bug with NM on my Laptop's distro that was causing NM to segfault when reading the status of wireless networks via dbus. Do you remember which svn version from NM that was? Today I tested NM 3302 and 425 for the gnome applet. Not the newest stuff but known to work quite good. I tested it with the ipw2915 wifi card in my notebook and found no problem so far. Connected to an open, a WEP encrypted, a WPA-PSK and a WPA2-PSK encrypted AP. Next step is to test this version with e_nm, get some basic communication running and then make my way to a newer version. Let's see if I can find your bug on this way. It needs to get fixed. ;) NetworkManager itself works fine! It's just that I've been able to reliably crash it via calling a function over dbus. http://bugzilla.gnome.org/show_bug.cgi?id=459323 If I query NM via dbus for info on a wireless network, NM dies. It can be reproduced easily via dbus-send: dbus-send --system --print-reply --type=method_call \ --dest=org.freedesktop.NetworkManager \ /org/freedesktop/NetworkManager/Devices/eth1/Networks/SSID \ org.freedesktop.NetworkManager.Devices.getAddress Substitute the SSID for the SSID you want to query. The library code I believe was all committed to CVS. The sample client I started playing with is probably still on my workstation at home, but because of the NM bug that (afaik) is still unresolved, only really works for trivial cases like a desktop with a single wired connection. Still your sample code would be nice to read for me. If you don't mind uploading it would be nice. Are you still interested in working on this? If yes let me know, then I'll try to keep something like a public todo list of my work fopr better coordination. I'd definitely be interested - NetworkManager support is the only real thing that keeps me tied to Gnome on my laptop! I'm not much of a GUI developer, but I'll try to dig up the sample client I was working on tonight. -- Ross Vandegrift [EMAIL PROTECTED] The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell. --St. Augustine, De Genesi ad Litteram, Book II, xviii, 37 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Current status of e_nm
Hello. On Wed, 2008-01-23 at 17:09, Ross Vandegrift wrote: On Wed, Jan 23, 2008 at 09:26:21PM +0100, Stefan Schmidt wrote: Next step is to test this version with e_nm, get some basic communication running and then make my way to a newer version. Let's see if I can find your bug on this way. It needs to get fixed. ;) NetworkManager itself works fine! It's just that I've been able to reliably crash it via calling a function over dbus. http://bugzilla.gnome.org/show_bug.cgi?id=459323 OK, misread that. If I query NM via dbus for info on a wireless network, NM dies. It can be reproduced easily via dbus-send: dbus-send --system --print-reply --type=method_call \ --dest=org.freedesktop.NetworkManager \ /org/freedesktop/NetworkManager/Devices/eth1/Networks/SSID \ org.freedesktop.NetworkManager.Devices.getAddress Substitute the SSID for the SSID you want to query. So we have a test case for the bug. That's something. :) I'll try to reproduce this later on my box. Not the highest prio atm, but added to my list. Are you still interested in working on this? If yes let me know, then I'll try to keep something like a public todo list of my work fopr better coordination. I'd definitely be interested - NetworkManager support is the only real thing that keeps me tied to Gnome on my laptop! That's indeed a problem I have personally, too. :) I'm not much of a GUI developer, but I'll try to dig up the sample client I was working on tonight. Thanks. regards Stefan Schmidt signature.asc Description: Digital signature - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [Patch] evas stringshare and e modules
On Wed, 23 Jan 2008 10:48:42 +0100 lok [EMAIL PROTECTED] babbled: Hello, while working on a module I somehow screwed up my E config. After that my E was trying to load a NULL module, which caused various segfaults. So I added a few more security checks and everything ran fine. that is truly... bizarre. how did a NULL module entry get into your config? actually... eet probably shouldn't have encoded such an entry to disk - letalone loaded it as a NULL list entry... -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E17 under OpenBSD and other goodies.
On Wed, 23 Jan 2008 05:11:33 -0800 laurent FANIS [EMAIL PROTECTED] babbled: Hi, A long over due mail with the OpenBSD specific patches inlined. The files can be checked directly from http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/e17/ This in the -current system (http://www.openbsd.org/faq/faq5.html#Flavors). This is based on a snapshot from 20071211. do you do the ports patching? if so you've done a great job at breaking e in openbsd ports. In eet: --- src/lib/eet_lib.c.orig Mon Nov 12 11:14:04 2007 +++ src/lib/eet_lib.c Mon Nov 12 11:15:11 2007 @@ -497,6 +497,10 @@ eet_open(const char *file, Eet_File_Mode mode) else return NULL; } + else if (file_stat.st_size == 0) + { + return NULL; + } /* We found one */ if (ef (file_stat.st_mtime != ef-mtime)) old - eet is even pickier. it requires the file be 3 ints of size (which in 99.% of cases int is 32bit - yes. technically it might not be - but if you are on a system where it is not - 99.% of your software just broke anyway :) ). not needed. Warnings: Four warnings:about HAVE_STDLIB_H being redefined. i don't know where this comes from, but config.h is included onle once in Eet_private.h and that is included only once in each .c file. where are the previous definitions? Two warning about unsafe function : strcpy and sprintf instead of strlcpy and snprintf where? you might find that these are safe anyway as the pre-conditions make them safe. if we missed them - telling us will be useful :). i can go through all of them: eet_lib.c: check the code above the strcpy. the buffer is alloced to be bigger than the string being strcpy'ed in. it's safe. eet_data.c: 1st instance: safe. malloced buffer of correct size exists to strcpy into. 2nd instance: same as above 3rd instance: same as above 4th instance: commented out 5th instance: commented out 6th instance: commented out sprintf: buffers used are 64 bytes. this is more than large enough to hold any possible output from _eet_double_to_string_convert() and the null terminator. format is (up to a max): 0xX. (4 bytes - X is 1 hex value) (16 bytes - hex) pX (2 bytes) (exponent in decimal max value with a max sized double will be 1023 - so 4 bytes) so a total buffer size requirement is 4 + 16 + 2 + 4 = 26 bytes, plus nul byte terminator, so 27. we have 64. we're safe as houses. :) In Evas: $OpenBSD: patch-configure_in,v 1.1 2007/12/06 19:47:08 bernd Exp $ --- configure.in.orig Wed Dec 5 22:13:29 2007 +++ configure.inWed Dec 5 22:13:42 2007 @@ -31,7 +31,7 @@ AC_SUBST(version_info) AC_FUNC_ALLOCA -MODULE_ARCH=$host_os-$host_cpu +MODULE_ARCH= AC_SUBST(MODULE_ARCH) AC_DEFINE_UNQUOTED(MODULE_ARCH, $MODULE_ARCH, Module architecture) you just broke multi-arch support if you install modules to ~/.evas/modules (imagine your homedir is rsync'ed or nfs shared between a sparc solaris box, an x86 solairs box, a openbsd x86 box, an x86-64 linux box. each module will have its binaries in a different arch dir - and will work - as long as you built it for that arch+os. this patch summarily breaks that. $OpenBSD: patch-src_lib_include_evas_common_h,v 1.1 2007/12/07 09:49:58 mbalmer Exp $ --- src/lib/include/evas_common.h.orig Fri Dec 7 10:34:46 2007 +++ src/lib/include/evas_common.h Fri Dec 7 10:34:59 2007 @@ -46,6 +46,7 @@ #include stdio.h #include stdlib.h #include unistd.h +#include stdint.h #include string.h #include signal.h #include setjmp.h what problems did you fix by doing this? we rarely use uint32/64 etc. etc. (and friends). i'll put this in as it should be harmless unless your os is in a retirement home awaiting its final days. Warnings: evas_convert_rgb_8.c: In function `evas_common_convert_rgba_to_8bpp_rgb_221_dith': evas_convert_rgb_8.c:162: warning: right shift count is negative evas_convert_rgb_8.c: In function `evas_common_convert_rgba_to_8bpp_rgb_121_dith': evas_convert_rgb_8.c:195: warning: right shift count is negative evas_convert_rgb_8.c: In function `evas_common_convert_rgba_to_8bpp_rgb_111_dith': evas_convert_rgb_8.c:228: warning: right shift count is negative not important. limits it to 0 for us. that's the intended effect. and: evas_outbuf.c: In function `evas_buffer_outbuf_buf_push_updated_region': evas_outbuf.c:268: warning: assignment from incompatible pointer type evas_outbuf.c:284: warning: assignment from incompatible pointer type evas_outbuf.c:310: warning: assignment from incompatible pointer type evas_outbuf.c:341: warning: assignment from incompatible pointer type unfortunately no directory for this file - so no way to know which one of several evas_outbuf.c's it might be. chances are these are entirely harmless and all we will do is shut the compiler up with some casts - which it does anyway. And: evas_engine.c: In function `eng_font_draw': evas_engine.c:855: warning: passing arg 3 of
Re: [E-devel] {Spam?} Re: E17 under OpenBSD and other goodies.
On Thu, 24 Jan 2008, Carsten Haitzler (The Rasterman) wrote: Warnings: Four warnings:about HAVE_STDLIB_H being redefined. i don't know where this comes from, but config.h is included onle once in Eet_private.h and that is included only once in each .c file. where are the previous definitions? certainly in jpeglib.h (more precisely in jconfig.h). That header is crappy. Vincent - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [Patch] evas stringshare and e modules
Carsten Haitzler (The Rasterman) wrote: On Wed, 23 Jan 2008 10:48:42 +0100 lok [EMAIL PROTECTED] babbled: Hello, while working on a module I somehow screwed up my E config. After that my E was trying to load a NULL module, which caused various segfaults. So I added a few more security checks and everything ran fine. that is truly... bizarre. how did a NULL module entry get into your config? actually... eet probably shouldn't have encoded such an entry to disk - letalone loaded it as a NULL list entry... Well I don't exactly know how I end up in this case in the first place, but it was around the time when I changed my config struct, and forgot to update the eet descriptor. I suspect that the module segfaulted at the wrong moment. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] get-e.org integration in wallpaper configuration module
On Mon, 21 Jan 2008 14:17:43 +0100 Massimiliano Calamelli [EMAIL PROTECTED] babbled: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, 19 Jan 2008 12:56:21 +1100 Carsten Haitzler (The Rasterman) [EMAIL PROTECTED] wrote: ok first the bad (it's short): 1. initial size of the dialog is tiny - no space for the website list or thumbail list. need to have it be a sane size at the start. Do you think that can i use the same size of Gradient dialog? well you should set minimum size on the website and wallpaper thumbnail fm list - then the dialog can have a minimum size thats sane - all dialogs do this. 2. you have parse bugs and segv's. use valgrind and see :) Thx for tip! valgrind is your friend. learn it. love it. use it. become best friends with it. 3. i might just rename websites button to online - really minor, and websites frame to sources. I agree, it's better. it's minor cosmetic stuff - but makes more sense in english. this stuff can be done as final polishes as its just text label changes. so you need to fix #1 and #2 first :) 3 is minor. now the good. this is fantastic. nice nice nice! i had hoped to eventually get to this - maybe in e18. bringing in online content in a very easy way. vry nice!. :) this of course opens a bit of a floodgate. for now - lets not do themes and other things. lets ONLY make an online wallpaper fetcher and make it good - use it as our prototype/test case. many things here come out of this can of worms. Ok, sounds good for me. 1. http procies. yes libcurl will use HTTP_PROXY environment vars - but there is no way for a user to set this with e - they have to edit their shell env. we probably need to have e be able to set this env var itself from its own config - if the user desires to have a proxy set. a proxy config settign in e and a config module to set it would be good/useful here. 2. no way to add more sites (yet) need this. a user should be able to type in a url, and if the site handles the same RSS feed format and data - then it should work. this would allow for other people to provide their own data feeds online. We need a RSS/ATOM-parsing library for now - keep that code in your patches - but separate it out to be generic and possibly useful being split out later. so for now this can be the testbed for it, but if the api is done well, it can be easily stripped out and made into a library. 3. i'd LOVE to see a way for a user to... SUBMIT content. lets say they make a nice wallpaper of their own - they want to submit it for the repository/feed - they just press the submit button and the code does the rest (does an http post or upload with the data etc.) 4. as suggested bu laurent - being able to vote a wallpaper as good or bad - or any content might be nice. Great ideas, user interaction is very important (web2.0 way) yup - just minus the big fat bulky web browser bloat :) and that - i like :) 5. you want to make a .tmp/ directory in the download dir for the thumbnails/previews. why? AS they download efm will keep getting file changed events and keep trying to generate thumbnails. you want to create an invisible .tmp/ dir and download into there - then when the download is done, rename() (mv) the file from the .tmp dir into the parent. then it will appear in 1 go when done cleanly and efficiently. renames are atomic in unix so this should be exactly what you need I'll try to implement this way after solving bad things 6. this may lead to wanting to make a much more abstracted bit of code for downloading and previewing content. so we could have a core piece of shared code that does the: * rss fetching, caching, parsing and building of a list of content to download * downloading of previews, generating a directory of preview content with filenames and the whole rename() and .tmp dir stuff as well as caching. * downloading of the real content once selected and any download status (progress/whatever) as needed. * handles a generic way to submit content * handles a generic way to add new repositories via a dialog and a user typing in a URL * have a central list of all known repositories also online somewhere (get-e.org or enlightenment.org) and a way for anyone to submit their repo to it. this way users can update/get new repositories whenever they become available. as long as we make it really fast easy to have your repository added without fuss - this should work well. Agree note - i don't see this as a must for e17 - but if this can get done nicely and well before e17 release - i am more than happy to include it. once we have this right and done well for wallpapers we can expand to themes, icons and anything else - even modules (this gets a bit complex as u need to have the module compiled for your particular architecture/os or u have to compile it
Re: [E-devel] Ecore_Fb + libts
On Sun, 20 Jan 2008 03:43:03 +0100 Tobias [EMAIL PROTECTED] babbled: okies! :) included - but i put back the calibration stuff as u need that as mickey said - to write calibration utils. On Sat, 2008-01-19 at 11:41 +1100, Carsten Haitzler wrote: On Sat, 05 Jan 2008 21:02:52 +0100 Tobias [EMAIL PROTECTED] babbled: Hi all, I've played around with Ecore_Fb on my zaurus and I've run into some problems with events getting through to evas. First, there were some comments about libts support in ecore a couple of weeks ago, this libts implementation (ecore_fb_ts_c) seems to be very ipaq specific, and is not used anywhere and deprecated. that's the code compiled if u don't have tslib support. #ifdef HAVE_TSLIB builds the tslib specific code, and otherwise its the old code i wrote originally for my ipaq 3660 touchscreen etc. frankly at the time i didn't abstract it much at all - i was just happy to make it work :) If I'm not mistaken, it does not build the ipaq nor the tslib code, ecore_fb_ts.c is not included in the build at all. I've altered it and attach patches here to enable it again and only support the libts mouse events and remove all the ipaq backlightning,led,brightnes...etc stuff, I've also removed the calibration. seems mostly the patches just remove the old ipaq code (most of whihc is dormant) and only leave the tslib specific code - thats really just a old feature cleanup - not sure how it makes things work as opposed to not work (if u built with tslib support). removing the led blink etc. calls are probably good - it's an ipaq specific thing. but what was wrong? if u had tslib - then it should be using it, not ipaq specific touchscreen stuff? What was wrong was that it was never built at all; currently ecore_fb_ts.c is outcommented in Makefile.am. I wanted to enable it, and I found lots of ipaq specific calls. So I reasoned like this: It is outcommented in Makefile.am, so noone is using it. Tslib is linked in if found, but no code is using it. There are ecore_fb_ functions that only works on ipaq and noone is using them. Why not enable it again and remove the ipaq calls? What the patch does is make ecore_fb_ts_init.c compile again and removes ipaq specific calls. Maybe you want the ipaq code to be outcommented instead? Now ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_*...) events works, but I can't get any evas_object_event_callbacks to work (subsequently edje files don't receive any mouse events either). I've tried evas_event_feed_mouse in an app but I can't get any more events than mouse_in and mouse_out fed to the evas_object. I'm not sure I grok evas_event_feed*. these feed in raw events - ecore_evas_fb should have all that hooked up for you - *IF* it is getting events from ecore_fb at all. i'd printf in ecore_fb when it adds events and see if events are being produced at all. I init the touchscreen at the end of _ecore_evas_fb_init if no mouse is found, if successful event handlers are setup for mouse up/down/move. It works here. New patch attached. /Cheers Tobias -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] {Spam?} [offtopic]
can you please fix your e-mail/isp/whatever sucks ... this {Spam?} in the subject is ridiculous -mike signature.asc Description: This is a digitally signed message part. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E17 under OpenBSD and other goodies.
On Thu, 24 Jan 2008 00:59:08 -0500 Mike Frysinger [EMAIL PROTECTED] babbled: On Wednesday 23 January 2008, Carsten Haitzler wrote: On Wed, 23 Jan 2008 05:11:33 -0800 laurent FANIS --- src/bin/e_fm.c.orig Wed Nov 7 11:45:43 2007 +++ src/bin/e_fm.c Fri Dec 7 15:44:09 2007 @@ -104,7 +104,7 @@ struct _E_Fm2_Smart_Data E_Drop_Handler *drop_handler; E_Fm2_Icon *drop_icon; E_Fm2_Mount*mount; - chardrop_after; + signed char drop_after; unsigned char drop_show : 1; unsigned char drop_in_show : 1; unsigned char drop_all : 1; why? char is normally signed. are you using a strange architecture? i can see how this would break if char is not signed on a particular arch. you cannot rely on the signedness when using char. if there is code that requires it one way or the other, then the type must be explicit. one example of a strange architecture is powerpc ;). char defaults to unsigned char on ppc systems. yeah - though generally i rarely use short/char AND use negative numbers with them, so it is highly rare to hit this. :) -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel