diff options
| author | Jim Blandy | 1992-04-24 08:11:54 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-04-24 08:11:54 +0000 |
| commit | 4746118aca2d5cbdd054b4af4814d56550dfbc79 (patch) | |
| tree | 370e07c6950794f936bc8d434cb0560d883e4a0b /src/xterm.c | |
| parent | d4327fecc103493bc8275c3580b05c06c9fcc019 (diff) | |
| download | emacs-4746118aca2d5cbdd054b4af4814d56550dfbc79.tar.gz emacs-4746118aca2d5cbdd054b4af4814d56550dfbc79.zip | |
*** empty log message ***
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 34 |
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 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | 6 | GNU Emacs is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 1, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | 10 | ||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | 11 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -258,8 +258,8 @@ static void dumpqueue (); | |||
| 258 | #endif | 258 | #endif |
| 259 | 259 | ||
| 260 | void dumpborder (); | 260 | void dumpborder (); |
| 261 | static XTcursor_to (); | 261 | static int XTcursor_to (); |
| 262 | static XTclear_end_of_line (); | 262 | static 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 | ||
| 364 | static | 364 | static int |
| 365 | XTcursor_to (row, col) | 365 | XTcursor_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 | ||
| 585 | static | 585 | static int |
| 586 | XTclear_end_of_line (first_unused) | 586 | XTclear_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. */ | ||
| 2782 | static SIGTYPE | ||
| 2783 | x_death_handler () | ||
| 2784 | { | ||
| 2785 | if (_Xdebug) | ||
| 2786 | abort (); | ||
| 2787 | else | ||
| 2788 | Fkill_emacs (make_number (70)); | ||
| 2789 | } | ||
| 2790 | |||
| 2778 | static char *x_proto_requests[] = | 2791 | static 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 |
| 2973 | static unsigned int x_wire_count; | 2981 | static unsigned int x_wire_count; |
| 2974 | x_trace_wire () | 2982 | x_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 | ||
| 3746 | void | 3754 | void |