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 <s.b.wielinga@student.utwente.nl> for noticing that. kwo suggested using XmbDrawString(), but that causes font problems I'm not ready to diagnose just yet. ---------------------------------------------------------------------- SVN revision: 12526
This commit is contained in:
parent
11356eeb96
commit
3c059ee512
10
ChangeLog
10
ChangeLog
|
@ -5279,3 +5279,13 @@ someone can help me out.
|
|||
If you know iconv(), please have a look at the FIXME_BLOCK starting at
|
||||
line 3509 of src/command.c.
|
||||
----------------------------------------------------------------------
|
||||
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 <s.b.wielinga@student.utwente.nl> for
|
||||
noticing that.
|
||||
|
||||
kwo suggested using XmbDrawString(), but that causes font problems I'm
|
||||
not ready to diagnose just yet.
|
||||
----------------------------------------------------------------------
|
||||
|
|
|
@ -3506,7 +3506,7 @@ main_loop(void)
|
|||
}
|
||||
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 @@ main_loop(void)
|
|||
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;
|
||||
}
|
||||
|
|
15
src/screen.c
15
src/screen.c
|
@ -1682,8 +1682,13 @@ scr_refresh(int type)
|
|||
|
||||
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 @@ scr_refresh(int type)
|
|||
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 @@ scr_refresh(int type)
|
|||
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 */
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue