1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-13 23:36:08 +00:00

Update to 0.8.8.

PR:	ports/9779
Submitted by:	MANTANI Nobutaka <nobutaka@nobutaka.com>
This commit is contained in:
SADA Kenji 1999-01-30 22:00:14 +00:00
parent 988a5991df
commit 0dd52dfa96
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=16436
6 changed files with 285 additions and 272 deletions

View File

@ -1,16 +1,18 @@
# New ports collection makefile for: eterm # New ports collection makefile for: eterm
# Version required: 0.8.7 # Version required: 0.8.8
# Date created: 11th December 1998 # Date created: 11th December 1998
# Whom: MANTANI Nobutaka <nobutaka@nobutaka.com> # Whom: MANTANI Nobutaka <nobutaka@nobutaka.com>
# #
# $Id: Makefile,v 1.1.1.1 1998/12/16 18:48:20 sada Exp $ # $Id: Makefile,v 1.2 1999/01/14 17:08:22 vanilla Exp $
# #
DISTNAME= Eterm-0.8.7 DISTNAME= Eterm-0.8.8
PKGNAME= ja-eterm-0.8.7 PKGNAME= ja-eterm-0.8.8
CATEGORIES= japanese x11 CATEGORIES= japanese x11
MASTER_SITES= ftp://ftp.enlightenment.org/pub/Eterm/ \ MASTER_SITES= http://www.eterm.org/download/ \
ftp://ftp.eterm.org/pub/Eterm/ \
http://www.tcserv.com/archive/E/ \ http://www.tcserv.com/archive/E/ \
http://eterm.is.nontoxic.org/download/ \
http://www.tcserv.com/archive/E/old/ http://www.tcserv.com/archive/E/old/
MAINTAINER= nobutaka@nobutaka.com MAINTAINER= nobutaka@nobutaka.com

View File

@ -1 +1 @@
MD5 (Eterm-0.8.7.tar.gz) = 00de2b1fb7d35bff42337a9723195114 MD5 (Eterm-0.8.8.tar.gz) = 19c0571f900757e5a90ac36baac3f79b

View File

