aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorJim Blandy1992-04-24 08:11:54 +0000
committerJim Blandy1992-04-24 08:11:54 +0000
commit4746118aca2d5cbdd054b4af4814d56550dfbc79 (patch)
tree370e07c6950794f936bc8d434cb0560d883e4a0b /src/xterm.c
parentd4327fecc103493bc8275c3580b05c06c9fcc019 (diff)
downloademacs-4746118aca2d5cbdd054b4af4814d56550dfbc79.tar.gz
emacs-4746118aca2d5cbdd054b4af4814d56550dfbc79.zip
*** empty log message ***
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 05ad3bc588d..1df1c7d36ba 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1,11 +1,11 @@
1/* X Communication module for terminals which understand the X protocol. 1/* X Communication module for terminals which understand the X protocol.
2 Copyright (C) 1989 Free Software Foundation, Inc. 2 Copyright (C) 1989, 1992 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
6GNU Emacs is free software; you can redistribute it and/or modify 6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by 7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option) 8the Free Software Foundation; either version 2, or (at your option)
9any later version. 9any later version.
10 10
11GNU Emacs is distributed in the hope that it will be useful, 11GNU Emacs is distributed in the hope that it will be useful,
@@ -258,8 +258,8 @@ static void dumpqueue ();
258#endif 258#endif
259 259
260void dumpborder (); 260void dumpborder ();
261static XTcursor_to (); 261static int XTcursor_to ();
262static XTclear_end_of_line (); 262static int XTclear_end_of_line ();
263 263
264/* These hooks are called by update_screen at the beginning and end 264/* These hooks are called by update_screen at the beginning and end
265 of a screen update. We record in `updating_screen' the identity 265 of a screen update. We record in `updating_screen' the identity
@@ -361,7 +361,7 @@ XTreset_terminal_modes ()
361 where display update commands will take effect. 361 where display update commands will take effect.
362 This does not affect the place where the cursor-box is displayed. */ 362 This does not affect the place where the cursor-box is displayed. */
363 363
364static 364static int
365XTcursor_to (row, col) 365XTcursor_to (row, col)
366 register int row, col; 366 register int row, col;
367{ 367{
@@ -582,7 +582,7 @@ XTwrite_glyphs (start, len)
582 to column FIRST_UNUSED (exclusive). The idea is that everything 582 to column FIRST_UNUSED (exclusive). The idea is that everything
583 from FIRST_UNUSED onward is already erased. */ 583 from FIRST_UNUSED onward is already erased. */
584 584
585static 585static int
586XTclear_end_of_line (first_unused) 586XTclear_end_of_line (first_unused)
587 register int first_unused; 587 register int first_unused;
588{ 588{
@@ -2775,6 +2775,19 @@ x_text_icon (s, icon_name)
2775 return 0; 2775 return 0;
2776} 2776}
2777 2777
2778/* Handling X errors. */
2779
2780/* A handler for SIGPIPE, when it occurs on the X server's connection.
2781 This basically does an orderly shutdown of Emacs. */
2782static SIGTYPE
2783x_death_handler ()
2784{
2785 if (_Xdebug)
2786 abort ();
2787 else
2788 Fkill_emacs (make_number (70));
2789}
2790
2778static char *x_proto_requests[] = 2791static char *x_proto_requests[] =
2779{ 2792{
2780 "CreateWindow", 2793 "CreateWindow",
@@ -2961,14 +2974,9 @@ x_error_handler (disp, event)
2961 } 2974 }
2962 UNBLOCK_INPUT; 2975 UNBLOCK_INPUT;
2963 2976
2964 if (_Xdebug) 2977 x_death_handler ();
2965 abort ();
2966 else
2967 Fkill_emacs (make_number (70));
2968} 2978}
2969 2979
2970/* Initialize communication with the X window server. */
2971
2972#if 0 2980#if 0
2973static unsigned int x_wire_count; 2981static unsigned int x_wire_count;
2974x_trace_wire () 2982x_trace_wire ()
@@ -3740,7 +3748,7 @@ x_term_init (display_name)
3740 signal (SIGWINCH, SIG_DFL); 3748 signal (SIGWINCH, SIG_DFL);
3741#endif /* SIGWINCH */ 3749#endif /* SIGWINCH */
3742 3750
3743 signal (SIGPIPE, x_error_handler); 3751 signal (SIGPIPE, x_death_handler);
3744} 3752}
3745 3753
3746void 3754void