--- rxvt-unicode/src/main.C 2007/10/15 07:33:48 1.253 +++ rxvt-unicode/src/main.C 2007/10/31 09:55:23 1.255 @@ -40,14 +40,19 @@ #include #include -#ifdef TTY_GID_SUPPORT -# include -#endif - #ifdef HAVE_TERMIOS_H # include #endif +#ifdef HAVE_XSETLOCALE +# define X_LOCALE +# include +#else +# ifdef HAVE_SETLOCALE +# include +# endif +#endif + vector rxvt_term::termlist; // used to tell global functions which terminal instance is "active" @@ -90,7 +95,7 @@ text_t rxvt_composite_vec::compose (unicode_t c1, unicode_t c2) { compose_char *cc; - + // break compose chains, as stupid readline really likes to duplicate // composing characters for some reason near the end of a line. cc = (*this)[c1]; @@ -180,7 +185,7 @@ #ifdef USE_XIM im_ev (this, &rxvt_term::im_cb), #endif -#ifndef NO_BELL +#ifndef NO_BELL bell_ev (this, &rxvt_term::bell_cb), #endif termwin_ev (this, &rxvt_term::x_cb), @@ -431,7 +436,7 @@ mesg, BUFSIZ); rxvt_warn (strncat (mesg, "\n", BUFSIZ), event->resourceid); } - XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", + XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", mesg, BUFSIZ); rxvt_warn (strncat (mesg, "\n", BUFSIZ), event->serial); } @@ -515,10 +520,10 @@ if (option (Opt_transparent)) { bgPixmap.set_transparent (); -#ifdef HAVE_AFTERIMAGE +#ifdef HAVE_AFTERIMAGE if (rs [Rs_blurradius]) bgPixmap.set_blur_radius (rs [Rs_blurradius]); -#endif +#endif if (ISSET_PIXCOLOR (Color_tint)) bgPixmap.set_tint (pix_colors_focused [Color_tint]); if (rs [Rs_shade]) @@ -587,7 +592,7 @@ static struct sig_handlers { sig_watcher sw_term, sw_int; - + /* * Catch a fatal signal and tidy up before quitting */ @@ -899,7 +904,7 @@ resize_all_windows (0, 0, 0); scr_remap_chars (); scr_touch (true); - } + } return true; } @@ -953,7 +958,7 @@ #ifdef XTERM_COLOR_CHANGE rxvt_color xcol; int i; - + if (color == NULL || *color == '\0') return; @@ -1344,7 +1349,7 @@ } else str = (void *)text->string.wide_char; - + HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW, DT_INT, call_data->caret, DT_INT, call_data->chg_first, @@ -1673,7 +1678,7 @@ { im_set_size (preedit_rect); preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); - + XSetICValues (Input_Context, XNPreeditAttributes, preedit_attr, NULL); }