summaryrefslogtreecommitdiff
path: root/src/dispnew.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Fix Bug#16284.Martin Rudalics2013-12-301-2/+1
| | | | | * dispnew.c (change_frame_size_1): Take old width of root window from that window's pixel width. Bug#16284.
* Some more fixes for pixelwise resizing.Martin Rudalics2013-12-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove scroll_bar_actual_width from frames. * frame.h (struct frame): Remove scroll_bar_actual_width slot. * frame.c (Fscroll_bar_width): Return scroll bar area width. (x_figure_window_size): * nsterm.m (x_set_window_size): * widget.c (set_frame_size): * w32term.c (x_set_window_size): * xterm.c (x_set_window_size, x_set_window_size_1): Don't set scroll_bar_actual_width. Convert scroll_bar members to integers on Windows. * w32term.h (struct scroll_bar): Convert top, left, width, height, start, end and dragging to integers. * w32fns.c (w32_createscrollbar): Remove XINT conversions for scroll_bar members. * w32term.c (w32_set_scroll_bar_thumb) (w32_scroll_bar_handle_click): Remove XINT conversions for scroll_bar members. Treat bar->dragging as integer. (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as first element. Remove XINT conversions for scroll_bar members. (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion): Remove XINT conversions for scroll_bar members. Fix assignment for new window total sizes. * window.c (Fwindow_resize_apply_total): Assign values for minibuffer window. * window.el (window--pixel-to-size): Remove function. (window--pixel-to-total-1, window--pixel-to-total): Fix calculation of new total sizes.
* Use bool for boolean, focusing on headers.Paul Eggert2013-12-141-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (PTY_OPEN, GC_MARK_SECONDARY_STACK): Use bool for boolean. * lib-src/emacsclient.c, lib-src/etags.c, lib-src/hexl.c (FALSE, TRUE): Remove. All uses replaced with uncapitalized version. * lib-src/emacsclient.c (message): * lib-src/etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names): * lib-src/hexl.c (un_flag, iso_flag, endian): * lib-src/pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next) (pop_trash): Use bool for boolean. * lib-src/etags.c (bool): Remove. * lib-src/etags.c (globals, members, declarations, no_line_directive) (no_duplicates): Use 'int' for boolean values that getopt requires to be 'int'. Formerly, these were 'bool' and 'bool' was 'int', but we can no longer rely on this implementation. * lib-src/pop.h (struct _popserver): Use bool_bf for boolean bit-fields. * lwlib/xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields. * src/atimer.h, src/lisp.h, src/syssignal.h, src/syswait.h, src/unexelf.c: No need to include <stdbool.h>, since conf_post.h does it now. * src/buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION) (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P) (SET_PER_BUFFER_VALUE_P): * src/ccl.c, src/ccl.h (setup_ccl_program): * src/ccl.h (CHECK_CCL_PROGRAM): * src/character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR) (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY) (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE) (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE) (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE) (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH) (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS): * src/charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID) (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET) (CHARSET_FAST_MAP_SET): * src/coding.c (decode_coding_ccl, encode_coding_ccl): * src/coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC) (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2) (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE) (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8) (decode_coding_c_string): * src/composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE): * src/conf_post.h (has_attribute): * src/dispextern.h (trace_redisplay_p): (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE) (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH) (SET_GLYPH_FROM_CHAR_GLYPH): (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P) (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P) (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p) (cursor_in_mouse_face_p): * src/dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows) (blank_row, prepare_desired_row) (build_frame_matrix_from_leaf_window, make_current) (mirror_make_current, mirrored_line_dance, mirror_line_dance) (update_window, scrolling_window, update_frame_line): * src/disptab.h (GLYPH_FOLLOW_ALIASES): * src/editfns.c (Fformat): * src/font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC) (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE) (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC) (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC) (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY) (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG) (FONT_DEFERRED_LOG): * src/frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P): (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME) (FRAME_MOUSE_UPDATE): * src/fringe.c (Fdefine_fringe_bitmap): * src/image.c (x_create_bitmap_from_data, x_create_bitmap_mask) (x_create_bitmap_from_xpm_data, xpm_load_image): * src/intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT) (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE) (MERGE_INTERVAL_CACHE): * src/keymap.h (KEYMAPP): * src/lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE) (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP) (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER) (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER) (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT) (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT) (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE) (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp): * src/syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX) (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD) (SETUP_BUFFER_SYNTAX_TABLE): * src/systime.h (timespec_valid_p): * src/term.c (save_and_enable_current_matrix): * src/window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P): * src/xdisp.c (in_display_vector_p, display_tool_bar_line) (redisplay_internal, try_window_reusing_current_matrix) (sync_frame_with_window_matrix_rows, try_window_id) (display_menu_bar, display_tty_menu_item, display_mode_line) (coords_in_mouse_face_p, cursor_in_mouse_face_p): * src/xmenu.c (xmenu_show): * src/xterm.c (use_xim, x_term_init): * src/xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET) (struct x_bitmap_record): Use bool for booleans. * src/ccl.c (struct buffer_text): * src/ccl.h (struct ccl_program): * src/charset.h (struct charset): * src/cm.h (struct cm): * src/coding.h (struct iso_2022_spec, struct coding_system): * src/dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row) (struct glyph_string, struct face, struct face_cache) (struct bidi_string_data, struct bidi_it) (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo) (struct image): * src/editfns.c (Fformat): * src/frame.h (struct frame): * src/fringe.c (struct fringe_bitmap): * src/intervals.h (struct interval): * src/keyboard.h (struct kboard): * src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker) (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free) (struct Lisp_Buffer_Local_Value, union specbinding): * src/macfont.m (struct macfont_info): * src/process.h (struct Lisp_Process): * src/termchar.h (struct tty_display_info): * src/window.h (struct window): * src/xterm.h (struct x_output): Use bool_bf for boolean bit-fields. * src/ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0. All callers changed. * src/ccl.h (struct ccl_program): Remove unused members private_state, src_multibyte, dst_multibyte, cr_consumed, suppress_error, eight_bit_control. (struct ccl_spec): Remove unused members cr_carryover, eight_bit_carryover. * src/conf_post.h: Include <stdbool.h>. (bool_bf): New type. * src/dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY): * src/interval.h (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE) Surround statement macro with proper 'do { ... } while (false)' brackets. (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool. (PRODUCE_GLYPHS): Simplify use of boolean. * src/fileio.c (Fcopy_file): If I is an integer, prefer 'if (I != 0)' to 'if (I)'. * src/lisp.h (UNGCPRO): Return void, not int. (FOR_EACH_TAIL): Use void expression, not int expression. * src/region-cache.c: Reindent. * src/region-cache.h: Copy comments from region-cache.c, to fix incorrect remarks about booleans.
* Support resizing frames and windows pixelwise.Martin Rudalics2013-11-301-60/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (enum window_part): Add ON_SCROLL_BAR, ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER. (struct glyph_matrix): Replace window_left_col and window_top_line by window_pixel_left and window_pixel_top. (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): Minor rewrite. (enum face_id): Add WINDOW_DIVIDER_FACE_ID. (draw_window_divider, move_it_to, x_draw_right_divider) (x_draw_bottom_divider, change_frame_size): Add or fix declarations. * dispnew.c (change_frame_size_1): Change prototype. (adjust_glyph_matrix, required_matrix_width) (adjust_frame_glyphs_for_window_redisplay): Use pixel values instead of lines and columns. (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of WINDOW_TOTAL_FRINGE_WIDTH. (handle_window_change_signal, do_pending_window_change) (init_display): Adjusts calls of change_frame_size. (change_frame_size, change_frame_size_1): Handle pixelwise changes. * frame.c (Qright_divider_width, Qbottom_divider_width): New Lisp objects. (set_menu_bar_lines_1, set_menu_bar_lines, make_frame) (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters) (x_set_internal_border_width, x_set_vertical_scroll_bars) (x_set_scroll_bar_width, x_figure_window_size): Handle pixel values. (set_frame_param): New function. (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols) (Fframe_text_width, Fframe_text_height, Fscroll_bar_width) (Ffringe_width, Fborder_width, Fright_divider_width) (Fbottom_divider_width): New functions, defsubr them. (Fset_frame_height, Fset_frame_width, Fset_frame_size): New argument pixelwise. (struct frame_parm_table): New members Qright_divider_width and Qbottom_divider_width. (x_set_frame_parameters): Handle parameters for pixelwise sizes. (x_report_frame_params): Handle Qright_divider_width and Qbottom_divider_width. (x_set_right_divider_width, x_set_bottom_divider_width): New functions. (frame_resize_pixelwise): New option. * frame.h (struct frame): Add tool_bar_height, menu_bar_height, new_pixelwise, right_divider_width and bottom_divider_width; remove total_lines; rename text_lines, text_cols, new_text_lines and new_text_cols to text_height, text_width, new_height and new_width respectively. (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and FRAME_TEXT_WIDTH respectively. (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT) (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH) (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH): New macros. (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH) (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH) (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT) (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS) (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros. (FRAME_TOTAL_COLS_ARG): Remove macro. * fringe.c (draw_fringe_bitmap_1): Handle right divder. * gtkutil.c (xg_frame_resized, xg_frame_set_char_size) (x_wm_set_size_hint): Handle frame pixel sizes. * indent.c (compute_motion, Fcompute_motion): Call window_body_width instead of window_body_cols. * keyboard.c (Qright_divider, Qbottom_divider): New symbols. (make_lispy_position): Handle right and bottom dividers. (Fsuspend_emacs): Pixelize call of change_frame_size. * keyboard.h: Extern Qright_divider, Qbottom_divider. * lisp.h: Extern set_frame_param. * nsfns.m (x_set_tool_bar_lines): Pixelize call of x_set_window_size. (Fx_create_frame): Add entry for vertical_drag_cursor. Pixelize call of change_frame_size. * nsterm.h (struct ns_output): Add vertical_drag_cursor. * nsterm.m (ns_update_window_end): Optionally draw right divider. (x_set_window_size): Add argument pixelwise. Call check_frame_size and change_frame_size with pixelwise zero. (ns_draw_window_divider): New function. (ns_redisplay_interface): Add ns_draw_window_divider. (updateFrameSize:): Call change_frame_size with pixelwise zero. (x_new_font): Call x_set_window_size with pixelwise zero. * print.c (print_object): For a window print its sequence number again. * term.c (Fresume_tty): Pixelize call of change_frame_size. * w32fns.c (x_set_mouse_color): Handle vertical drag cursor. (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. (w32_createwindow): Use scroll bar area width. (w32_wnd_proc): Handle bottom divider width. For WM_WINDOWPOSCHANGING return zero if we resize pixelwise. (Fx_create_frame): Default divider width parameters. Caclulate sizes pixelwise. Add vertical drag cursor support. (x_create_tip_frame): Default divider widths to zero. Pixelize call to change_frame_size. (Fx_show_tip): Add handling of divider widths. Pixelize window position and sizes. (Fw32_frame_rect): New function. (frame_parm_handler w32_frame_parm_handlers): Add divider widths. (Vx_window_vertical_drag_shape): Add variable. * w32inevt.c (resize_event, maybe_generate_resize_event): Pixelize change_frame_size calls. * w32menu.c (set_frame_menubar): Pixelize x_set_window_size call. * w32term.c (w32_draw_window_divider): New function. (x_update_window_end): Handle right divider. (w32_draw_fringe_bitmap, x_scroll_run) (w32_set_vertical_scroll_bar): Pixelize scrollbar widths. (w32_read_socket): Handle SIZE_MAXIMIZED separately. Calculate new frame sizes pixelwise. (x_new_font): Pixelize call to x_set_window_size. (x_check_fullscreen): Pixelize call to change_frame_size. (x_set_window_size_1, x_set_window_size): New argument pixelwise. Calculate pixelwise. (x_wm_set_size_hint): Use scroll bar area width. (w32_redisplay_interface): Add w32_draw_window_divider. * w32term.h (struct w32_output): Add vertical drag cursor. * widget.c (set_frame_size, update_wm_hints) (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of change_frame_size. (EmacsFrameSetCharSize): Pixelize call of x_set_window_size. * window.c (sequence_number): Restore. (Fwindow_pixel_width, Fwindow_pixel_height) (Fwindow_mode_line_height, Fwindow_header_line_height) (window_pixel_to_total, Frun_window_scroll_functions) (Fset_window_new_pixel, window_resize_apply_total) (Fwindow_resize_apply_total): New functions. (window_body_height, window_body_width): Rename from window_body_lines. New argument PIXELWISE. Calculate pixelwise. (Fwindow_body_height, Fwindow_body_width): New argument PIXELWISE. (coordinates_in_window, window_relative_x_coord): Use window's pixel width instead of total width. (replace_window, recombine_windows): Initialize pixel values. (resize_root_window, resize_frame_windows, grow_mini_window) (shrink_mini_window): New argument PIXELWISE. Calculate pixelwise. (Fdelete_other_windows_internal, adjust_window_margins) (window_resize_check, window_resize_apply) (Fdelete_window_internal, Fresize_mini_window_internal) (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise. (check_frame_size): Rename arguments. New argument PIXELWISE. Calculate pixelwise. (set_window_buffer): Make samebuf bool. Run configuration change hook only if buffer changed. (Fset_window_buffer): Rewrite doc-string. (make_window): Initialize new_pixel slot. (Fwindow_resize_apply): Check pixel size of root window. (Fsplit_window_internal): Call 2nd argument pixel_size. Calculate pixelwise. (Fscroll_left, Fscroll_right): Call window_body_width instead of window_body_cols. (save_window_data): New slots frame_text_width, frame_text_height, frame_menu_bar_height, frame_tool_bar_height. (saved_window): New slots pixel_left, pixel_top, pixel_height, pixel_width. (Fcurrent_window_configuration, Fset_window_configuration) (save_window_save, compare_window_configurations): Handle new slots in save_window_data and saved_window. (Fset_window_scroll_bars): Fix doc-string. (window_resize_pixelwise): New variable. (coordinates_in_window, Fcoordinates_in_window_p): Handle dividers. (make_parent_window): Adjust sequence_number. (Fwindow_right_divider_width, Fwindow_bottom_divider_width): New functions. * window.h (struct window): New members new_pixel, pixel_left, pixel_top, pixel_width, pixel_height. Restore sequence_number. (wset_new_pixel): New function. (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT) (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT) (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE) (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE) (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE) (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS) (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH) (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros. (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH. (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros. (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y) (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P) (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X) (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS) (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT): Rewrite. (resize_frame_windows, grow_mini_window, shrink_mini_window) (window_body_width, check_frame_size): Adapt external declarations. * xdisp.c (last_max_ascent): New integer. (window_text_bottom_y): Handle bottom divider. (window_box_width, window_box_height): Calculate pixelwise. (get_glyph_string_clip_rects): Handle right divider. (remember_mouse_glyph): When windows are resized pixelwise proceed with width and height set to 1. (init_iterator): Use WINDOW_PIXEL_WIDTH instead of WINDOW_TOTAL_WIDTH. (move_it_to): Calculate and return maximum x position encountered. (Fwindow_text_pixel_size): New function. (resize_mini_window, update_tool_bar): Calculate pixelwise. (tool_bar_lines_needed): Rename to tool_bar_height. Calculate pixelwise. (Ftool_bar_lines_needed): Rename to Ftool_bar_height. Calculate pixelwise. (redisplay_tool_bar): Calculate pixelwise. (redisplay_window): Calculate pixelwise. Handle dividers. (draw_glyphs, x_clear_end_of_line, note_mouse_highlight) (x_draw_vertical_border): Handle dividers. (define_frame_cursor1): Handle vertical drag cursor. (x_draw_right_divider, x_draw_bottom_divider): New functions. (expose_window): Calculate pixelwise. Handle dividers. (init_xdisp): Initialize pixel values. * xfaces.c (Qwindow_divider): New face. (realize_basic_faces): Realize it. * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor. (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. (x_set_scroll_bar_default_width): Default actual width to 16. (Fx_create_frame): Set sizes pixelwise. (x_create_tip_frame): Default divider widths to zero. Pixelize call of change_frame_size. (Fx_show_tip): Handle divider widths. Initial pixel position and sizes. (frame_parm_handler x_frame_parm_handlers): Add divider widths. (Vx_window_vertical_drag_shape): New option. * xmenu.c (free_frame_menubar): Pixelize call of x_set_window_size. * xterm.c (x_draw_window_divider): New function. (x_update_window_end): Optionally draw right divider. (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create) (XTset_vertical_scroll_bar): Use scroll bar pixel width. (handle_one_xevent, x_new_font): Calculate pixelwise. (x_set_window_size_1, x_set_window_size): New argument pixelwise. Calculate pixelwise. (x_wm_set_size_hint): Pixelize call of check_frame_size. (struct x_redisplay_interface): Add x_draw_window_divider. * xterm.h (struct x_output): Add vertical_drag_cursor. * cus-start.el (frame-resize-pixelwise) (window-resize-pixelwise): New entries. * emacs-lisp/debug.el (debug): Use window-total-height instead of window-total-size. * frame.el (tool-bar-lines-needed): Defalias to tool-bar-height. * help.el (describe-bindings-internal): Call help-buffer (temp-buffer-max-width): New option. (resize-temp-buffer-window, help-window-setup) (with-help-window): Rewrite. * mouse.el (mouse-drag-line): Rewrite. Add key bindings for dragging dividers. * window.el (frame-char-size, window-min-pixel-height) (window-safe-min-pixel-height, window-safe-min-pixel-width) (window-min-pixel-width, window-safe-min-pixel-size) (window-combination-p, window-safe-min-size) (window-resizable-p, window--size-to-pixel) (window--pixel-to-size, window--resize-apply-p): New functions. (window-safe-min-height): Fix doc-string. (window-size, window-min-size, window--min-size-1) (window-sizable, window-sizable-p, window--min-delta-1) (window-min-delta, window--max-delta-1, window-max-delta) (window--resizable, window--resizable-p, window-resizable) (window-full-height-p, window-full-width-p, window-at-side-p) (window--in-direction-2, window-in-direction) (window--resize-reset-1, window--resize-mini-window) (window-resize, window-resize-no-error) (window--resize-child-windows-normal) (window--resize-child-windows, window--resize-siblings) (window--resize-this-window, window--resize-root-window) (window--resize-root-window-vertically) (adjust-window-trailing-edge, enlarge-window, shrink-window) (maximize-window, minimize-window, delete-window) (quit-restore-window, window-split-min-size, split-window) (balance-windows-2, balance-windows) (balance-windows-area-adjust, balance-windows-area) (window--state-get-1, window-state-get, window--state-put-1) (window--state-put-2, window-state-put) (display-buffer-record-window, window--display-buffer): Make functions handle pixelwise sizing of windows. (display-buffer--action-function-custom-type) (display-buffer-fallback-action): Add display-buffer-in-previous-window. (display-buffer-use-some-window): Resize window to height it had before. (fit-window-to-buffer-horizontally): New option. (fit-frame-to-buffer): Describe new values. (fit-frame-to-buffer-bottom-margin): Replace with fit-frame-to-buffer-margins. (window--sanitize-margin): New function. (fit-frame-to-buffer, fit-window-to-buffer): Rewrite completely using window-text-pixel-size.
* * src/xdisp.c (redisplay_internal): Don't call set_window_update_flags.Stefan Monnier2013-11-291-14/+14
| | | | | | | | | | | Set invisible frames's `redisplay' when a full redisplay is requested. (redisplay_window): Set must_be_updated_p instead. (redisplay_mode_lines): Don't set must_be_updated_p any more. (display_mode_lines): Set it here instead. * src/dispextern.h (set_window_update_flags): Remove. * src/dispnew.c (set_window_update_flags): Remove `b' argument; make static. Fixes: debbugs:15999
* *.[chm]: Number every assignment to windows_or_buffers_changed.Stefan Monnier2013-11-051-1/+1
|
* Port to stricter C99 platforms.Paul Eggert2013-11-031-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially, C99 prohibits nesting a struct X inside struct Y if struct X has a flexible array member. Also, merge from gnulib, incorporating: 2013-11-03 intprops: port to Oracle Studio c99 * lib/intprops.h: Update from gnulib. * src/alloc.c (struct sdata): New type. (sdata): Implement in terms of struct sdata. Remove u member; all uses replaced by next_vector, set_next_vector. (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change. (SDATA_DATA_OFFSET): Now a constant, not a macro. (struct sblock): Rename first_data member to data, which is now a flexible array member. All uses changed. (next_vector, set_next_vector, large_vector_vec): New functions. (vector_alignment): New constant. (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too. (struct large-vector): Now merely a NEXT member, since the old approach ran afoul of stricter C99. All uses changed to use large_vector_vec or large_vector_offset. (large_vector_offset): New constant. * src/dispnew.c: Include tparam.h, for tgetent. Do not include term.h; no longer needed. * src/gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn. * src/lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int. (struct Lisp_Vector): Use a flexible array member for contents, instead of a union with a member that is an array of size 1. All uses changed. (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the fact that the struct no longer contains a union. (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay) (struct Lisp_Save_Value, struct Lisp_Free): Use unsigned, not int, for spacers, to avoid c99 warning. (union specbinding): Use unsigned, not bool, for bitfield, as bool is not portable to pre-C99 hosts.
* * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)Dmitry Antipov2013-10-141-14/+15
| | | | | | | | | | | | | | | | | | (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK) (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME): Adjust to match the change described below. (struct terminal): Move must_write_spaces, line_ins_del_ok, char_ins_del_ok, scroll_region_ok, scroll_region_cost and memory_below_frame members to... * termchar.h (struct tty_display_info): ...here because they're relevant only on TTYs. Prefer unsigned bitfield where appropriate. * term.c (init_tty): * nsterm.m (ns_create_terminal): * w32term.c (w32_create_terminal): * xterm.c (x_create_terminal): Adjust users. * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg to filter out non-TTY frames. Adjust comment. (scrolling): Adjust user. Prefer eassert for debugging check.
* Support frame dimension changes while TTY menus are displayed.Eli Zaretskii2013-10-111-2/+1
| | | | | | | | | | src/xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO have different dimensions. src/dispnew.c (fill_up_frame_row_with_spaces): Now has external visibility. src/dispextern.h (fill_up_frame_row_with_spaces): Add prototype. Fixes: debbugs:15575
* * dispnew.c (redraw_frame): Remove useless #ifdef becauseDmitry Antipov2013-10-111-4/+0
| | | | | | FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS. Also, move TTY fflush to... * term.c (tty_update_end): ...this function.
* * lisp.h (eassume): New macro.Paul Eggert2013-10-101-1/+0
| | | | | | | | | | | | | | | | | | | | Also, include <verify.h>, for 'assume'. * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector) (vroundup, vector_nbytes): * data.c (bool_vector_spare_mask, bool_vector_binop_driver) (Fbool_vector_not, Fbool_vector_count_matches) (Fbool_vector_count_matches_at): Use eassume, not eassert. * casetab.c (set_identity, shuffle): * composite.c (composition_gstring_put_cache): * dispnew.c (update_frame_1): * ftfont.c (ftfont_shape_by_flt): * image.c (gif_load): * intervals.c (offset_intervals): * macfont.m (macfont_shape): Remove calls to 'assume' that are no longer needed, because --enable-gcc-warnings no longer generates bogus warnings when these calls are removed.
* Fix minor problems found by static checking.Paul Eggert2013-10-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * dispnew.c (save_current_matrix): Omit unnecessary casts. * dispnew.c (update_frame_with_menu): Mark debug local as used. * keyboard.c, keyboard.h (Qmouse_movement): Now static. * keyboard.c (read_menu_command): Remove unused local. * lisp.h (read_menu_command): New decl. * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for benefit of STRING_CHAR_AND_LENGTH. All uses changed. Return ptrdiff_t, not int. * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t, not int, for benefit of xpalloc. (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc and xpalloc. (have_menus_p): Remove; unused. (tty_menu_add_pane, tty_menu_add_selection): Change signedness of local char * pointer to pacify STRING_CHAR_AND_LENGTH. (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy): Now static. (save_and_enable_current_matrix): Omit unnecessary casts. (read_menu_input): Omit local extern decl (now in lisp.h). Don't access uninitialized storage if mouse_get_xy fails. (tty_menu_activate): Mark local as initialized, for lint. (tty_menu_activate, tty_meny_show): Remove unused locals.
* Support menus on text-mode terminals.Eli Zaretskii2013-10-081-0/+81
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/xterm.h (xw_popup_dialog): Add prototype. src/xmenu.c (Fx_popup_dialog): Function moved to menu.c. (xmenu_show): Block input here, instead in Fx_popup_menu. (xw_popup_dialog): New function, with X-specific bits of popup dialogs. src/xdisp.c (deep_copy_glyph_row, display_tty_menu_item): New functions. src/window.c (Fset_window_configuration): Use run-time tests of the frame type instead of compile-time conditionals, when menu-bar lines are considered. src/w32term.h (w32con_hide_cursor, w32con_show_cursor) (w32_popup_dialog): New prototypes. src/w32menu.c (Fx_popup_dialog): Function deleted. (w32_popup_dialog): New function, with w32 specific bits of popup dialogs. Block input here. src/w32inevt.c (w32_console_read_socket): Minor change to add debugging TTY events. src/w32fns.c (show_hourglass): If returning early because the frame is not a GUI frame, unblock input. src/w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX) (cursorY): New functions. src/termhooks.h (cursorX, cursorY): Prototypes of functions on WINDOWSNT, macros that call curX and curY elsewhere. src/termchar.h (struct tty_display_info) <showing_menu>: New flag. src/term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32 specific function to hide and show cursor on a text-mode terminal. (tty_menu_struct, struct tty_menu_state): New structures. (tty_menu_create, tty_menu_make_room, tty_menu_search_pane) (tty_menu_calc_size, mouse_get_xy, tty_menu_display) (have_menus_p, tty_menu_add_pane, tty_menu_add_selection) (tty_menu_locate, save_and_enable_current_matrix) (restore_desired_matrix, screen_update, read_menu_input) (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback) (tty_pop_down_menu, tty_menu_last_menubar_item) (tty_menu_new_item_coords, tty_menu_show): New functions. (syms_of_term): New DEFSYMs for tty-menu-* symbols. src/nsterm.h (ns_popup_dialog): Adjust prototype. src/nsmenu.m (ns_menu_show): Block and unblock input here, instead of in x-popup-menu. (ns_popup_dialog): Adapt order of arguments to the other *_menu_show implementations. (Fx_popup_dialog): Function deleted. src/msdos.c (x_set_menu_bar_lines): Delete unused function. src/menu.h (tty_menu_show, menu_item_width): provide prototypes. src/menu.c (have_boxes): New function. (single_keymap_panes): Use it instead of a compile-time conditional. (single_menu_item): Use run-time tests of the frame type instead of compile-time conditionals. (encode_menu_string): New function. (list_of_items, list_of_panes): Use it instead of ENCODE_STRING the macro, since different types of frame need different encoding of menu items. (digest_single_submenu): Use run-time tests of frame type instead of, or in addition to, compile-time conditionals. (menu_item_width, Fmenu_bar_menu_at_x_y): New functions. (Fx_popup_menu): Detect when the function is called from keyboard on a TTY. Don't barf when invoked on a text-mode frame. Check frame type at run time, instead of compile-time conditionals for invoking terminal-specific menu-show functions. Call tty_menu_show on text-mode frames. (Fx_popup_dialog): Moved here from xmenu.c. Test frame types at run time to determine which alternative to invoke; support dialogs on TTYs. src/keyboard.h <Qmouse_movement>: Declare. src/keyboard.c <Qmouse_movement>: Now extern. <Qecho_keystrokes>: New static variable. (read_key_sequence): Accept an additional argument, a flag to prevent redisplay during reading of the key sequence. All callers changed. (read_menu_command): New function. (read_char): When COMMANDFLAG is -2, do not redisplay and do not autosave. (toolkit_menubar_in_use): New function. (make_lispy_event): Use it instead of a compile-time test. src/fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on window-system being available. src/editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call to x-popup-dialog on the frame type, they all now support popup dialogs. src/dispnew.c (save_current_matrix): Save the margin areas. (restore_current_matrix): Restore margin areas. (update_frame_with_menu): New function. src/dispextern.h (display_tty_menu_item, update_frame_with_menu): Add prototypes. src/alloc.c (make_save_ptr): Now compiled unconditionally. lisp/tmm.el (tmm-menubar): Adapt doc string to TTY menus functionality. lisp/tooltip.el (tooltip-mode): Don't error out on TTYs. lisp/menu-bar.el (popup-menu, popup-menu-normalize-position): Moved here from mouse.el. (popup-menu): Support menu-bar navigation on TTYs using C-f/C-b and arrow keys. (tty-menu-navigation-map): New map for TTY menu navigation. lisp/loadup.el ("tooltip"): Load even if x-show-tip is not available. lisp/frame.el (display-mouse-p): Report text-mode mouse as available on w32. (display-popup-menus-p): Report availability if mouse is available; don't condition on window-system. lisp/faces.el (tty-menu-enabled-face, tty-menu-disabled-face) (tty-menu-selected-face): New faces. configure.ac (HAVE_MENUS): Define unconditionally. doc/emacs/screen.texi (Menu Bar): Adapt to TTY menus. doc/emacs/frames.texi (Frames): Mention menu support on text terminals. doc/emacs/files.texi (Visiting): Mention the "File" menu-bar menu. doc/emacs/display.texi (Standard Faces): Mention TTY faces for menus. doc/lispref/keymaps.texi (Defining Menus, Mouse Menus, Menu Bar): Modify wording to the effect that menus are supported on TTYs. doc/lisprefframes.texi (Pop-Up Menus, Dialog Boxes) (Display Feature Testing): Update for menu support on TTYs. etc/NEWS: Mention the new features.
| * Merge from trunk.Eli Zaretskii2013-09-261-125/+36
| |\
| * | Fix a blatant bug in restore_current_matrix.Eli Zaretskii2013-09-191-2/+2
| | |
| * | Fixed screen restoration after popping down a menu.Eli Zaretskii2013-09-191-0/+2
| | |
| * | Minor fixes to interfaces, avoid assertion violation under GLYPH_DEBUG.Eli Zaretskii2013-09-171-0/+5
| | |
| * | Fixed C compilation problems.Eli Zaretskii2013-09-051-1/+2
| | |
| * | Merge from trunk after a lot of time.Eli Zaretskii2013-09-051-901/+553
| |\ \
| * | | Second commit; does not compile yet.Eli Zaretskii2012-08-111-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finalized saving of current_matrix and restoring into desired_matrix. Added margin areas, when non-empty, to save/restore. Replaced ScreenRetreive and ScreenUpdate with the new functions based on saving and restoring glyph matrices. Started work on reading input via read_char while inside menu display.
| * | | Initial incomplete version of tty menus. tty_menu_activate not done yet.Eli Zaretskii2012-06-021-0/+33
| | | |
* | | | * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.Dmitry Antipov2013-10-081-7/+8
| |_|/ |/| | | | | | | | | | | | | | | | | | | | (redraw_frame, update_frame): Adjust users. * dispextern.h (set_window_update_flags): Adjust prototype. * xdisp.c (redisplay_internal): When updating all frames with zero windows_or_buffers_changed, assume that only the windows that shows current buffer should be really updated.
* | | * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enumsPaul Eggert2013-09-241-2/+2
| | | | | | | | | | | | | | | instead of ints, as it's the usual style for offsetof constants. See: http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
* | | * dispnew.c (clear_glyph_row, copy_row_except_pointers):Paul Eggert2013-09-241-6/+4
| | | | | | | | | | | | | | | | | | | | | Prefer signed to unsigned integers where either will do. No need for 'const' on locals that do not escape. Omit easserts with unnecessary and unportable assumptions about alignment. Avoid unnecessary casts to char *.
* | | Optimize glyph row clearing and copying routines.Dmitry Antipov2013-09-241-50/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (struct glyph_row): Change layout of struct glyph_row to help copy_row_except_pointers. Adjust comment. * dispnew.c (null_row): Remove. (clear_glyph_row): Use offsetof and memset to find and clear just the members that need clearing. Adjust comment. (copy_row_except_pointers): Likewise for copying.
* | | * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):Dmitry Antipov2013-09-231-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move to... * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame): ...this file and convert the latter to static. Adjust comment. (make_initial_frame): * window.c (init_window_once): Adjust user. * frame.h (last_nonminibuf_frame): Remove declaration. * lisp.h (selected_frame): Likewise. * msdos.c (the_only_display_info): Adjust comment.
* | | Add set operations for bool-vector.Daniel Colascione2013-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00404.html * data.c (Qbool_vector_p): New symbol. (bool_vector_spare_mask,popcount_size_t_generic) (popcount_size_t_msc,popcount_size_t_gcc) (popcount_size_t) (bool_vector_binop_driver) (count_trailing_zero_bits,size_t_to_host_endian) (Fbool_vector_exclusive_or) (Fbool_vector_union) (Fbool_vector_intersection,Fbool_vector_set_difference) (Fbool_vector_subsetp,Fbool_vector_not) (Fbool_vector_count_matches) (Fbool_vector_count_matches_at): New functions. (syms_of_data): Intern new symbol, functions. * alloc.c (bool_vector_payload_bytes): New function. (Fmake_bool_vector): Instead of calling Fmake_vector, which performs redundant initialization and argument checking, just call allocate_vector ourselves. Make sure we clear any terminating padding to zero. (vector_nbytes,sweep_vectors): Use bool_vector_payload_bytes instead of open-coding the size calculation. (vroundup_ct): New macro. (vroundup): Assume argument >= 0; invoke vroundup_ct. * casetab.c (shuffle,set_identity): Change lint_assume to assume. * composite.c (composition_gstring_put_cache): Change lint_assume to assume. * conf_post.h (assume): New macro. (lint_assume): Remove. * dispnew.c (update_frame_1): Change lint_assume to assume. * ftfont.c (ftfont_shape_by_flt): Change lint_assume to assume. * image.c (gif_load): Change lint_assume to assume. * lisp.h (eassert_and_assume): New macro. (Qbool_vector_p): Declare. (CHECK_BOOL_VECTOR,ROUNDUP,BITS_PER_SIZE_T): New macros. (swap16,swap32,swap64): New inline functions. * macfont.c (macfont_shape): Change lint_assume to assume. * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout. * xsettings.c (parse_settings): Use new swap16 and swap32 from lisp.h instead of file-specific macros.
* | | A simpler, centralized INLINE.Paul Eggert2013-09-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/profile.c (INLINE): New macro. (SYSTIME_INLINE): Remove. * src/conf_post.h (INLINE): Define only if not already defined. This allows us to use a single INLINE, defined by one file per executable. * src/emacs.c (INLINE): Define it. Also, include category.h, charset.h, composite.h, dispextern.h, syntax.h, systime.h, so that their INLINE definitions are expanded properly for Emacs. * src/blockinput.h, src/keyboard.c (BLOCKINPUT_INLINE): * src/buffer.h, src/buffer.c (BUFFER_INLINE): * src/category.h, src/category.c (CATEGORY_INLINE): * src/character.h, src/character.c (CHARACTER_INLINE): * src/charset.h, src/charset.c (CHARSET_INLINE): * src/composite.h, src/composite.c (COMPOSITE_INLINE): * src/dispextern.h, src/dispnew.c (DISPEXTERN_INLINE): * src/frame.h, src/frame.c (FRAME_INLINE): * src/intervals.h, src/intervals.c (INTERVALS_INLINE): * src/keyboard.h, src/keyboard.c (KEYBOARD_INLINE): * src/lisp.h, src/alloc.c (LISP_INLINE): * src/process.h, src/process.c (PROCESS_INLINE): * src/syntax.h, src/syntax.c (SYNTAX_INLINE): * src/systime.h, src/sysdep.c (SYSTIME_INLINE): * src/termhooks.h, src/terminal.h (TERMHOOKS_INLINE): * src/window.h, src/window.c (WINDOW_INLINE): Remove. All uses replaced with INLINE.
* | | Ifdef away frame tool bar code when it is not really used.Dmitry Antipov2013-09-111-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]: Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string and minimize_tool_bar_window_p under the above. (fset_current_tool_bar_string, fset_desired_tool_bar_string) (fset_tool_bar_window): Likewise. * dispnew.c (clear_current_matrices, clear_desired_matrices) (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame) (change_frame_size_1): * window.c (window_from_coordinates, Frecenter): Adjust users. * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar code is not really used. * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line) (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info) (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight) [!USE_GTK && !HAVE_NS]: Define as such. (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face) (note_mouse_highlight, expose_frame): * xfns.c (x_set_tool_bar_lines): * xterm.c (handle_one_xevent): Adjust users.
* | | Review and drop old frame resize hack.Dmitry Antipov2013-09-091-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.h (struct frame): Remove force_flush_display_p. * dispnew.c (update_frame): Adjust user and don't call flush_frame here. The comment has said that there was an issues with redisplaying fringes, but I don't see any differences with and without this hack. Hopefully we can continue without it. * xdisp.c (clear_garbaged_frames): Adjust user and do not clear current frame matrices twice if resized_p is set.
* | | Cleanup frame flushing.Dmitry Antipov2013-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (struct redisplay_interface): Drop flush_display_optional because flush_display is enough for X and flushing via RIF is just a no-op for others. * frame.h (flush_frame): New function. * dispnew.c (update_frame): * minibuf.c (read_minibuf): * xdisp.c (echo_area_display, redisplay_preserve_echo_area): Use it. * keyboard.c (detect_input_pending_run_timers): Do not flush all frames but selected one in redisplay_preserve_echo_area. * nsterm.m (ns_flush): Remove no-op. (ns_redisplay_interface): Adjust user. * w32term.h (x_flush): Remove no-op. (w32_redisplay_interface): Adjust user. * xterm.c (x_flush): Simplify because we do not flush all frames at once any more. Adjust comment. (x_redisplay_interface): Adjust user.
* | | Attempt to make redisplay more selective when changing fonts.Dmitry Antipov2013-09-061-37/+8
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.h (struct frame): New bitfield fonts_changed. * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration. (adjust_frame_glyphs): Add prototype. * dispnew.c (fonts_changed_p): Remove. (adjust_glyphs): Remove becase we do not adjust matrices on all frames at once any more. (adjust_frame_glyphs): Block and unblock input here. (adjust_glyph_matrix): Use fonts_changed. (change_frame_size_1): Use adjust_frame_glyphs. * font.c (font_open_entity): Use fonts_changed. * frame.c (set_menu_bar_lines, Fmake_terminal_frame): * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip): * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply) (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window) (shrink_mini_window, Fresize_mini_window_internal) (window_scroll_pixel_based, Fset_window_configuration) (apply_window_adjustment, Fset_window_vscroll): * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip): Use adjust_frame_glyphs. * xdisp.c (redisplay_tool_bar, redisplay_window, try_window) (try_window_reusing_current_matrix, try_window_id, display_line) (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed. (redisplay_internal): Consider fonts_changed and adjust frame matrices for each frame only if the frame is visible. If font has been changed on some frame during full redisplay, retry only visible frames where the font has been actually changed.
* | Move Flast_nonminibuf_frame from dispnew.c to frame.c.Martin Rudalics2013-09-021-14/+0
| | | | | | | | | | * dispnew.c (Flast_nonminibuf_frame): Move from here ... * frame.c (Flast_nonminibuf_frame): ... to here.
* | * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.Dmitry Antipov2013-09-011-3/+1
| | | | | | | | | | | | | | (CLIP_TEXT_POS_FROM_MARKER): New macro. * dispnew.c (buffer_posn_from_coords): * window.c (Fwindow_end, displayed_window_lines): * xdisp.c (redisplay_mode_lines): Use it.
* | Prefer enum glyph_row_area to int where appropriate.Dmitry Antipov2013-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (enum glyph_row_area): Add ANY_AREA member. Fix comment. (window_box, window_box_width, window_box_left, window_box_left_offset) (window_box_right, window_box_right_offset): Adjust prototypes. * xdisp.c (window_box, window_box_width, window_box_left) (window_box_left_offset, window_box_right, window_box_right_offset): Use enum glyph_row_area. Adjust users and tweak comment where needed. (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA. * nsterm.m (ns_clip_to_row): * w32term.c (w32_clip_to_row): * xterm.c (x_clip_to_row): Likewise.
* | Redesign redisplay interface to drop global output_cursor.Dmitry Antipov2013-08-281-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (struct redisplay_interface): Remove cursor_to member. (toplevel): Remove declaration of output_cursor. (set_output_cursor, x_cursor_to): Remove prototype. * window.h (struct window): New member output_cursor. (output_cursor_to): New function to replace RIF member. * dispnew.c (redraw_overlapped_rows, update_marginal_area) (update_text_area, set_window_cursor_after_update): Use it. * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove. (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line): * nsterm.m (ns_update_window_begin, ns_update_window_end): * w32term.c (x_update_window_begin, x_update_window_end): * xterm.c (x_update_window_begin, x_update_window_end): Adjust to use per-window output cursor.
* | Simplify EMACS_TIME-related code.Paul Eggert2013-08-271-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This portability layer is no longer needed, since Emacs has been using struct timespec as a portability layer for some time. Merge from gnulib, incorporating: 2013-08-27 timespec: new convenience constants and function * src/atimer.h, src/buffer.h, src/dispextern.h, src/xgselect.h: Include <time.h> rather than "systime.h"; that's all that's needed now. * src/dispnew.c: Include <timespec.h> rather than "systime.h"; that's all that's needed now. * src/systime.h (EMACS_TIME): Remove. All uses changed to struct timespec. (EMACS_TIME_RESOLUTION): Remove. All uses changed to TIMESPEC_RESOLUTION. (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to LOG10_TIMESPEC_RESOLUTION. (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec. (EMACS_NSECS): Remove. All uses changed to tv_nsec. (make_emacs_time): Remove. All used changed to make_timespec. (invalid_timespec): Rename from invalid_emacs_time. All uses changed. (current_timespec): Rename from current_emacs_time. All uses changed. (add_emacs_time): Remove. All uses changed to timespec_add. (sub_emacs_time): Remove. All uses change dot timespec_sub. (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign. (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed. (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec. (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod. (current_timespec): Rename from current_emacs_time. All uses changed. (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses changed to timespec_cmp. * src/xgselect.c: Include <timespec.h>, since our .h files don't.
* | Redesign redisplay interface to drop updated_row and updated_area.Dmitry Antipov2013-08-231-37/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (updated_row, updated_area): Remove declaration. (struct redisplay_interface): Pass glyph row and row area parameters to write_glyphs, insert_glyphs and clear_end_of_line functions. (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line): Adjust prototypes. * dispnew.c (updated_row, updated_area): Remove. (redraw_overlapped_rows, update_window_line): Adjust user. (update_marginal_area, update_text_area): Likewise. Pass updated row as a parameter. Prefer enum glyph_row_area to int where appropriate. * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line): Adjust users.
* | * window.h (struct window): Convert window_end_pos andDmitry Antipov2013-08-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively. (wset_window_end_pos, wset_window_end_vpos): Remove. * dispnew.c (adjust_glyph_matrix): * window.c (Fwindow_end, replace_window, set_window_buffer) (make_window): * xdisp.c (check_window_end, move_it_to, redisplay_internal) (set_vertical_scroll_bar, redisplay_window, try_window) (try_window_reusing_current_matrix, find_first_unchanged_at_end_row) (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos) (note_mouse_highlight): Adjust users. (try_cursor_movement): Likewise. Convert old precondition to eassert. Add comment.
* | * window.h (struct window): Convert left_margin_cols andDmitry Antipov2013-08-131-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | right_margin_cols from Lisp_Objects to integers. Adjust comment. (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS) (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH): Adjust users. * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int. Adjust comment. (showing_window_margins_p, update_window_line, update_frame_1): * fringe.c (draw_fringe_bitmap_1): * xdisp.c (window_box_width): Adjust users. * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove. (adjust_window_margins, set_window_buffer, Fsplit_window_internal): Use direct assignment. (Fset_window_configuration, save_window_save, Fwindow_margins): Convert Lisp_Object to integer and back where appropriate. (Fset_window_margins): Adjust user. Return t if any margin was actually changed, and mention this in docstring.
* | Redesign redisplay interface to drop global variable updated_window.Dmitry Antipov2013-08-081-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always pass currently updated window as a parameter to update routines. * dispextern.h (updated_window): Remove declaration. (struct redisplay_interface): Pass window parameter to write_glyphs, insert_glyphs, clear_end_of_line, cursor_to and after_update_window_hook. (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to): Adjust prototypes. * dispnew.c (updated_window): Remove. (redraw_overlapped_rows, update_marginal_area, update_text_area) (update_window_line): Adjust to match redisplay interface changes. * nsterm.m (ns_update_window_begin, ns_update_window_end) (ns_scroll_run, ns_after_update_window_line): * w32term.c (x_update_window_begin, x_update_window_end) (x_after_update_window_line, x_scroll_run): * xterm.c (x_update_window_begin, x_update_window_end) (x_after_update_window_line, x_scroll_run): * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line): Likewise. Adjust comments where appropriate. (x_cursor_to): Simplify because this is always called during window update (but install debugging check anyway). (expose_window): Check must_be_updated_p flag to see whether this function is called during window update.
* | New macro to iterate over live buffers similar to frames.Dmitry Antipov2013-08-051-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * buffer.h (FOR_EACH_LIVE_BUFFER): New macro. (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string): Declare buffer-related variables here to offload lisp.h. * buffer.c (Vbuffer_alist): Adjust comment. (Fget_file_buffer, get_truename_buffer, Fother_buffer) (other_buffer_safely): * data.c (store_symval_forwarding): * dispnew.c (Fframe_or_buffer_changed_p): * fileio.c (Fdo_auto_save): * filelock.c (unlock_all_files): * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
* | * dispnew.c (glyph_matrix_count, glyph_pool_count):Dmitry Antipov2013-08-041-19/+30
| | | | | | | | | | | | | | Move under GLYPH_DEBUG and ENABLE_CHECKING. (new_glyph_matrix, free_glyph_matrix, new_glyph_pool) (free_glyph_pool, check_glyph_memory): Likewise for all users. Adjust comments where appropriate.
* | Port to GNU/Linux systems with tinfo but not ncurses.Paul Eggert2013-07-231-1/+1
| | | | | | | | | | | | | | | | * configure.ac (USE_NCURSES): New symbol. * src/dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX, to decide whether ncurses is being used. Without this change, GCC complains about tgetent not being declared, on a system that has tinfo installed but ncurses not installed.
* | * fileio.c (report_file_errno): Fix errno reporting bug.Paul Eggert2013-07-161-1/+1
| | | | | | | | | | | | | | | | If the file name is neither null nor a pair, package it up as a singleton list. All callers changed, both to this function and to report_file_error. This fixes a bug where the memory allocator invoked by list1 set errno so that the immediately following report_file_error reported the wrong errno value.
* | Prefer list1 (X) to Fcons (X, Qnil) when building lists.Paul Eggert2013-07-151-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the code easier to read and the executable a bit smaller. Do not replace all calls to Fcons that happen to create lists, just calls that are intended to create lists. For example, when creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil)) rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil). Similarly for list2 through list5. * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): * bytecode.c (exec_byte_code): * callint.c (quotify_arg, Fcall_interactively): * callproc.c (Fcall_process, create_temp_file): * charset.c (load_charset_map_from_file) (Fdefine_charset_internal, init_charset): * coding.c (get_translation_table, detect_coding_system) (Fcheck_coding_systems_region) (Fset_terminal_coding_system_internal) (Fdefine_coding_system_internal, Fdefine_coding_system_alias): * composite.c (update_compositions, Ffind_composition_internal): * dired.c (directory_files_internal, file_name_completion) (Fsystem_users): * dispnew.c (Fopen_termscript, bitch_at_user, init_display): * doc.c (Fsnarf_documentation): * editfns.c (Fmessage_box): * emacs.c (main): * eval.c (do_debug_on_call, signal_error, maybe_call_debugger) (Feval, eval_sub, Ffuncall, apply_lambda): * fileio.c (make_temp_name, Fcopy_file, Faccess_file) (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes) (Fset_file_times, Finsert_file_contents) (Fchoose_write_coding_system, Fwrite_region): * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns): * font.c (font_registry_charsets, font_parse_fcname) (font_prepare_cache, font_update_drivers, Flist_fonts): * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset): * frame.c (make_frame, Fmake_terminal_frame) (x_set_frame_parameters, x_report_frame_params) (x_default_parameter, Fx_parse_geometry): * ftfont.c (syms_of_ftfont): * image.c (gif_load): * keyboard.c (command_loop_1): * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1) (Fcopy_keymap, append_key, Fcurrent_active_maps) (Fminor_mode_key_binding, accessible_keymaps_1) (Faccessible_keymaps, Fwhere_is_internal): * lread.c (read_emacs_mule_char): * menu.c (find_and_return_menu_selection): * minibuf.c (get_minibuffer): * nsfns.m (Fns_perform_service): * nsfont.m (ns_script_to_charset): * nsmenu.m (ns_popup_dialog): * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard) (Fx_own_selection_internal): * nsterm.m (append2): * print.c (Fredirect_debugging_output) (print_prune_string_charset): * process.c (Fdelete_process, Fprocess_contact) (Fformat_network_address, set_socket_option) (read_and_dispose_of_process_output, write_queue_push) (send_process, exec_sentinel): * sound.c (Fplay_sound_internal): * textprop.c (validate_plist, add_properties) (Fput_text_property, Fadd_face_text_property) (copy_text_properties, text_property_list, syms_of_textprop): * unexaix.c (report_error): * unexcoff.c (report_error): * unexsol.c (unexec): * xdisp.c (redisplay_tool_bar, store_mode_line_string) (Fformat_mode_line, syms_of_xdisp): * xfaces.c (set_font_frame_param) (Finternal_lisp_face_attribute_values) (Finternal_merge_in_global_face, syms_of_xfaces): * xfns.c (x_default_scroll_bar_color_parameter) (x_default_font_parameter, x_create_tip_frame): * xfont.c (xfont_supported_scripts): * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show) (menu_help_callback, xmenu_show): * xml.c (make_dom): * xterm.c (set_wm_state): Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list, and similarly for list2 through list5.
* | Port to C89.Paul Eggert2013-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/ebrowse.c (USAGE): Remove macro with too-long string literal ... (usage_message): ... and replace it with this new static constant containing multiple literals. All uses changed. * lib-src/emacsclient.c (print_help_and_exit): Rewrite to avoid string literals longer than the C89 limits. (start_daemon_and_retry_set_socket): Rewrite to avoid non-constant array initializer. * lib-src/make-docfile.c (enum global_type): Omit trailing comma. * src/bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__. (B__dummy__): New dummy symbol, to pacify C89. * src/dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since they can't grok varargs macros. * src/dispnew.c (add_window_display_history) (add_frame_display_history): * src/print.c (print_object): * src/xdisp.c (debug_method_add): Use %p printf format only for void pointers. * src/emacs.c (usage_message): New constant, replacing ... (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89. (main): Adjust to usage reorg. * src/fns.c (syms_of_fns): * src/profiler.c (syms_of_profiler): Don't use non-constant struct initializers. * src/gnutls.h (gnutls_initstage_t): * src/lisp.h (enum Lisp_Fwd_Type): * src/lread.c (lisp_file_lexically_bound_p): * src/xsettings.c (anonymous enum): Remove trailing comma. * src/xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism. * src/lisp.h (ENUM_BF): Use unsigned if pedantic. (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99. (DEFUN): Use it. * src/regex.c (const_re_char): New type, to pacify strict C89. All uses of 'const re_char' replaced to use it. * src/regex.h (_Restrict_): Rename from __restrict, to avoid clash with glibc when strict C89. This change is imported from gnulib. All uses changed. (_Restrict_arr_): Rename from __restrict_arr, similarly. * src/sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]: Omit GNU_LINUX implementation, since it requires long long. * src/xterm.c (x_draw_underwave): Do not assume the traditional order of struct's members. (x_term_init): Rewrite to avoid the need for non-constant structure initializers.
* | Use emacs_open more consistently when opening files.Paul Eggert2013-07-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This handles EINTR more consistently now, and makes it easier to introduce other uniform changes to file descriptor handling. * src/systdio.h: New file. * src/buffer.c (mmap_init): * cygw32.c (chdir_to_default_directory): * dispnew.c (Fopen_termscript): * emacs.c (Fdaemon_initialized): * fileio.c (Fdo_auto_save): * image.c (slurp_file, png_load_body, jpeg_load_body): * keyboard.c (Fopen_dribble_file): * lread.c (Fload): * print.c (Fredirect_debugging_output): * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory): * termcap.c (tgetent): * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs): * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec): * w32term.c (w32_initialize) [CYGWIN]: * xfaces.c (Fx_load_color_file): Use emacs_open instead of plain open, and emacs_fopen instead of plain fopen. * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c: * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen. * callproc.c (default_output_mode): New constant. (Fcall_process): Use it to call emacs_open instead of plain creat. * dispnew.c (Fopen_termscript): Fix minor race in opening termscript. * sysdep.c (emacs_open): Add commentary and don't call file name "path". (emacs_fopen): New function. * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c: Include <lisp.h>, for emacs_open. * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
* | Prefer < to > in range checks such as 0 <= i && i < N.Paul Eggert2013-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to visualize quantities on a number line. This patch doesn't apply to all such range checks, only to the range checks affected by the 2013-03-24 change. This patch reverts most of the 2013-03-24 change. * alloc.c (xpalloc, Fgarbage_collect): * ccl.c (ccl_driver, resolve_symbol_ccl_program): * character.c (string_escape_byte8): * charset.c (read_hex): * data.c (cons_to_unsigned): * dispnew.c (update_frame_1): * doc.c (Fsubstitute_command_keys): * doprnt.c (doprnt): * editfns.c (hi_time, decode_time_components): * fileio.c (file_offset): * fns.c (larger_vector, make_hash_table, Fmake_hash_table): * font.c (font_intern_prop): * frame.c (x_set_alpha): * gtkutil.c (get_utf8_string): * indent.c (check_display_width): * keymap.c (Fkey_description): * lisp.h (FIXNUM_OVERFLOW_P, vcopy): * lread.c (read1): * minibuf.c (read_minibuf_noninteractive): * process.c (wait_reading_process_output): * search.c (Freplace_match): * window.c (get_phys_cursor_glyph): * xdisp.c (redisplay_internal): * xsmfns.c (smc_save_yourself_CB): Prefer < to > for range checks. * dispnew.c (sit_for): Don't mishandle NaNs. This fixes a bug introduced in the 2013-03-24 change. * editfns.c (decode_time_components): Don't hoist comparison. This fixes another bug introduced in the 2013-03-24 change.