@ -1,6 +1,6 @@
--- src/command.c.orig Thu Oct 22 01:13:37 1998 --- src/command.c.orig Tue Jan 12 05:33:45 1999
+++ src/command.c Tue Dec 15 21:40:24 1998 +++ src/command.c Sat Jan 30 01:39:34 1999
@@ -89,6 +89,10 @@ @@ -90,6 +90,10 @@
# include <X11/Xlocale.h> # include <X11/Xlocale.h>
# endif # endif
#endif /* NO_XLOCALE */ #endif /* NO_XLOCALE */
@ -11,7 +11,7 @@
#ifdef USE_GETGRNAME #ifdef USE_GETGRNAME
# include <grp.h> # include <grp.h>
#endif #endif
@@ -249,7 +253,7 @@ @@ -251,7 +255,7 @@
/* defines: */ /* defines: */
@ -20,21 +20,24 @@
#define STRING_MAX 512 /* max string size for process_xterm_seq() */ #define STRING_MAX 512 /* max string size for process_xterm_seq() */
#define ESC_ARGS 32 /* max # of args for esc sequences */ #define ESC_ARGS 32 /* max # of args for esc sequences */
@@ -525,8 +529,8 @@ @@ -526,8 +530,10 @@
#endif /* OFFIX_DND */ #endif /* OFFIX_DND */
#ifndef NO_XLOCALE #ifndef NO_XLOCALE
-static char *rs_inputMethod = ""; /* XtNinputMethod */ -static char *rs_inputMethod = ""; /* XtNinputMethod */
-static char *rs_preeditType = NULL; /* XtNpreeditType */ -static char *rs_preeditType = NULL; /* XtNpreeditType */
+extern char *rs_inputMethod; /* XtNinputMethod */ +#ifdef USE_XIM
+extern char *rs_preeditType; /* XtNpreeditType */ +extern char *rs_inputMethod;
+extern char *rs_preeditType;
+#endif
static XIC Input_Context; /* input context */ static XIC Input_Context; /* input context */
#endif /* NO_XLOCALE */ #endif /* NO_XLOCALE */
@@ -575,9 +579,18 @@ @@ -576,9 +582,20 @@
#ifndef NO_XLOCALE #ifndef NO_XLOCALE
void init_xlocale (void); void init_xlocale (void);
+#ifdef USE_XIM
+void IMInstantiateCallback(Display *display, XPointer client_data, XPointer call_data); +void IMInstantiateCallback(Display *display, XPointer client_data, XPointer call_data);
+void IMDestroyCallback(XIM xim, XPointer client_data, XPointer call_data); +void IMDestroyCallback(XIM xim, XPointer client_data, XPointer call_data);
+void IMSetStatusPosition(void); +void IMSetStatusPosition(void);
@ -43,6 +46,7 @@
+void setColor(unsigned long *fg, unsigned long *bg); +void setColor(unsigned long *fg, unsigned long *bg);
+void setSize(XRectangle *size); +void setSize(XRectangle *size);
+extern void setPosition(XPoint *pos); +extern void setPosition(XPoint *pos);
+#endif
#else #else
# define init_xlocale() ((void)0) # define init_xlocale() ((void)0)
#endif #endif
@ -50,18 +54,16 @@
/*for Big Paste Handling */ /*for Big Paste Handling */
static int v_doPending(void); static int v_doPending(void);
@@ -1843,8 +1856,8 @@ @@ -2238,8 +2255,6 @@
DndSelection = XInternAtom(Xdisplay, "DndSelection", False); DndSelection = XInternAtom(Xdisplay, "DndSelection", False);
#endif /* OFFIX_DND */ #endif /* OFFIX_DND */
- init_xlocale(); - init_xlocale();
- -
+ XRegisterIMInstantiateCallback(Xdisplay, NULL, NULL, NULL, IMInstantiateCallback, NULL);
+
/* get number of available file descriptors */ /* get number of available file descriptors */
#ifdef _POSIX_VERSION #ifdef _POSIX_VERSION
num_fds = sysconf(_SC_OPEN_MAX); num_fds = sysconf(_SC_OPEN_MAX);
@@ -1878,131 +1891,12 @@ @@ -2273,131 +2288,21 @@
#ifndef NO_XLOCALE #ifndef NO_XLOCALE
void void
init_xlocale (void) { init_xlocale (void) {
@ -73,21 +75,24 @@
- int found; - int found;
- -
- Input_Context = NULL; - Input_Context = NULL;
- + char *locale;
# ifdef KANJI # ifdef KANJI
+ setlocale(LC_CTYPE, "ja_JP.EUC"); - setlocale(LC_CTYPE, "");
+# else -# endif
setlocale(LC_CTYPE, "");
# endif
- -
- if (rs_inputMethod == NULL - if (rs_inputMethod == NULL
-# ifndef KANJI -# ifndef KANJI
- || !*rs_inputMethod /* required ? */ - || !*rs_inputMethod /* required ? */
-# endif + locale = setlocale(LC_CTYPE, "");
# endif
- ) { - ) {
- if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) - if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
- xim = XOpenIM(Xdisplay, NULL, NULL, NULL); - xim = XOpenIM(Xdisplay, NULL, NULL, NULL);
- } else { +#ifdef USE_XIM
+ if (locale == NULL) {
+ print_error("Setting locale failed.");
} else {
- strcpy(tmp, rs_inputMethod); - strcpy(tmp, rs_inputMethod);
- for (s = tmp; *s; /*nil*/) { - for (s = tmp; *s; /*nil*/) {
- -
@ -191,15 +196,21 @@
- print_error("Failed to create input context"); - print_error("Failed to create input context");
-# endif -# endif
- XCloseIM(xim); - XCloseIM(xim);
- } + if (strcmp(locale, "C") != 0) {
+ setTermFontSet(); + setTermFontSet();
+ XRegisterIMInstantiateCallback(Xdisplay, NULL, NULL, NULL, IMInstantiateCallback, NULL);
+ }
}
+#endif
} }
#endif /* NO_XLOCALE */ #endif /* NO_XLOCALE */
/**/ /**/
@@ -2066,19 +1960,19 @@ @@ -2459,22 +2364,21 @@
numlock_state = (ev->xkey.state & Mod5Mask); /* numlock toggle */
PrivMode((!numlock_state), PrivMode_aplKP);
} }
-
#ifndef NO_XLOCALE -#ifndef NO_XLOCALE
- if (!XFilterEvent(ev, *(&ev->xkey.window))) { - if (!XFilterEvent(ev, *(&ev->xkey.window))) {
- if (Input_Context != NULL) { - if (Input_Context != NULL) {
- Status status_return; - Status status_return;
@ -213,34 +224,46 @@
- &compose); - &compose);
- } - }
- } else len = 0; - } else len = 0;
-#else /* NO_XLOCALE */
+#ifdef USE_XIM
+ len = 0; + len = 0;
+ if (Input_Context != NULL) { + if (Input_Context != NULL) {
+ Status status_return; + Status status_return;
+ +
+ kbuf[0] = '\0'; + kbuf[0] = '\0';
+ len = XmbLookupString(Input_Context, &ev->xkey, kbuf, + len = XmbLookupString(Input_Context, &ev->xkey, kbuf,
+ sizeof(kbuf), &keysym, + sizeof(kbuf), &keysym,
+ &status_return); + &status_return);
+ } else { + } else {
+ len = XLookupString(&ev->xkey, kbuf, + len = XLookupString(&ev->xkey, kbuf,
+ sizeof(kbuf), &keysym, + sizeof(kbuf), &keysym,
+ &compose); + &compose);
+ } + }
#else /* NO_XLOCALE */ +#else /* USE_XIM */
len = XLookupString(&ev->xkey, kbuf, sizeof(kbuf), &keysym, &compose); len = XLookupString(&ev->xkey, kbuf, sizeof(kbuf), &keysym, &compose);
/* /*
@@ -2664,6 +2558,9 @@ * have unmapped Latin[2-4] entries -> Latin1
@@ -2484,7 +2388,7 @@
len = 1;
kbuf[0] = (keysym & 0xFF);
}
-#endif /* NO_XLOCALE */
+#endif /* USE_XIM */
if (len && (Options & Opt_homeOnInput)) TermWin.view_start = 0;
@@ -3087,6 +2991,9 @@
#else #else
scr_refresh(refresh_type); scr_refresh(refresh_type);
#endif #endif
+#ifndef NO_XLOCALE +#ifdef USE_XIM
+ IMSendSpot(); + IMSendSpot();
+#endif +#endif
} }
/* characters already read in */ /* characters already read in */
@@ -2677,14 +2574,10 @@ @@ -3096,14 +3003,10 @@
#endif
v_doPending(); v_doPending();
while (XPending(Xdisplay)) { /* process pending X events */ while (XPending(Xdisplay)) { /* process pending X events */
- -
@ -255,186 +278,159 @@
/* in case button actions pushed chars to cmdbuf */ /* in case button actions pushed chars to cmdbuf */
if CHARS_READ() RETURN_CHAR(); if CHARS_READ() RETURN_CHAR();
@@ -2765,6 +2658,9 @@ @@ -3178,6 +3081,9 @@
scr_refresh(refresh_type); scr_refresh(refresh_type);
if (scrollbar_visible()) if (scrollbar_visible())
scrollbar_show(1); scrollbar_show(1);
+#ifndef NO_XLOCALE +#ifdef USE_XIM
+ IMSendSpot(); + IMSendSpot();
+#endif +#endif
} }
} }
} }
@@ -3453,6 +3349,9 @@ @@ -3867,6 +3773,9 @@
refresh_count = refresh_limit = 0; refresh_count = refresh_limit = 0;
scr_refresh(refresh_type); scr_refresh(refresh_type);
scrollbar_show(mouseoffset); scrollbar_show(mouseoffset);
+#ifndef NO_XLOCALE +#ifdef USE_XIM
+ IMSendSpot(); + IMSendSpot();
+#endif +#endif
#endif #endif
} else if ((ev->xany.window == scrollBar.win) && scrollbar_isMotion()) { } else if ((ev->xany.window == scrollBar.win) && scrollbar_isMotion()) {
Window unused_root, unused_child; Window unused_root, unused_child;
@@ -3470,6 +3369,9 @@ @@ -3884,6 +3793,9 @@
refresh_count = refresh_limit = 0; refresh_count = refresh_limit = 0;
scr_refresh(refresh_type); scr_refresh(refresh_type);
scrollbar_show(mouseoffset); scrollbar_show(mouseoffset);
+#ifndef NO_XLOCALE +#ifdef USE_XIM
+ IMSendSpot(); + IMSendSpot();
+#endif +#endif
} }
#ifdef PROFILE_X_EVENTS #ifdef PROFILE_X_EVENTS
P_SETTIMEVAL(motion_stop); P_SETTIMEVAL(motion_stop);
@@ -4215,6 +4117,9 @@ @@ -4626,6 +4538,9 @@
} }
} }
Gr_do_graphics(cmd, nargs, args, text); Gr_do_graphics(cmd, nargs, args, text);
+#ifndef NO_XLOCALE +#ifdef USE_XIM
+ IMSendSpot(); + IMSendSpot();
+#endif +#endif
#endif #endif
} }
@@ -4759,7 +4664,7 @@ @@ -5864,6 +5779,9 @@
TermWin.ncol = szHint.width;
TermWin.nrow = szHint.height;
-
+
change_font(1, NULL);
#if (MENUBAR_MAX)
szHint.base_height += (delay_menu_drawing ? menuBar_TotalHeight() : 0);
@@ -4879,7 +4784,7 @@
XClearWindow(Xdisplay, TermWin.vt);
}
}
-
+
XDefineCursor(Xdisplay, TermWin.vt, TermWin_cursor);
#ifdef USE_ACTIVE_TAGS
XSelectInput(Xdisplay, TermWin.vt,
@@ -5369,6 +5274,7 @@
XResizeWindow (Xdisplay, TermWin.parent, width, height); XResizeWindow (Xdisplay, TermWin.parent, width, height);
resize_window1 (width, height); resize_window1 (width, height);
+#ifdef USE_XIM
+ IMSetStatusPosition(); + IMSetStatusPosition();
+#endif
} }
} }
@@ -5402,6 +5308,7 @@ @@ -5897,6 +5815,9 @@
/* parent already resized */ /* parent already resized */
resize_window1 (width, height); resize_window1 (width, height);
+#ifdef USE_XIM
+ IMSetStatusPosition(); + IMSetStatusPosition();
+#endif
} }
/* xterm sequences - title, iconName, color (exptl) */ /* xterm sequences - title, iconName, color (exptl) */
@@ -5924,3 +5831,339 @@ @@ -6505,3 +6426,340 @@
#undef FNUM_RANGE #undef FNUM_RANGE
} }
+#ifndef NO_XLOCALE +#ifdef USE_XIM
+void +void
+setSize(XRectangle *size) +setSize(XRectangle *size)
+{ +{
+ size->x = TermWin.internalBorder; + size->x = TermWin.internalBorder;
+ size->y = TermWin.internalBorder; + size->y = TermWin.internalBorder;
+ size->width = Width2Pixel(TermWin.ncol); + size->width = Width2Pixel(TermWin.ncol);
+ size->height = Height2Pixel(TermWin.nrow); + size->height = Height2Pixel(TermWin.nrow);
+} +}
+ +
+void +void
+setColor(unsigned long *fg, unsigned long *bg) +setColor(unsigned long *fg, unsigned long *bg)
+{ +{
+ *fg = PixColors[fgColor]; + *fg = PixColors[fgColor];
+ *bg = PixColors[bgColor]; + *bg = PixColors[bgColor];
+} +}
+ +
+void +void
+IMSendSpot(void) +IMSendSpot(void)
+{ +{
+ XPoint spot; + XPoint spot;
+ XVaNestedList preedit_attr; + XVaNestedList preedit_attr;
+ XIMStyle input_style; + XIMStyle input_style;
+ +
+ if (Input_Context == NULL) + if (Input_Context == NULL)
+ return;
+ else {
+ XGetICValues(Input_Context, XNInputStyle, &input_style, NULL);
+ if (!(input_style & XIMPreeditPosition))
+ return; + return;
+ } + else {
+ setPosition(&spot) ; + XGetICValues(Input_Context, XNInputStyle, &input_style, NULL);
+ if (!(input_style & XIMPreeditPosition))
+ return;
+ }
+ setPosition(&spot) ;
+ +
+ preedit_attr = XVaCreateNestedList( 0, XNSpotLocation, &spot, NULL ) ; + preedit_attr = XVaCreateNestedList( 0, XNSpotLocation, &spot, NULL ) ;
+ XSetICValues( Input_Context, XNPreeditAttributes, preedit_attr, NULL ) ; + XSetICValues( Input_Context, XNPreeditAttributes, preedit_attr, NULL ) ;
+ XFree( preedit_attr ) ; + XFree( preedit_attr ) ;
+} +}
+ +
+void +void
+setTermFontSet(void) +setTermFontSet(void)
+{ +{
+ char *string; + char *string;
+ long length, i; + long length, i;
+ +
+ if (TermWin.fontset != NULL){ + if (TermWin.fontset != NULL){
+ XFreeFontSet(Xdisplay, TermWin.fontset); + XFreeFontSet(Xdisplay, TermWin.fontset);
+ TermWin.fontset = NULL; + TermWin.fontset = NULL;
+ } + }
+ +
+ length = 0; + length = 0;
+ for (i = 0; i < NFONTS; i++) {
+ if (rs_font[i])
+ length += strlen(rs_font[i]) + 1;
+# ifdef KANJI
+ if (rs_kfont[i])
+ length += strlen(rs_kfont[i]) + 1;
+# endif
+ }
+ if ((string = malloc( length )) != NULL) {
+ char **missing_charsetlist, *def_string;
+ int missing_charsetcount;
+
+ string[0] = '\0';
+ for (i = 0; i < NFONTS; i++) { + for (i = 0; i < NFONTS; i++) {
+ if (rs_font[i]){ + if (rs_font[i])
+ strcat(string, rs_font[i]); + length += strlen(rs_font[i]) + 1;
+ strcat(string, ",");
+ }
+# ifdef KANJI +# ifdef KANJI
+ if(rs_kfont[i]){ + if (rs_kfont[i])
+ strcat(string, rs_kfont[i]); + length += strlen(rs_kfont[i]) + 1;
+ strcat(string, ",");
+ }
+# endif +# endif
+ } + }
+ length = strlen(string); + if ((string = malloc( length )) != NULL) {
+ if (length > 0 && string[ length - 1 ] == ',') { + char **missing_charsetlist, *def_string;
+ string[length - 1] = '\0'; + int missing_charsetcount;
+ length--;
+ }
+ if (length > 0) {
+ TermWin.fontset = XCreateFontSet
+ (Xdisplay, string,
+ &missing_charsetlist, &missing_charsetcount, &def_string);
+ }
+ free(string);
+ } else {
+ TermWin.fontset = NULL;
+ }
+}
+ +
+void + string[0] = '\0';
+XProcessEvent(Display *display) + for (i = 0; i < NFONTS; i++) {
+{ + if (rs_font[i]){
+ XEvent xev; + strcat(string, rs_font[i]);
+ XNextEvent(display, &xev); + strcat(string, ",");
+#ifndef NO_XLOCALE + }
+ if( !XFilterEvent( &xev, xev.xany.window ) ) +# ifdef KANJI
+ process_x_event( &xev ) ; + if(rs_kfont[i]){
+#else + strcat(string, rs_kfont[i]);
+ process_x_event( &xev ) ; + strcat(string, ",");
+#endif + }
+# endif
+ }
+ length = strlen(string);
+ if (length > 0 && string[ length - 1 ] == ',') {
+ string[length - 1] = '\0';
+ length--;
+ }
+ if (length > 0) {
+ TermWin.fontset = XCreateFontSet(Xdisplay, string,
+ &missing_charsetlist, &missing_charsetcount,
+ &def_string);
+ }
+ free(string);
+ } else {
+ TermWin.fontset = NULL;
+ }
+} +}
+ +
+void +void
@ -457,141 +453,142 @@
+ Input_Context = NULL; + Input_Context = NULL;
+ if (rs_inputMethod == NULL + if (rs_inputMethod == NULL
+# ifndef KANJI +# ifndef KANJI
+ || !*rs_inputMethod /* required ? */ + || !*rs_inputMethod /* required ? */
+# endif +# endif
+ ) { + ) {
+ if ((p = XSetLocaleModifiers("")) != NULL && *p) + if ((p = XSetLocaleModifiers("")) != NULL && *p)
+ xim = XOpenIM(Xdisplay, NULL, NULL, NULL); + xim = XOpenIM(Xdisplay, NULL, NULL, NULL);
+ } else { + } else {
+ strcpy(tmp, rs_inputMethod); + strcpy(tmp, rs_inputMethod);
+ for (s = tmp; *s; /*nil*/) { + for (s = tmp; *s; /*nil*/) {
+ +
+ char *end, *next_s; + char *end, *next_s;
+ +
+ for (; *s && isspace(*s); s++); + for (; *s && isspace(*s); s++);
+ if (!*s) break; + if (!*s) break;
+ end = s; + end = s;
+ for (; *end && (*end != ','); end++); + for (; *end && (*end != ','); end++);
+ next_s = end--; + next_s = end--;
+ for (; (end >= s) && isspace(*end); end--); + for (; (end >= s) && isspace(*end); end--);
+ *(end + 1) = '\0'; + *(end + 1) = '\0';
+ +
+ if (*s) { + if (*s) {
+ strcpy(buf, "@im="); + strcpy(buf, "@im=");
+ strcat(buf, s); + strcat(buf, s);
+ if ((p = XSetLocaleModifiers(buf)) != NULL && *p + if ((p = XSetLocaleModifiers(buf)) != NULL && *p
+ && (xim = XOpenIM(Xdisplay, NULL, NULL, NULL)) != NULL) + && (xim = XOpenIM(Xdisplay, NULL, NULL, NULL)) != NULL)
+ break; + break;
+ }
+ if (!*next_s) break;
+ s = (next_s + 1);
+ } + }
+ if (!*next_s) break;
+ s = (next_s + 1);
+ }
+ } + }
+ +
+ if (xim == NULL && (p = XSetLocaleModifiers("")) != NULL && *p) + if (xim == NULL && (p = XSetLocaleModifiers("")) != NULL && *p)
+ xim = XOpenIM(Xdisplay, NULL, NULL, NULL); + xim = XOpenIM(Xdisplay, NULL, NULL, NULL);
+ +
+ if (xim == NULL) { + if (xim == NULL) {
+# ifdef DEBUG_X11 +# ifdef DEBUG_X11
+ print_error("Failed to open input method"); + print_error("Failed to open input method");
+# endif +# endif
+ return; + return;
+ } + }
+ +
+ XSetIMValues(xim, XNDestroyCallback, &ximcallback, NULL); + XSetIMValues(xim, XNDestroyCallback, &ximcallback, NULL);
+ +
+ if (XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL) || !xim_styles) { + if (XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL) || !xim_styles) {
+# ifdef DEBUG_X11 +# ifdef DEBUG_X11
+ print_error("input method doesn't support any style"); + print_error("input method doesn't support any style");
+# endif +# endif
+ XCloseIM(xim); + XCloseIM(xim);
+ return; + return;
+ } + }
+ +
+ strcpy(tmp, (rs_preeditType ? rs_preeditType : "OverTheSpot")); + strcpy(tmp, (rs_preeditType ? rs_preeditType : "OverTheSpot"));
+ for (found = 0, s = tmp; *s && !found; /*nil*/) { + for (found = 0, s = tmp; *s && !found; /*nil*/) {
+ +
+ unsigned short i; + unsigned short i;
+ char *end, *next_s; + char *end, *next_s;
+ +
+ while (*s && isspace(*s)) s++; + while (*s && isspace(*s)) s++;
+ if (!*s) break; + if (!*s) break;
+ end = s; + end = s;
+ while (*end && (*end != ',')) end++; + while (*end && (*end != ',')) end++;
+ next_s = end--; + next_s = end--;
+ while ((end >= s) && isspace(*end)) *end-- = 0; + while ((end >= s) && isspace(*end)) *end-- = 0;
+ +
+ if (!strcmp(s, "OverTheSpot")) input_style = (XIMPreeditPosition | XIMStatusNothing); + if (!strcmp(s, "OverTheSpot"))
+ else if (!strcmp(s, "OffTheSpot")) input_style = (XIMPreeditArea | XIMStatusArea); + input_style = (XIMPreeditPosition | XIMStatusNothing);
+ else if (!strcmp(s, "Root")) + else
+ input_style = (XIMPreeditNothing | XIMStatusNothing); + if (!strcmp(s, "OffTheSpot"))
+ + input_style = (XIMPreeditArea | XIMStatusArea);
+ for (i = 0; i < xim_styles->count_styles; i++) { + else
+ if (input_style == xim_styles->supported_styles[i]) { + if (!strcmp(s, "Root"))
+ found = 1; + input_style = (XIMPreeditNothing | XIMStatusNothing);
+ break; +
+ } + for (i = 0; i < xim_styles->count_styles; i++) {
+ if (input_style == xim_styles->supported_styles[i]) {
+ found = 1;
+ break;
+ } + }
+ s = next_s; + }
+ s = next_s;
+ } + }
+ XFree(xim_styles); + XFree(xim_styles);
+ +
+ if (found == 0) { + if (found == 0) {
+# ifdef DEBUG_X11 +# ifdef DEBUG_X11
+ print_error ("input method doesn't support my preedit type"); + print_error ("input method doesn't support my preedit type");
+# endif +# endif
+ XCloseIM(xim); + XCloseIM(xim);
+ return; + return;
+ } + }
+ +
+ /* + /*
+ * This program only understands the Root preedit_style yet + * This program only understands the Root preedit_style yet
+ * Then misc.preedit_type should default to: + * Then misc.preedit_type should default to:
+ * "OverTheSpot,OffTheSpot,Root" + * "OverTheSpot,OffTheSpot,Root"
+ * /MaF + * /MaF
+ */ + */
+ if ((input_style != (XIMPreeditPosition | XIMStatusNothing)) && + if ((input_style != (XIMPreeditPosition | XIMStatusNothing)) &&
+ (input_style != (XIMPreeditArea | XIMStatusArea)) && + (input_style != (XIMPreeditArea | XIMStatusArea)) &&
+ (input_style != (XIMPreeditNothing | XIMStatusNothing))) { + (input_style != (XIMPreeditNothing | XIMStatusNothing))) {
+# ifdef DEBUG_X11 +# ifdef DEBUG_X11
+ print_error ("This program only supports the preedit type"); + print_error ("This program only supports the preedit type");
+# endif +# endif
+ XCloseIM(xim); + XCloseIM(xim);
+ return; + return;
+ } + }
+ +
+ if (input_style & XIMPreeditPosition) { + if (input_style & XIMPreeditPosition) {
+ setSize(&rect); + setSize(&rect);
+ setPosition(&spot); + setPosition(&spot);
+ setColor(&fg, &bg); + setColor(&fg, &bg);
+ +
+ preedit_attr = XVaCreateNestedList + preedit_attr = XVaCreateNestedList(0,
+ (0, + XNArea, &rect,
+ XNArea, &rect, + XNSpotLocation, &spot,
+ XNSpotLocation, &spot, + XNForeground, fg,
+ XNForeground, fg, + XNBackground, bg,
+ XNBackground, bg, + XNFontSet, TermWin.fontset,
+ XNFontSet, TermWin.fontset, + XNLineSpace, 0,
+ XNLineSpace, 0, + NULL);
+ NULL);
+ } else if (input_style & XIMPreeditArea) { + } else if (input_style & XIMPreeditArea) {
+ setColor(&fg, &bg); + setColor(&fg, &bg);
+ +
+ preedit_attr = XVaCreateNestedList + preedit_attr = XVaCreateNestedList(0,
+ (0, + XNForeground, fg,
+ XNForeground, fg, + XNBackground, bg,
+ XNBackground, bg, + XNFontSet, TermWin.fontset,
+ XNFontSet, TermWin.fontset, + XNLineSpace, 0,
+ XNLineSpace, 0, + NULL);
+ NULL);
+ +
+ status_attr = XVaCreateNestedList + status_attr = XVaCreateNestedList(0,
+ (0, + XNForeground, fg,
+ XNForeground, fg, + XNBackground, bg,
+ XNBackground, bg, + XNFontSet, TermWin.fontset,
+ XNFontSet, TermWin.fontset, + XNLineSpace, 0,
+ XNLineSpace, 0, + NULL);
+ NULL);
+ } + }
+ +
+ ximcallback.callback = IMDestroyCallback; + ximcallback.callback = IMDestroyCallback;
@ -608,9 +605,9 @@
+ XFree(status_attr); + XFree(status_attr);
+ if (Input_Context == NULL) { + if (Input_Context == NULL) {
+# ifdef DEBUG_X11 +# ifdef DEBUG_X11
+ print_error("Failed to create input context"); + print_error("Failed to create input context");
+# endif +# endif
+ XCloseIM(xim); + XCloseIM(xim);
+ } + }
+ +
+ if (input_style & XIMPreeditArea) { + if (input_style & XIMPreeditArea) {
@ -621,16 +618,16 @@
+void +void
+IMSetStatusPosition(void) +IMSetStatusPosition(void)
+{ +{
+ XIMStyle input_style; + XIMStyle input_style;
+ XRectangle rect, status_rect, *needed_rect; + XRectangle rect, status_rect, *needed_rect;
+ XVaNestedList preedit_attr, status_attr; + XVaNestedList preedit_attr, status_attr;
+ +
+ if (Input_Context == NULL) + if (Input_Context == NULL)
+ return; + return;
+ +
+ XGetICValues(Input_Context, XNInputStyle, &input_style, NULL); + XGetICValues(Input_Context, XNInputStyle, &input_style, NULL);
+ +
+ if (input_style & XIMPreeditArea) { + if (input_style & XIMPreeditArea) {
+ status_attr = XVaCreateNestedList(0, XNAreaNeeded, &needed_rect, NULL); + status_attr = XVaCreateNestedList(0, XNAreaNeeded, &needed_rect, NULL);
+ XGetICValues(Input_Context, XNStatusAttributes, status_attr, NULL); + XGetICValues(Input_Context, XNStatusAttributes, status_attr, NULL);
+ XFree(status_attr); + XFree(status_attr);
@ -659,13 +656,26 @@
+ XNStatusAttributes, status_attr, NULL); + XNStatusAttributes, status_attr, NULL);
+ XFree(preedit_attr); + XFree(preedit_attr);
+ XFree(status_attr); + XFree(status_attr);
+ } + }
+} +}
+ +
+void +void
+IMDestroyCallback(XIM xim, XPointer client_data, XPointer call_data) +IMDestroyCallback(XIM xim, XPointer client_data, XPointer call_data)
+{ +{
+ Input_Context = NULL; + Input_Context = NULL;
+ XRegisterIMInstantiateCallback(Xdisplay, NULL, NULL, NULL, IMInstantiateCallback, NULL); + XRegisterIMInstantiateCallback(Xdisplay, NULL, NULL, NULL, IMInstantiateCallback, NULL);
+}
+#endif /* USE_XIM */
+
+void
+XProcessEvent(Display *display)
+{
+ XEvent xev;
+ XNextEvent(display, &xev);
+#ifndef NO_XLOCALE
+ if( !XFilterEvent( &xev, xev.xany.window ) )
+ process_x_event( &xev ) ;
+#else
+ process_x_event( &xev ) ;
+#endif
+} +}
+#endif /* NO_XLOCALE */

