1. 01 Sep, 2011 1 commit
  2. 31 Aug, 2011 1 commit
    • Paul Eggert's avatar
      Avoid the use of snprintf. · 61bfeeb7
      Paul Eggert authored
      * font.c (APPEND_SNPRINTF): Remove.
      * xterm.c (x_io_error_quitter):
      Use esnprintf, not snprintf.  That way, we don't have to worry
      about porting to ancient platforms that lack snprintf.
      (x_term_init): Use sprintf, not snprintf.
  3. 29 Aug, 2011 1 commit
  4. 05 Aug, 2011 1 commit
  5. 04 Aug, 2011 1 commit
  6. 29 Jul, 2011 1 commit
    • Paul Eggert's avatar
      * xterm.c: Integer and memory overflow issues. · 3256efce
      Paul Eggert authored
      (x_color_cells, handle_one_xevent, x_term_init):
      Check for size calculation overflow.
      (x_color_cells): Don't store size until memory allocation succeeds.
      (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
      (x_term_init): Don't assume length fits in int (sprintf is limited
      to int size).
  7. 17 Jul, 2011 1 commit
    • Paul Eggert's avatar
      * xterm.c: don't go over XClientMessageEvent limit · 50849c52
      Paul Eggert authored
      (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
      (x_send_scroll_bar_event): Likewise.  Check that the size does not
      exceed limits imposed by XClientMessageEvent, as well as the usual
      ptrdiff_t and size_t limits.
  8. 24 Jun, 2011 1 commit
  9. 22 Jun, 2011 2 commits
    • Paul Eggert's avatar
      GLYPH_DEBUG fixes · 85fece3e
      Paul Eggert authored
      The following patches are for when GLYPH_DEBUG && !XASSERT.
      * dispextern.h (trace_redisplay_p, dump_glyph_string):
      * dispnew.c (flush_stdout):
      * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
      Mark as externally visible.
      * dispnew.c (check_window_matrix_pointers): Now static.
      * dispnew.c (window_to_frame_vpos):
      * xfns.c (unwind_create_frame):
      * xterm.c (x_check_font): Remove unused local.
      * scroll.c (CHECK_BOUNDS):
      * xfaces.c (cache_fache): Rename local to avoid shadowing.
      * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
      * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
      (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
      (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
      Now static.
      (debug_method_add): Use va_list and vsprintf rather than relying
      on undefined behavior with wrong number of arguments.
      (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
      Don't assume ptrdiff_t and EMACS_INT are the same width as int.
      In this code, it's OK to assume C99 behavior for ptrdiff_t formats
      since we're not interested in debugging glyphs with old libraries.
      * xfaces.c (cache_face): Move debugging code earlier; this pacifies
      GCC 4.6.0's static checking.
    • Paul Eggert's avatar
      * dispextern.h (struct face.stipple): · 0766b489
      Paul Eggert authored
      * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
      (x_bitmap_mask, x_allocate_bitmap_record)
      (x_create_bitmap_from_data, x_create_bitmap_from_file)
      (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
      * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
      * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
      * xfaces.c (load_pixmap):
      * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
      * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
      (.bitmaps_last, struct x_output.icon_bitmap):
      Use ptrdiff_t, not int, for bitmap indexes.
      (x_allocate_bitmap_record): Check for size overflow.
      * dispextern.h, lisp.h: Adjust to API changes elsewhere.
  10. 21 Jun, 2011 1 commit
  11. 13 Jun, 2011 4 commits
  12. 11 Jun, 2011 1 commit
    • Paul Eggert's avatar
      * buffer.c (Qclone_number): Remove for now, as it's unused. · 4475bec4
      Paul Eggert authored
      (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
      (record_buffer): Remove unused local.
      * frame.c (other_visible_frames, frame_buffer_list): Now static.
      (set_frame_buffer_list): Remove; unused.
      * frame.h (other_visible_frames): Remove decl.
      * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
      * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
      (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
      if HAVE_GPM.
      * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
      * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
      Define only if HAVE_GPM.
      * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
      (update_hints_inhibit): Remove; never set.  All uses removed.
      * widgetprv.h (emacsFrameClassRec): Remove decl.
      * window.c (delete_deletable_window): Now returns void, since it
      wasn't returning anything.
      (compare_window_configurations): Remove unused locals.
      * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
      * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
      Omit no-longer-needed #ifdef USE_X_TOOLKIT, since USE_X_TOOLKIT is
      implied by USE_GTK || USE_MOTIF.
      (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
      the same widths as pointers.  This follows up on the 2011-05-06 patch.
      * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
      * xterm.h: Likewise.
      (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
  13. 30 May, 2011 1 commit
    • Paul Eggert's avatar
      [ChangeLog] · 531b0165
      Paul Eggert authored
      Malloc failure behavior now depends on size of allocation.
      * lib/allocator.h (struct allocator.die): New size arg.
      * lib/careadlinkat.c (careadlinkat): Pass size to 'die' function.
      If the actual problem is an ssize_t limitation, not a size_t or
      malloc failure, fail with errno == ENAMETOOLONG instead of calling 'die'.
      Malloc failure behavior now depends on size of allocation.
      * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
      * lisp.h: Change signatures accordingly.
      * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
      All callers changed.
  14. 28 May, 2011 1 commit
    • Paul Eggert's avatar
      [ChangeLog] · 55d4c1b2
      Paul Eggert authored
      Use 'inline', not 'INLINE'.
      * configure.in, autogen/config.in (INLINE): Remove.
      Use 'inline', not 'INLINE'.
      * etags.c (hash): Now inline unconditionally.
      * make-docfile.c (put_char): inline, not INLINE.
      Use 'inline', not 'INLINE'.
      * config.nt (INLINE): Remove.
      Use 'inline', not 'INLINE'.
      * alloc.c, fontset.c (INLINE): Remove.
      * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
      * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
      * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
      * gmalloc.c (register_heapinfo): Use inline unconditionally.
      * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
  15. 27 May, 2011 1 commit
    • Chong Yidong's avatar
      Support X clipboard managers. · a9f737ee
      Chong Yidong authored
      * lisp/select.el (xselect-convert-to-targets): Add MULTIPLE target to list.
      (xselect-convert-to-save-targets): New function.
      * src/xselect.c: Support for clipboard managers.
      (Vselection_alist): Move to termhooks.h as terminal-local var.
      (LOCAL_SELECTION): New macro.
      (x_atom_to_symbol): Handle x_display_info_for_display fail case.
      (symbol_to_x_atom): Remove gratuitous arg.
      (x_handle_selection_request, lisp_data_to_selection_data)
      (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
      (x_own_selection, x_get_local_selection, x_convert_selection): New
      arg, specifying work frame.  Use terminal-local Vselection_alist.
      (some_frame_on_display): Delete unused function.
      (Fx_own_selection_internal, Fx_get_selection_internal)
      (Fx_disown_selection_internal, Fx_selection_owner_p)
      (Fx_selection_exists_p): New optional frame arg.
      (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
      (x_handle_selection_clear): Don't treat other terminals with the
      same keyboard specially.  Use the terminal-local Vselection_alist.
      (x_clear_frame_selections): Use Frun_hook_with_args.
      * src/termhooks.h (Vselection_alist): Make it terminal-local.
      * src/terminal.c (create_terminal): Initialize it.
      * src/xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
      * src/xterm.h: Add support for those atoms.
  16. 12 May, 2011 1 commit
    • Paul Eggert's avatar
      Be more systematic about user-interface timestamps. · 08dc5ae6
      Paul Eggert authored
      Before, the code sometimes used 'Time', sometimes 'unsigned long',
      and sometimes 'EMACS_UINT', to represent these timestamps.  This
      change causes it to use 'Time' uniformly, as that's what X uses.
      This makes the code easier to follow, and makes it easier to catch
      integer overflow bugs such as Bug#8664.
      * frame.c (Fmouse_position, Fmouse_pixel_position):
      Use Time, not unsigned long, for user-interface timestamps.
      * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
      (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
      * keyboard.h (last_event_timestamp): Likewise.
      * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
      * menu.h (xmenu_show): Likewise.
      * term.c (term_mouse_position): Likewise.
      * termhooks.h (struct input_event.timestamp): Likewise.
      (struct terminal.mouse_position_hook): Likewise.
      * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
      * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
      * systime.h (Time): New decl.  Pull it in from <X11/X.h> if
      HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
      what it was before.
      * menu.h, termhooks.h: Include "systime.h", for Time.
  17. 11 May, 2011 2 commits
    • Paul Eggert's avatar
      * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers. · 5235bd3e
      Paul Eggert authored
      Before, the code was not consistent.  These values cannot exceed
      2**31 - 1 so there's no need to make them unsigned.
      (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
      (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
      (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
      as modifiers.
      * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
    • YAMAMOTO Mitsuharu's avatar
      Take account of fringe background extension in scroll_run_hook. · 7db47798
      YAMAMOTO Mitsuharu authored
      * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
      `width' to `bar_area_x' and `bar_area_width', respectively.
      (x_scroll_run): Take account of fringe background extension.
      * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]: Rename
      local vars `left' and `width' to `bar_area_x' and
      `bar_area_width', respectively.
      (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
      background extension.
  18. 03 May, 2011 1 commit
  19. 17 Apr, 2011 1 commit
    • Chong Yidong's avatar
      Minor redisplay cleanups. · 4581706e
      Chong Yidong authored
      * src/dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
      definition for no-X builds.
      * src/termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
      * src/xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
  20. 16 Apr, 2011 7 commits
  21. 13 Apr, 2011 1 commit
    • Paul Eggert's avatar
      * xterm.c: Make symbols static if they're not exported. · b532497d
      Paul Eggert authored
      (x_raise_frame, x_lower_frame, x_wm_set_window_state):
      (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
      (x_destroy_window, x_delete_display):
      Now static.
      (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
      (x_mouse_leave): Remove; unused.
      * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
      (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
      (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
      Remove decls.
      (x_mouse_leave): Declare only if WINDOWSNT.
      (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
      (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
  22. 08 Apr, 2011 1 commit
  23. 06 Apr, 2011 1 commit
  24. 01 Apr, 2011 2 commits
  25. 27 Mar, 2011 1 commit
    • Glenn Morris's avatar
      Remove (RET)SIGTYPE; it is identical to void on all supported systems. · 9af30bdf
      Glenn Morris authored
      Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg01068.html
      * configure.in (AC_TYPE_SIGNAL): Remove obsolete macro.
      (AH_BOTTOM): Do not define SIGTYPE.
      * lib-src/emacsclient.c: Replace SIGTYPE with void.
      * nt/config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void).
      * src/syssignal.h: Replace RETSIGTYPE with void.
      * src/atimer.c, src/data.c, src/dispnew.c, src/emacs.c, src/floatfns.c:
      * src/keyboard.c, src/keyboard.h, src/lisp.h, src/process.c, src/sysdep.c:
      * src/xterm.c: Replace SIGTYPE with void everywhere.
      * src/s/template.h (SIGTYPE): Remove commented out definition.
      * src/s/usg5-4-common.h (SIGTYPE): Remove definition.
      * admin/CPP-DEFINES: Remove SIGTYPE.
  26. 23 Mar, 2011 1 commit
  27. 22 Mar, 2011 1 commit
  28. 09 Mar, 2011 1 commit