#include <X11/Xatom.h>
#endif /* __MAKEDEPEND__ */
-
+#include <iconv.h>
/*
* Include some helpful X11 code.
*/
Infokfnt->info, Infofnt->wid * 2);
#else
#ifdef USE_FONTSET
+
+ iconv_t cd = iconv_open("UTF-8", "EUC-JP");
+ size_t inlen = len;
+ size_t outlen = len * 2;
+ char *kanji = malloc(outlen);
+ char *sp; char *kp = kanji;
+ char sbuf[1024];
+ my_strcpy(sbuf, str, sizeof(sbuf));
+ sp = sbuf;
+ iconv(cd, &sp, &inlen, &kp, &outlen);
+ iconv_close(cd);
+
XmbDrawImageString(Metadpy->dpy, Infowin->win, Infofnt->info,
- Infoclr->gc, x, y, str, len);
+ Infoclr->gc, x, y, kanji, kp-kanji);
+ free(kanji);
#else
XDrawImageString(Metadpy->dpy, Infowin->win, Infoclr->gc,
x, y, str, len);
char buf[1024];
char *list[1000];
co_ord max, min;
- int x,y,l,n;
- byte a;
+ TERM_LEN x,y;
+ int l,n;
+ TERM_COLOR a;
char c;
/* Too old, or incorrect call. */
/*
* Draw some textual characters.
*/
-static errr Term_text_x11(int x, int y, int n, byte a, cptr s)
+static errr Term_text_x11(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s)
{
/* Draw the text */
Infoclr_set(clr[a]);
/*
* Draw some graphical characters.
*/
-static errr Term_pict_x11(int x, int y, int n, const byte *ap, const char *cp, const byte *tap, const char *tcp)
+static errr Term_pict_x11(TERM_LEN x, TERM_LEN y, int n, const TERM_COLOR *ap, const char *cp, const TERM_COLOR *tap, const char *tcp)
{
int i, x1, y1;
- byte a;
+ TERM_COLOR a;
char c;
- byte ta;
+ TERM_COLOR ta;
char tc;
int x2, y2;