ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.252 by ayin, Mon Oct 8 07:05:23 2007 UTC vs.
Revision 1.254 by ayin, Thu Oct 18 09:11:42 2007 UTC

38#include <limits> 38#include <limits>
39 39
40#include <csignal> 40#include <csignal>
41#include <cstring> 41#include <cstring>
42 42
43#ifdef TTY_GID_SUPPORT
44# include <grp.h>
45#endif
46
47#ifdef HAVE_TERMIOS_H 43#ifdef HAVE_TERMIOS_H
48# include <termios.h> 44# include <termios.h>
45#endif
46
47#ifdef HAVE_XSETLOCALE
48# define X_LOCALE
49# include <X11/Xlocale.h>
50#else
51# ifdef HAVE_SETLOCALE
52# include <clocale>
53# endif
49#endif 54#endif
50 55
51vector<rxvt_term *> rxvt_term::termlist; 56vector<rxvt_term *> rxvt_term::termlist;
52 57
53// used to tell global functions which terminal instance is "active" 58// used to tell global functions which terminal instance is "active"
201#endif 206#endif
202} 207}
203 208
204// clean up the most important stuff, do *not* call x or free mem etc. 209// clean up the most important stuff, do *not* call x or free mem etc.
205// for use before an emergency exit 210// for use before an emergency exit
211void
206void rxvt_term::emergency_cleanup () 212rxvt_term::emergency_cleanup ()
207{ 213{
208 if (cmd_pid) 214 if (cmd_pid)
209 kill (-cmd_pid, SIGHUP); 215 kill (-cmd_pid, SIGHUP);
210 216
211 pty_ev.stop (); 217 pty_ev.stop ();
901 } 907 }
902 908
903 return true; 909 return true;
904} 910}
905 911
912void
906void rxvt_term::set_string_property (Atom prop, const char *str, int len) 913rxvt_term::set_string_property (Atom prop, const char *str, int len)
907{ 914{
908 XChangeProperty (dpy, parent[0], 915 XChangeProperty (dpy, parent[0],
909 prop, XA_STRING, 8, PropModeReplace, 916 prop, XA_STRING, 8, PropModeReplace,
910 (const unsigned char *)str, len >= 0 ? len : strlen (str)); 917 (const unsigned char *)str, len >= 0 ? len : strlen (str));
911} 918}
912 919
920void
913void rxvt_term::set_utf8_property (Atom prop, const char *str, int len) 921rxvt_term::set_utf8_property (Atom prop, const char *str, int len)
914{ 922{
915 wchar_t *ws = rxvt_mbstowcs (str, len); 923 wchar_t *ws = rxvt_mbstowcs (str, len);
916 char *s = rxvt_wcstoutf8 (ws); 924 char *s = rxvt_wcstoutf8 (ws);
917 925
918 XChangeProperty (dpy, parent[0], 926 XChangeProperty (dpy, parent[0],

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines