diff -Ncr xxgdb-1.12/Imakefile xxgdb-1.12-I18N/Imakefile *** xxgdb-1.12/Imakefile Tue Jun 20 07:20:55 1995 --- xxgdb-1.12-I18N/Imakefile Sat Dec 18 17:38:36 1999 *************** *** 1,5 **** --- 1,6 ---- #define TARGET_IS_GDB 1 + #define I18N_MB 1 #if TARGET_IS_GDB DEFGDB = -DGDB -DCREATE_IO_WINDOW -g *************** *** 79,84 **** --- 80,90 ---- # Add to open all windows at startup #DEFINES+=-DOPEN_ALL_WINDOWS + # Add to support I18N multibyte charactor. + #if I18N_MB + DEFINES+=-DI18N_MB + #endif + mallocc = #malloc.c malloco = #malloc.o *************** *** 103,109 **** --- 109,119 ---- #endif /* not GDB */ + #ifdef I18N_MB + InstallAppDefaultsLong(XDbx-I18N,XDbx) + #else InstallAppDefaults(XDbx) + #endif #if TARGET_IS_GDB handler.o: gdb_handler.c diff -Ncr xxgdb-1.12/README.I18N xxgdb-1.12-I18N/README.I18N *** xxgdb-1.12/README.I18N Thu Jan 1 09:00:00 1970 --- xxgdb-1.12-I18N/README.I18N Sat Dec 18 20:18:01 1999 *************** *** 0 **** --- 1,33 ---- + Xxgdb I18N Patch + Yasuyuki Furukawa + 1998,1999 + ------- + About + ------- + + This patch just allows you to debug programs that have comments + of multibyte code without character turnning. + + You can compile I18N xxgdb by just only applying this to orignal + xxgdb code; + + $ cd xxgdb-1.12 + $ patch -p1 < $(where_this_patch_is)/xxgdb-1.12-I18N_mb-1.1.patch + $ xmkmf + $ make + + Notice that this use system's locale instead of X's one.... + + ----------- + Changelog + ----------- + * Sut 18 Dec 1999 Yasuyuki Furukawa + - release 1.1 + - (dialog.c) fixed bug that commands typed directly in + a dialog take no effect. + + * 12 Dec 1998 Yasuyuki Furukawa + - first release + + + diff -Ncr xxgdb-1.12/XDbx-I18N.NEW_INTERFACE xxgdb-1.12-I18N/XDbx-I18N.NEW_INTERFACE *** xxgdb-1.12/XDbx-I18N.NEW_INTERFACE Thu Jan 1 09:00:00 1970 --- xxgdb-1.12-I18N/XDbx-I18N.NEW_INTERFACE Sat Dec 18 19:35:53 1999 *************** *** 0 **** --- 1,79 ---- + ! + ! XXgdb 1.08 Application defaults file with NEW_INTERFACE + ! (derived from Xdbx 2.1 app-defaults) + + *background: snow1 + *foreground: black + *fileWindow*background: snow2 + *messageWindow.background: snow2 + *commandWindow.background: snow2 + *Scrollbar.foreground: black + + XDbx.geometry: +0+0 + *allowShellResize: True + *borderWidth: 1 + *font: fixed + *vpane.width: 550 + *fileWindow*font: variable + *fileLabel.width: 500 + *lineLabel.width: 50 + *sourceShell.geometry: 550x260+0+380 + *sourceForm.top: ChainTop + *sourceForm.bottom: ChainBottom + *sourceForm.left: ChainLeft + *sourceForm.right: ChainRight + *sourceForm.fromVert: fileWindow + *sourceWindow.width: 558 + *sourceWindow.height: 220 + *sourceWindow.leftMargin: 35 + *sourceWindow.scrollHorizontal: whenNeeded + *sourceWindow.translations: #override \n\ + : SelectStart() SelectWord() \n\ + Shift: Update(warp) SelectEnd() PrintSelection() \n\ + : Update(warp) SelectEnd() \n\ + Down: next-line() Update()\n\ + Up: previous-line() Update() \n\ + CtrlL: redraw-display() Update() \n\ + CtrlN: next-line() Update() \n\ + CtrlP: previous-line() Update() \n\ + CtrlV: next-page() Update() \n\ + CtrlZ: scroll-one-line-up() Update() \n\ + MetaV: previous-page() Update() \n\ + MetaZ: scroll-one-line-down() Update() \n\ + :Meta\>: end-of-file() Update() \n\ + :Meta]: forward-paragraph() Update() \n\ + :Meta[: backward-paragraph() Update() + *messageWindow*font: variable + *messageWindow.min: 30 + *messageWindow.max: 30 + *dialogWindow.preferredPaneSize: 240 + *dialogWindow.resizeToPreferred: True + *dialogWindow.translations: #override \n\ + : SelectStart() SelectWord() \n\ + Shift: SelectEnd() PrintSelection() \n\ + : SelectEnd() \n + *commandShell.geometry: 190x370+590+0 + *commandWindow.hSpace: 6 + *commandWindow.vSpace: 6 + *Command.height: 20 + *Command.width: 80 + *List.columnSpacing: 10 + *displayShell.geometry: +590+450 + *displayWindow.top: ChainTop + *displayWindow.bottom: ChainBottom + *displayWindow.left: ChainLeft + *displayWindow.right: ChainRight + *displayWindow.width: 300 + *displayWindow.height: 100 + *displayWindow.scrollVertical: whenNeeded + *displayWindow.scrollHorizontal: whenNeeded + *displayWindow.translations: #override \n\ + : SelectStart() SelectWord() \n\ + Shift: SelectEnd() PrintSelection() \n\ + : SelectEnd() \n + *popup*showGrip: False + *bindings: emacs + + + + *international: True + + *fontSet: -*-fixed-medium-r-*--14 + + !*inputMethod: kinput2 diff -Ncr xxgdb-1.12/XDbx-I18N.ad xxgdb-1.12-I18N/XDbx-I18N.ad *** xxgdb-1.12/XDbx-I18N.ad Thu Jan 1 09:00:00 1970 --- xxgdb-1.12-I18N/XDbx-I18N.ad Sat Dec 18 19:30:45 1999 *************** *** 0 **** --- 1,66 ---- + ! + ! Xdbx 2.1 Application defaults file + ! + + *background: snow1 + *foreground: black + *fileWindow*background: snow2 + *messageWindow.background: snow2 + *commandWindow.background: snow2 + *Scrollbar.foreground: black + + *allowShellResize: True + *borderWidth: 1 + *font: fixed + *vpane.width: 550 + *fileWindow*font: variable + *fileLabel.width: 500 + *lineLabel.width: 50 + *sourceForm.preferredPaneSize: 320 + *sourceWindow.leftMargin: 35 + *sourceWindow.scrollHorizontal: whenNeeded + *sourceWindow.translations: #override \n\ + : SelectStart() SelectWord() \n\ + Shift: Update(warp) SelectEnd() PrintSelection() \n\ + : Update(warp) SelectEnd() \n\ + Down: next-line() Update()\n\ + Up: previous-line() Update() \n\ + CtrlL: redraw-display() Update() \n\ + CtrlN: next-line() Update() \n\ + CtrlP: previous-line() Update() \n\ + CtrlV: next-page() Update() \n\ + CtrlZ: scroll-one-line-up() Update() \n\ + MetaV: previous-page() Update() \n\ + MetaZ: scroll-one-line-down() Update() \n\ + :Meta\>: end-of-file() Update() \n\ + :Meta]: forward-paragraph() Update() \n\ + :Meta[: backward-paragraph() Update() + *messageWindow*font: variable + *messageWindow.min: 30 + *messageWindow.max: 30 + *dialogWindow.preferredPaneSize: 200 + *dialogWindow.resizeToPreferred: True + *dialogWindow.translations: #override \n\ + : SelectStart() SelectWord() \n\ + Shift: SelectEnd() PrintSelection() \n\ + : SelectEnd() \n + *commandWindow.preferredPaneSize: 135 + *commandWindow.skipAdjust: True + !*commandWindow.hSpace: 14 + !*commandWindow.vSpace: 10 + !*Command.height: 20 + !*Command.width: 60 + *List.columnSpacing: 10 + *displayWindow.preferredPaneSize: 50 + *displayWindow.skipAdjust: True + *displayWindow.scrollVertical: whenNeeded + *displayWindow.scrollHorizontal: whenNeeded + *displayWindow.translations: #override \n\ + : SelectStart() SelectWord() \n\ + Shift: SelectEnd() PrintSelection() \n\ + : SelectEnd() \n + *popup*showGrip: False + + *international: True + *fontSet: -*-fixed-medium-r-*--14 + !*inputMethod: kinput2 diff -Ncr xxgdb-1.12/datadpy.c xxgdb-1.12-I18N/datadpy.c *** xxgdb-1.12/datadpy.c Sat Apr 30 01:38:15 1994 --- xxgdb-1.12-I18N/datadpy.c Sat Dec 18 17:45:28 1999 *************** *** 303,309 **** --- 303,313 ---- Arg args[MAXARGS]; Cardinal n; Dimension dataDpyHeight, dataDpyWidth; + #ifdef I18N_MB + XFontSet text_font; + #else XFontStruct *text_font; + #endif static XtActionsRec datadpy_actions[] = { {"SelectPointer", (XtActionProc) SelectPointer}, *************** *** 357,363 **** --- 361,371 ---- XtSetArg(args[n], XtNleft, (XtArgVal) XawChainLeft); n++; XtSetArg(args[n], XtNleftMargin, (XtArgVal) LEFT_MARGIN); n++; + #ifdef I18N_MB + XtSetArg(args[n], XtNuseStringInPlace, (XtArgVal) False ); n++; + #else XtSetArg(args[n], XtNuseStringInPlace, (XtArgVal) True); n++; + #endif XtSetArg(args[n], XtNstring, (XtArgVal) dataDpy->buf); n++; XtSetArg(args[n], XtNlength, (XtArgVal) dataDpy->buflen); n++; XtSetArg(args[n], XtNeditType, (XtArgVal) XawtextRead); n++; *************** *** 371,384 **** --- 379,412 ---- /* Get the text font */ n = 0; + #ifdef I18N_MB + XtSetArg(args[n], XtNfontSet, &text_font); n++; + #else XtSetArg(args[n], XtNfont, &text_font); n++; + #endif XtGetValues(dataDpy->dataDpyWindow, args, n); /* Estimate the size of the text widget, dataDpyWindow, with the number of lines and the maximum length of a line. Assume fixed font width. */ + #ifdef I18N_MB + font_height = XExtentsOfFontSet(text_font)->max_logical_extent.height; + { + XRectangle ink_array_return, logical_array_return; + XRectangle overall_ink_return, overall_logical_return; + int num_chars_return; + XmbTextPerCharExtents( text_font, "A", 1, + &ink_array_return, + &logical_array_return, 1, + &num_chars_return, + &overall_ink_return, + &overall_logical_return ); + font_width = overall_logical_return.width; + } + #else font_height = text_font->ascent + text_font->descent; font_width = text_font->max_bounds.width; + #endif dataDpyHeight = dataDpy->numlines * font_height + 5; dataDpyWidth = dataDpy->maxLineLength * font_width + LEFT_MARGIN; if (dataDpyHeight > app_resources.dataDpyMaxHeight) diff -Ncr xxgdb-1.12/defs.h xxgdb-1.12-I18N/defs.h *** xxgdb-1.12/defs.h Sat Dec 3 10:33:33 1994 --- xxgdb-1.12-I18N/defs.h Sat Dec 18 17:38:37 1999 *************** *** 88,93 **** --- 88,96 ---- #include #include #include + #if defined I18N_MB && ProjectX == 5 + #include + #endif #include #if XtVersion < 11005 diff -Ncr xxgdb-1.12/dialog.c xxgdb-1.12-I18N/dialog.c *** xxgdb-1.12/dialog.c Sat Dec 18 19:22:08 1999 --- xxgdb-1.12-I18N/dialog.c Sat Dec 18 19:39:31 1999 *************** *** 76,81 **** --- 76,84 ---- */ #include + #ifdef I18N_MB + #include + #endif #include "global.h" #define DIALOGSIZE 100000 /* max size of dialogue window buffer */ *************** *** 83,89 **** --- 86,96 ---- Widget dialogWindow; /* text window as a dbx terminal */ Boolean FalseSignal = FALSE; /* set to TRUE before self-generated interrupt/quit signals */ + #ifdef I18N_MB + static wchar_t DialogText[DIALOGSIZE]; /* text buffer of wide char for widget */ + #else static char DialogText[DIALOGSIZE]; /* text buffer for widget */ + #endif static XawTextPosition StartPos; /* starting position of input text */ *************** *** 156,162 **** --- 163,173 ---- XawTextBlock textblock; XawTextPosition pos, beginPos; Cardinal i; + #ifdef I18N_MB + wchar_t *s; + #else char *s; + #endif textblock.firstPos = 0; textblock.length = 0; *************** *** 199,205 **** --- 210,221 ---- #endif char s[LINESIZ]; + #ifdef I18N_MB + wcstombs(s, DialogText + StartPos, LINESIZ); + #else strcpy(s, DialogText + StartPos); + #endif + #if 1 /* (PW)18DEC90 : bug xdbx : without the following line, xdbx sends several times the same lines when Prompt is false */ diff -Ncr xxgdb-1.12/source.c xxgdb-1.12-I18N/source.c *** xxgdb-1.12/source.c Sat Dec 18 17:54:25 1999 --- xxgdb-1.12-I18N/source.c Sat Dec 18 17:39:32 1999 *************** *** 82,87 **** --- 82,90 ---- /* #include */ #include #include + #ifdef I18N_MB + #include + #endif #include "global.h" #ifdef SYSV *************** *** 263,269 **** --- 266,282 ---- for (start=begin, nchars=end-begin; nchars > 0; start=begin+buffer.length, nchars-=buffer.length) { XawTextSourceRead(textsrc, start, &buffer, nchars); + #ifdef I18N_MB + if( buffer.format == XawFmtWide ) { + char mbbuf[buffer.length+1]; + wcstombs( mbbuf, (wchar_t *)buffer.ptr, buffer.length ); + strncat(s, mbbuf, buffer.length); + } + else + strncat(s, buffer.ptr, buffer.length); + #else strncat(s, buffer.ptr, buffer.length); + #endif } XStoreBytes(display, s, strlen(s)); if (end - begin > LINESIZ) free(s); *************** *** 306,312 **** --- 319,335 ---- for (start=left, nchars=right-left; nchars > 0; start=left+buffer.length, nchars-=buffer.length) { XawTextSourceRead(textsrc, start, &buffer, nchars); + #ifdef I18N_MB + if( buffer.format == XawFmtWide ) { + char mbbuf[buffer.length+1]; + wcstombs( mbbuf, (wchar_t *)buffer.ptr, buffer.length ); + strncat(s, mbbuf, buffer.length); + } + else + strncat(s, buffer.ptr, buffer.length); + #else strncat(s, buffer.ptr, buffer.length); + #endif } if (!strcmp(s, "")) return; *************** *** 521,526 **** --- 544,552 ---- XtSetArg(args[n], XtNtype, (XtArgVal)XawAsciiFile); n++; XtSetArg(args[n], XtNstring, (XtArgVal)"/dev/null"); n++; XtSetArg(args[n], XtNscrollVertical, (XtArgVal) XawtextScrollAlways);n++; + #ifdef I18N_MB + XtSetArg(args[n], XtNuseStringInPlace, False ); n++; + #endif sourceWindow = XtCreateManagedWidget("sourceWindow", asciiTextWidgetClass, sourceForm, args, n); diff -Ncr xxgdb-1.12/xdbx.c xxgdb-1.12-I18N/xdbx.c *** xxgdb-1.12/xdbx.c Fri Apr 21 11:37:31 1995 --- xxgdb-1.12-I18N/xdbx.c Sat Dec 18 17:41:15 1999 *************** *** 235,240 **** --- 235,244 ---- : SelectEnd() \\n", "*popup*showGrip: False", "*bindings: emacs", + #ifdef I18N_MB + "*international: True", + "*fontSet: -*-fixed-medium-r-*--14", + #endif NULL, }; *************** *** 466,471 **** --- 470,479 ---- progname = argv[0]; /* (MJH) */ + #ifdef I18N_MB + XtSetLanguageProc(NULL, NULL, NULL); + #endif + #ifndef GDB /* (PW)12MAR93 : for gdb, use pwd command of gdb */ #ifdef SYSV getcwd((char *)cwd, MAXPATHLEN);