Enlightenment CVS committal

Author  : mej
Project : eterm
Module  : Eterm

Dir     : eterm/Eterm/src


Modified Files:
        command.c screen.c screen.h 


Log Message:
Mon Dec 20 14:31:33 2004                        Michael Jennings (mej)

Okay, so my first problem was that I didn't pay close enough attention
to the iconv_open() man page and got the parameter order wrong.  Duh.
Thanks to Sytse Wielinga <[EMAIL PROTECTED]> for
noticing that.

kwo suggested using XmbDrawString(), but that causes font problems I'm
not ready to diagnose just yet.
----------------------------------------------------------------------

===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/command.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- command.c   18 Dec 2004 19:04:12 -0000      1.103
+++ command.c   20 Dec 2004 19:36:59 -0000      1.104
@@ -34,7 +34,7 @@
  * he guarantee anything whatsoever.
  *----------------------------------------------------------------------*/
 
-static const char cvs_ident[] = "$Id: command.c,v 1.103 2004/12/18 19:04:12 
swielinga Exp $";
+static const char cvs_ident[] = "$Id: command.c,v 1.104 2004/12/20 19:36:59 
mej Exp $";
 
 /* includes: */
 #include "config.h"
@@ -3506,7 +3506,7 @@
             }
             D_SCREEN(("Adding %d lines (%d chars); str == %8p, cmdbuf_ptr == 
%8p, cmdbuf_endp == %8p\n",
                       nlines, cmdbuf_ptr - str, str, cmdbuf_ptr, cmdbuf_endp));
-#if FIXME_BLOCK
+#if !FIXME_BLOCK
             /* 
              * iconv() is not my friend. :-( I've tried various things
              * to make this work (including UCS2, SJIS, EUCJ, and
@@ -3530,17 +3530,17 @@
                     char *outbuff, *pinbuff, *poutbuff;
                     wchar_t *wcbuff;
                     mbstate_t mbs;
-                    size_t bufflen, outlen = 0, outbufflen, retval;
+                    size_t bufflen, outlen = 0, retval;
 
                     pinbuff = (char *) str;
                     bufflen = cmdbuf_ptr - str;
-                    outbufflen = outlen = bufflen * 6;
+                    outlen = bufflen * 6;
                     poutbuff = outbuff = SPIF_CAST_C(char *) MALLOC(outlen);
                     errno = 0;
                     D_VT(("Allocated output buffer of %lu chars at %010p 
against input buffer of %lu\n", bufflen * 6, outbuff, bufflen));
                     print_warning("Moo:  %s\n", safe_print_string(str, 
bufflen));
                     retval = iconv(handle, &pinbuff, &bufflen, &poutbuff, 
&outlen);
-                    outlen = outbufflen - outlen;
+                    outlen = (size_t) (poutbuff - outbuff);
                     if (retval != (size_t) -1) {
                         errno = 0;
                     }
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/screen.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- screen.c    17 Dec 2004 21:37:38 -0000      1.79
+++ screen.c    20 Dec 2004 19:37:00 -0000      1.80
@@ -3,7 +3,7 @@
  *
  */
 
-static const char cvs_ident[] = "$Id: screen.c,v 1.79 2004/12/17 21:37:38 mej 
Exp $";
+static const char cvs_ident[] = "$Id: screen.c,v 1.80 2004/12/20 19:37:00 mej 
Exp $";
 
 #include "config.h"
 #include "feature.h"
@@ -1682,8 +1682,13 @@
 
     XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
 
+#if FIXME_BLOCK
+    draw_string = XmbDrawString;
+    draw_image_string = XmbDrawImageString;
+#else
     draw_string = XDrawString;
     draw_image_string = XDrawImageString;
+#endif
 
     BOUND(screen.row, 0, TERM_WINDOW_GET_REPORTED_ROWS() - 1);
     BOUND(screen.col, 0, TERM_WINDOW_GET_REPORTED_COLS() - 1);
@@ -1768,8 +1773,13 @@
                     if (!wbyte) {
                         wbyte = 1;
                         XSetFont(Xdisplay, TermWin.gc, TermWin.mfont->fid);
+# if FIXME_BLOCK
+                        draw_string = XmbDrawString;
+                        draw_image_string = XmbDrawImageString;
+# else
                         draw_string = XDrawString16;
                         draw_image_string = XDrawImageString16;
+# endif
                     }
                     /* double stepping - we're in Multibyte mode */
                     for (; ++col < ncols;) {
@@ -1806,8 +1816,13 @@
                     if (wbyte) {
                         wbyte = 0;
                         XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
+# if FIXME_BLOCK
+                        draw_string = XmbDrawString;
+                        draw_image_string = XmbDrawImageString;
+# else
                         draw_string = XDrawString;
                         draw_image_string = XDrawImageString;
+# endif
                     }
 #endif
                     /* single stepping - `normal' mode */
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/screen.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- screen.h    17 Dec 2004 21:37:39 -0000      1.31
+++ screen.h    20 Dec 2004 19:37:04 -0000      1.32
@@ -59,7 +59,11 @@
                                                             if (y1 < low_y) 
low_y = y1; if (y2 > high_y) high_y = y2;}} while (0)
 #define ERASE_ROWS(row, num)  do {XFillRectangle(Xdisplay, draw_buffer, 
TermWin.gc, Col2Pixel(0), Row2Pixel(row), TERM_WINDOW_GET_WIDTH(), 
Height2Pixel(num)); \
                                   if (buffer_pixmap) {XClearArea(Xdisplay, 
TermWin.vt, Col2Pixel(0), Row2Pixel(row), TERM_WINDOW_GET_WIDTH(), 
Height2Pixel(num), 0);}} while (0)
-#define DRAW_STRING(Func, x, y, str, len)  Func(Xdisplay, draw_buffer, 
TermWin.gc, x, y, str, len)
+#if 0
+# define DRAW_STRING(Func, x, y, str, len)  Func(Xdisplay, draw_buffer, 
TermWin.fontset, TermWin.gc, x, y, str, len)
+#else
+# define DRAW_STRING(Func, x, y, str, len)  Func(Xdisplay, draw_buffer, 
TermWin.gc, x, y, str, len)
+#endif
 
 /* Make bold if bold flag is set and either we're drawing the foreground color 
or we're not suppressing bold.
    In other words, the foreground color can always be bolded, but other colors 
can't if bold is suppressed. */




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to