summaryrefslogtreecommitdiff
path: root/japanese/gnomelibs
diff options
context:
space:
mode:
authorYoshio MITA <mita@FreeBSD.org>2002-01-20 22:32:04 +0000
committerYoshio MITA <mita@FreeBSD.org>2002-01-20 22:32:04 +0000
commit2c480e144fea8d613935eb99328494de3ddf5d4b (patch)
treeffff5bba4de63a10d52bd357a00b99f6ea42bc6d /japanese/gnomelibs
parentUpdate to 0.21. (diff)
cvs server: scheduling `files/patch-ae' for removal
Synchronize to the latest gnomelibs version (1.4.1.3). These removed patch files have already included in distfile of the latest gnomelibs. Submitted by: SASAKI Katuhiro <sahiro@crest.ocn.ne.jp>
Notes
Notes: svn path=/head/; revision=53412
Diffstat (limited to 'japanese/gnomelibs')
-rw-r--r--japanese/gnomelibs/Makefile2
-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-ai521
-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
15 files changed, 1 insertions, 1441 deletions
diff --git a/japanese/gnomelibs/Makefile b/japanese/gnomelibs/Makefile
index 18f72b801aa8..819ceb605aaa 100644
--- a/japanese/gnomelibs/Makefile
+++ b/japanese/gnomelibs/Makefile
@@ -6,7 +6,7 @@
#
# This port does not work with another version of master port.
-#PORTVERSION= 1.4.1.1
+#PORTVERSION= 1.4.1.3
CATEGORIES= japanese x11 gnome
MASTERDIR= ${.CURDIR}/../../x11/gnomelibs
diff --git a/japanese/gnomelibs/files/patch-ae b/japanese/gnomelibs/files/patch-ae
deleted file mode 100644
index 537cc3e9086e..000000000000
--- a/japanese/gnomelibs/files/patch-ae
+++ /dev/null
@@ -1,154 +0,0 @@
---- zvt/update.c.zvtmb Mon Aug 28 01:22:23 2000
-+++ zvt/update.c Sun Jun 24 07:35:48 2001
-@@ -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
deleted file mode 100644
index ea73c508a625..000000000000
--- a/japanese/gnomelibs/files/patch-af
+++ /dev/null
@@ -1,160 +0,0 @@
---- zvt/vt.c.zvtmb Sun Nov 26 03:49:08 2000
-+++ zvt/vt.c Sun Jun 24 07:35:48 2001
-@@ -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
-@@ -1521,7 +1581,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)
-@@ -1531,17 +1610,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)); */
-@@ -1571,6 +1676,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
deleted file mode 100644
index 8fc48ec0274a..000000000000
--- a/japanese/gnomelibs/files/patch-ag
+++ /dev/null
@@ -1,32 +0,0 @@
---- zvt/vt.h.zvtmb Sat Oct 30 03:35:49 1999
-+++ zvt/vt.h Sun Jun 24 07:35:48 2001
-@@ -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
deleted file mode 100644
index 279d55c06e99..000000000000
--- a/japanese/gnomelibs/files/patch-ah
+++ /dev/null
@@ -1,24 +0,0 @@
---- zvt/zterm.c.zvtmb Sat Mar 18 16:57:13 2000
-+++ zvt/zterm.c Sun Jun 24 07:35:48 2001
-@@ -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
deleted file mode 100644
index b3d94577a632..000000000000
--- a/japanese/gnomelibs/files/patch-ai
+++ /dev/null
@@ -1,521 +0,0 @@
---- zvt/zvtterm.c.zvtmb Sun Jun 24 07:35:48 2001
-+++ zvt/zvtterm.c Sun Jun 24 07:35:48 2001
-@@ -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);
-
-@@ -328,19 +355,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);
- }
-
- /**
-@@ -647,6 +664,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 */
- }
-
- /**
-@@ -782,6 +804,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;
-
-@@ -794,6 +819,7 @@
- g_warning("Can't create input context.");
- }
- }
-+#endif
- }
-
- static void
-@@ -1261,7 +1287,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;
- }
-@@ -1276,6 +1306,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);
-@@ -1376,16 +1409,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);
- }
-
-@@ -1425,7 +1470,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);
-
-@@ -1445,7 +1494,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) {
-@@ -1871,10 +1924,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];
-@@ -1883,7 +1941,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"));
-@@ -1972,10 +2030,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;
-@@ -2026,6 +2108,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;
-@@ -2036,13 +2119,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);
-+ }
- }
- }
-
-@@ -2094,6 +2204,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)
- {
-@@ -2324,7 +2569,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;
-@@ -2535,6 +2780,7 @@
- break;
- default:
- if (event->length > 0){
-+ gint length = MIN(((buffer+ sizeof(buffer)) - p)/sizeof(char), event->length);
- if (event->state & (GDK_MOD1_MASK | GDK_MOD4_MASK)){
- *p++ = '\033';
- }
-@@ -3149,24 +3395,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);
- }
- }
-
-@@ -3187,6 +3433,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
- }
-
-
-@@ -3856,6 +4106,7 @@
- gdk_gc_set_foreground (term->back_gc, &pen);
- return;
- }
-+
- }
-
- static gint
diff --git a/japanese/gnomelibs/files/patch-aj b/japanese/gnomelibs/files/patch-aj
deleted file mode 100644
index 8cb4ba6caf99..000000000000
--- a/japanese/gnomelibs/files/patch-aj
+++ /dev/null
@@ -1,21 +0,0 @@
---- zvt/zvtterm.h.zvtmb Sun Jun 24 07:35:48 2001
-+++ zvt/zvtterm.h Sun Jun 24 07:35:48 2001
-@@ -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
deleted file mode 100644
index 5791438b9a62..000000000000
--- a/japanese/gnomelibs/files/patch-ak
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./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
deleted file mode 100644
index 61fdf435ea67..000000000000
--- a/japanese/gnomelibs/files/patch-al
+++ /dev/null
@@ -1,328 +0,0 @@
---- ./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
deleted file mode 100644
index 2c9547e672aa..000000000000
--- a/japanese/gnomelibs/files/patch-am
+++ /dev/null
@@ -1,23 +0,0 @@
---- ./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
deleted file mode 100644
index 7c63077e3c9d..000000000000
--- a/japanese/gnomelibs/files/patch-an
+++ /dev/null
@@ -1,89 +0,0 @@
---- ./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
deleted file mode 100644
index 528c50f818d7..000000000000
--- a/japanese/gnomelibs/files/patch-ao
+++ /dev/null
@@ -1,16 +0,0 @@
---- ./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
deleted file mode 100644
index c92ca7c31ef4..000000000000
--- a/japanese/gnomelibs/files/patch-ap
+++ /dev/null
@@ -1,29 +0,0 @@
---- ./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
deleted file mode 100644
index b47757d43a40..000000000000
--- a/japanese/gnomelibs/files/patch-aq
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./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
deleted file mode 100644
index ce9102ab05c8..000000000000
--- a/japanese/gnomelibs/files/patch-ar
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./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);
-