Thu Nov 9 19:22:18 PST 2000 Michael Jennings <mej@eterm.org>

Fixed the error message bug I noticed.  There's also a big5 fix from
	Chung-Yen Chang <candyz@cle.linux.org.tw>, and I got rid of some
	tiny memory leaks in the X data, the first of which was noticed by
	zed@linuxpower.org.


SVN revision: 3844
This commit is contained in:
Michael Jennings 2000-11-10 03:26:04 +00:00
parent bb859961aa
commit 9e8120cb88
6 changed files with 42 additions and 5 deletions

View File

@ -3938,3 +3938,11 @@ Tue Oct 31 19:33:09 PST 2000 Michael Jennings <mej@eterm.org>
in their names.
-------------------------------------------------------------------------------
Thu Nov 9 19:22:18 PST 2000 Michael Jennings <mej@eterm.org>
Fixed the error message bug I noticed. There's also a big5 fix from
Chung-Yen Chang <candyz@cle.linux.org.tw>, and I got rid of some
tiny memory leaks in the X data, the first of which was noticed by
zed@linuxpower.org.
-------------------------------------------------------------------------------

View File

@ -577,6 +577,21 @@ if test "x$MULTI_CHARSET_TYPE" != "x"; then
FONT2="fixed"
FONT3="8x13"
FONT4="9x15"
elif test "$MULTI_CHARSET_TYPE" = "big5"; then
AC_MSG_RESULT(big5)
AC_DEFINE(MULTI_CHARSET)
DEF_FONT_IDX=0
MULTICHAR_ENCODING="big5"
FONT0="8x16"
FONT1="9x18"
FONT2="10x20"
FONT3="12x24"
FONT4="13x26"
MFONT0="-*-ming-medium-r-normal--16-*-*-*-c-*-big5-0"
MFONT1="-*-ming-medium-r-normal--18-*-*-*-c-*-big5-0"
MFONT2="-*-ming-medium-r-normal--20-*-*-*-c-*-big5-0"
MFONT3="-*-ming-medium-r-normal--24-*-*-*-c-*-big5-0"
MFONT4="-*-ming-medium-r-normal--26-*-*-*-c-*-big5-0"
else
MULTI_CHARSET_TYPE=""
fi

View File

@ -327,9 +327,12 @@ handle_client_message(event_t *ev)
unsigned long Size, RemainingBytes;
XGetWindowProperty(Xdisplay, Xroot, DndSelection, 0L, 1000000L, False, AnyPropertyType, &ActualType, &ActualFormat, &Size, &RemainingBytes, &data);
XChangeProperty(Xdisplay, Xroot, XA_CUT_BUFFER0, XA_STRING, 8, PropModeReplace, data, strlen(data));
selection_paste(Xroot, XA_CUT_BUFFER0, True);
XSetInputFocus(Xdisplay, Xroot, RevertToNone, CurrentTime);
if (data != NULL) {
XChangeProperty(Xdisplay, Xroot, XA_CUT_BUFFER0, XA_STRING, 8, PropModeReplace, data, strlen(data));
selection_paste(Xroot, XA_CUT_BUFFER0, True);
XSetInputFocus(Xdisplay, Xroot, RevertToNone, CurrentTime);
XFree(data);
}
return 1;
}
#endif /* OFFIX_DND */

View File

@ -286,7 +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 or sjis or euckr)",
OPT_LONG("mencoding", "multichar encoding mode (eucj, sjis, euckr, or big5)",
&rs_multichar_encoding),
#endif /* MULTI_CHARSET */
#ifdef USE_XIM
@ -3240,7 +3240,8 @@ parse_multichar(char *buff, void *state)
if (rs_multichar_encoding != NULL) {
if (BEG_STRCASECMP(rs_multichar_encoding, "eucj")
&& BEG_STRCASECMP(rs_multichar_encoding, "sjis")
&& BEG_STRCASECMP(rs_multichar_encoding, "euckr")) {
&& BEG_STRCASECMP(rs_multichar_encoding, "euckr")
&& BEG_STRCASECMP(rs_multichar_encoding, "big5")) {
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;

View File

@ -1814,6 +1814,7 @@ get_desktop_window(void)
} else {
continue;
}
XFree(data);
if (type != None) {
D_PIXMAP(("Found desktop as window 0x%08x\n", w));
if (w != Xroot) {
@ -1871,6 +1872,7 @@ get_desktop_pixmap(void)
XGetWindowProperty(Xdisplay, desktop_window, prop, 0L, 1L, False, AnyPropertyType, &type, &format, &length, &after, &data);
if (type == XA_PIXMAP) {
p = *((Pixmap *) data);
XFree(data);
if (p != None) {
D_PIXMAP((" Found pixmap 0x%08x\n", p));
if (orig_desktop_pixmap == p) {
@ -1912,6 +1914,8 @@ get_desktop_pixmap(void)
}
}
}
} else {
XFree(data);
}
}
if (prop2 != None) {
@ -1924,6 +1928,7 @@ get_desktop_pixmap(void)
free_desktop_pixmap();
pix = *((Pixel *) data);
XFree(data);
D_PIXMAP((" Found solid color 0x%08x\n", pix));
gcvalue.foreground = pix;
gcvalue.background = pix;
@ -1934,6 +1939,8 @@ get_desktop_pixmap(void)
D_PIXMAP(("Created solid color pixmap 0x%08x for desktop_pixmap.\n", color_pixmap));
LIBAST_X_FREE_GC(gc);
return (desktop_pixmap = color_pixmap);
} else {
XFree(data);
}
}
D_PIXMAP(("No suitable attribute found.\n"));

View File

@ -88,6 +88,9 @@ eterm_bootstrap(int argc, char *argv[])
PABLO_START_TRACING();
getcwd(initial_dir, PATH_MAX);
libast_set_program_name(PACKAGE);
libast_set_program_version(VERSION);
/* Open display, get options/resources and create the window */
if ((display_name = getenv("DISPLAY")) == NULL)
display_name = ":0";