diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cm.c | 10 | ||||
-rw-r--r-- | src/keyboard.c | 13 | ||||
-rw-r--r-- | src/term.c | 80 | ||||
-rw-r--r-- | src/termchar.h | 1 |
4 files changed, 33 insertions, 71 deletions
@@ -264,11 +264,11 @@ x: * for using n2tabs, then pick the minimum. */ - /* cost for ntabs + cost for right motion */ + /* cost for ntabs + cost for right motion */ tabcost = ntabs ? ntabs * tty->Wcm->cc_tab + (dstx - tabx) * tty->Wcm->cc_right : BIG; - /* cost for n2tabs + cost for left motion */ + /* cost for n2tabs + cost for left motion */ c = n2tabs ? n2tabs * tty->Wcm->cc_tab + (tab2x - dstx) * tty->Wcm->cc_left : BIG; @@ -396,9 +396,9 @@ cmgoto (tty, row, col) { /* compute REAL direct cost */ cost = 0; - p = dcm == tty->Wcm->cm_habs - ? tgoto (dcm, row, col) - : tgoto (dcm, col, row); + p = (dcm == tty->Wcm->cm_habs + ? tgoto (dcm, row, col) + : tgoto (dcm, col, row)); emacs_tputs (tty, p, 1, evalcost); if (cost <= relcost) { /* really is cheaper */ diff --git a/src/keyboard.c b/src/keyboard.c index 4e0786ec1c9..11e1d18c7d5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4050,8 +4050,11 @@ kbd_buffer_get_event (kbp, used_mouse_menu) If there is no valid info, it does not store anything so x remains nil. */ x = Qnil; - if (f && FRAME_DISPLAY (f)->mouse_position_hook) /* XXX Can f or mouse_position_hook be NULL here? */ - (*FRAME_DISPLAY (f)->mouse_position_hook) (&f, 0, &bar_window, &part, &x, &y, &time); + + /* XXX Can f or mouse_position_hook be NULL here? */ + if (f && FRAME_DISPLAY (f)->mouse_position_hook) + (*FRAME_DISPLAY (f)->mouse_position_hook) (&f, 0, &bar_window, + &part, &x, &y, &time); obj = Qnil; @@ -10550,9 +10553,9 @@ The elements of this list correspond to the arguments of if (FRAME_TERMCAP_P (sf)) { val[1] = FRAME_TTY (sf)->flow_control ? Qt : Qnil; - val[2] = FRAME_TTY (sf)->meta_key == 2 - ? make_number (0) - : CURTTY ()->meta_key == 1 ? Qt : Qnil; + val[2] = (FRAME_TTY (sf)->meta_key == 2 + ? make_number (0) + : (CURTTY ()->meta_key == 1 ? Qt : Qnil)); } else { diff --git a/src/term.c b/src/term.c index 65b6c158c33..f5e0256e0f1 100644 --- a/src/term.c +++ b/src/term.c @@ -285,9 +285,7 @@ void set_terminal_window (size) int size; { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (FRAME_DISPLAY (f)->set_terminal_window_hook) (*FRAME_DISPLAY (f)->set_terminal_window_hook) (size); @@ -298,9 +296,7 @@ set_terminal_window (size) void tty_set_terminal_window (int size) { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); @@ -314,9 +310,7 @@ set_scroll_region (start, stop) int start, stop; { char *buf; - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); @@ -439,9 +433,7 @@ void cursor_to (vpos, hpos) int vpos, hpos; { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (FRAME_DISPLAY (f)->cursor_to_hook) (*FRAME_DISPLAY (f)->cursor_to_hook) (vpos, hpos); @@ -450,9 +442,7 @@ cursor_to (vpos, hpos) void tty_cursor_to (int vpos, int hpos) { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); @@ -477,9 +467,7 @@ void raw_cursor_to (row, col) int row, col; { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (FRAME_DISPLAY (f)->raw_cursor_to_hook) (*FRAME_DISPLAY (f)->raw_cursor_to_hook) (row, col); @@ -488,9 +476,7 @@ raw_cursor_to (row, col) void tty_raw_cursor_to (int row, int col) { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); @@ -510,9 +496,7 @@ tty_raw_cursor_to (int row, int col) void clear_to_end () { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (FRAME_DISPLAY (f)->clear_to_end_hook) (*FRAME_DISPLAY (f)->clear_to_end_hook) (); @@ -524,9 +508,7 @@ void tty_clear_to_end (void) { register int i; - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); if (tty->TS_clr_to_bottom) @@ -560,9 +542,7 @@ clear_frame () void tty_clear_frame () { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); @@ -588,9 +568,7 @@ void clear_end_of_line (first_unused_hpos) int first_unused_hpos; { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (FRAME_DISPLAY (f)->clear_end_of_line_hook) (*FRAME_DISPLAY (f)->clear_end_of_line_hook) (first_unused_hpos); @@ -604,9 +582,7 @@ void tty_clear_end_of_line (int first_unused_hpos) { register int i; - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); /* Detect the case where we are called from reset_sys_modes @@ -758,9 +734,7 @@ write_glyphs (string, len) register struct glyph *string; register int len; { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (FRAME_DISPLAY (f)->write_glyphs_hook) (*FRAME_DISPLAY (f)->write_glyphs_hook) (string, len); @@ -775,9 +749,7 @@ tty_write_glyphs (struct glyph *string, int len) unsigned char conversion_buffer[1024]; int conversion_buffer_size = sizeof conversion_buffer; - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); @@ -872,9 +844,7 @@ insert_glyphs (start, len) register struct glyph *start; register int len; { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (len <= 0) return; @@ -890,9 +860,7 @@ tty_insert_glyphs (struct glyph *start, int len) { char *buf; struct glyph *glyph = NULL; - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); @@ -974,9 +942,7 @@ void delete_glyphs (n) register int n; { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (FRAME_DISPLAY (f)->delete_glyphs_hook) (*FRAME_DISPLAY (f)->delete_glyphs_hook) (n); @@ -989,9 +955,7 @@ tty_delete_glyphs (int n) { char *buf; register int i; - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); @@ -1024,9 +988,7 @@ void ins_del_lines (vpos, n) int vpos, n; { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); if (FRAME_DISPLAY (f)->ins_del_lines_hook) (*FRAME_DISPLAY (f)->ins_del_lines_hook) (vpos, n); @@ -1037,9 +999,7 @@ ins_del_lines (vpos, n) void tty_ins_del_lines (int vpos, int n) { - struct frame *f = (updating_frame - ? updating_frame - : XFRAME (selected_frame)); + struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame)); struct tty_display_info *tty = FRAME_TTY (f); char *multi = n > 0 ? tty->TS_ins_multi_lines : tty->TS_del_multi_lines; diff --git a/src/termchar.h b/src/termchar.h index e9efbc21fe4..fbf91f2458f 100644 --- a/src/termchar.h +++ b/src/termchar.h @@ -63,7 +63,6 @@ struct tty_display_info /* Redisplay. */ - /* XXX GC does not know about this; is this a problem? */ Lisp_Object top_frame; /* The topmost frame on this tty. */ /* The previous terminal frame we displayed on this tty. */ |