aboutsummaryrefslogtreecommitdiff
path: root/japanese
diff options
context:
space:
mode:
authorYukihiro Nakai <nakai@FreeBSD.org>2000-10-30 13:55:28 +0000
committerYukihiro Nakai <nakai@FreeBSD.org>2000-10-30 13:55:28 +0000
commit3d6b18a12d917bbf2d900d72a253e50f6e1cf170 (patch)
tree332241b267d910dfce7b68381e56e9b531d036a7 /japanese
parentfe9a45097110b0e072c569b78008fddef775442e (diff)
downloadports-3d6b18a12d917bbf2d900d72a253e50f6e1cf170.tar.gz
ports-3d6b18a12d917bbf2d900d72a253e50f6e1cf170.zip
Notes
Diffstat (limited to 'japanese')
-rw-r--r--japanese/Makefile1
-rw-r--r--japanese/gnomelibs/Makefile18
-rw-r--r--japanese/gnomelibs/files/patch-aa21
-rw-r--r--japanese/gnomelibs/files/patch-ab12
-rw-r--r--japanese/gnomelibs/files/patch-ac20
-rw-r--r--japanese/gnomelibs/files/patch-ad61
-rw-r--r--japanese/gnomelibs/files/patch-ae154
-rw-r--r--japanese/gnomelibs/files/patch-af160
-rw-r--r--japanese/gnomelibs/files/patch-ag32
-rw-r--r--japanese/gnomelibs/files/patch-ah24
-rw-r--r--japanese/gnomelibs/files/patch-ai528
-rw-r--r--japanese/gnomelibs/files/patch-aj21
-rw-r--r--japanese/gnomelibs/files/patch-ak20
-rw-r--r--japanese/gnomelibs/files/patch-al328
-rw-r--r--japanese/gnomelibs/files/patch-am23
-rw-r--r--japanese/gnomelibs/files/patch-an89
-rw-r--r--japanese/gnomelibs/files/patch-ao16
-rw-r--r--japanese/gnomelibs/files/patch-ap29
-rw-r--r--japanese/gnomelibs/files/patch-aq13
-rw-r--r--japanese/gnomelibs/files/patch-ar10
20 files changed, 1580 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile
index c19ab42e0c76..8034b265a6da 100644
--- a/japanese/Makefile
+++ b/japanese/Makefile
@@ -62,6 +62,7 @@
SUBDIR += gn-gnspool
SUBDIR += gn-mnews
SUBDIR += gnomeicu
+ SUBDIR += gnomelibs
SUBDIR += gp
SUBDIR += grep
SUBDIR += groff
diff --git a/japanese/gnomelibs/Makefile b/japanese/gnomelibs/Makefile
new file mode 100644
index 000000000000..2462828fd006
--- /dev/null
+++ b/japanese/gnomelibs/Makefile
@@ -0,0 +1,18 @@
+# New ports collection makefile for: Japanese gnome-libs
+# Date created: 28 October 2000
+# Whom: Yukihiro Nakai <nakai@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+# This port does not work with another version of master port.
+#PORTVERSION= 1.2.8
+CATEGORIES= japanese x11 gnome
+
+MASTERDIR= ${.CURDIR}/../../x11/gnomelibs
+
+EXTRA_PATCHES= ${.CURDIR}/files/patch-*
+
+MAINTAINER= nakai@FreeBSD.org
+
+.include "${MASTERDIR}/Makefile"
diff --git a/japanese/gnomelibs/files/patch-aa b/japanese/gnomelibs/files/patch-aa
new file mode 100644
index 000000000000..4e81c73bc057
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-aa
@@ -0,0 +1,21 @@
+--- libgnomeui/gnome-druid-page-finish.c.orig Sat Jul 22 00:37:59 2000
++++ libgnomeui/gnome-druid-page-finish.c Sun Oct 29 19:23:55 2000
+@@ -205,7 +205,8 @@
+ gnome_canvas_text_get_type (),
+ "text", druid_page_finish->title,
+ "font", "-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-iso8859-1",
+- "fontset", "-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-iso8859-1,*-r-*",
++ "fontset", "-misc-fixed-medium-r-normal--
++14-*-*-*-*-*-*-*",
+ NULL);
+ druid_page_finish->text_item =
+ gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_finish->canvas)),
+@@ -213,7 +214,7 @@
+ "text", druid_page_finish->text,
+ "justification", GTK_JUSTIFY_LEFT,
+ "font", "-adobe-helvetica-medium-r-normal-*-*-120-*-*-p-*-iso8859-1",
+- "fontset", "-adobe-helvetica-medium-r-normal-*-*-120-*-*-p-*-iso8859-1,*-r-*",
++ "fontset", "-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*",
+ NULL);
+
+ gnome_druid_page_finish_configure_size (druid_page_finish, DRUID_PAGE_WIDTH, DRUID_PAGE_HEIGHT);
diff --git a/japanese/gnomelibs/files/patch-ab b/japanese/gnomelibs/files/patch-ab
new file mode 100644
index 000000000000..4cc0f10cd14d
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ab
@@ -0,0 +1,12 @@
+--- libgnomeui/gnome-druid-page-standard.c.orig Sun Oct 29 18:21:01 2000
++++ libgnomeui/gnome-druid-page-standard.c Sun Oct 29 18:21:19 2000
+@@ -202,7 +202,8 @@
+ gnome_canvas_text_get_type (),
+ "text", druid_page_standard->title,
+ "font", "-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-iso8859-1",
+- "fontset", "-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-iso8859-1,*-r-*",
++ "fontset", "-misc-fixed-medium-r-normal--
++14-*-*-*-*-*-*-*",
+ NULL);
+ gnome_canvas_item_set (druid_page_standard->title_item,
+ "x", 15.0,
diff --git a/japanese/gnomelibs/files/patch-ac b/japanese/gnomelibs/files/patch-ac
new file mode 100644
index 000000000000..728f9de7b7ec
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ac
@@ -0,0 +1,20 @@
+--- libgnomeui/gnome-druid-page-start.c.orig Sun Oct 29 18:18:28 2000
++++ libgnomeui/gnome-druid-page-start.c Sun Oct 29 18:19:43 2000
+@@ -214,7 +214,7 @@
+ gnome_canvas_text_get_type (),
+ "text", druid_page_start->title,
+ "font", "-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-iso8859-1",
+- "fontset", "-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-iso8859-1,*-r-*",
++ "fontset", "-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*",
+ NULL);
+
+ druid_page_start->text_item =
+@@ -223,7 +223,7 @@
+ "text", druid_page_start->text,
+ "justification", GTK_JUSTIFY_LEFT,
+ "font", "-adobe-helvetica-medium-r-normal-*-*-120-*-*-p-*-iso8859-1",
+- "fontset", "-adobe-helvetica-medium-r-normal-*-*-120-*-*-p-*-iso8859-1,*-r-*",
++ "fontset", "-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*",
+ NULL);
+
+ gnome_druid_page_start_configure_size (druid_page_start, DRUID_PAGE_WIDTH, DRUID_PAGE_HEIGHT);
diff --git a/japanese/gnomelibs/files/patch-ad b/japanese/gnomelibs/files/patch-ad
new file mode 100644
index 000000000000..c2770ef0c4a6
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ad
@@ -0,0 +1,61 @@
+--- ./zvt/README.mb.jp2 Sun Oct 29 18:32:20 2000
++++ ./zvt/README.mb Sun Oct 29 18:32:20 2000
+@@ -0,0 +1,58 @@
++*Poor* Multibyte Kanji patch for gnome-zvt.
++
++ Yasuyuki Furukawa <yasu@on.cs.keio.ac.jp>
++
++This patch make gnome-libs to use multibyte
++(ex kanji, Japanese character), and to support "OverTheSpot" Input
++Method.
++
++If you use multibyte characters in the gnome-terminal, you require
++gnome-core-x.y.z-terminal_mb-*.patch, too.
++
++-----------
++ TODO
++-----------
++ - JIS locale support.
++ - JIS curses support in EUC.
++ - integrate UTF and multibyte code.
++ - support half Katakana character(JISX201).
++ - optimize the routine for redrawing in multibyte environment.
++ (DONE at 0.5)
++ - more speedy.
++ (DONE at 0.4)
++
++-----------
++ ChangeLog
++-----------
++* Sun Jan 16 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
++ - Release 0.6 -- bug fix
++ - prevend to be into alt mode with half katakana.
++ - fixed to fail getting of character-wdith in startup.
++
++* Thu Nov 4 1999 Yasuyuki Furukawa <furukawa@vinelinux.org>
++ - Release 0.5 -- a little faster.
++ - update.c (vt_line_update): enable optimize redrawing for
++ multibyte locale. Now more clear for redrawing multibyte
++ character. but there is a problem wheln scrolled dumping.
++
++* Tue Nov 2 1999 Yasuyuki Furukawa <furukawa@vinelinux.org>
++ - Release 0.2 -- bug fix
++ - update.c (vt_line_update): disable optimizing routine for
++ redrawing
++ - zvtterm (zvt_term_convert_selection): fix for selection memory
++ bug in compound_text.
++
++ - Release 0.3 -- a little optimized.
++ - vt.c (vt_query_line_mbchar): more optimize.
++ - zvtterm.c (vt_draw_text): reduce zvt_im_preedit_set_spot() call
++
++ - Release 0.4 -- JIS dumping support in EUC locale.
++ - vt.c (vt_parse_vt): add escape sequence "ESC$B" and "ESC)B".
++ JIS text can be dumped at least.(NOT IN CURSES...)
++
++* Tue Nov 1 1999 Yasuyuki Furukawa <furukawa@vinelinux.org
++ - Release 0.1
++ - update.c, zvtterm.c, vt.c, zterm.c, vt.h, zterm.h: updated for
++ gnome-libs-1.0.54 based on my old kanji patch.
++ old patch is following:
++ http://www.on.cs.keio.ac.jp/~yasu/linux/gnome/
diff --git a/japanese/gnomelibs/files/patch-ae b/japanese/gnomelibs/files/patch-ae
new file mode 100644
index 000000000000..ae60c3e38c7a
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ae
@@ -0,0 +1,154 @@
+--- ./zvt/update.c.jp2 Mon Aug 28 01:22:23 2000
++++ ./zvt/update.c Sun Oct 29 18:32:20 2000
+@@ -170,6 +170,11 @@
+ run++;
+ } else {
+ /* render 'run so far' */
++#ifdef ZVT_MB
++ run = vt_query_line_mbchar(runstart + run, bl);
++ runstart = vt_query_line_mbchar(runstart, bl);
++ run -= runstart;
++#endif
+ vx->draw_text(vx->vt.user_data, bl,
+ line, runstart, run, attr);
+ vx->back_match = always?0:
+@@ -197,6 +202,11 @@
+ /* check for runs of common characters, if they are short, then
+ use them */
+ if (commonrun>VT_THRESHHOLD || (newattr!=attr)) {
++#ifdef ZVT_MB
++ run = vt_query_line_mbchar(runstart + run, bl);
++ runstart = vt_query_line_mbchar(runstart, bl);
++ run -= runstart;
++#endif
+ vx->draw_text(vx->vt.user_data, bl,
+ line, runstart, run, attr);
+ run=0;
+@@ -205,6 +215,11 @@
+ commonrun++;
+ }
+ #else
++#ifdef ZVT_MB
++ run = vt_query_line_mbchar(runstart + run, bl);
++ runstart = vt_query_line_mbchar(runstart, bl);
++ run -= runstart;
++#endif
+ vx->draw_text(vx->vt.user_data, bl,
+ line, runstart, run, attr);
+ run=0;
+@@ -215,6 +230,11 @@
+ }
+
+ if (run) {
++#ifdef ZVT_MB
++ run = vt_query_line_mbchar(runstart + run, bl);
++ runstart = vt_query_line_mbchar(runstart, bl);
++ run -= runstart;
++#endif
+ vx->draw_text(vx->vt.user_data, bl,
+ line, runstart, run, attr);
+ }
+@@ -677,7 +697,14 @@
+ while (nn && line<vx->vt.height) {
+ d(printf("%p: scanning line %d, was %d\n", wn, line, wn->line));
+ if (wn->line==-1) {
++#ifdef ZVT_MB
++ /* FIXME:
++ Current vt_line_update() have a problem for multibyte character,
++ so, we must update with a force argument. */
++ vt_line_update(vx, wn, bl, line, 1, 0, bl->width);
++#else
+ vt_line_update(vx, wn, bl, line, 0, 0, bl->width);
++#endif
+ d(printf("manual: updating line %d\n", line));
+ } else if (wn->modcount || update_state) {
+ vt_line_update(vx, wn, bl, line, force, 0, bl->width);
+@@ -772,6 +799,12 @@
+
+ if (wn) {
+ nn = wn->next;
++#ifdef ZVT_MB
++ /* query start/end range for multibyte */
++ csx = vt_query_line_mbchar(csx, wn);
++ cex = vt_query_line_mbchar(cex, wn);
++#endif
++
+ while ((csy<=cey) && nn) {
+ d(printf("updating line %d\n", csy));
+
+@@ -965,6 +998,12 @@
+ ex++;
+ }
+
++#ifdef ZVT_MB
++ /* arranged selection columns (sx and ex) for multibyte character */
++ sx = vt_query_line_mbchar(sx,s);
++ ex = vt_query_line_mbchar(ex,e);
++#endif
++
+ if ( ((vx->selstarty == vx->selendy) && (vx->selstartx > vx->selendx)) ||
+ (vx->selstarty > vx->selendy) ) {
+ vx->selstartx = ex; /* swap end/start values */
+@@ -998,6 +1037,9 @@
+ }
+ }
+
++#ifdef ZVT_MB
++ if (!(l->data[dataend] & VTATTR_MULTIBYTE))
++#endif
+ if (end>dataend) {
+ lf = 1; /* we selected past the end of the line */
+ end = dataend;
+@@ -1011,6 +1053,9 @@
+ case 2: {
+ unsigned short *o = (unsigned short *)out;
+ for (i=start;i<end;i++) {
++#ifdef ZVT_MB
++ if ((l->data[i] & VTATTR_MULTIBYTE)) continue;
++#endif
+ c = l->data[i] & VTATTR_DATAMASK;
+ if (state==0) {
+ if (c==0x09)
+@@ -1037,6 +1082,9 @@
+ case 4: {
+ unsigned int *o = (unsigned int *)out;
+ for (i=start;i<end;i++) {
++#ifdef ZVT_MB
++ if ((l->data[i] & VTATTR_MULTIBYTE)) continue;
++#endif
+ c = l->data[i] & VTATTR_DATAMASK;
+ if (state==0) {
+ if (c==0x09)
+@@ -1062,6 +1110,9 @@
+ default: {
+ unsigned char *o = out;
+ for (i=start;i<end;i++) {
++#ifdef ZVT_MB
++ if ((l->data[i] & VTATTR_MULTIBYTE)) continue;
++#endif
+ c = l->data[i] & VTATTR_DATAMASK;
+ if (state==0) {
+ if (c==0x09)
+@@ -1288,9 +1339,13 @@
+ void vt_draw_cursor(struct _vtx *vx, int state)
+ {
+ uint32 attr;
++ gint len = 1;
+
+ if (vx->vt.scrollbackold == 0 && vx->vt.cursorx<vx->vt.width) {
+ attr = vx->vt.this_line->data[vx->vt.cursorx];
++#ifdef ZVT_MB
++ len = vt_line_mblen(vx->vt.cursorx, vx->vt.this_line);
++#endif /* ZVT_MB */
+ if (state && (vx->vt.mode & VTMODE_BLANK_CURSOR)==0) { /* must swap fore/background colour */
+ attr = (((attr & VTATTR_FORECOLOURM) >> VTATTR_FORECOLOURB) << VTATTR_BACKCOLOURB)
+ | (((attr & VTATTR_BACKCOLOURM) >> VTATTR_BACKCOLOURB) << VTATTR_FORECOLOURB)
+@@ -1299,7 +1354,7 @@
+ vx->back_match=0; /* forces re-draw? */
+ vx->draw_text(vx->vt.user_data,
+ vx->vt.this_line,
+- vx->vt.cursory, vx->vt.cursorx, 1, attr);
++ vx->vt.cursory, vx->vt.cursorx, len, attr);
+ }
+ }
+
diff --git a/japanese/gnomelibs/files/patch-af b/japanese/gnomelibs/files/patch-af
new file mode 100644
index 000000000000..13a4f24e2f3c
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-af
@@ -0,0 +1,160 @@
+--- ./zvt/vt.c.jp2 Sat Mar 18 16:57:13 2000
++++ ./zvt/vt.c Sun Oct 29 18:32:20 2000
+@@ -109,6 +109,62 @@
+
+ #endif
+
++#ifdef ZVT_MB
++/*
++ return multibyte character length in vt line
++*/
++int vt_line_mblen(int x, struct vt_line *l)
++{
++ unsigned char ctmp[MB_CUR_MAX];
++ int len = 1, i;
++
++ /* arranged selection columns (sx and ex) for multibyte character */
++ if (MB_CUR_MAX >= 2) {
++ for (i = 0; i < MB_CUR_MAX; i++)
++ if (x+i <= l->width)
++ ctmp[i] = l->data[x+i] & 0xff;
++ else
++ ctmp[i] = 0;
++ len = mblen(ctmp, MB_CUR_MAX);
++ if (len <= 0) len = 1;
++ }
++
++ return(len);
++}
++
++int vt_query_line_mbchar(int x, struct vt_line *l)
++{
++ unsigned char ctmp[MB_CUR_MAX];
++ int xx = x, len = 1, i;
++
++ if (x == 0 || x == l->width) return(x);
++
++ /* arranged selection columns (sx and ex) for multibyte character */
++ if (MB_CUR_MAX >= 2) {
++ if (x > l->width) x = l->width;
++ if (x < 0) x = 0;
++ for (xx = 0; xx < x; xx += len) {
++ if ((l->data[xx] & VTATTR_DATAMASK) <= 0x1f)
++ len = 1; /* control code character */
++ else {
++ for (i = 0; i < MB_CUR_MAX && xx+i < x; i++)
++ ctmp[i] = l->data[xx+i] & VTATTR_DATAMASK;
++ for ( ; i < MB_CUR_MAX; i++)
++ ctmp[i] = 0;
++ len = mblen(ctmp, MB_CUR_MAX);
++ if (len <= 0) {
++ if (xx + 1 != x)
++ len = 1;
++ else
++ break;
++ }
++ }
++ }
++ }
++ return(xx);
++}
++#endif
++
+ /***********************************************************************
+ * Update functions
+ */
+@@ -1444,6 +1500,10 @@
+ struct vt_jump *modes = vtjumps;
+ char *ptr_end;
+ void (*process)(struct vt_em *vt); /* process function */
++#ifdef ZVT_MB
++ unsigned char ctmp[MB_CUR_MAX];
++ int ctmp_num;
++#endif
+
+ /* states:
+ * 0: normal escape mode
+@@ -1516,7 +1576,26 @@
+
+ switch (state) {
+
++#if defined(ZVT_JIS) && defined(ZVT_MB)
++ case 100: /* enter JIS mode */
++ state = (c == 'B')? 101: 0;
++ break;
++ case 110: /* exit JIS mode */
++ state = 0;
++ break;
++ case 101:
++ if (c > 0x1f && c < 0x80 && MB_CUR_MAX >= 2)
++ c += 0x80;
++#endif
+ case 0:
++#ifdef ZVT_MB
++ /* prevent to be into alt mode for half katakana character in EUC-JP */
++ if ((mode & VT_CON) && process == vt_alt_start && (*ptr & 0xff) >= 0xa0) {
++ mode = VT_LIT;
++ process = NULL;
++ }
++#endif
++
+ if (mode & VT_LIT) {
+ /* remap character? */
+ if (vt->remaptable && c<=0xff)
+@@ -1526,17 +1605,43 @@
+ if (vt->mode & VTMODE_INSERT)
+ vt_insert_chars(vt, 1);
+
++#ifdef ZVT_MB
++ ctmp_num = 0;
++#endif
+ /* need to wrap? */
+ if (vt->cursorx>=vt->width) {
+ if (vt->mode&VTMODE_WRAPOFF)
+ vt->cursorx = vt->width-1;
+ else {
++#ifdef ZVT_MB
++ /* check of a boundary of multi byte character */
++ int x = vt_query_line_mbchar(vt->width+1, vt->this_line);
++ if (x < vt->width && vt->width - x < sizeof(ctmp) ) {
++ for(ctmp_num=0; ctmp_num < vt->width - x; ctmp_num++) {
++ int i = vt->width - 1 - ctmp_num;
++ ctmp[ctmp_num] = vt->this_line->data[i] & 0xff;
++ vt->this_line->data[i] =
++ ((vt->attr) & VTATTR_CLEARMASK) |VTATTR_MULTIBYTE;
++ vt->this_line->modcount++;
++ }
++ }
++#endif
+ vt_lf(vt);
+ vt->cursorx=0;
+ }
+ }
+
+ /* output character */
++#ifdef ZVT_MB
++ if (ctmp_num) {
++ while(ctmp_num) {
++ vt->this_line->data[vt->cursorx++] =
++ ((vt->attr) & VTATTR_MASK) | ctmp[ctmp_num-1];
++ ctmp_num--;
++ vt->this_line->modcount++;
++ }
++ }
++#endif
+ vt->this_line->data[vt->cursorx] = ((vt->attr) & VTATTR_MASK) | c;
+ vt->this_line->modcount++;
+ /* d(printf("literal %c\n", c)); */
+@@ -1566,6 +1671,12 @@
+ } else if (c==']') { /* set text parameters, read parameters */
+ state = 4;
+ vt->arg.txt.outptr = vt->arg.txt.args_mem;
++#if defined(ZVT_JIS) && defined(ZVT_MB)
++ } else if (c=='$') { /* in JIS code */
++ state = 100;
++ } else if (c=='(') { /* out JIS mode */
++ state = 110;
++#endif
+ } else if (mode & VT_EXA) {
+ vt->arg.num.intargs[0] = c & 0x7f;
+ state = 5;
diff --git a/japanese/gnomelibs/files/patch-ag b/japanese/gnomelibs/files/patch-ag
new file mode 100644
index 000000000000..b5ac9094ff21
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ag
@@ -0,0 +1,32 @@
+--- ./zvt/vt.h.jp2 Sat Oct 30 03:35:49 1999
++++ ./zvt/vt.h Sun Oct 29 18:32:20 2000
+@@ -28,6 +28,10 @@
+ /* for utf-8 input support */
+ #define ZVT_UTF 1
+
++/* for multibyte support */
++#define ZVT_MB 1
++#define ZVT_JIS 1
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+@@ -71,6 +75,7 @@
+ #define VTATTR_BLINK 0x10000000
+ #define VTATTR_REVERSE 0x08000000
+ #define VTATTR_CONCEALED 0x04000000
++#define VTATTR_MULTIBYTE 0x80000000 /* for multibyte charater */
+
+ /* all attributes mask, and no-attributes mask */
+ #define VTATTR_MASK 0xffff0000
+@@ -207,6 +212,10 @@
+ int vt_killchild (struct vt_em *vt, int signal);
+ int vt_closepty (struct vt_em *vt);
+ void vt_reset_terminal (struct vt_em *vt, int hard);
++#ifdef ZVT_MB
++int vt_line_mblen(int x, struct vt_line *l);
++int vt_query_line_mbchar(int x, struct vt_line *l);
++#endif
+
+ #ifdef __cplusplus
+ }
diff --git a/japanese/gnomelibs/files/patch-ah b/japanese/gnomelibs/files/patch-ah
new file mode 100644
index 000000000000..6909955ccdb3
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ah
@@ -0,0 +1,24 @@
+--- ./zvt/zterm.c.jp2 Sat Mar 18 16:57:13 2000
++++ ./zvt/zterm.c Sun Oct 29 18:32:20 2000
+@@ -41,7 +41,12 @@
+
+ #include "zvtterm.h"
+
+-#define FONT "-misc-fixed-medium-r-normal--12-200-75-75-c-100-iso8859-1"
++
++#ifdef ZVT_MB
++#define FONT "-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*"
++#else
++#define FONT "-misc-fixed-medium-r-normal--14-*-*-*-*-*-iso8859-1"
++#endif
+
+ extern char **environ;
+ static char **env;
+@@ -153,6 +158,7 @@
+ env_copy [winid_pos] = "TEST";
+ env_copy [i] = NULL;
+
++ gtk_set_locale();
+ gtk_init(&argc, &argv);
+
+ /* process arguments */
diff --git a/japanese/gnomelibs/files/patch-ai b/japanese/gnomelibs/files/patch-ai
new file mode 100644
index 000000000000..331a475fc543
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ai
@@ -0,0 +1,528 @@
+--- ./zvt/zvtterm.c.jp2 Tue Oct 24 08:12:43 2000
++++ ./zvt/zvtterm.c Sun Oct 29 18:32:20 2000
+@@ -49,12 +49,15 @@
+ #include <X11/Xatom.h>
+ #include <X11/Xos.h>
+
+-
+ /* define to 'x' to enable copious debug output */
+ #define d(x)
+
+ /* default font */
++#ifndef ZVT_MB
+ #define DEFAULT_FONT "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"
++#else
++#define DEFAULT_FONT "-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-1"
++#endif
+
+ #define PADDING 2
+
+@@ -115,6 +118,12 @@
+ /* load the "current" background, from file or from system */
+ static void load_background (ZvtTerm *term);
+
++#ifdef ZVT_IM_ON_THE_SPOT
++static void zvt_im_preedit_set_spot(ZvtTerm *term, int col, int row, int offx, int offy);
++static void zvt_im_preedit_set_foreground(ZvtTerm *term, GdkColor *color);
++static void zvt_im_preedit_set_background(ZvtTerm *term, GdkColor *color);
++static void zvt_im_preedit_set_font(ZvtTerm *term, GdkFont *font);
++#endif
+
+ /* static data */
+
+@@ -146,6 +155,13 @@
+ };
+ static guint term_signals[LAST_SIGNAL] = { 0 };
+
++/* values for selection info */
++enum {
++ TARGET_STRING,
++ TARGET_UTF8,
++ TARGET_TEXT,
++ TARGET_COMPOUND_TEXT
++};
+
+ /* GTK parent class */
+ static GtkWidgetClass *parent_class = NULL;
+@@ -237,6 +253,17 @@
+ zvt_term_init (ZvtTerm *term)
+ {
+ struct _zvtprivate *zp;
++ static const GtkTargetEntry targets[] = {
++ { "STRING", 0, TARGET_STRING },
++#ifdef ZVT_UTF
++ { "UTF-8", 0, TARGET_UTF8 },
++#endif
++#ifdef ZVT_MB
++ { "TEXT", 0, TARGET_TEXT },
++ { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT }
++#endif
++ };
++ static const gint n_targets = sizeof(targets) / sizeof(targets[0]);
+
+ GTK_WIDGET_SET_FLAGS (term, GTK_CAN_FOCUS);
+
+@@ -329,19 +356,9 @@
+ term);
+
+ /* selection received */
+- gtk_selection_add_target (
+- GTK_WIDGET (term),
+- GDK_SELECTION_PRIMARY,
+- GDK_SELECTION_TYPE_STRING,
+- 0);
+-#ifdef ZVT_UTF
+- gtk_selection_add_target (
+- GTK_WIDGET (term),
+- GDK_SELECTION_PRIMARY,
+- gdk_atom_intern ("UTF-8", FALSE),
+- 1);
+-#endif
+-
++ gtk_selection_add_targets (GTK_WIDGET (term),
++ GDK_SELECTION_PRIMARY,
++ targets, n_targets);
+ }
+
+ /**
+@@ -666,6 +683,11 @@
+ clone_col(&zp->queue_red, 0);
+ clone_col(&zp->queue_green, 0);
+ clone_col(&zp->queue_blue, 0);
++#ifdef ZVT_IM_ON_THE_SPOT
++ zvt_im_preedit_set_background(term, &c);
++ c.pixel = term->colors [16];
++ zvt_im_preedit_set_foreground(term, &c);
++#endif /* ZVT_IM_ON_THE_SPOT */
+ }
+
+ /**
+@@ -801,6 +823,9 @@
+ term_force_size(term);
+
+ /* input context */
++#ifdef ZVT_IM_ON_THE_SPOT
++ zvt_term_set_open_im (term, True);
++#else
+ if (gdk_im_ready () && !term->ic) {
+ GdkICAttr attr;
+
+@@ -813,6 +838,7 @@
+ g_warning("Can't create input context.");
+ }
+ }
++#endif
+ }
+
+ static void
+@@ -1280,7 +1306,11 @@
+ case GDK_FONT_FONTSET: {
+ XFontSet fontset = (XFontSet) ((GdkFontPrivate *)font)->xfont;
+ XFontSetExtents *extents = XExtentsOfFontSet(fontset);
++#ifdef ZVT_MB /* This is look bug..., isn't it? */
++ term->charwidth = gdk_string_width (font, "M");
++#else
+ term->charwidth = extents->max_logical_extent.width;
++#endif
+ term->charheight = extents->max_logical_extent.height;
+ zp->fonttype = ZVT_FONT_FONTSET;
+ }
+@@ -1295,6 +1325,9 @@
+ if (term->font)
+ gdk_font_unref (term->font);
+ term->font = font;
++#ifdef ZVT_IM_ON_THE_SPOT
++ zvt_im_preedit_set_font(term, font);
++#endif
+
+ if (term->font_bold)
+ gdk_font_unref (term->font_bold);
+@@ -1395,16 +1428,28 @@
+
+ if (rest) {
+ g_string_sprintf (outname, "%s-medium-r%s", newname->str, rest);
++#ifndef ZVT_MB
+ font = gdk_font_load (outname->str);
++#else
++ font = gdk_fontset_load (outname->str);
++#endif
+ d( printf("loading normal font %s\n", outname->str) );
+
+ g_string_sprintf (outname, "%s-bold-r%s", newname->str, rest);
++#ifndef ZVT_MB
+ font_bold = gdk_font_load (outname->str);
++#else
++ font_bold = gdk_fontset_load (outname->str);
++#endif
+ d( printf("loading bold font %s\n", outname->str) );
+
+ zvt_term_set_fonts_internal (term, font, font_bold);
+ } else {
++#ifndef ZVT_MB
+ font = gdk_font_load (name);
++#else
++ font = gdk_fontset_load (name);
++#endif
+ zvt_term_set_fonts_internal (term, font, 0);
+ }
+
+@@ -1444,7 +1489,11 @@
+ {
+ GdkAtom string_atom;
+ #ifdef ZVT_UTF
++#ifdef ZVT_MB
++ char *types[] = {"UTF-8", "COMPOUND_TEXT"};
++#else
+ char *types[] = {"UTF-8", "STRING"};
++#endif /* ZVT_MB */
+ int index;
+ struct _zvtprivate *zp = _ZVT_PRIVATE(widget);
+
+@@ -1464,7 +1513,11 @@
+ d(printf(" %s atom = %d\n", types[index], (int)string_atom));
+ #else
+ /* Get the atom corresonding to the target "STRING" */
++#ifdef ZVT_MB
++ string_atom = gdk_atom_intern ("COMPOUND_TEXT", FALSE);
++#else
+ string_atom = gdk_atom_intern ("STRING", FALSE);
++#endif /* ZVT_MB */
+ #endif
+
+ if (string_atom == GDK_NONE) {
+@@ -1890,10 +1943,15 @@
+
+ switch (type) {
+ default:
+- case 0: { /* this is ascii/isolatin1 */
++
++#ifdef ZVT_MB
++ case TARGET_COMPOUND_TEXT:
++ case TARGET_TEXT:
++#endif
++ case TARGET_STRING: { /* this is ascii/isolatin1 */
+ unsigned char *o;
+ d(printf("converting selection to ISOLATIN1\n"));
+- out = g_malloc(term->vx->selection_size);
++ out = g_malloc(term->vx->selection_size+1);
+ o = out;
+ for(i=0;i<term->vx->selection_size;i++) {
+ c = term->vx->selection_data[i];
+@@ -1902,7 +1960,7 @@
+ *outlen = term->vx->selection_size;
+ break;
+ }
+- case 1: { /* this is utf-8, basically a local implementation of wcstombs() */
++ case TARGET_UTF8: { /* this is utf-8, basically a local implementation of wcstombs() */
+ unsigned char *o;
+ unsigned int len=0;
+ d(printf("converting selection to UTF-8\n"));
+@@ -1991,10 +2049,34 @@
+ term = ZVT_TERM (widget);
+ vx = term->vx;
+
++#ifdef ZVT_MB
++ if (info == TARGET_COMPOUND_TEXT||info == TARGET_TEXT) {
++ GdkAtom encoding;
++ gint format;
++ guchar *str, *new_str;
++ gint new_len;
++#ifdef ZVT_UTF
++ str = zvt_term_convert_selection(term, info, &len);
++#else
++ int len = vx->selection_size;
++ str = (guchar*)vx->selection_data;
++#endif
++ str[len] = '\0';
++ gdk_string_to_compound_text (str, &encoding, &format, &new_str, &new_len);
++ gtk_selection_data_set (selection_data_ptr, encoding, format,
++ new_str, new_len);
++ gdk_free_compound_text (new_str);
++#if ZVT_UTF
++ g_free(str);
++#endif
++ return;
++ }
++#endif /* ZVT_MB */
++
+ #ifdef ZVT_UTF
+ /* convert selection based on info */
+ /* the selection is actually stored in 32 bit chars */
+- if (info==1)
++ if (info==TARGET_UTF8)
+ atom = gdk_atom_intern ("UTF-8", FALSE);
+ else
+ atom = GDK_SELECTION_TYPE_STRING;
+@@ -2045,6 +2127,7 @@
+
+ /* Make sure we got the data in the expected form */
+ if (selection_data->type != GDK_SELECTION_TYPE_STRING
++ && selection_data->type != gdk_atom_intern("COMPOUND_TEXT", FALSE)
+ && selection_data->type != gdk_atom_intern("UTF-8", FALSE)) {
+ g_print ("Selection \"STRING\" was not returned as strings!\n");
+ return;
+@@ -2055,13 +2138,40 @@
+ {
+ int i;
+ char *ctmp = selection_data->data;
++ gint length = selection_data->length;
+
+- for(i = 0; i < selection_data->length; i++)
+- if(ctmp[i] == '\n') ctmp[i] = '\r';
+-
+- if (term->scroll_on_keystroke)
+- zvt_term_scroll (term, 0);
+- zvt_term_writechild(term, selection_data->data, selection_data->length);
++ if (selection_data->type == gdk_atom_intern("COMPOUND_TEXT",FALSE)) {
++ gchar **list;
++ gint count;
++
++ count = gdk_text_property_to_text_list (selection_data->type,
++ selection_data->format,
++ selection_data->data,
++ selection_data->length,
++ &list);
++ if (count > 0) {
++ gint n;
++ length = 0;
++ for (n=0; n<count; n++) {
++ ctmp = list[n];
++ length = strlen (list[n]);
++ for(i = 0; i < length; i++)
++ if(ctmp[i] == '\n') ctmp[i] = '\r';
++
++ if (term->scroll_on_keystroke)
++ zvt_term_scroll (term, 0);
++ vt_writechild(&vx->vt, ctmp, length);
++ }
++ gdk_free_text_list (list);
++ }
++ } else {
++ for (i = 0; i < length; i++)
++ if(ctmp[i] == '\n') ctmp[i] = '\r';
++
++ if (term->scroll_on_keystroke)
++ zvt_term_scroll (term, 0);
++ vt_writechild(&vx->vt, ctmp, length);
++ }
+ }
+ }
+
+@@ -2113,6 +2223,141 @@
+ return length;
+ }
+
++#ifdef ZVT_IM_ON_THE_SPOT
++/**
++ * zvt_term_set_open_im:
++ * @term: A &ZvtTerm widget.
++ * @state: if True, open IM, else close.
++ **/
++void
++zvt_term_set_open_im (ZvtTerm *term, int state)
++{
++ if(!state)
++ {
++ if (term->ic)
++ {
++ gdk_ic_destroy(term->ic);
++ term->ic = NULL;
++ }
++ return;
++ }
++
++ if (gdk_im_ready () && !term->ic)
++ {
++ gint width, height;
++ GdkICAttr attr;
++ GdkColormap *colormap;
++ GdkICAttributesType attrmask = GDK_IC_ALL_REQ;
++ GdkIMStyle style;
++ GdkIMStyle supported_style = GDK_IM_PREEDIT_NONE |
++ GDK_IM_PREEDIT_NOTHING |
++ GDK_IM_PREEDIT_POSITION |
++ GDK_IM_STATUS_NONE |
++ GDK_IM_STATUS_NOTHING;
++
++ if (GTK_WIDGET (term)->style &&
++ GTK_WIDGET (term)->style->font->type != GDK_FONT_FONTSET)
++ supported_style &= ~GDK_IM_PREEDIT_POSITION;
++
++ attr.style = style = gdk_im_decide_style (supported_style);
++ attr.client_window = attr.focus_window = term->term_window;
++
++ if ((colormap = gtk_widget_get_colormap (GTK_WIDGET (term)))
++ != gtk_widget_get_default_colormap ())
++ {
++ attrmask |= GDK_IC_PREEDIT_COLORMAP;
++ attr.preedit_colormap = colormap;
++ }
++
++ switch (style & GDK_IM_PREEDIT_MASK)
++ {
++ case GDK_IM_PREEDIT_POSITION:
++ if (term->font && term->font->type != GDK_FONT_FONTSET)
++ {
++ g_warning ("over-the-spot style requires fontset");
++ break;
++ }
++#if 0
++ gdk_window_get_size (term->term_window, &width, &height);
++#else
++ width = term->vx->vt.width* term->charwidth;
++ height = term->vx->vt.height* term->charheight;
++#endif
++ attrmask |= GDK_IC_PREEDIT_POSITION_REQ|GDK_IC_PREEDIT_FONTSET;
++ attr.spot_location.x = 0;
++ attr.spot_location.y = 0;
++ attr.preedit_area.x = 0;
++ attr.preedit_area.y = 0;
++ attr.preedit_area.width = width;
++ attr.preedit_area.height = height;
++ attr.preedit_fontset = term->font;
++ break;
++ }
++
++ term->ic = gdk_ic_new(&attr, attrmask);
++
++ if (!term->ic)
++ {
++ g_warning("Can't create input context.");
++ }
++ }
++}
++
++
++static void
++zvt_im_preedit_set_spot(ZvtTerm *term, int col, int row, int offx, int offy)
++{
++ if (term->ic &&
++ (gdk_ic_get_style (term->ic) & GDK_IM_PREEDIT_POSITION))
++ {
++ GdkICAttr attr;
++ attr.spot_location.x = col * term->charwidth + offx;
++ attr.spot_location.y = row * term->charheight
++ + term->font->ascent + offy;
++ gdk_ic_set_attr (term->ic, &attr, GDK_IC_SPOT_LOCATION);
++ }
++}
++
++static void
++zvt_im_preedit_set_foreground(ZvtTerm *term, GdkColor *color)
++{
++ if (term->ic &&
++ (gdk_ic_get_style (term->ic) & GDK_IM_PREEDIT_POSITION))
++ {
++ GdkICAttr attr;
++ attr.preedit_foreground = *color;
++ gdk_ic_set_attr (term->ic, &attr, GDK_IC_PREEDIT_FOREGROUND);
++ }
++}
++
++static void
++zvt_im_preedit_set_background(ZvtTerm *term, GdkColor *color)
++{
++ if (term->ic &&
++ (gdk_ic_get_style (term->ic) & GDK_IM_PREEDIT_POSITION))
++ {
++ GdkICAttr attr;
++ attr.preedit_background = *color;
++ gdk_ic_set_attr (term->ic, &attr, GDK_IC_PREEDIT_BACKGROUND);
++ }
++}
++
++
++static void
++zvt_im_preedit_set_font(ZvtTerm *term, GdkFont *font)
++{
++ if (term->ic &&
++ (gdk_ic_get_style (term->ic) & GDK_IM_PREEDIT_POSITION))
++ {
++ GdkICAttr attr;
++ if (font && font->type != GDK_FONT_FONTSET)
++ g_warning ("over-the-spot style requires fontset");
++ attr.preedit_fontset = font;
++ gdk_ic_set_attr (term->ic, &attr, GDK_IC_PREEDIT_FONTSET);
++ }
++}
++#endif /* ZVT_IM_ON_THE_SPOT */
++
+ static void
+ zvt_term_writemore (gpointer data, gint fd, GdkInputCondition condition)
+ {
+@@ -2343,7 +2588,7 @@
+ static gint
+ zvt_term_key_press (GtkWidget *widget, GdkEventKey *event)
+ {
+- char buffer[64];
++ char buffer[128];
+ char *p=buffer;
+ struct _vtx *vx;
+ ZvtTerm *term;
+@@ -2547,11 +2792,12 @@
+ break;
+ default:
+ if (event->length > 0){
++ gint length = MIN(((buffer+ sizeof(buffer)) - p)/sizeof(char), event->length);
+ if (event->state & GDK_MOD1_MASK){
+ *p++ = '\033';
+ }
+- memcpy(p, event->string, event->length*sizeof(char));
+- p += event->length;
++ memcpy(p, event->string, length);
++ p += length;
+ } else {
+ handled = FALSE;
+ }
+@@ -3161,24 +3407,24 @@
+ break;
+ /* this is limited to 65535 characters! */
+ case ZVT_FONT_FONTSET: {
+- wchar_t *expandwc = zp->text_expand;
++ char *expand = zp->text_expand;
+ XFontSet fontset = (XFontSet) font_private->xfont;
+
+ for (i=0;i<len;i++) {
+- expandwc[i] = VT_ASCII(line->data[i+col]);
++ expand[i] = VT_ASCII(line->data[i+col]) & 0xff;
+ }
+
+ /* render wide characters, with fill if we can */
+ if (dofill) {
+- XwcDrawImageString(drawable_private->xdisplay, drawable_private->xwindow,
+- fontset, gc_private->xgc, offx + x, offy + y, expandwc, len);
++ XmbDrawImageString(drawable_private->xdisplay, drawable_private->xwindow,
++ fontset, gc_private->xgc, offx + x, offy + y, expand, len);
+ } else {
+- XwcDrawString(drawable_private->xdisplay, drawable_private->xwindow,
+- fontset, gc_private->xgc, offx + x, offy + y, expandwc, len);
++ XmbDrawString(drawable_private->xdisplay, drawable_private->xwindow,
++ fontset, gc_private->xgc, offx + x, offy + y, expand, len);
+ }
+ if (overstrike)
+- XwcDrawString(drawable_private->xdisplay, drawable_private->xwindow,
+- fontset, gc_private->xgc, offx + x + 1, offy + y, expandwc, len);
++ XmbDrawString(drawable_private->xdisplay, drawable_private->xwindow,
++ fontset, gc_private->xgc, offx + x + 1, offy + y, expand, len);
+ }
+ }
+
+@@ -3199,6 +3445,10 @@
+ x + offx + len*term->charwidth, offy + row*term->charheight,
+ 1, term->charheight);
+ }
++#ifdef ZVT_IM_ON_THE_SPOT
++ if (len <= MB_CUR_MAX)
++ zvt_im_preedit_set_spot(term, col, row, offx, offy);
++#endif
+ }
+
+
+@@ -3833,6 +4083,7 @@
+ } else {
+ d(printf("background hasn't moved, leaving\n"));
+ }
++
+ }
+
+ static gint
diff --git a/japanese/gnomelibs/files/patch-aj b/japanese/gnomelibs/files/patch-aj
new file mode 100644
index 000000000000..8375a0052ca5
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-aj
@@ -0,0 +1,21 @@
+--- ./zvt/zvtterm.h.jp2 Sat Mar 18 16:57:13 2000
++++ ./zvt/zvtterm.h Sun Oct 29 18:32:20 2000
+@@ -33,6 +33,7 @@
+
+ /* if one doesn't want to compile in transparency one would define this */
+ /* #define ZVT_NO_TRANSPARENT 1 */
++#define ZVT_IM_ON_THE_SPOT 1
+
+ #define ZVT_TERM(obj) GTK_CHECK_CAST (obj, zvt_term_get_type (), ZvtTerm)
+ #define ZVT_TERM_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, zvt_term_get_type (), ZvtTermClass)
+@@ -240,6 +241,10 @@
+ void zvt_term_set_size (ZvtTerm *term,
+ guint width,
+ guint height);
++#if ZVT_IM_ON_THE_SPOT
++void zvt_term_set_open_im (ZvtTerm *term,
++ int state);
++#endif
+
+ /* returns an bitmask of the capabilities compiled into ZvtTerm */
+ guint32 zvt_term_get_capabilities (ZvtTerm *term);
diff --git a/japanese/gnomelibs/files/patch-ak b/japanese/gnomelibs/files/patch-ak
new file mode 100644
index 000000000000..5791438b9a62
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ak
@@ -0,0 +1,20 @@
+--- ./gtk-xmhtml/XmHTMLP.h.jp3 Thu Jun 3 08:01:17 1999
++++ ./gtk-xmhtml/XmHTMLP.h Sun Oct 29 18:32:21 2000
+@@ -301,6 +301,8 @@
+ #define TEXT_IMAGE (1<<5) /* indicates an image member */
+ #define TEXT_FORM (1<<6) /* indicates a form member */
+ #define TEXT_BREAK (1<<7) /* indicates a linebreak */
++#define TEXT_SPACE_LEAD_ZEROWIDTH (1<<8) /* no spacing, but can break before the word */
++#define TEXT_SPACE_TRAIL_ZEROWIDTH (1<<9) /* no spacing, but can break after the word */
+
+ /*****
+ * HTML list marker enumeration type
+@@ -527,7 +529,7 @@
+ int len; /* string length of word */
+ XmHTMLfont *font; /* font to use */
+ Byte line_data; /* line data (underline/strikeout) */
+- Byte spacing; /* leading/trailing/nospace allowed */
++ int spacing; /* leading/trailing/nospace allowed */
+ AllEvents *events; /* events to be served */
+ struct _XmHTMLImage *image; /* when this is an image */
+ struct _XmHTMLForm *form; /* when this is a form element */
diff --git a/japanese/gnomelibs/files/patch-al b/japanese/gnomelibs/files/patch-al
new file mode 100644
index 000000000000..61fdf435ea67
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-al
@@ -0,0 +1,328 @@
+--- ./gtk-xmhtml/format.c.jp3 Fri Jul 30 02:59:48 1999
++++ ./gtk-xmhtml/format.c Sun Oct 29 18:32:21 2000
+@@ -237,6 +237,14 @@
+ #include <string.h>
+ #include <ctype.h> /* isspace, tolower */
+
++#include <gdk/gdki18n.h>
++#if !defined(G_HAVE_BROKEN_WCTYPE) && (defined(G_HAVE_WCTYPE_H) || defined(G_HAVE_WCHAR_H)) && !defined(X_LOCALE)
++#define is_ideograph(wc) \
++ (!(iswspace(wc) || iswalnum(wc) || iswpunct(wc) || iswcntrl(wc)))
++#else
++#define is_ideograph(wc) FALSE
++#endif
++
+ /* Local includes */
+ #include "XmHTMLP.h"
+ #include "XmHTMLfuncs.h"
+@@ -307,14 +315,14 @@
+
+ /* copy given text into an internal buffer */
+ static String CopyText(XmHTMLWidget html, String text, Boolean formatted,
+- Byte *text_data, Boolean expand_escapes);
++ int *text_data, Boolean expand_escapes);
+
+ /* collapse all consecutive whitespace into a single space */
+ static void CollapseWhiteSpace(String text);
+
+ /* Split raw text into an array of words */
+ static XmHTMLWord* TextToWords(String text, int *num_words, Dimension *height,
+- XmHTMLfont *font, Byte line_data, Byte text_data,
++ XmHTMLfont *font, Byte line_data, int text_data,
+ XmHTMLObjectTableElement owner);
+
+ /* Split an image into an array of words ;-) */
+@@ -804,14 +812,16 @@
+ *****/
+ static XmHTMLWord*
+ TextToWords(String text, int *num_words, Dimension *height, XmHTMLfont *font,
+- Byte line_data, Byte text_data, XmHTMLObjectTableElement owner)
++ Byte line_data, int text_data, XmHTMLObjectTableElement owner)
+ {
+- int n_words, len, i;
+- char *start;
+- static XmHTMLWord *words;
+- static char *raw;
++ int n_words, n_words_alloc, raw_numwc, i;
++ GdkWChar *raw, *start;
++ XmHTMLWord *words;
+ register int j;
+- register char *chPtr;
++ register GdkWChar *chPtr;
++ int leading_space;
++ char *wordsbuf;
++ int size_wordsbuf;
+
+ /* sanity check */
+ if(text == NULL)
+@@ -822,57 +832,109 @@
+
+ _XmHTMLFullDebug(2, ("format.c: TextToWords, text in is:\n%s\n", text));
+
+- /* compute how many words we have */
+- n_words = 0;
+- for(chPtr = text; *chPtr != '\0'; chPtr++)
+- if(*chPtr == ' ')
+- n_words++;
+- /* also pick up the last word */
+- n_words++;
+-
+ /* copy text */
+- raw = strdup(text);
++ raw = (GdkWChar *)calloc(strlen(text) + 1, sizeof(GdkWChar));
++ raw_numwc = gdk_mbstowcs(raw, text, strlen(text));
++ if (raw_numwc < 1)
++ raw_numwc = 0;
+
+ /* allocate memory for all words */
+- words = (XmHTMLWord*)calloc(n_words, sizeof(XmHTMLWord));
++ n_words = 0;
++ n_words_alloc = 10;
++ words = (XmHTMLWord*)calloc(n_words_alloc, sizeof(XmHTMLWord));
+
+ /* Split the text in words and fill in the appropriate fields */
+ *height = font->height;
+ chPtr = start = raw;
+
+- for(i = 0, j = 0, len = 0; ; chPtr++, len++, j++)
++ for(i = 0, j = 0, leading_space = 0; ; chPtr++, j++)
+ {
+- /* also pick up the last word! */
+- if(*chPtr == ' ' || *chPtr == '\0')
++ /* expand words[] if needed */
++ if (n_words_alloc < i + 1)
+ {
+- if(*chPtr)
++ n_words_alloc += 10;
++ words = (XmHTMLWord *)realloc(
++ words, n_words_alloc * sizeof(XmHTMLWord));
++ }
++
++ /* also pick up the last word! */
++ if(*chPtr == ' ' || *chPtr == '\0' ||
++ (chPtr > start &&
++ (is_ideograph(*chPtr) || is_ideograph(chPtr[-1]))))
++ {
++ GdkWChar saved_char;
++ int trailing_space = 0;
++ if(*chPtr == ' ')
+ {
+ chPtr++; /* nuke the space */
+ raw[j++] = '\0';
++ trailing_space = 1;
+ }
++ /* set the first char of the next word 0 temporally.
++ * gdk_wcstombs requires this. */
++ saved_char = raw[j];
++ raw[j] = '\0';
+ /* fill in required fields */
+- words[i].self = &words[i];
+- words[i].word = start;
+- words[i].len = len;
++ words[i].self = NULL; /* set later */
++ words[i].word = gdk_wcstombs(start);
++ words[i].len = words[i].word ? strlen(words[i].word) : 0;
+ words[i].height = *height;
+- words[i].width = Toolkit_Text_Width(font->xfont, words[i].word, len);
++ words[i].width = Toolkit_Text_Width(
++ font->xfont, words[i].word, strlen(words[i].word));
+ words[i].owner = owner;
+ words[i].font = font;
+- words[i].spacing = TEXT_SPACE_LEAD | TEXT_SPACE_TRAIL;
++ words[i].spacing = 0; /* set later */
+ words[i].type = OBJ_TEXT;
+ words[i].line_data = line_data;
+
++ if (leading_space)
++ words[i].spacing |= TEXT_SPACE_LEAD;
++ else
++ words[i].spacing |= TEXT_SPACE_LEAD_ZEROWIDTH;
++
++ if (trailing_space)
++ words[i].spacing |= TEXT_SPACE_TRAIL;
++ else
++ words[i].spacing |= TEXT_SPACE_TRAIL_ZEROWIDTH;
++
++ leading_space = trailing_space; /* for the next word */
++
++ raw[j] = saved_char;
++
+ _XmHTMLFullDebug(2, ("format.c: TextToWords, word is %s, len is "
+ "%i, width is %i, height is %i\n", words[i].word, words[i].len,
+ words[i].width, words[i].height));
+
+ start = chPtr;
+ i++;
+- len = 0;
+ }
+ if(*chPtr == '\0')
+ break;
+ }
++ free(raw);
++ n_words = i;
++
++ /* because the pointer 'words' may be realloc()ed, we need to set the
++ * 'self' field here.
++ */
++ for (i = 0; i < n_words; i++)
++ words[i].self = &words[i];
++
++ /* words[0].word must be a malloc()ed pointer, and word[i].word
++ * (for i > 0) a reference (i.e., it should not be freed).
++ */
++ for (size_wordsbuf = 0, i = 0; i < n_words; i++)
++ size_wordsbuf += words[i].len + 1;
++ wordsbuf = (char *)malloc(size_wordsbuf);
++ for (i = j = 0; i < n_words; i++)
++ {
++ /* copies trailing nil also */
++ memcpy(wordsbuf + j, words[i].word, words[i].len + 1);
++ free(words[i].word);
++ words[i].word = wordsbuf + j;
++ j += words[i].len + 1;
++ }
++
+ /*
+ * when there is more than one word in this block, the first word
+ * _always_ has a trailing space.
+@@ -880,10 +942,13 @@
+ */
+ if(n_words > 1)
+ {
+- /* unset nospace bit */
+- Byte spacing = text_data & ~TEXT_SPACE_NONE;
+- words[0].spacing = spacing | TEXT_SPACE_TRAIL;
+- words[n_words-1].spacing = spacing | TEXT_SPACE_LEAD;
++ words[0].spacing &= ~TEXT_SPACE_LEAD_ZEROWIDTH;
++ words[n_words-1].spacing &= ~TEXT_SPACE_TRAIL_ZEROWIDTH;
++
++ words[0].spacing |= text_data &
++ (TEXT_SPACE_LEAD | TEXT_SPACE_LEAD_ZEROWIDTH);
++ words[n_words-1].spacing |= text_data &
++ (TEXT_SPACE_TRAIL | TEXT_SPACE_TRAIL_ZEROWIDTH);
+ }
+ else
+ words[0].spacing = text_data;
+@@ -1109,7 +1174,7 @@
+ if(tmp->id == HT_OPTION && !tmp->is_end)
+ {
+ XmHTMLObject *sel_start = tmp;
+- Byte foo;
++ int foo;
+ String text = NULL;
+
+ /*
+@@ -1185,7 +1250,7 @@
+ static XmHTMLForm *form_entry;
+ XmHTMLWord *word;
+ String text = NULL;
+- Byte foo;
++ int foo;
+
+ *num_words = 0;
+ *height = *width = 0;
+@@ -1633,13 +1698,14 @@
+ * cleaned up text. Terminates if malloc fails.
+ *****/
+ static String
+-CopyText(XmHTMLWidget html, String text, Boolean formatted, Byte *text_data,
++CopyText(XmHTMLWidget html, String text, Boolean formatted, int *text_data,
+ Boolean expand_escapes)
+ {
+ static String ret_val;
+- char *start = text;
++ GdkWChar *wtext, *start;
+ int len;
+ static Boolean have_space = False;
++ static Boolean have_space_zerowidth = False;
+
+ /* sanity check */
+ if(*text == '\0' || !strlen(text))
+@@ -1653,23 +1719,30 @@
+ /* expand all escape sequences in this text */
+ if(expand_escapes)
+ _XmHTMLExpandEscapes(ret_val, html->html.bad_html_warnings);
+- have_space = False;
++ have_space = have_space_zerowidth = False;
+ return(ret_val);
+ }
+
+ _XmHTMLFullDebug(2, ("format.c: CopyText, text in is:\n%s\n", text));
+
+- /* initial length of full text */
+- len = strlen(text);
++ /* convert to wide characters */
++ wtext = (GdkWChar *)calloc(strlen(text) + 1, sizeof(GdkWChar));
++ len = gdk_mbstowcs(wtext, text, strlen(text));
++ if (len < 0) len = 0;
++ start = wtext;
+
+ *text_data = 0;
+
+ /* see if we have any leading/trailing spaces */
+- if(isspace(*text) || have_space)
++ if(gdk_iswspace(*wtext) || have_space)
+ *text_data = TEXT_SPACE_LEAD;
++ else if(is_ideograph(*wtext) || have_space_zerowidth)
++ *text_data = TEXT_SPACE_LEAD_ZEROWIDTH;
+
+- if(isspace(text[len-1]))
++ if(len > 0 && gdk_iswspace(wtext[len-1]))
+ *text_data |= TEXT_SPACE_TRAIL;
++ else if(len > 0 && is_ideograph(wtext[len-1]))
++ *text_data |= TEXT_SPACE_TRAIL_ZEROWIDTH;
+
+ /*****
+ * Remove leading/trailing spaces
+@@ -1677,11 +1750,13 @@
+ * elements must be retained
+ *****/
+ /* remove all leading space */
+- while(*start != '\0' && isspace(*start))
++ while(*start != '\0' && gdk_iswspace(*start))
++ {
+ start++;
++ len--;
++ }
+ /* remove all trailing space */
+- len = strlen(start);
+- while(len > 0 && isspace(start[len-1]))
++ while(len > 0 && gdk_iswspace(start[len-1]))
+ len--;
+
+ /*****
+@@ -1705,16 +1780,14 @@
+ have_space = True;
+ return(NULL);
+ }
+- have_space = False;
+-
+- /*
+- * We are a little bit to generous here: consecutive multiple whitespace
+- * will be collapsed into a single space, so we may over-allocate.
+- * Hey, better to overdo this than to have one byte to short ;-)
+- */
+- ret_val = (String)malloc((len+1)*sizeof(char));
+- strncpy(ret_val, start, len); /* copy it */
+- ret_val[len] = '\0'; /* NULL terminate */
++ have_space = have_space_zerowidth = False;
++ if(len > 0 && is_ideograph(wtext[len-1]))
++ have_space_zerowidth = True;
++
++ /* convert to multibyte form */
++ start[len] = '\0';
++ ret_val = gdk_wcstombs(start);
++ free(wtext);
+
+ /* expand all escape sequences in this text */
+ if(expand_escapes)
+@@ -3030,7 +3103,8 @@
+ String text;
+ int linefeed, n_words, anchor_words, named_anchors;
+ int x_offset = 0, y_offset = 0;
+- Byte text_data, line_data; /* text and line data bits */
++ int text_data; /* text data bits */
++ Byte line_data; /* line data bits */
+ unsigned long element_data = 0;
+ XmHTMLWord *words;
+ XmHTMLAnchor *anchor_data, *form_anchor_data;
diff --git a/japanese/gnomelibs/files/patch-am b/japanese/gnomelibs/files/patch-am
new file mode 100644
index 000000000000..2c9547e672aa
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-am
@@ -0,0 +1,23 @@
+--- ./gtk-xmhtml/gtk-xmhtml.c.jp3 Fri Jul 30 02:59:49 1999
++++ ./gtk-xmhtml/gtk-xmhtml.c Sun Oct 29 18:32:21 2000
+@@ -2262,16 +2262,18 @@
+ Toolkit_Draw_Shadows(XmHTMLWidget html, TGC top_shadow, TGC bottom_shadow,
+ gint xs, gint ys, gint w, gint h, gint shadow_thick, gint shadow_type)
+ {
++ GtkWidget *win;
++ win = GTK_WIDGET(html->html.work_area);
+ switch (shadow_type)
+ {
+ case XmSHADOW_IN:
+- gtk_draw_shadow(GTK_WIDGET(html)->style, GTK_WIDGET(html)->window,
++ gtk_draw_shadow(GTK_WIDGET(html)->style, win->window,
+ GTK_STATE_NORMAL, GTK_SHADOW_IN,
+ xs, ys,
+ w, h);
+ break;
+ case XmSHADOW_OUT:
+- gtk_draw_shadow(GTK_WIDGET(html)->style, GTK_WIDGET(html)->window,
++ gtk_draw_shadow(GTK_WIDGET(html)->style, win->window,
+ GTK_STATE_NORMAL, GTK_SHADOW_OUT,
+ xs, ys,
+ w, h);
diff --git a/japanese/gnomelibs/files/patch-an b/japanese/gnomelibs/files/patch-an
new file mode 100644
index 000000000000..7c63077e3c9d
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-an
@@ -0,0 +1,89 @@
+--- ./gtk-xmhtml/layout.c.jp3 Fri Jul 30 02:59:51 1999
++++ ./gtk-xmhtml/layout.c Sun Oct 29 18:32:21 2000
+@@ -447,7 +447,7 @@
+ *****/
+ for(i = 0 ; i < html->html.anchor_words; i++)
+ html->html.anchors[i].x = html->html.anchors[i].self->x;
+- for(i = 0 ; i < html->html.anchor_words; i++)
++ for(i = 0 ; i < html->html.anchor_words - 1; i++)
+ {
+ if((html->html.anchors[i].owner == html->html.anchors[i+1].owner) &&
+ (html->html.anchors[i].line == html->html.anchors[i+1].line))
+@@ -1173,19 +1173,30 @@
+ * which *does* have a trailing space. We then use the total width
+ * of this word to check against available line width.
+ *****/
+- if(!(words[i]->spacing & TEXT_SPACE_TRAIL) &&
+- i+1 < *nwords && !(words[i+1]->spacing & TEXT_SPACE_LEAD))
++ if(
++ !(words[i]->spacing & TEXT_SPACE_TRAIL) &&
++ !(words[i]->spacing & TEXT_SPACE_TRAIL_ZEROWIDTH) &&
++ i+1 < *nwords &&
++ !(words[i+1]->spacing & TEXT_SPACE_LEAD) &&
++ !(words[i+1]->spacing & TEXT_SPACE_LEAD_ZEROWIDTH)
++ )
+ {
+ int j = i+1;
+ word_width = words[i]->width;
+ while(j < *nwords)
+ {
+- if(!(words[j]->spacing & TEXT_SPACE_LEAD))
++ if(!(words[j]->spacing & TEXT_SPACE_LEAD) &&
++ !(words[j]->spacing & TEXT_SPACE_LEAD_ZEROWIDTH))
+ word_width += words[j]->width;
+
+ /* see if this word has a trail space and the next a leading */
+- if(!(words[j]->spacing & TEXT_SPACE_TRAIL) &&
+- j+1 < *nwords && !(words[j+1]->spacing & TEXT_SPACE_LEAD))
++ if(
++ !(words[j]->spacing & TEXT_SPACE_TRAIL) &&
++ !(words[j]->spacing & TEXT_SPACE_TRAIL_ZEROWIDTH) &&
++ j+1 < *nwords &&
++ !(words[j+1]->spacing & TEXT_SPACE_LEAD) &&
++ !(words[j+1]->spacing & TEXT_SPACE_LEAD_ZEROWIDTH)
++ )
+ j++;
+ else
+ break;
+@@ -1395,8 +1406,13 @@
+ * save linenumber, x and y positions for this word or for
+ * multiple words needing to be ``glued'' together.
+ *****/
+- if(!(words[i]->spacing & TEXT_SPACE_TRAIL) &&
+- i+1 < *nwords && !(words[i+1]->spacing & TEXT_SPACE_LEAD))
++ if(
++ !(words[i]->spacing & TEXT_SPACE_TRAIL) &&
++ !(words[i]->spacing & TEXT_SPACE_TRAIL_ZEROWIDTH) &&
++ i+1 < *nwords &&
++ !(words[i+1]->spacing & TEXT_SPACE_LEAD) &&
++ !(words[i+1]->spacing & TEXT_SPACE_LEAD_ZEROWIDTH)
++ )
+ {
+ /* first word must take spacing into account */
+ UPDATE_WORD(words[i]);
+@@ -1413,8 +1429,13 @@
+ UPDATE_WORD(words[i])
+
+ /* this word has a trailing and the next a leading space? */
+- if(!(words[i]->spacing & TEXT_SPACE_TRAIL) &&
+- i+1 < *nwords && !(words[i+1]->spacing & TEXT_SPACE_LEAD))
++ if(
++ !(words[i]->spacing & TEXT_SPACE_TRAIL) &&
++ !(words[i]->spacing & TEXT_SPACE_TRAIL_ZEROWIDTH) &&
++ i+1 < *nwords &&
++ !(words[i+1]->spacing & TEXT_SPACE_LEAD) &&
++ !(words[i+1]->spacing & TEXT_SPACE_LEAD_ZEROWIDTH)
++ )
+ i++;
+ else
+ break;
+@@ -2972,8 +2993,7 @@
+
+ /* store return dimensions, box->x is not touched */
+ box->y += max_theight;
+- table->end->height = box->height = max_theight;
+- box->width = box->min_width = full_max_twidth;
++ table->end->height = max_theight;
+
+ /*****
+ * update x position of owning object, it might have shifted due to
diff --git a/japanese/gnomelibs/files/patch-ao b/japanese/gnomelibs/files/patch-ao
new file mode 100644
index 000000000000..528c50f818d7
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ao
@@ -0,0 +1,16 @@
+--- ./gtk-xmhtml/paint.c.jp3 Fri Jul 30 02:59:51 1999
++++ ./gtk-xmhtml/paint.c Sun Oct 29 18:32:21 2000
+@@ -1604,13 +1604,8 @@
+ xs = data->x - html->html.scroll_x;
+
+ /* vertical offset */
+-#if 0
+ dy = (int)(0.75*(html->html.default_font->height));
+-#else
+- dy = 0;
+-#endif
+ ys = data->y - html->html.scroll_y;
+-
+ if(data->height)
+ {
+ if(data->y_offset) /* noshade */
diff --git a/japanese/gnomelibs/files/patch-ap b/japanese/gnomelibs/files/patch-ap
new file mode 100644
index 000000000000..c92ca7c31ef4
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ap
@@ -0,0 +1,29 @@
+--- ./gtk-xmhtml/fonts.c.jp4 Fri Jul 30 02:59:47 1999
++++ ./gtk-xmhtml/fonts.c Sun Oct 29 18:32:21 2000
+@@ -221,8 +221,8 @@
+ static fontCache *curr_cache; /* current font cache */
+
+ /* Backup lists when sizes are not specified */
+-static int def_fn_sizes[8] = {140,80,240,180,160,140,120,100};
+-static int def_fn_fixed_sizes[2] = {120,80};
++static int def_fn_sizes[8] = {110,80,240,160,160,140,140,140};
++static int def_fn_fixed_sizes[2] = {110,80};
+
+ /*****
+ * Name: makeFontName
+@@ -297,13 +297,13 @@
+ /* FIXME: better way to determine the fontset name? */
+ sprintf(new_name,
+ "-%s-%s-%s-%s-%s-*-*-%i-%i-%i-%s-*-%s,"
+- "-*-*-%s-%s-%s-*-*-%i-*-*-*-*-*,"
++ "-*-*-%s-%s-%s-*-%i-*-*-*-*-*-*,"
+ "-*-*-*-*-*-*-%i-*-*-*-*-*-*,*",
+ foundry != NULL ? foundry : fndry,
+ family != NULL ? family : fam,
+ weight, slant, wd, points,
+ curr_cache->res_x, curr_cache->res_y, sp, charset,
+- weight, slant, wd, points,
++ weight, slant, wd, points / 10,
+ points / 10);
+ } else {
+ sprintf(new_name,
diff --git a/japanese/gnomelibs/files/patch-aq b/japanese/gnomelibs/files/patch-aq
new file mode 100644
index 000000000000..b47757d43a40
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-aq
@@ -0,0 +1,13 @@
+--- ./gtk-xmhtml/XmHTMLfuncs.h.jp4 Wed Dec 2 09:30:06 1998
++++ ./gtk-xmhtml/XmHTMLfuncs.h Sun Oct 29 18:32:21 2000
+@@ -190,8 +190,8 @@
+ * Scalable size array: default,sub/superscript,h1,h2,h3,h4,h5,h6
+ * Fixed size array : default,sub/superscript
+ *****/
+-#define XmHTML_DEFAULT_FONT_SCALABLE_SIZES "14,8,24,18,14,12,10,8"
+-#define XmHTML_DEFAULT_FONT_FIXED_SIZES "12,8"
++#define XmHTML_DEFAULT_FONT_SCALABLE_SIZES "14,8,24,16,16,14,14,8"
++#define XmHTML_DEFAULT_FONT_FIXED_SIZES "14,8"
+
+ /*****
+ * Default Table boder width, cell & row spacing.
diff --git a/japanese/gnomelibs/files/patch-ar b/japanese/gnomelibs/files/patch-ar
new file mode 100644
index 000000000000..ce9102ab05c8
--- /dev/null
+++ b/japanese/gnomelibs/files/patch-ar
@@ -0,0 +1,10 @@
+--- ./libgnomeui/gnome-about.c.jp5 Thu May 4 19:15:28 2000
++++ ./libgnomeui/gnome-about.c Sun Oct 29 18:32:21 2000
+@@ -413,6 +413,7 @@
+ /* Create fonts */
+ /* FIXME: dirty hack, but it solves i18n problem without rewriting the
+ drawing code.. */
++ gtk_widget_ensure_style (widget);
+ style = gtk_style_ref (widget->style);
+ gtk_widget_ensure_style(widget);
+