View File

@ -1,30 +1,10 @@
--- themes/Makefile.in.orig Fri Oct 23 01:09:53 1998 --- themes/Makefile.in.orig Sat Jan 30 01:24:43 1999
+++ themes/Makefile.in Fri Dec 11 19:56:10 1998 +++ themes/Makefile.in Sat Jan 30 01:25:55 1999
@@ -196,17 +196,18 @@ @@ -205,6 +205,7 @@
-@for i in $(THEMES) ; do \ $(CHMOD) 755 $(pkgdatadir)/themes/$$i ; \
$(SED) -e 's%@''PREFIX''@%${prefix}%g' $$i/MAIN.in > $$i/MAIN ; \ $(CHMOD) 644 $(pkgdatadir)/themes/$$i/???* ; \
done rm -f $(pkgdatadir)/themes/$$i/MAIN.in ; \
- $(mkinstalldirs) $(pkglibdir)/themes
+ $(mkinstalldirs) $(pkgdatadir)/themes
-@for i in $(THEMES) ; do \
- if test ! -d $(pkglibdir)/themes/$$i ; then \
- echo "Installing $$i theme in $(pkglibdir)/themes" ; \
- $(mkinstalldirs) $(pkglibdir)/themes/$$i ; \
- $(CP) $$i/???* $(pkglibdir)/themes/$$i ; \
- $(CHMOD) 755 $(pkglibdir)/themes/$$i ; \
- $(CHMOD) 644 $(pkglibdir)/themes/$$i/???* ; \
- rm -f $(pkglibdir)/themes/$$i/MAIN.in ; \
+ if test ! -d $(pkgdatadir)/themes/$$i ; then \
+ echo "Installing $$i theme in $(pkgdatadir)/themes" ; \
+ $(mkinstalldirs) $(pkgdatadir)/themes/$$i ; \
+ $(CP) $$i/???* $(pkgdatadir)/themes/$$i ; \
+ $(CHMOD) 755 $(pkgdatadir)/themes/$$i ; \
+ $(CHMOD) 644 $(pkgdatadir)/themes/$$i/???* ; \
+ rm -f $(pkgdatadir)/themes/$$i/MAIN.in ; \
+ rm -f $(pkgdatadir)/themes/$$i/MAIN.in.orig ; \ + rm -f $(pkgdatadir)/themes/$$i/MAIN.in.orig ; \
else \ else \
- echo "ALERT! Not overwriting theme $$i in $(pkglibdir)/themes. You will need to update this theme manually." ; \ echo "ALERT! Not overwriting theme $$i in $(pkgdatadir)/themes. You will need to update this theme manually." ; \
+ echo "ALERT! Not overwriting theme $$i in $(pkgdatadir)/themes. You will need to update this theme manually." ; \
fi ; \ fi ; \
done
@if test ! -f $(HOME)/.active.tags ; then $(CP) active.tags $(HOME)/.active.tags ; \

View File

@ -6,6 +6,8 @@ If you want to input Japanese, use "--input-method" and
If you have a comment about Japanese input support for Eterm and If you have a comment about Japanese input support for Eterm and
this port, contact with MANTANI Nobutaka <nobutaka@nobutaka.com>. this port, contact with MANTANI Nobutaka <nobutaka@nobutaka.com>.
Further information about this port is available at
http://www.nobutaka.com/programs/Eterm.html .
Eterm Main Web Site -- <http://www.tcserv.com/Eterm/> Eterm Main Web Site -- <http://www.tcserv.com/Eterm/>
Eterm FAQ -- <http://www.tcserv.com/Eterm/FAQ.html> Eterm FAQ -- <http://www.tcserv.com/Eterm/FAQ.html>

View File

@ -10,19 +10,37 @@ lib/libEterm.so
lib/libEterm.so.8.7 lib/libEterm.so.8.7
@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R @unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R
@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %B @exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %B
share/Eterm/pix/014.png
share/Eterm/pix/backwave.jpg
share/Eterm/pix/button1.jpg
share/Eterm/pix/button5.jpg
share/Eterm/pix/circuit.png
share/Eterm/pix/fourthday.jpg
share/Eterm/pix/gaia.jpg
share/Eterm/pix/galleon.jpg
share/Eterm/pix/nebula.jpg
share/Eterm/pix/night_of_the_dragon.jpg
share/Eterm/pix/pixmaps.list
share/Eterm/themes/Eterm/Eterm.menu share/Eterm/themes/Eterm/Eterm.menu
share/Eterm/themes/Eterm/MAIN share/Eterm/themes/Eterm/MAIN
share/Eterm/themes/Eterm/pixmaps.list
share/Eterm/themes/chooser/MAIN share/Eterm/themes/chooser/MAIN
share/Eterm/themes/chooser/chooser.menu share/Eterm/themes/chooser/chooser.menu
share/Eterm/themes/chooser/pixmaps.list
share/Eterm/themes/emacs/MAIN share/Eterm/themes/emacs/MAIN
share/Eterm/themes/emacs/emacs.menu share/Eterm/themes/emacs/emacs.menu
share/Eterm/themes/emacs/pixmaps.list
share/Eterm/themes/irc/MAIN share/Eterm/themes/irc/MAIN
share/Eterm/themes/irc/irc.menu share/Eterm/themes/irc/irc.menu
share/Eterm/themes/irc/pixmaps.list
share/Eterm/themes/mutt/MAIN share/Eterm/themes/mutt/MAIN
share/Eterm/themes/mutt/mutt.menu share/Eterm/themes/mutt/mutt.menu
share/Eterm/themes/mutt/pixmaps.list
share/Eterm/themes/tn3270/MAIN share/Eterm/themes/tn3270/MAIN
share/Eterm/themes/tn3270/pixmaps.list
share/Eterm/themes/trans/MAIN share/Eterm/themes/trans/MAIN
share/Eterm/themes/trans/trans.menu share/Eterm/themes/trans/trans.menu
share/Eterm/themes/trans/pixmaps.list
share/Eterm/Eterm.help share/Eterm/Eterm.help
share/Eterm/Eterm.ref share/Eterm/Eterm.ref
share/Eterm/Eterm.tcap share/Eterm/Eterm.tcap
@ -39,4 +57,5 @@ share/Eterm/menu_cmd
@dirrm share/Eterm/themes/chooser @dirrm share/Eterm/themes/chooser
@dirrm share/Eterm/themes/Eterm @dirrm share/Eterm/themes/Eterm
@dirrm share/Eterm/themes @dirrm share/Eterm/themes
@dirrm share/Eterm/pix
@dirrm share/Eterm @dirrm share/Eterm