summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--acconfig.h1
-rw-r--r--configure.in78
-rw-r--r--src/command.c20
-rw-r--r--src/e.c134
-rw-r--r--src/e.h4
-rw-r--r--src/feature.h9
-rw-r--r--src/options.c24
-rw-r--r--src/options.h1
-rw-r--r--src/screen.c22
-rw-r--r--src/screen.h6
-rw-r--r--src/term.c29
-rw-r--r--src/term.h1
-rw-r--r--themes/Eterm/theme.cfg.in16
-rw-r--r--themes/Makefile.am1
-rw-r--r--themes/auto/theme.cfg.in16
-rw-r--r--themes/cEterm/theme.cfg.in16
-rw-r--r--themes/chooser/theme.cfg.in16
-rw-r--r--themes/emacs/theme.cfg.in16
-rw-r--r--themes/irc/theme.cfg.in16
-rw-r--r--themes/mutt/theme.cfg.in16
-rw-r--r--themes/trans/theme.cfg.in16
-rw-r--r--utils/Etwinop28
-rw-r--r--utils/Makefile.am6
24 files changed, 211 insertions, 296 deletions
diff --git a/ChangeLog b/ChangeLog
index d7a0d3f..22da86c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4010,3 +4010,18 @@ Fri Nov 24 18:53:13 PST 2000 Michael Jennings <mej@eterm.org>
fixes XIM-related seg faults during clean-up.
-------------------------------------------------------------------------------
+Fri Dec 29 14:39:09 PST 2000 Michael Jennings <mej@eterm.org>
+
+ Moved the HAVE_SAVED_UIDS define into a configure option so that the
+ FreeBSD folks will have an easier time with it.
+
+ Fixed "make distcheck" which broke at some point.
+
+ That X stuff in clean_exit() should only happen if we're debugging.
+ Nobody but me should have to deal with those random hangs. :-)
+
+ Added a patch for multibyte cursor support from Michael C. Wu
+ <keichii@iteration.net> and Sung-Hyun Nam <namsh@lgic.co.kr>, along
+ with some other FreeBSD-related patches from Mr. Wu.
+
+-------------------------------------------------------------------------------
diff --git a/acconfig.h b/acconfig.h
index 0854802..dbc750d 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -360,6 +360,7 @@
#undef TIMER_IDENT
#undef UTMP_IDENT
#undef WINDOWS_IDENT
+#undef HAVE_SAVED_UIDS
/* Leave that blank line there!! Autoheader needs it.
diff --git a/configure.in b/configure.in
index 0633e3d..0212c91 100644
--- a/configure.in
+++ b/configure.in
@@ -13,28 +13,28 @@ AC_SUBST(AUTHORS)
AC_DEFINE_UNQUOTED(AUTHORS, "$AUTHORS")
dnl# Find RCS Ident info from source files
-AC_DEFINE_UNQUOTED(ACTIONS_IDENT, "`grep '$''Id:' src/actions.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(BUTTONS_IDENT, "`grep '$''Id:' src/buttons.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(COMMAND_IDENT, "`grep '$''Id:' src/command.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(DRAW_IDENT, "`grep '$''Id:' src/draw.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(E_IDENT, "`grep '$''Id:' src/e.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(EVENTS_IDENT, "`grep '$''Id:' src/events.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(FONT_IDENT, "`grep '$''Id:' src/font.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(GRKELOT_IDENT, "`grep '$''Id:' src/grkelot.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(MAIN_IDENT, "`grep '$''Id:' src/main.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(MENUS_IDENT, "`grep '$''Id:' src/menus.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(MISC_IDENT, "`grep '$''Id:' src/misc.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(NETDISP_IDENT, "`grep '$''Id:' src/netdisp.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(OPTIONS_IDENT, "`grep '$''Id:' src/options.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(PIXMAP_IDENT, "`grep '$''Id:' src/pixmap.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(SCREEN_IDENT, "`grep '$''Id:' src/screen.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(SCROLLBAR_IDENT, "`grep '$''Id:' src/scrollbar.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(STARTUP_IDENT, "`grep '$''Id:' src/startup.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(SYSTEM_IDENT, "`grep '$''Id:' src/system.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(TERM_IDENT, "`grep '$''Id:' src/term.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(TIMER_IDENT, "`grep '$''Id:' src/timer.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(UTMP_IDENT, "`grep '$''Id:' src/utmp.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
-AC_DEFINE_UNQUOTED(WINDOWS_IDENT, "`grep '$''Id:' src/windows.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(ACTIONS_IDENT, "`grep '$''Id:' $srcdir/src/actions.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(BUTTONS_IDENT, "`grep '$''Id:' $srcdir/src/buttons.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(COMMAND_IDENT, "`grep '$''Id:' $srcdir/src/command.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(DRAW_IDENT, "`grep '$''Id:' $srcdir/src/draw.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(E_IDENT, "`grep '$''Id:' $srcdir/src/e.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(EVENTS_IDENT, "`grep '$''Id:' $srcdir/src/events.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(FONT_IDENT, "`grep '$''Id:' $srcdir/src/font.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(GRKELOT_IDENT, "`grep '$''Id:' $srcdir/src/grkelot.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(MAIN_IDENT, "`grep '$''Id:' $srcdir/src/main.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(MENUS_IDENT, "`grep '$''Id:' $srcdir/src/menus.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(MISC_IDENT, "`grep '$''Id:' $srcdir/src/misc.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(NETDISP_IDENT, "`grep '$''Id:' $srcdir/src/netdisp.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(OPTIONS_IDENT, "`grep '$''Id:' $srcdir/src/options.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(PIXMAP_IDENT, "`grep '$''Id:' $srcdir/src/pixmap.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(SCREEN_IDENT, "`grep '$''Id:' $srcdir/src/screen.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(SCROLLBAR_IDENT, "`grep '$''Id:' $srcdir/src/scrollbar.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(STARTUP_IDENT, "`grep '$''Id:' $srcdir/src/startup.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(SYSTEM_IDENT, "`grep '$''Id:' $srcdir/src/system.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(TERM_IDENT, "`grep '$''Id:' $srcdir/src/term.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(TIMER_IDENT, "`grep '$''Id:' $srcdir/src/timer.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(UTMP_IDENT, "`grep '$''Id:' $srcdir/src/utmp.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
+AC_DEFINE_UNQUOTED(WINDOWS_IDENT, "`grep '$''Id:' $srcdir/src/windows.c | sed 's/^.*\$''Id: //;s/ \$.*$//;s/.v / /;s/ Exp//'`")
dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
if test ! -z "${CFLAGS}" -o ! -z "${CCOPTS}"; then
@@ -264,6 +264,34 @@ AC_ARG_WITH(pty-group,
AC_MSG_RESULT(none)
fi
)
+AC_MSG_CHECKING(for saved uids)
+AC_ARG_WITH(saved-uids, [ --with(out)-saved-uids specify that your OS has (does not have) saved uids, default is to guess],
+ if test "$withval" = "yes"; then
+ AC_MSG_RESULT(user specified yes)
+ HAVE_SAVED_UIDS=1
+ elif test "$withval" = "no"; then
+ AC_MSG_RESULT(user specified no)
+ HAVE_SAVED_UIDS=0
+ fi
+)
+if test "x$HAVE_SAVED_UIDS" = "x"; then
+ case `uname -s` in
+ Linux | linux | GNU*Linux) HAVE_SAVED_UIDS=1 ;;
+ HP*UX | hp*ux) HAVE_SAVED_UIDS=1 ;;
+ AIX | aix) HAVE_SAVED_UIDS=1 ;;
+ Solaris | SunOS | [Ss]un) HAVE_SAVED_UIDS=1 ;;
+ *BSD) HAVE_SAVED_UIDS=0 ;;
+ esac
+ if test "x$HAVE_SAVED_UIDS" = "x"; then
+ AC_MSG_RESULT(unknown...assuming no support)
+ HAVE_SAVED_UIDS=0
+ elif test $HAVE_SAVED_UIDS -eq 1; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SAVED_UIDS)
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
dnl#
dnl# X LIBRARIES
@@ -861,15 +889,15 @@ for i in utils/kEsetroot themes/Eterm/theme.cfg themes/auto/theme.cfg themes/cEt
} else {
print $0;
}
- }' $i.in > $i
+ }' $srcdir/$i.in > $srcdir/$i
done
&%
changequote([, ])dnl
dnl If we're not building with Imlib support, don't build Esetroot
if test -z "$GRLIBS"; then
- sed -e 's/^bin_PROGRAMS.*$//g' doc/Makefile > doc/Makefile.new
- mv doc/Makefile.new doc/Makefile
+ sed -e 's/^bin_PROGRAMS.*$//g' $srcdir/doc/Makefile > $srcdir/doc/Makefile.new
+ mv $srcdir/doc/Makefile.new $srcdir/doc/Makefile
fi
echo "
diff --git a/src/command.c b/src/command.c
index 662e703..a2a3526 100644
--- a/src/command.c
+++ b/src/command.c
@@ -1138,18 +1138,18 @@ clean_exit(void)
}
}
conf_free_subsystem();
+# ifdef USE_XIM
+ if (xim_input_context) {
+ XUnsetICFocus(xim_input_context);
+ XDestroyIC(xim_input_context);
+ }
+ if (xim_input_method) {
+ XCloseIM(xim_input_method);
+ }
+# endif
+ XCloseDisplay(Xdisplay);
}
#endif
-#ifdef USE_XIM
- if (xim_input_context) {
- XUnsetICFocus(xim_input_context);
- XDestroyIC(xim_input_context);
- }
- if (xim_input_method) {
- XCloseIM(xim_input_method);
- }
-#endif
- XCloseDisplay(Xdisplay);
privileges(INVOKE);
diff --git a/src/e.c b/src/e.c
index a94b982..e080932 100644
--- a/src/e.c
+++ b/src/e.c
@@ -269,137 +269,3 @@ enl_send_and_wait(char *msg)
signal(SIGALRM, old_alrm);
return (reply);
}
-
-void
-eterm_ipc_parse(char *str)
-{
-
- char *params;
-
- ASSERT(str != NULL);
-
- params = strchr(str, ':');
- if (params) {
- *params++ = 0; /* Nuke the colon */
- }
- if (!strcasecmp(str, "echo") || !strcasecmp(str, "tty_write")) {
- if (params) {
- tt_write((unsigned char *) params, strlen(params));
- } else {
- print_error("IPC Error: Invalid syntax in command \"%s\"\n", str);
- }
- } else if (!strcasecmp(str, "parse")) {
- if (params) {
- cmd_write((unsigned char *) params, strlen(params));
- } else {
- print_error("IPC Error: Invalid syntax in command \"%s\"\n", str);
- }
- } else if (!strcasecmp(str, "enl_send")) {
- if (params) {
- enl_ipc_send(params);
- } else {
- print_error("IPC Error: Invalid syntax in command \"%s\"\n", str);
- }
- } else if (!strcasecmp(str, "enl_query")) {
- if (params) {
- char *reply, header[512];
-
- reply = enl_send_and_wait(params);
- snprintf(header, sizeof(header), "Enlightenment IPC Reply to \"%s\":\n", params);
- tt_write((unsigned char *) header, strlen(header));
- tt_write((unsigned char *) reply, strlen(reply));
- tt_write((unsigned char *) "\n", 1);
- FREE(reply);
- } else {
- print_error("IPC Error: Invalid syntax in command \"%s\"\n", str);
- }
- } else if (!strcasecmp(str, "winop")) {
- if (params) {
- eterm_handle_winop(params);
- } else {
- print_error("IPC Error: Invalid syntax in command \"%s\"\n", str);
- }
- } else if (!strcasecmp(str, "exit")) {
- exit(0);
- } else {
- print_error("IPC Error: Unrecognized command \"%s\"\n", str);
- }
-}
-
-void
-eterm_ipc_send(char *str)
-{
-
- return;
- str = NULL;
-}
-
-char *
-eterm_ipc_get(void)
-{
-
- return (NULL);
-}
-
-void
-eterm_handle_winop(char *action)
-{
-
- char *winid;
- Window win = 0;
-
- ASSERT(action != NULL);
-
- winid = strchr(action, ' ');
- if (winid) {
- win = (Window) strtoul(winid + 1, (char **) NULL, 0);
- }
- if (win == 0) { /* If no window ID was given, or if the strtoul() call failed */
- win = TermWin.parent;
- }
- if (!BEG_STRCASECMP(action, "raise")) {
- XRaiseWindow(Xdisplay, win);
- } else if (!BEG_STRCASECMP(action, "lower")) {
- XLowerWindow(Xdisplay, win);
- } else if (!BEG_STRCASECMP(action, "map")) {
- XMapWindow(Xdisplay, win);
- } else if (!BEG_STRCASECMP(action, "unmap")) {
- XUnmapWindow(Xdisplay, win);
- } else if (!BEG_STRCASECMP(action, "move")) {
- int x, y, n;
- char *xx, *yy;
-
- n = num_words(action);
- if (n == 3 || n == 4) {
- if (n == 3) {
- win = TermWin.parent;
- }
- xx = get_pword(n - 1, action);
- yy = get_pword(n, action);
- x = (int) strtol(xx, (char **) NULL, 0);
- y = (int) strtol(yy, (char **) NULL, 0);
- XMoveWindow(Xdisplay, win, x, y);
- }
- } else if (!BEG_STRCASECMP(action, "resize")) {
- int w, h, n;
- char *ww, *hh;
-
- n = num_words(action);
- if (n == 3 || n == 4) {
- if (n == 3) {
- win = TermWin.parent;
- }
- ww = get_pword(n - 1, action);
- hh = get_pword(n, action);
- w = (int) strtol(ww, (char **) NULL, 0);
- h = (int) strtol(hh, (char **) NULL, 0);
- XResizeWindow(Xdisplay, win, w, h);
- }
- } else if (!BEG_STRCASECMP(action, "kill")) {
- XKillClient(Xdisplay, win);
- } else if (!BEG_STRCASECMP(action, "iconify")) {
- XIconifyWindow(Xdisplay, win, Xscreen);
- } else {
- print_error("IPC Error: Unrecognized window operation \"%s\"\n", action);
- }
-}
diff --git a/src/e.h b/src/e.h
index c39360f..fc27d2e 100644
--- a/src/e.h
+++ b/src/e.h
@@ -45,11 +45,7 @@ extern void enl_ipc_send(char *);
extern char *enl_wait_for_reply(void);
extern char *enl_ipc_get(const char *);
extern void enl_query_for_image(unsigned char);
-extern void eterm_ipc_parse(char *);
-extern void eterm_ipc_send(char *);
-extern char *eterm_ipc_get(void);
extern char *enl_send_and_wait(char *);
-extern void eterm_handle_winop(char *);
_XFUNCPROTOEND
diff --git a/src/feature.h b/src/feature.h
index c3c1100..39b05e6 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -226,15 +226,6 @@
/* Make it an option */
#define MAPALERT_OPTION
-/********************* utmp logging support *********************/
-
-/* Added security for systems with saved uids and gids. If you don't define
- * this, and you're not on HP-UX with _HPUX_SOURCE defined, Eterm processes
- * may seem to be owned by root. But if you define this and don't have them,
- * the utmp and tty stuff could break. Do some testing. DO NOT get this one
- * wrong! */
-#define HAVE_SAVED_UIDS
-
/********************* Config file parser options *********************/
/* Allow evaluation of expressions like `echo hello` in config files. The
diff --git a/src/options.c b/src/options.c
index b6f34c3..d1f418e 100644
--- a/src/options.c
+++ b/src/options.c
@@ -286,8 +286,7 @@ static const struct {
OPT_LONG("mfont2", "multichar font 2", &rs_mfont[2]),
OPT_LONG("mfont3", "multichar font 3", &rs_mfont[3]),
OPT_LONG("mfont4", "multichar font 4", &rs_mfont[4]),
- OPT_LONG("mencoding", "multichar encoding mode (eucj, sjis, euckr, or big5)",
- &rs_multichar_encoding),
+ OPT_LONG("mencoding", "multichar encoding mode (eucj/sjis/euckr/big5/gb)", &rs_multichar_encoding),
#endif /* MULTI_CHARSET */
#ifdef USE_XIM
OPT_LONG("input-method", "XIM input method", &rs_input_method),
@@ -2252,6 +2251,13 @@ parse_toggles(char *buff, void *state)
Options &= ~(Opt_report_as_keysyms);
}
+ } else if (!BEG_STRCASECMP(buff, "mbyte_cursor ")) {
+ if (bool_val) {
+ Options |= Opt_mbyte_cursor;
+ } else {
+ Options &= ~(Opt_mbyte_cursor);
+ }
+
} else if (!BEG_STRCASECMP(buff, "itrans ") || !BEG_STRCASECMP(buff, "immotile_trans ")) {
if (bool_val) {
image_toggles |= IMOPT_ITRANS;
@@ -3290,12 +3296,12 @@ parse_multichar(char *buff, void *state)
if (BEG_STRCASECMP(rs_multichar_encoding, "eucj")
&& BEG_STRCASECMP(rs_multichar_encoding, "sjis")
&& BEG_STRCASECMP(rs_multichar_encoding, "euckr")
- && BEG_STRCASECMP(rs_multichar_encoding, "big5")) {
+ && BEG_STRCASECMP(rs_multichar_encoding, "big5")
+ && BEG_STRCASECMP(rs_multichar_encoding, "gb")) {
print_error("Parse error in file %s, line %lu: Invalid multichar encoding mode \"%s\"\n",
file_peek_path(), file_peek_line(), rs_multichar_encoding);
return NULL;
}
- set_multichar_encoding(rs_multichar_encoding);
} else {
print_error("Parse error in file %s, line %lu: Invalid parameter list \"\" for attribute encoding\n",
file_peek_path(), file_peek_line());
@@ -3324,6 +3330,7 @@ parse_multichar(char *buff, void *state)
file_peek_path(), file_peek_line(), NONULL(tmp));
FREE(tmp);
}
+
} else {
print_error("Parse error in file %s, line %lu: Attribute \"%s\" is not valid within context multichar\n",
file_peek_path(), file_peek_line(), buff);
@@ -3768,6 +3775,9 @@ post_parse(void)
RESET_AND_ASSIGN(rs_mfont[i], NULL);
}
}
+ if (rs_multichar_encoding != NULL) {
+ set_multichar_encoding(rs_multichar_encoding);
+ }
#endif
}
if (rs_font_effects) {
@@ -4105,12 +4115,6 @@ post_parse(void)
}
#endif
-#ifdef MULTI_CHARSET
- if (rs_multichar_encoding != NULL) {
- set_multichar_encoding(rs_multichar_encoding);
- }
-#endif
-
if (rs_pipe_name) {
struct stat fst;
diff --git a/src/options.h b/src/options.h
index e2c5a1e..24518c2 100644
--- a/src/options.h
+++ b/src/options.h
@@ -81,6 +81,7 @@
# define Opt_install (1LU << 21)
# define Opt_scrollbar_floating (1LU << 22)
# define Opt_double_buffer (1LU << 23)
+# define Opt_mbyte_cursor (1LU << 24)
# define IMOPT_TRANS (1U << 0)
# define IMOPT_ITRANS (1U << 1)
diff --git a/src/screen.c b/src/screen.c
index 83f494b..00eb45e 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1570,6 +1570,28 @@ scr_printscreen(int fullhist)
#endif
}
+#ifdef MULTI_CHARSET
+int
+scr_multi1(void)
+{
+ rend_t rend;
+
+ rend = screen.rend[screen.row + TermWin.saveLines][screen.col];
+ return ((rend & RS_multiMask) == RS_multi1);
+}
+
+int
+scr_multi2(void)
+{
+ rend_t rend;
+
+ if (screen.col == 0)
+ return 0;
+ rend = screen.rend[screen.row + TermWin.saveLines][screen.col - 1];
+ return ((rend & RS_multiMask) == RS_multi2);
+}
+#endif /* MULTI_CHARSET */
+
/*
* Refresh the screen
* drawn_text/drawn_rend contain the screen information before the update.
diff --git a/src/screen.h b/src/screen.h
index d678aeb..8dc07db 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -25,7 +25,7 @@
#endif
/************ Macros and Definitions ************/
-#define WRAP_CHAR (MAX_COLS + 1)
+#define WRAP_CHAR (0xff)
#define PROP_SIZE 4096
#define TABSIZE 8 /* default tab size */
@@ -307,6 +307,10 @@ extern void mouse_tracking(int, int, int, int, int);
extern void debug_PasteIt(unsigned char *, int);
extern int debug_selection(void);
extern void debug_colors(void);
+#ifdef MULTI_CHARSET
+extern int scr_multi2(void);
+extern int scr_multi1(void);
+#endif /* MULTI_CHARSET */
_XFUNCPROTOEND
diff --git a/src/term.c b/src/term.c
index 8f7963a..41edbc4 100644
--- a/src/term.c
+++ b/src/term.c
@@ -447,6 +447,12 @@ lookup_key(XEvent * ev)
#else
kbuf[0] = (((PrivateModes & PrivMode_BackSpace) ? !(shft | ctrl) : (shft | ctrl)) ? '\b' : '\177');
#endif
+#ifdef MULTI_CHARSET
+ if ((Options & Opt_mbyte_cursor) && scr_multi2()) {
+ memmove(kbuf + len, kbuf, len);
+ len *= 2;
+ }
+#endif /* MULTI_CHARSET */
break;
/* Tab key is normal unless it's shift-tab. */
@@ -502,6 +508,14 @@ lookup_key(XEvent * ev)
kbuf[1] = 'O';
kbuf[2] = ("dacb"[keysym - XK_Left]);
}
+#ifdef MULTI_CHARSET
+ if ((Options & Opt_mbyte_cursor)
+ && ((keysym == XK_Left && scr_multi2())
+ || (keysym == XK_Right && scr_multi1()))) {
+ memmove(kbuf + len, kbuf, len);
+ len *= 2;
+ }
+#endif /* MULTI_CHARSET */
break;
/* Keypad and normal PgUp/PgDn */
@@ -588,6 +602,13 @@ lookup_key(XEvent * ev)
case XK_Delete:
#ifdef KS_DELETE
len = strlen(strcpy(kbuf, KS_DELETE));
+#ifdef MULTI_CHARSET
+ if ((Options & Opt_mbyte_cursor) && scr_multi1())
+ {
+ memmove(kbuf + len, kbuf, len);
+ len *= 2;
+ }
+#endif /* MULTI_CHARSET */
#endif
break;
@@ -1223,7 +1244,7 @@ process_xterm_seq(void)
if (ch) {
if (ch == '\t')
ch = ' '; /* translate '\t' to space */
- else if ((ch < ' ') && !(isspace(ch) && arg == XTerm_EtermIPC))
+ else if (ch < ' ')
return; /* control character - exit */
if (n < sizeof(string) - 1)
@@ -2324,12 +2345,6 @@ xterm_seq(int op, const char *str)
#endif /* PIXMAP_SUPPORT */
break;
- case XTerm_EtermIPC:
- for (; (nstr = (char *) strsep(&tnstr, ";"));) {
- eterm_ipc_parse(nstr);
- }
- break;
-
case XTerm_restoreFG:
#ifdef XTERM_COLOR_CHANGE
set_window_color(fgColor, str);
diff --git a/src/term.h b/src/term.h
index 982eccd..effd990 100644
--- a/src/term.h
+++ b/src/term.h
@@ -69,7 +69,6 @@
/* rxvt/Eterm extensions of XTerm escape sequences: ESC ] Ps;Pt BEL */
# define XTerm_Takeover 5 /* Steal keyboard focus and raise window */
# define XTerm_EtermSeq 6 /* Eterm proprietary escape sequences */
-# define XTerm_EtermIPC 7 /* Eterm escape code/text IPC interface */
# define XTerm_Pixmap 20 /* new bg pixmap */
# define XTerm_DumpScreen 30 /* Dump contents of scrollback to a file */
# define XTerm_restoreFG 39 /* change default fg color */
diff --git a/themes/Eterm/theme.cfg.in b/themes/Eterm/theme.cfg.in
index 9313929..9f52a6c 100644
--- a/themes/Eterm/theme.cfg.in
+++ b/themes/Eterm/theme.cfg.in
@@ -90,14 +90,14 @@ begin main
# The Multichar support options. Same goes for these fonts as for the normal
# ones. The "encoding" attribute can be either "eucj" or "sjis" or "euckr"
# or big5 or gb
-# begin multichar
-# font 0 @MFONT0@
-# font 1 @MFONT1@
-# font 2 @MFONT2@
-# font 3 @MFONT3@
-# font 4 @MFONT4@
-# encoding @MULTICHAR_ENCODING@
-# end multichar
+ begin multichar
+ font 0 @MFONT0@
+ font 1 @MFONT1@
+ font 2 @MFONT2@
+ font 3 @MFONT3@
+ font 4 @MFONT4@
+ encoding @MULTICHAR_ENCODING@
+ end multichar
# Define the imageclasses.
begin imageclasses
diff --git a/themes/Makefile.am b/themes/Makefile.am
index 00804b8..3fab2d6 100644
--- a/themes/Makefile.am
+++ b/themes/Makefile.am
@@ -23,6 +23,7 @@ install-data-hook:
$(CHMOD) 755 $(DESTDIR)$(pkgdatadir)/themes/$$i ; \
$(CHMOD) 644 $(DESTDIR)$(pkgdatadir)/themes/$$i/???* ; \
rm -f $(DESTDIR)$(pkgdatadir)/themes/$$i/theme.cfg.in ; \
+ rm -f $(DESTDIR)$(pkgdatadir)/themes/$$i/theme.cfg.in.orig ; \
else \
echo "ALERT! Not overwriting $$i theme in $(DESTDIR)$(pkgdatadir)/themes. You will need to update this theme manually." ; \
fi ; \
diff --git a/themes/auto/theme.cfg.in b/themes/auto/theme.cfg.in
index ec5f1c2..9bf58b2 100644
--- a/themes/auto/theme.cfg.in
+++ b/themes/auto/theme.cfg.in
@@ -90,14 +90,14 @@ begin main
# The Multichar support options. Same goes for these fonts as for the normal
# ones. The "encoding" attribute can be either "eucj" or "sjis" or "euckr"
# or big5 or gb
-# begin multichar
-# font 0 @MFONT0@
-# font 1 @MFONT1@
-# font 2 @MFONT2@
-# font 3 @MFONT3@
-# font 4 @MFONT4@
-# encoding @MULTICHAR_ENCODING@
-# end multichar
+ begin multichar
+ font 0 @MFONT0@
+ font 1 @MFONT1@
+ font 2 @MFONT2@
+ font 3 @MFONT3@
+ font 4 @MFONT4@
+ encoding @MULTICHAR_ENCODING@
+ end multichar
# Define the imageclasses.
begin imageclasses
diff --git a/themes/cEterm/theme.cfg.in b/themes/cEterm/theme.cfg.in
index e963c47..230ba64 100644
--- a/themes/cEterm/theme.cfg.in
+++ b/themes/cEterm/theme.cfg.in
@@ -89,14 +89,14 @@ begin main
# The Multichar support options. Same goes for these fonts as for the normal
# ones. The "encoding" attribute can be either "eucj" or "sjis" or "euckr"
# or big5 or gb
-# begin multichar
-# font 0 @MFONT0@
-# font 1 @MFONT1@
-# font 2 @MFONT2@
-# font 3 @MFONT3@
-# font 4 @MFONT4@
-# encoding @MULTICHAR_ENCODING@
-# end multichar
+ begin multichar
+ font 0 @MFONT0@
+ font 1 @MFONT1@
+ font 2 @MFONT2@
+ font 3 @MFONT3@
+ font 4 @MFONT4@
+ encoding @MULTICHAR_ENCODING@
+ end multichar
# Define the imageclasses.
begin imageclasses
diff --git a/themes/chooser/theme.cfg.in b/themes/chooser/theme.cfg.in
index 9ed3758..2fdea5e 100644
--- a/themes/chooser/theme.cfg.in
+++ b/themes/chooser/theme.cfg.in
@@ -90,14 +90,14 @@ begin main
# The Multichar support options. Same goes for these fonts as for the normal
# ones. The "encoding" attribute can be either "eucj" or "sjis" or "euckr"
# or big5 or gb
-# begin multichar
-# font 0 @MFONT0@
-# font 1 @MFONT1@
-# font 2 @MFONT2@
-# font 3 @MFONT3@
-# font 4 @MFONT4@
-# encoding @MULTICHAR_ENCODING@
-# end multichar
+ begin multichar
+ font 0 @MFONT0@
+ font 1 @MFONT1@
+ font 2 @MFONT2@
+ font 3 @MFONT3@
+ font 4 @MFONT4@
+ encoding @MULTICHAR_ENCODING@
+ end multichar
# Define the imageclasses.
begin imageclasses
diff --git a/themes/emacs/theme.cfg.in b/themes/emacs/theme.cfg.in
index 5fc3bec..b7d2e76 100644
--- a/themes/emacs/theme.cfg.in
+++ b/themes/emacs/theme.cfg.in
@@ -90,14 +90,14 @@ begin main
# The Multichar support options. Same goes for these fonts as for the normal
# ones. The "encoding" attribute can be either "eucj" or "sjis" or "euckr"
# or big5 or gb
-# begin multichar
-# font 0 @MFONT0@
-# font 1 @MFONT1@
-# font 2 @MFONT2@
-# font 3 @MFONT3@
-# font 4 @MFONT4@
-# encoding @MULTICHAR_ENCODING@
-# end multichar
+ begin multichar
+ font 0 @MFONT0@
+ font 1 @MFONT1@
+ font 2 @MFONT2@
+ font 3 @MFONT3@
+ font 4 @MFONT4@
+ encoding @MULTICHAR_ENCODING@
+ end multichar
# Define the imageclasses.
begin imageclasses
diff --git a/themes/irc/theme.cfg.in b/themes/irc/theme.cfg.in
index edda17d..1e67561 100644
--- a/themes/irc/theme.cfg.in
+++ b/themes/irc/theme.cfg.in
@@ -92,14 +92,14 @@ begin main
# The Multichar support options. Same goes for these fonts as for the normal
# ones. The "encoding" attribute can be either "eucj" or "sjis" or "euckr"
# or big5 or gb
-# begin multichar
-# font 0 @MFONT0@
-# font 1 @MFONT1@
-# font 2 @MFONT2@
-# font 3 @MFONT3@
-# font 4 @MFONT4@
-# encoding @MULTICHAR_ENCODING@
-# end multichar
+ begin multichar
+ font 0 @MFONT0@
+ font 1 @MFONT1@
+ font 2 @MFONT2@
+ font 3 @MFONT3@
+ font 4 @MFONT4@
+ encoding @MULTICHAR_ENCODING@
+ end multichar
# Define the imageclasses.
begin imageclasses
diff --git a/themes/mutt/theme.cfg.in b/themes/mutt/theme.cfg.in
index 3a6c1df..4d6683c 100644
--- a/themes/mutt/theme.cfg.in
+++ b/themes/mutt/theme.cfg.in
@@ -90,14 +90,14 @@ begin main
# The Multichar support options. Same goes for these fonts as for the normal
# ones. The "encoding" attribute can be either "eucj" or "sjis" or "euckr"
# or big5 or gb
-# begin multichar
-# font 0 @MFONT0@
-# font 1 @MFONT1@
-# font 2 @MFONT2@
-# font 3 @MFONT3@
-# font 4 @MFONT4@
-# encoding @MULTICHAR_ENCODING@
-# end multichar
+ begin multichar
+ font 0 @MFONT0@
+ font 1 @MFONT1@
+ font 2 @MFONT2@
+ font 3 @MFONT3@
+ font 4 @MFONT4@
+ encoding @MULTICHAR_ENCODING@
+ end multichar
# Define the imageclasses.
begin imageclasses
diff --git a/themes/trans/theme.cfg.in b/themes/trans/theme.cfg.in
index d00d985..09baad2 100644
--- a/themes/trans/theme.cfg.in
+++ b/themes/trans/theme.cfg.in
@@ -90,14 +90,14 @@ begin main
# The Multichar support options. Same goes for these fonts as for the normal
# ones. The "encoding" attribute can be either "eucj" or "sjis" or "euckr"
# or big5 or gb
-# begin multichar
-# font 0 @MFONT0@
-# font 1 @MFONT1@
-# font 2 @MFONT2@
-# font 3 @MFONT3@
-# font 4 @MFONT4@
-# encoding @MULTICHAR_ENCODING@
-# end multichar
+ begin multichar
+ font 0 @MFONT0@
+ font 1 @MFONT1@
+ font 2 @MFONT2@
+ font 3 @MFONT3@
+ font 4 @MFONT4@
+ encoding @MULTICHAR_ENCODING@
+ end multichar
# Define the imageclasses.
begin imageclasses
diff --git a/utils/Etwinop b/utils/Etwinop
deleted file mode 100644
index e6be8dc..0000000
--- a/utils/Etwinop
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# Eterm Window Operation Aid
-#
-# $Id$
-
-if [ $# -eq 0 ]; then
- echo "Syntax: Etwinop { raise | lower | map | unmap | move | resize | iconify | kill } [windowid]"
- echo
- exit 0
-fi
-
-# Code to figure out if we need 'echo -n' or 'echo "\c"', stolen from configure
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-'
- else
- ac_n=-n ac_c=
- fi
-else
- ac_n= ac_c='\c'
-fi
-
-winop="$*"
-
-echo $ac_n "]7;winop:$winop$ac_c"
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 533cd94..29c33e9 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -1,7 +1,7 @@
# $Id$
bin_PROGRAMS = Esetroot Etbg Ettable
-bin_SCRIPTS = Etcolors Etwinop Etsearch kEsetroot
+bin_SCRIPTS = Etcolors Etsearch kEsetroot
Esetroot_SOURCES = Esetroot.c
Esetroot_LDFLAGS = -rpath $(libdir):$(pkglibdir)
@@ -9,6 +9,6 @@ Esetroot_LDFLAGS = -rpath $(libdir):$(pkglibdir)
Etbg_SOURCES = Etbg.c
Ettable_SOURCES = Ettable.c
-EXTRA_DIST = Etbg.c Esetroot.c Ettable.c Makefile.am Makefile.in Etcolors Etwinop Etsearch \
- kEsetroot.in
+EXTRA_DIST = Etbg.c Esetroot.c Ettable.c Makefile.am \
+ Makefile.in Etcolors Etsearch kEsetroot.in