Re: [E-devel] E CVS: libs/evas raster
On Wed, 1 Nov 2006 07:56:12 -0500 (EST), Enlightenment CVS [EMAIL PROTECTED] wrote : Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_font_main.c Log Message: evas utf8 patch broke e17's about box. revert Oops.. evas_common_font_utf8_get_prev() was indeed broken. Here is a new patch that fixes that. I agree that for window titles, it would be better to detect the encoding and then to convert it to UTF-8 but there is some cases where you can not know for sure the encoding used (as I said, media metadata, subtitles, or even filenames). For example, without this patch, with the file manager of e17, the accented filenames on my Fat32 partition are cut off. Simon--- evas_font_main.orig.c 2006-09-06 09:33:40.0 +0200 +++ evas_font_main.c 2006-11-01 15:45:44.0 +0100 @@ -120,34 +120,34 @@ * the decoded code point at iindex offset, and advances iindex * to the next code point after this. * -* Returns 0 to indicate an error (e.g. invalid UTF8) +* Returns 0 to indicate there is no next char */ - int index = *iindex, r; + int index = *iindex, len, r; unsigned char d, d2, d3, d4; d = buf[index++]; if (!d) return 0; - if (d 0x80) + + while (buf[index] ((buf[index] 0xc0) == 0x80)) + index++; + len = index - *iindex; + + if (len == 1) + r = d; + else if (len == 2) { - *iindex = index; - return d; - } - if ((d 0xe0) == 0xc0) - { - /* 2 byte */ - if (((d2 = buf[index++]) 0xc0) != 0x80) - return 0; + /* 2 bytes */ +d2 = buf[*iindex + 1]; r = d 0x1f; /* copy lower 5 */ r = 6; r |= (d2 0x3f); /* copy lower 6 */ } - else if ((d 0xf0) == 0xe0) + else if (len == 3) { - /* 3 byte */ - if (((d2 = buf[index++]) 0xc0) != 0x80 || - ((d3 = buf[index++]) 0xc0) != 0x80) - return 0; + /* 3 bytes */ +d2 = buf[*iindex + 1]; +d3 = buf[*iindex + 2]; r = d 0x0f; /* copy lower 4 */ r = 6; r |= (d2 0x3f); @@ -156,11 +156,10 @@ } else { - /* 4 byte */ - if (((d2 = buf[index++]) 0xc0) != 0x80 || - ((d3 = buf[index++]) 0xc0) != 0x80 || - ((d4 = buf[index++]) 0xc0) != 0x80) - return 0; + /* 4 bytes */ +d2 = buf[*iindex + 1]; +d3 = buf[*iindex + 2]; +d4 = buf[*iindex + 3]; r = d 0x0f; /* copy lower 4 */ r = 6; r |= (d2 0x3f); @@ -169,6 +168,7 @@ r = 6; r |= (d4 0x3f); } + *iindex = index; return r; } @@ -177,37 +177,37 @@ evas_common_font_utf8_get_prev(unsigned char *buf, int *iindex) { /* Reads UTF8 bytes from @buf, starting at [EMAIL PROTECTED] and returns -* the decoded code point at iindex offset, and advances iidnex -* to the next code point after this. +* the decoded code point at iindex offset, and advances iindex +* to the prev code point after this. * -* Returns 0 to indicate an error (e.g. invalid UTF8) +* Returns 0 to indicate there is no prev char */ - int index = *iindex, r, istart = *iindex; + int index = *iindex, len, r; unsigned char d, d2, d3, d4; - d = buf[index++]; - if (d 0x80) - { - r = d; - } - else if ((d 0xe0) == 0xc0) + if (iindex = 0) + return 0; + d = buf[index--]; + + while ((index 0) ((buf[index] 0xc0) == 0x80)) + index--; + len = *iindex - index; + + if (len == 1) + r = d; + else if (len == 2) { - /* 2 byte */ - d2 = buf[index++]; - if ((d2 0xc0) != 0x80) - return 0; + /* 2 bytes */ +d2 = buf[index + 1]; r = d 0x1f; /* copy lower 5 */ r = 6; r |= (d2 0x3f); /* copy lower 6 */ } - else if ((d 0xf0) == 0xe0) + else if (len == 3) { - /* 3 byte */ - d2 = buf[index++]; - d3 = buf[index++]; - if ((d2 0xc0) != 0x80 || - (d3 0xc0) != 0x80) - return 0; + /* 3 bytes */ +d2 = buf[index + 1]; +d3 = buf[index + 2]; r = d 0x0f; /* copy lower 4 */ r = 6; r |= (d2 0x3f); @@ -216,14 +216,10 @@ } else { - /* 4 byte */ - d2 = buf[index++]; - d3 = buf[index++]; - d4 = buf[index++]; - if ((d2 0xc0) != 0x80 || - (d3 0xc0) != 0x80 || - (d4 0xc0) != 0x80) - return 0; + /* 4 bytes */ +d2 = buf[index + 1]; +d3 = buf[index + 2]; +d4 = buf[index + 3]; r = d 0x0f; /* copy lower 4 */ r = 6; r |= (d2 0x3f); @@ -232,30 +228,8 @@ r = 6; r |= (d4 0x3f); } - if (istart 0) - { - index = istart - 1; - d = buf[index]; - if (!(d 0x80)) - *iindex = index; - else - { - while (index 0) - { - index--; - d = buf[index]; - if ((d 0xc0) != 0x80) - { - *iindex = index; - return r; - } - } - } - } - else - { - *iindex = -1; - } + + *iindex = index; return r; } - Using
Re: [E-devel] e17 freeze on App execution error dialog and segfaults
On Thu, 2 Nov 2006 00:52:38 +1000 David Seikel [EMAIL PROTECTED] wrote On Wed, 1 Nov 2006 16:33:40 +0200 blak [EMAIL PROTECTED] wrote: I have a problem with mplayer. When I close mplayer e17 freeze for about 10 seconds and after that I get App execution error dialog when i try to save message e17 segfaults. As I looked mplayer returns very long error string and probably it is problem reason. I sent gdb output and it seems that buffer string is messed. Your copy of e_apps_error.c does not look up to date. Other things might be out of date to. Please update everything and try again. I update e17 and efl. Now e17 freeze only for 5 seconds :) and it still segfaults when I try to save error message. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] e17 freeze on App execution error dialog and segfaults
On Thu, 2 Nov 2006 08:39:20 +1000 David Seikel [EMAIL PROTECTED] wrote On Thu, 2 Nov 2006 00:35:43 +0200 blak [EMAIL PROTECTED] wrote: On Thu, 2 Nov 2006 00:52:38 +1000 David Seikel [EMAIL PROTECTED] wrote On Wed, 1 Nov 2006 16:33:40 +0200 blak [EMAIL PROTECTED] wrote: I have a problem with mplayer. When I close mplayer e17 freeze for about 10 seconds and after that I get App execution error dialog when i try to save message e17 segfaults. As I looked mplayer returns very long error string and probably it is problem reason. I sent gdb output and it seems that buffer string is messed. Your copy of e_apps_error.c does not look up to date. Other things might be out of date to. Please update everything and try again. I update e17 and efl. Now e17 freeze only for 5 seconds :) and it still segfaults when I try to save error message. Can you get a back trace for us? Here is new bt, but it seems the same. P.S I put here and also attach log file. #0 0xb7a00d28 in ___newselect_nocancel () from /lib/tls/libc.so.6 #1 0xb7ab7662 in _XWaitForReadable () from /usr/X11R6/lib/libX11.so.6 #2 0xb7ab7a65 in _XRead () from /usr/X11R6/lib/libX11.so.6 #3 0xb7ab9994 in _XReadEvents () from /usr/X11R6/lib/libX11.so.6 #4 0xb7aa7ba8 in XNextEvent () from /usr/X11R6/lib/libX11.so.6 #5 0x080cc856 in e_alert_show ( text=0x8145314 This is very bad. Enlightenment has segfaulted.\nThis is not meant to happen and is likely a sign of a\nbug in Enlightenment or the libraries it relies on.\n\nYou can gdb attach to this process now to try...) at e_alert.c:129 #6 0x080b4caf in e_sigseg_act (x=11, info=0xbfeb862c, data=0xbfeb86ac) at e_signals.c:53 #7 signal handler called #8 0x0810f2ef in _dialog_save_cb (data=0x81c3100, data2=0x827ba10) at e_apps_error.c:353 #9 0x080d8e9b in _e_wid_activate_hook (obj=0x8395f60) at e_widget_button.c:131 #10 0x080d8f3e in _e_wid_signal_cb1 (data=0x8395f60, obj=0x83960e8, emission=0x82a3f80 e,action,click, source=0xb7fd12f2 ) at e_widget_button.c:154 #11 0xb7fc4da6 in _edje_emit_cb (ed=0x8396208, sig=0x82a3f80 e,action,click, src=0xb7fd12f2 ) at edje_program.c:875 #12 0xb7fc4c91 in _edje_emit_handle (ed=0x8396208, sig=0x82a3f80 e,action,click, src=0xb7fd12f2 ) at edje_program.c:843 #13 0xb7fcdd2c in _edje_message_process (em=0x82a9538) at edje_message_queue.c:433 #14 0xb7fce2d4 in _edje_message_queue_process () at edje_message_queue.c:605 #15 0xb7fcd50f in _edje_job (data=0x0) at edje_message_queue.c:99 #16 0xb7f768b6 in _ecore_job_event_handler (data=0x0, type=76, ev=0x82a9510) at ecore_job.c:75 #17 0xb7f238e4 in _ecore_event_call () at ecore_events.c:430 #18 0xb7f2ab2f in _ecore_main_loop_iterate_internal (once_only=0) at ecore_main.c:639 #19 0xb7f29ca1 in ecore_main_loop_begin () at ecore_main.c:79 #20 0x08067463 in main (argc=1, argv=0xbfeed574) at e_main.c:825 #8 0x0810f2ef in _dialog_save_cb (data=0x81c3100, data2=0x827ba10) at e_apps_error.c:353 353 for (i = 0; app-read-lines[i].line != NULL; i++) 348tlen += app-read-lines[i].size + 1; 349 text = alloca(tlen + 1); 350 if (text) 351 { 352text[0] = 0; 353for (i = 0; app-read-lines[i].line != NULL; i++) 354 { 355 strcat(text, \t); 356 strcat(text, app-read-lines[i].line); 357 strcat(text, \n); $1 = 774793070 The program is running. Quit anyway (and detach it)? (y or n) Detaching from program: /usr/bin/enlightenment, process 3344 #0 0xb7a00d28 in ___newselect_nocancel () from /lib/tls/libc.so.6 #1 0xb7ab7662 in _XWaitForReadable () from /usr/X11R6/lib/libX11.so.6 #2 0xb7ab7a65 in _XRead () from /usr/X11R6/lib/libX11.so.6 #3 0xb7ab9994 in _XReadEvents () from /usr/X11R6/lib/libX11.so.6 #4 0xb7aa7ba8 in XNextEvent () from /usr/X11R6/lib/libX11.so.6 #5 0x080cc856 in e_alert_show ( text=0x8145314 This is very bad. Enlightenment has segfaulted.\nThis is not meant to happen and is likely a sign of a\nbug in Enlightenment or the libraries it relies on.\n\nYou can gdb attach to this process now to try...) at e_alert.c:129 #6 0x080b4caf in e_sigseg_act (x=11, info=0xbfeb862c, data=0xbfeb86ac) at e_signals.c:53 #7 signal handler called #8 0x0810f2ef in _dialog_save_cb (data=0x81c3100, data2=0x827ba10) at e_apps_error.c:353 #9 0x080d8e9b in _e_wid_activate_hook (obj=0x8395f60) at e_widget_button.c:131 #10 0x080d8f3e in _e_wid_signal_cb1 (data=0x8395f60, obj=0x83960e8, emission=0x82a3f80 e,action,click, source=0xb7fd12f2 ) at e_widget_button.c:154 #11 0xb7fc4da6 in _edje_emit_cb (ed=0x8396208, sig=0x82a3f80 e,action,click, src=0xb7fd12f2 ) at edje_program.c:875 #12 0xb7fc4c91 in _edje_emit_handle (ed=0x8396208, sig=0x82a3f80 e,action,click, src=0xb7fd12f2 ) at edje_program.c:843 #13 0xb7fcdd2c in _edje_message_process (em=0x82a9538) at edje_message_queue.c:433 #14 0xb7fce2d4 in _edje_message_queue_process () at
Re: [E-devel] Evas Utf-8 patch
On Wed, 1 Nov 2006 11:47:41 GMT [EMAIL PROTECTED] [EMAIL PROTECTED] babbled: Carsten writes: the real solution is to know the encoding of the title string if it is not already a utf8 one - and convert. Yes. It's a 'slippery slope' to do otherwise.. one could argue eg. for having evas convert to/fro every iso-whatnot, etc. It would really be better if this were done 'higher up', and fed to evas as utf8. exactly. thats my point. evas is not being fed utf8. it expects utf8. it has only 1 string format it handles - it makes life easy that way. it is up to whatever is using evas to convert to/from utf8 for evas. :) jose. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 Tokyo, Japan (東京 日本) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel