1. 10 Jun, 2018 1 commit
    • Paul Eggert's avatar
      Use native alignment to access Lisp object data · 0303fab3
      Paul Eggert authored
      Instead of using __builtin_assume_aligned (P, GCALIGNMENT) to
      tell GCC that P has alignment 8, use (T *) P where T is the
      type of the pointed-to object, to tell GCC that P has native
      alignment.  This is simpler, matches the intent better, and
      should help simplify future improvements.  Some of these
      changes are to pacify gcc -Wnull-dereference, since GCC is
      smarter about pointers now that Emacs no longer uses
      __builtin_assume_aligned; these minor changes should improve
      code efficiency slightly.  On Fedora 28 x86-64 with default
      optimization this patch shrinks the size of the Emacs text
      segment by 0.36%.
      * src/conf_post.h (__has_builtin, __builtin_assume_aligned):
      Remove; no longer used.
      * src/dbusbind.c (XD_OBJECT_TO_DBUS_TYPE):
      Pacify -Wnull-dereference by using XCAR instead of CAR_SAFE
      and XCDR instead of CDR_SAFE when this is safe.
      * src/fileio.c (Fexpand_file_name):
      * src/font.c (clear_font_cache):
      Pacify -Wnull-dereference by removing unnecessary NILP test.
      * src/keyboard.c (xevent_start): New function.
      (read_char, read_key_sequence): Pacify -Wnull-dereference by
      using xevent_start instead of EVENT_START.
      * src/lisp.h (lisp_h_XUNTAG): Remove; XUNTAG is always a macro
      now, since it can no longer be implemented as a function.
      (XUNTAG): New third argument CTYPE.  All uses changed.
      Cast result to CTYPE * instead of using __builtin_assume_aligned.
      Simplify by using LISP_WORD_TAG.
      (LISP_WORD_TAG): New macro.
      (TAG_PTR): Use it.
      * src/menu.c (x_popup_menu_1):
      Pacify -Wnull-dereference by using XCAR instead of Fcar and
      XCDR instead of Fcdr where this is safe.
      0303fab3
  2. 04 Apr, 2018 1 commit
    • Paul Eggert's avatar
      Improve GC+Cairo workaround · d02fd482
      Paul Eggert authored
      Suggested by Eli Zaretskii (Bug#20890#31).
      * src/font.h (font_data_structures_may_be_ill_formed): New function.
      * src/ftfont.c (ftfont_close):
      * src/ftcrfont.c (ftcrfont_close): Use it.
      d02fd482
  3. 01 Jan, 2018 1 commit
  4. 13 Nov, 2017 1 commit
    • Paul Eggert's avatar
      Change vectorlike from struct to union · 5d68dc9a
      Paul Eggert authored
      * src/lisp.h (vectorlike_headed): Change from struct to union.
      All uses changed.  Since it has only one member, this does not
      change semantics.  This is designed to simplify future changes
      needed to fix bugs like Bug#29040.  All uses changed.
      5d68dc9a
  5. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  6. 10 Apr, 2017 1 commit
    • Lars Brinkhoff's avatar
      Add PVSIZE function to return the size of a pseudovector. · 3ccd0ff1
      Lars Brinkhoff authored
      * src/lisp.h (PVSIZE): New function.
      
      * src/chartab.c (copy_char_table):
      * src/data.c (Ftype_of, Finteractive_form, Faref, Faset):
      * src/doc.c (Fdocumentation, store_function_docstring):
      * src/eval.c (Fcommandp, funcall_lambda, lambda_arity, Ffetch_bytecode):
      * src/fns.c (Flength, Fcopy_sequence):
      * src/font.h (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P):
      * src/lread.c (substitute_object_recurse):
      * src/src/print.c (print_object):
        Use it.
      3ccd0ff1
  7. 01 Jan, 2017 1 commit
  8. 02 Dec, 2016 1 commit
    • Paul Eggert's avatar
      Make struct font_drivers read-only · ebb96114
      Paul Eggert authored
      This simplifies the code a bit, and makes the structs more
      shareable and less likely to become corrupt.
      * src/alloc.c (cleanup_vector):
      * src/font.c (valid_font_driver, font_prepare_cache)
      (font_finish_cache, font_get_cache, font_clear_cache)
      (register_font_driver, font_update_drivers):
      * src/font.h (struct font, struct font_driver_list)
      (valid_font_driver):
      struct font_drivers are now const.
      * src/font.c, src/ftcrfont.c, src/ftfont.c, src/nsfont.m, src/xfont.c:
      Omit no-longer-necessary decls.
      * src/ftcrfont.c (syms_of_ftcrfont):
      * src/ftxfont.c (syms_of_ftxfont):
      * src/xftfont.c (syms_of_xftfont):
      Omit no-longer-necessary initialization code.
      * src/ftcrfont.c (ftcrfont_driver):
      * src/ftfont.c (ftfont_driver):
      * src/ftxfont.c (ftxfont_driver):
      * src/macfont.m (macfont_driver):
      * src/nsfont.m (nsfont_driver):
      * src/xfont.c (xfont_driver):
      * src/xftfont.c (xftfont_driver):
      Use C99-style initializer for ease of maintenance, and make it const.
      * src/ftcrfont.c, src/ftxfont.c, src/xftfont.c:
      Refer to functions like ftfont_text_extents directly.
      * src/ftfont.c (ftfont_get_cache, ftfont_list, ftfont_list_family)
      (ftfont_has_char, ftfont_encode_char, ftfont_text_extents)
      (ftfont_get_bitmap, ftfont_anchor_point, ftfont_otf_capability)
      (ftfont_variation_glyphs, ftfont_filter_properties)
      (ftfont_combining_capability):
      * src/xfont.c (xfont_get_cache):
      Now extern, so that other modules’ struct font_drivers can use
      them directly.
      * src/macfont.m (macfont_descriptor_entity):
      * src/nsfont.m (nsfont_open):
      Use constant directly; this is clearer.
      ebb96114
  9. 29 Oct, 2016 1 commit
    • Daniel Colascione's avatar
      Add double-buffering support to reduce flicker · c2907158
      Daniel Colascione authored
      * src/dispextern.h (struct glyph_string): Remove window member
      (block_buffer_flips, unblock_buffer_flips)
      (buffer_flipping_blocked_p): Declare.
      
      * src/xterm.h (struct x_display_info): New member supports_xdbe.
      (struct x_output): New members draw_desc and need_buffer_flip.
      (FRAME_X_DRAWABLE, FRAME_X_RAW_DRAWABLE)
      (FRAME_X_DOUBLE_BUFFERED_P)
      (FRAME_X_NEED_BUFFER_FLIP): New macros.
      (set_up_x_back_buffer, tear_down_x_back_buffer)
      (initial_set_up_x_back_buffer): Declare.
      
      * src/xterm.c: Include Xdbe.h.
      (x_begin_cr_clip, x_fill_rectangle, x_draw_rectangle)
      (x_draw_vertical_window_border, x_update_end)
      (x_setup_relief_color, x_draw_relief_rect)
      (x_draw_fringe_bitmap, x_shift_glyphs_for_insert)
      (x_scroll_run, x_draw_hollow_cursor, x_draw_bar_cursor): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW; rename local
      variables appropriately; substitute calls to XClearArea with
      x_clear_area, which DTRT for double buffering.
      (x_clear_window, x_clear_area): In double-buffering mode, use
      rect-drawing X functions instead of XClearWindow and
      XClearArea, which always operate on the front buffer.
      (show_back_buffer): New function.
      (XTframe_up_to_date): Call show_back_buffer when done.
      (x_clear_frame, x_clear_frame_area): Remove obsolete calls to
      gtk_widget_queue_draw to refresh scroll bars; scroll bars are
      now independent X windows.
      (handle_one_xevent): Call font_drop_xrender_surfaces when
      XftDraw might need regenerating; perform buffer flip when
      responding to Expose events; issue front-buffer clearing
      commands as stopgap while we wait for redisplay.
      Call flush_dirty_back_buffers.
      (x_make_frame_visible): Un-bitrot comment; move XSETFRAME
      earlier in function.
      (x_free_frame_resources): Call tear_down_x_back_buffer when
      destroying frame.
      (x_term_init): Attempt to initialize double buffer extension.
      (x_flip_and_flush): New function.
      (x_redisplay_interface): Point to x_flip_and_flush instead of
      x_flip directly.
      (flush_dirty_back_buffers): New function.
      (x_create_terminal): Register buffer_flipping_unblocked_hook.
      
      * src/xftfont.c (xftfont_drop_xrender_surfaces): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (xftfont_draw): Call x_mark_frame_dirty.
      (xftfont_drop_xrender_surfaces): New function.
      (syms_of_xftfont): Register it.
      
      * src/xfont.c (xfont_draw): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/xfns.c: Include Xdbe.h.
      (x_set_inhibit_double_buffering, set_up_x_back_buffer)
      (Fx_double_buffered_p): New functions.
      (x_window): Call initial_set_up_x_back_buffer.
      (x_make_gc): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (Fx_create_frame): Configure `inhibit-double-buffering'
      frame parameter.
      (x_create_tip_frame): Call initial_set_up_x_back_buffer.
      (x_frame_parm_handlers): Register
      x_set_inhibit_double_buffering.
      (syms_of_xfns): Register Sx_double_buffered_p.
      (x_mark_frame_dirty): Define.
      
      * src/xfaces.c (x_create_gc): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/xdisp.c (remember_mouse_glyph, init_glyph_string): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (redisplay_internal): Restart redisplay if a frame is garbaged
      during updating; explain why. Block buffer flips
      during redisplay.
      (redisplay_preserve_echo_area): Block buffer flip during call
      to redisplay_internal.
      (buffer_flip_blocked_depth): New variable.
      (block_buffer_flips, unblock_buffer_flips)
      (buffer_flipping_blocked_p): New functions.
      (init_glyph_string): Stop setting window member of struct
      glyph_string.
      
      * src/w32fns.c (w32_frame_parm_handlers): Add placeholder for
      x_set_inhibit_double_buffering.
      
      * src/termhooks.h (struct terminal): Add
      buffer_flipping_unblocked_hook.
      
      * src/nsfns.m (ns_frame_parm_handlers): Add placeholder for
      x_set_inhibit_double_buffering.
      
      * src/image.c (x_create_bitmap_from_data)
      (x_create_bitmap_from_file, x_create_x_image_and_pixmap)
      (Create_Pixmap_From_Bitmap_Data)
      (x_create_bitmap_from_xpm_data, xpm_load, gs_load): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW; rename local
      variables appropriately.
      
      * src/gtkutil.c: Include Xdbe.h.
      (xg_get_widget_from_map): Forward declare.
      (xg_clear_under_internal_border): Remove obsolete calls to
      refresh scroll bars.
      (xg_create_frame_widgets): Call initial_set_up_x_back_buffer.
      (xg_free_frame_widgets): Call tear_down_x_back_buffer; reset
      FRAME_X_DRAWABLE as well as FRAME_X_WINDOW and for the
      same reason.
      (xg_set_background_color): Set scroll bar background colors.
      (xg_finish_scroll_bar_creation): New function with common
      logic of xg_create_scroll_bar, xg_create_horizontal_scroll_bar. Force
      scroll bars to be real X11 windows.
      (xg_create_scroll_bar, xg_create_horizontal_scroll_bar): Call
      xg_finish_scroll_bar_creation.
      (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
      Remove obsolete calls to refresh scroll bars; fix comments.
      
      * src/ftxfont.c (ftxfont_get_gcs, ftxfont_draw_bitmap,
      (ftxfont_draw_background): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/frame.c (frame_parms): Add table entry for new
      `inhibit-double-buffering' frame parameter
      (syms_of_frame): Register Qinhibit_double_buffering.
      
      * src/font.h (struct font_driver): Add new `flush_frame_caches' hook.
      (font_drop_xrender_surfaces): Declare.
      
      * src/font.c (font_drop_xrender_surfaces): New function.
      
      * src/Makefile.in (XDBE_LIBS, XDBE_CFLAGS): Substitute.
      
      * etc/NEWS: Mention use of double buffering
      
      * doc/lispref/frames.texi (Management Parameters): Document
      `inhibit-double-buffering' frame parameters.
      (Visibility of Frames): Document `x-double-buffered-p'.
      
      * configure.ac: Check for the X double buffer extension
      c2907158
  10. 10 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      Work around Bug#22884 by rewording comments and strings to avoid ‘(’
      at the start of a line unless it starts a function.  This change
      is a short-term hack; in the longer run we plan to fix cc-mode’s
      performance for C files that have ‘(’ at the start of a line in a
      comment or string.
      7352c6c6
  11. 26 Jan, 2016 1 commit
    • K. Handa's avatar
      support rendering of wider range of combinging characters by ftfont backend · 4a3db0f7
      K. Handa authored
      * lisp/language/hebrew.el (hebrew-shape-gstring): If the font backend
      supports rendering of combining characters, call
      font-shape-gstring.
      
      * src/font.c (Ffont_get): Handle `combining-capability' property.
      (syms_of_font): New symbol ":combining-capability'.
      
      * src/font.h (struct font_driver): New member combining_capability.
      
      * src/ftfont.c: Include "category.h".
      (ftfont_driver): Initialize combining_capability to
      ftfont_combining_capability.
      (ftfont_shape_by_flt): If OTF is null, try to find a suitable
      FLT in advance.
      (ftfont_combining_capability): New function.
      
      (cherry picked from commit 536f48e9)
      4a3db0f7
  12. 02 Jan, 2016 1 commit
    • K. Handa's avatar
      support rendering of wider range of combinging characters by ftfont backend · 536f48e9
      K. Handa authored
      * lisp/language/hebrew.el (hebrew-shape-gstring): If the font backend
      supports rendering of combining characters, call
      font-shape-gstring.
      
      * src/font.c (Ffont_get): Handle `combining-capability' property.
      (syms_of_font): New symbol ":combining-capability'.
      
      * src/font.h (struct font_driver): New member combining_capability.
      
      * src/ftfont.c: Include "category.h".
      (ftfont_driver): Initialize combining_capability to
      ftfont_combining_capability.
      (ftfont_shape_by_flt): If OTF is null, try to find a suitable
      FLT in advance.
      (ftfont_combining_capability): New function.
      536f48e9
  13. 01 Jan, 2016 1 commit
  14. 24 Nov, 2015 1 commit
    • Eli Zaretskii's avatar
      Fix crash at startup related to GC of font entities · d5fdffec
      Eli Zaretskii authored
      * src/font.h (GC_FONT_SPEC_P, GC_FONT_ENTITY_P)
      (GC_FONT_OBJECT_P, GC_XFONT_SPEC, GC_XFONT_ENTITY)
      (GC_XFONT_OBJECT): New macros, for use in garbage collector.
      * src/alloc.c (compact_font_cache_entry, compact_font_caches):
      Don't ifdef away font cache compaction on NT_GUI, as the problems
      which led to that seem to have been solved.
      (compact_font_cache_entry): Use GC_FONT_SPEC_P, GC_XFONT_SPEC,
      GC_XFONT_ENTITY, and GC_XFONT_OBJECT, instead of their non-GC_
      cousins.  (Bug#21999)
      d5fdffec
  15. 21 Oct, 2015 1 commit
    • Paul Eggert's avatar
      Include-file cleanup for src directory · 63cfb75f
      Paul Eggert authored
      Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707).
      In a few cases, add ‘#include "foo.h"’ if the file needs foo.h
      but does not include it directly.  As a general rule, a source
      file should include foo.h if it needs the interfaces that foo.h
      defines.
      * src/alloc.c: Don’t include process.h.  Include dispextern.h,
      systime.h.
      * src/atimer.c: Don’t include blockinput.h.
      * src/buffer.c: Include coding.h, systime.h.  Don’t include
      keyboard.h, coding.h.
      * src/callint.c: Don’t include commands.h, keymap.h.
      * src/callproc.c: Don’t include character.h, ccl.h, composite.h,
      systty.h, termhooks.h.
      * src/casetab.c: Don’t include character.h.
      * src/category.c: Don’t include charset.h, keymap.h.
      * src/ccl.h: Don’t include character.h.
      * src/character.c: Don’t include charset.h.
      * src/charset.c: Don’t include disptab.h.
      * src/chartab.c: Don’t include ccl.h.
      * src/cm.c: Don’t include frame.h, termhooks.h.
      * src/cmds.c: Don’t include window.h, dispextern.h.
      * src/coding.c: Don’t include window.h, frame.h.
      * src/composite.c: Include composite.h.  Don’t include window.h,
      font.h.
      * src/data.c: Don’t include syssignal.h, termhooks.h, font.h.
      * src/dbusbind.c: Don’t include frame.h.
      * src/decompress.c: Don’t include character.h.
      * src/dired.c: Don’t include character.h, commands.h, charset.h.
      * src/dispnew.c: Don’t include character.h, indent.h, intervals.h,
      process.h, timespec.h.  Include systime.h.
      * src/doc.c: Include coding.h.  Don’t include keyboard.h.
      * src/editfns.c: Include composite.h.  Don’t include frame.h.
      * src/emacs.c: Include fcntl.h, coding.h.  Don’t include
      commands.h, systty.h..
      * src/fileio.c: Don’t include intervals.h, dispextern.h.
      Include composite.h.
      * src/filelock.c: Don’t include character.h, systime.h.
      * src/fns.c: Don’t include time.h, commands.h, keyboard.h,
      keymap.h, frame.h, blockinput.h, xterm.h.  Include composite.h.
      * src/font.c: Include termhooks.h.
      * src/font.h: Don’t include ccl.h, frame.h.  Add forward decls of
      struct composition_it, struct face, struct glyph_string.
      * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h,
      intervals.h, window.h, termhooks.h.
      * src/frame.c: Don’t include character.h, commands.h, font.h.
      * src/frame.h: Don’t include dispextern.h.
      * src/fringe.c: Don’t include character.h.
      * src/ftcrfont.c: Don’t include dispextern.h, frame.h,
      character.h, charset.h, fontset.h.
      * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h,
      fontset.h.
      * src/ftxfont.c: Don’t include dispextern.h, character.h,
      charset.h, fontset.h.
      * src/gfilenotify.c: Don’t include frame.h, process.h.
      * src/gtkutil.c: Include dispextern.h, frame.h, systime.h.
      Don’t include syssignal.h, buffer.h, charset.h, font.h.
      * src/gtkutil.h: Don’t include frame.h.
      * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h.
      Don’t include character.h.
      * src/indent.c: Don’t include keyboard.h, termchar.h.
      * src/inotify.c: Don’t include character.h, frame.h.
      * src/insdel.c: Include composite.h.  Don’t include blockinput.h.
      * src/intervals.c: Don’t include character.h, keyboard.h.
      * src/intervals.h: Don’t include dispextern.h, composite.h.
      * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h.
      Include coding.h.
      * src/keyboard.h: Don’t incldue systime.h.
      * src/keymap.c: Don’t include charset.h, frame.h.
      * src/lread.c: Include dispextern.h and systime.h.
      Don’t include frame.h.  Include systime.h.
      * src/macros.c: Don’t include commands.h, character.h, buffer.h.
      * src/menu.c: Include character.h, coding.h.  Don’t include
      dispextern.h.
      * src/menu.h: Don’t include systime.h.
      * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h,
      intervals.h, termhooks.h.
      * src/print.c: Include coding.h.  Don’t include keyboard.h,
      window.h, dispextern.h, termchar.h, termhooks.h, font.h.
      Add forward decl of struct terminal.
      * src/process.c: Don’t include termhooks.h, commands.h,
      dispextern.h, composite.h.
      * src/region-cache.c: Don’t include character.h.
      * src/scroll.c: Don’t include keyboard.h, window.h.
      * src/search.c: Don’t include category.h, commands.h.
      * src/sound.c: Don’t include dispextern.h.
      * src/syntax.c: Don’t include command.h, keymap.h.
      * src/sysdep.c: Don’t include window.h, dispextern.h.
      * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’,
      * src/term.c: Don’t include systty.h, intervals.h, xterm.h.
      * src/terminal.c: Include character.h.
      Don’t include charset.h, coding.h.
      * src/textprop.c: Don’t include character.h.
      * src/undo.c: Don’t include character.h, commands.h, window.h.
      * src/unexsol.c: Don’t include character.h, charset.h.
      * src/widget.c: Include widget.h.  Don’t include keyboard.h,
      window.h, dispextern.h, blockinput.h, character.h, font.h.
      * src/widgetprv.h: Don’t include widget.h.
      * src/window.c: Don’t include character.h, menu.h, intervals.h.
      * src/xdisp.c: Include composite.h, systime.h.  Don’t include
      macros.h, process.h.
      * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h,
      intervals.h.
      * src/xfns.c: Don’t include menu.h, character.h, intervals.h,
      epaths.h, fontset.h, systime.h, atimer.h, termchar.h.
      * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h.
      * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h.
      * src/xgselect.c: Don’t include timespec.h, frame.h.
      Include systime.h.
      * src/xgselect.h: Don’t include time.h.
      Use a forward decl to struct timespec instead.
      * src/xmenu.c: Don’t include keymap.h, character.h, charset.h,
      dispextern.h.  Include systime.h.
      * src/xml.c: Don’t include character.h.
      * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h.
      * src/xselect.c: Don’t include dispextern.h, character.h,
      buffer.h, process.h.
      * src/xsmfns.c: Don’t include systime.h, sysselect.h.
      * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h,
      intervals.h process.h, keymap.h, xgselect.h.  Include composite.h.
      63cfb75f
  16. 11 Feb, 2015 1 commit
    • Jan D's avatar
      Add cairo drawing. · dddcc0e7
      Jan D authored
      * configure.ac (with-cairo): New option.
      (USE_CAIRO): Default to yes for Gtk+ 3.  Add code to test for cairo,
      set CAIRO_CFLAGS, CAIRO_LIBS.  Add ftcrfonto to FONT_OBJ if cairo.
      Output "Does Emacs use cairo?".
      
      * lisp/version.el (emacs-version): Add cairo version.
      
      * src/Makefile.in (CAIRO_CFLAGS, CAIRO_LIBS): New variables.
      (FONT_OBJ): Add comment about ftcrfont.
      (ALL_CFLAGS): Add CAIRO_CFLAGS.
      (LIBES): Add CAIRO_LIBS.
      
      * src/dispextern.h (struct image): Add cr_data for cairo.
      (x_cr_init_fringe): Declare.
      
      * src/font.c (syms_of_font): Call syms_of_ftcrfont for cairo.
      
      * src/font.h (ftcrfont_driver, syms_of_ftcrfont): Declare
      
      * src/fringe.c (x_cr_init_fringe): New function name that shares code
      with w32_init_fringe.
      
      * src/ftcrfont.c: New font driver for cairo, based on the ftfont driver.
      
      * src/ftfont.c (ftfont_info_size); New global variable.
      (ftfont_open2): New extern function almost the same as old ftfont_open,
      but takes the font_object as argument.
      (ftfont_open): Build font object and call ftfont_open2.
      
      * src/ftfont.h (ftfont_open2, ftfont_info_size): Declare.
      
      * src/gtkutil.c (xg_clear_under_internal_border)
      (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos): Only
      queue_draw if not cairo.  Change args to x_clear_area.
      (xg_get_font): Use Qftcr when using cairo, Qxft otherwise.
      (xg_page_setup_dialog, xg_get_page_setup, draw_page)
      (xg_print_frames_dialog): New functions for printing.
      
      * src/gtkutil.h (xg_page_setup_dialog, xg_get_page_setup)
      (xg_print_frames_dialog): Declare.
      
      * src/image.c: Add defined (USE_CAIRO) for PNG.
      Add !defined USE_CAIRO for W32 PNG code.
      (x_clear_image): If cairo, destroy the surface in cr_data.
      (png_load): Add new cairo compatible implementation.
      (lookup_image_type): Add defined (USE_CAIRO) for define png_type.
      
      * src/xfns.c: New section Printing.
      (x-export-frames, x-page-setup-dialog, x-get-page-setup)
      (x-print-frames-dialog): New printing functions.
      (Fx_create_frame, x_create_tip_frame): Register ftcrfont if
      cairo.
      (syms_of_xfns): Defsym Qorientation, Qtop_margin, Qbottom_margin,
      Qportrait, Qlandscape, Qreverse_portrait, Qreverse_landscape).
      (syms_of_xfns): Provide cairo and defvar cairo-version-string.
      defsubr Sx_page_setup_dialog, Sx_get_page_setup, Sx_print_frames_dialog.
      
      * src/xterm.c (x_clear_area1, x_prepare_for_xlibdraw)
      (x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle)
      (x_draw_rectangle, x_fill_trapezoid_for_relief, x_clear_window)
      (x_gc_get_ext_data, x_extension_initialize, x_cr_accumulate_data):
      Declare.
      (FRAME_CR_CONTEXT, FRAME_CR_SURFACE): New macros.
      (max_fringe_bmp, fringe_bmp): New variables.
      (x_gc_get_ext_data, x_extension_initialize)
      (x_cr_destroy_surface, x_begin_cr_clip, x_end_cr_clip)
      (x_set_cr_source_with_gc_foreground)
      (x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
      (x_cr_destroy_fringe_bitmap, x_cr_draw_image, x_cr_draw_frame)
      (x_cr_accumulate_data, x_cr_destroy, x_cr_export_frames)
      (x_prepare_for_xlibdraw, x_set_clip_rectangles)
      (x_reset_clip_rectangles, x_fill_rectangle, x_draw_rectangle)
      (x_clear_window, x_fill_trapezoid_for_relief): New functions.
      (x_update_begin): Create cairo surface if needed.
      (x_draw_vertical_window_border): Call x_fill_rectangle for cairo.
      (x_update_end): Paint cairo drawing surface to xlib surface.
      (x_clear_under_internal_border, x_after_update_window_line): Adjust
      arguments to x_clear_area.
      (x_draw_fringe_bitmap): Call x_fill_rectangle.  Get GC values and
      call x_cr_draw_image for cairo.  Call x_reset_clip_rectangles instead
      of XSetClipMask.
      (x_set_glyph_string_clipping)
      (x_set_glyph_string_clipping_exactly): Use x_set_clip_rectangles
      instead of XSetClipRectangles.
      (x_clear_glyph_string_rect, x_draw_glyph_string_background): Use
      x_fill_rectangle instead of XFillRectangle.
      (x_draw_glyph_string_foreground)
      (x_draw_composite_glyph_string_foreground)
      (x_draw_glyphless_glyph_string_foreground): Use x_draw_rectangle instead
      of XDrawRectangle.
      (x_draw_relief_rect): Add code for USE_CAIRO.
      Call x_reset_clip_rectangles instead of XSetClipMask.
      (x_draw_box_rect): x_set_clip_rectangles instead of XSetClipRectangles,
      x_fill_rectangle instead of XFillRectangle, x_reset_clip_rectangles
      instead of XSetClipMask.
      (x_draw_image_foreground, x_draw_image_foreground_1):
      x_draw_rectangle instead of XDrawRectangle.
      (x_draw_glyph_string_bg_rect): x_fill_rectangle instead of
      XFillRectangle.
      (x_draw_image_glyph_string): If img has cr_data, use it as
      a cairo surface.
      (x_draw_stretch_glyph_string): x_set_clip_rectangles instead of
      XSetClipRectangles, x_fill_rectangle instead of XFillRectangle.
      (x_draw_glyph_string): x_fill_rectangle instead of XFillRectangle.,
      x_reset_clip_rectangles instead of XSetClipMask.
      (x_shift_glyphs_for_insert): Call x_prepare_for_xlibdraw.
      (x_clear_area1): New function that calls XClearArea.
      (x_clear_area): Takes frame as parameter, calls x_clear_area1 for
      non-cairo.
      (x_clear_frame): x_clear_window instead of XClearWindow.
      (x_scroll_run): Set frame garbaged if cairo.
      (XTmouse_position): Initialize *part to 0.
      (x_scroll_bar_create): Adjust arguments to x_clear_area.
      (x_scroll_bar_set_handle): x_clear_area1 instead of x_clear_area,
      x_fill_rectangle instead of XFillRectangle.
      (XTset_vertical_scroll_bar, XTset_horizontal_scroll_bar): Adjust
      arguments to x_clear_area.
      (x_scroll_bar_expose): x_draw_rectangle instead of XDrawRectangle.
      (handle_one_xevent): Adjust arguments to x_clear_area.
      Destroy cairo surface for frame if ConfigureNotify.
      (x_clip_to_row): x_set_clip_rectangles instead of XSetClipRectangles.
      (x_draw_hollow_cursor): x_draw_rectangle instead of XDrawRectangle,
      x_reset_clip_rectangles instead of XSetClipMask.
      (x_draw_bar_cursor): x_fill_rectangle instead of XFillRectangle,
      x_reset_clip_rectangles instead of XSetClipMask.
      (x_clear_frame_area): Adjust arguments to x_clear_area.
      (x_free_frame_resources): Call x_prepare_for_xlibdraw.
      (x_term_init): Call x_extension_initialize if cairo.
      (x_redisplay_interface): Add x_cr_define_fringe_bitmap,
      x_cr_destroy_fringe_bitmap for cairo.
      (x_initialize): Call x_cr_init_fringe for cairo.
      
      * src/xterm.h: Add include of cairo header files.
      (x_bitmap_record): Add img if cairo.
      (x_gc_ext_data): New struct for cairo.
      (x_display_info): Add ext_codes for cairo.
      (x_output): Add cr_context and cr_surface for cairo.
      (x_clear_area): Change arguments from Display*/Window to frame pointer.
      (x_query_color, x_begin_cr_clip, x_end_cr_clip)
      (x_set_cr_source_with_gc_foreground, x_set_cr_source_with_gc_background)
      (x_cr_draw_frame, x_cr_export_frames): Declare.
      dddcc0e7
  17. 16 Jan, 2015 1 commit
    • Dmitry Antipov's avatar
      Prefer INLINE functions in font.h to match style used in lisp.h · 4303d110
      Dmitry Antipov authored
      * font.h (FONTP, FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P)
      (CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
      (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, CHECK_FONT_GET_OBJECT):
      Now functions.
      * font.c (Ffont_otf_alternates, Fquery_font, Ffont_get_glyphs):
      * ftfont.c (ftfont_shape):
      * macfont.m (macfont_shape):
      * w32uniscribe.c (uniscribe_shape):
      * xftfont.c (xftfont_shape): Adjust CHECK_FONT_GET_OBJECT users.
      4303d110
  18. 10 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Port to HAVE_FREETYPE && !HAVE_XFT · 64993792
      Paul Eggert authored
      * dispextern.h (struct face.extra) [HAVE_FREETYPE && !HAVE_XFT]:
      * font.h (syms_of_xftfont) [HAVE_FREETYPE && !HAVE_XFT]:
      Declare in this case too.
      64993792
  19. 05 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Compute C decls for DEFSYMs automatically · 58f2d6ef
      Paul Eggert authored
      Fixes Bug#15880.
      This patch also makes Q constants (e.g., Qnil) constant addresses
      from the C point of view.
      * make-docfile.c: Revamp to generate table of symbols, too.
      Include <stdbool.h>.
      (xstrdup): New function.
      (main): Don't process the same file twice.
      (SYMBOL): New constant in enum global_type.
      (struct symbol): Turn 'value' member into a union, either v.value
      for int or v.svalue for string.  All uses changed.
      (add_global): New arg svalue, which overrides value, so that globals
      can have a string value.
      (close_emacs_global): New arg num_symbols; all uses changed.
      Output lispsym decl.
      (write_globals): Output symbol globals too.  Output more
      ATTRIBUTE_CONST, now that Qnil etc. are C constants.
      Output defsym_name table.
      (scan_c_file): Move most of guts into ...
      (scan_c_stream): ... new function.  Scan for DEFSYMs and
      record symbols found.  Don't read past EOF if file doesn't
      end in newline.
      * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
      * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
      * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
      * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
      * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
      * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
      * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
      * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
      * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
      * xselect.c, xsettings.c, xterm.c:
      Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
      These names are now defined automatically by make-docfile.
      * alloc.c (init_symbol): New function.
      (Fmake_symbol): Use it.
      (c_symbol_p): New function.
      (valid_lisp_object_p, purecopy): Use it.
      * alloc.c (marked_pinned_symbols):
      Use make_lisp_symbol instead of make_lisp_ptr.
      (garbage_collect_1): Mark lispsym symbols.
      (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
      (mark_object): Use it.
      (sweep_symbols): Sweep lispsym symbols.
      (symbol_uses_obj): New function.
      (which_symbols): Use it.  Work for lispsym symbols, too.
      (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
      since Qt's address is already known now.
      (syms_of_alloc): Add lispsym count to symbols_consed.
      * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
      when testing whether storage is all bits zero.
      * dispextern (struct image_type):
      * font.c (font_property_table):
      * frame.c (struct frame_parm_table, frame_parms):
      * keyboard.c (scroll_bar_parts, struct event_head):
      * xdisp.c (struct props):
      Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
      Lisp_Object *, since Qfoo is no longer an object whose address can be
      taken.  All uses changed.
      * eval.c (run_hook): New function.  Most uses of Frun_hooks changed to
      use it, so that they no longer need to take the address of a Lisp sym.
      (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
      * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
      * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
      DEFSYM Qdeactivate_mark before the corresponding var.
      * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
      instead of interning their symbols; this avoids duplicates.
      (LISP_INITIALLY, TAG_PTR)
      (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
      New macros.
      (LISP_INITIALLY_ZERO): Use it.
      (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
      (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
      Move decls up, to avoid forward uses.  Include globals.h earlier, too.
      (make_lisp_symbol): New function.
      (XSETSYMBOL): Use it.
      (DEFSYM): Now just a placeholder for make-docfile.
      * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
      (intern_sym): New function, with body taken from old intern_driver.
      (intern_driver): Use it.  Last arg is now Lisp integer, not ptrdiff_t.
      All uses changed.
      (define_symbol): New function.
      (init_obarray): Define the C symbols taken from lispsym.
      Use plain DEFSYM for Qt and Qnil.
      * syntax.c (init_syntax_once): No need to worry about
      Qchar_table_extra_slots.
      58f2d6ef
  20. 01 Jan, 2015 2 commits
  21. 25 Aug, 2014 1 commit
    • Dmitry Antipov's avatar
      One more minor cleanup of font subsystem. · 8661ebaa
      Dmitry Antipov authored
      * font.h (struct font_driver): Convert text_extents to
      return void because returned value is never actually used.
      * macfont.c (macfont_text_extents):
      * w32font.c (w32font_text_extents):
      * xftfont.c (xftfont_text_extents): Adjust to return void
      and assume that 'metrics' argument is always non-NULL.
      * ftfont.c (ftfont_text_extents):
      * xfont.c (xfont_text_extents): Likewise.  Avoid redundant memset.
      8661ebaa
  22. 09 Jul, 2014 2 commits
    • Paul Eggert's avatar
      * font.c, font.h (font_unparse_fcname): Now static. · f5075377
      Paul Eggert authored
      Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
      f5075377
    • Dmitry Antipov's avatar
      Next minor cleanup of font subsystem. · 876d043f
      Dmitry Antipov authored
      * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
      users) and FONT_FORMAT_INDEX (set by a few font drivers but never
      really used).
      (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
      unused.
      * ftfont.h (ftfont_font_format): Remove prototype.
      * ftfont.c (ftfont_font_format): Remove; now unused.
      (ftfont_open):
      * nsfont.m (nsfont_open):
      * w32font.c (w32font_open_internal):
      * w32uniscribe.c (uniscribe_open):
      * xfont.c (xfont_open):
      * xftfont.c (xftfont_open): All users changed.
      876d043f
  23. 08 Jul, 2014 1 commit
  24. 04 Jul, 2014 1 commit
    • Dmitry Antipov's avatar
      * font.h (struct font_driver): Remove get_outline and free_outline; · 9d7b0167
      Dmitry Antipov authored
      not used by any font driver.
      * ftfont.c (ftfont_driver):
      * macfont.m (macfont_driver):
      * nsfont.m (nsfont_driver):
      * w32font.c (w32font_driver):
      * w32uniscribe.c (uniscribe_font_driver):
      * xfont.c (xfont_driver): Related users changed.
      * xselect.c (x_get_window_property): Use convenient xmalloc.
      Call to xfree only if some data was really allocated.
      9d7b0167
  25. 03 Jul, 2014 1 commit
    • Dmitry Antipov's avatar
      Use convenient alists to manage per-frame font driver-specific data. · 60ab5797
      Dmitry Antipov authored
      * frame.h (struct frame): Rename font_data_list to...
      [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
      * font.h (struct font_data_list): Remove; no longer need a special
      data type.
      (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
      Adjust prototypes.
      * font.c (font_put_frame_data, font_get_frame_data)
      [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
      management.
      * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
      Related users changed.
      * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
      Prefer convenient xmalloc and xfree.
      60ab5797
  26. 10 Jun, 2014 1 commit
    • Dmitry Antipov's avatar
      * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member. · 24ce6a02
      Dmitry Antipov authored
      * font.c (font_done_for_face):
      * xface.c (realize_non_ascii_face): Adjust user.
      * font.h (struct font_driver): Convert 'prepare_face' to return
      void because its return value is never used anyway.
      * xfont.c (xfont_prepare_face): Return void.
      * xftfont.c (xftfont_prepare_face): Likewise.  Use xmalloc.
      (xftfont_done_face): Use xfree.
      24ce6a02
  27. 08 Jun, 2014 1 commit
    • Paul Eggert's avatar
      If a C name must be extern on some platforms, make it extern on all. · ff2d0e83
      Paul Eggert authored
      * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
      (load_color):
      * font.h (ftxfont_driver) [HAVE_XFT]:
      * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
      * lisp.h (get_frame_param):
      * menu.h (tty_menu_show):
      * process.h (conv_sockaddr_to_lisp, catch_child_signal):
      * termhooks.h (encode_terminal_code):
      * xterm.h (x_menu_wait_for_event):
      Always declare.
      * frame.c (get_frame_param):
      * fringe.c (max_used_fringe_bitmap):
      * ftxfont.c (ftxfont_driver):
      * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
      * menu.c (menu_items_inuse):
      * process.c (conv_sockaddr_to_lisp, catch_child_signal):
      * term.c (encode_terminal_code, tty_menu_show):
      * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
      * xfaces.c (load_color):
      * xmenu.c (x_menu_wait_for_event):
      Now always extern.
      ff2d0e83
  28. 16 Apr, 2014 1 commit
    • Eli Zaretskii's avatar
      Fix the MSDOS build. · bf6b4923
      Eli Zaretskii authored
       src/unexcoff.c [MSDOS]: Include libc/atexit.h.
       (copy_text_and_data): Zero out the atexit chain pointer before
       dumping Emacs.
       src/termhooks.h (encode_terminal_code): Update prototype.
       src/term.c (encode_terminal_code) [DOS_NT]: Make it externally
       visible for all DOS_NT ports, not just WINDOWSNT.
       (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
       src/sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
       unless it is defined.
       (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
       src/process.c (close_on_exec, accept4, process_socket): Move into
       the "ifdef subprocesses" part.
       (catch_child_signal): Condition by "ifdef subprocesses".
       (syms_of_process) <Qinternal_default_process_sentinel>
       <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
       src/msdos.h: Add prototypes for new functions.
       (EINPROGRESS): Define.
       (O_CLOEXEC): Define to zero.
       src/msdos.c (check_window_system): Remove unnecessary an
       incompatible duplicate function.
       (sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New
       functions in support of new functionality.
       src/menu.c (single_menu_item): Add visual indication  of submenu
       also for menus on MSDOS frames.
       (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
       src/lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
       when async subprocesses aren't supported.
       src/font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
       src/emacs.c (close_output_streams): Zero out errno before calling
       close_stream.
       src/dired.c [MSDOS]: Include msdos.h.
       src/conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
       (DATA_START) [MSDOS]: Define.
       (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
       src/callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
       Ifdef away for MSDOS.
       (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
       (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
       for MSDOS.
       (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
       Use temporary file template that is compatible with mkostemp.
       Move vfork-related portions under #ifndef MSDOS.
       (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
      
       lisp/term/pc-win.el (x-list-fonts, x-get-selection-value): Provide
       doc strings, as required by snarf-documentation.
      
       msdos/sedlisp.inp:
       msdos/sedlibmk.inp:
       msdos/sedleim.inp:
       msdos/sed3v2.inp:
       msdos/sed2v2.inp:
       msdos/sed1v2.inp: Update Sed scripts for Emacs 24.4.
       msdos/inttypes.h: Add PRIdMAX.
       msdos/INSTALL: Update for Emacs 24.4.
       msdos/sedadmin.inp: New file.
      bf6b4923
  29. 01 Jan, 2014 1 commit
  30. 16 Dec, 2013 2 commits
    • Paul Eggert's avatar
      * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy. · 32779713
      Paul Eggert authored
      This prevents a compilation error on C compilers that do not
      default functions to return 'int' if not declared.  Also, add
      INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
      since it now uses inline functions.
      32779713
    • Dmitry Antipov's avatar
      * font.c (valid_font_driver) [ENABLE_CHECKING]: New function · 5ae356d9
      Dmitry Antipov authored
      intended to find bogus pointers in font objects (Bug#16140).
      * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
      * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
      (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
      Disable for MS-Windows due to Bug#15876; apparently this
      requires more or less substantial changes in fontset code.
      * xfont.c (xfont_close):
      * xftfont.c (xftfont_close): Call x_display_info_for_display
      to check whether 'Display *' is valid (Bug#16093 and probably
      Bug#16069).
      5ae356d9
  31. 14 Dec, 2013 1 commit
    • Paul Eggert's avatar
      Use bool for boolean, focusing on headers. · 96c06863
      Paul Eggert authored
      * 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.
      96c06863
  32. 13 Dec, 2013 1 commit
  33. 12 Dec, 2013 1 commit
    • Dmitry Antipov's avatar
      * font.h (struct font_entity) [HAVE_NS]: New field to record · cf86e18b
      Dmitry Antipov authored
      font driver which was used to create this entity.
      (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
      frame where the font was opened.
      (font_close_object): Add prototype.
      * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
      (font_close_object): Not static any more.  Lost frame arg.
      Adjust comment and users.
      * alloc.c (cleanup_vector): Call font_close_object to adjust
      per-frame font counters correctly.  If HAVE_NS, also call
      driver-specific cleanup for font-entity objects.
      * ftfont.c (ftfont_open):
      * nsfont.m (nsfont_open):
      * w32font.c (w32font_open_internal):
      * xfont.c (xfont_open):
      * xftfont.c (xftfont_open): Save frame pointer in font object.
      * macfont.m (macfont_open): Likewise.
      (macfont_descriptor_entity): Save driver pointer to be able
      to call its free_entity routine when font-entity is swept.
      * ftxfont.c (ftxfont_open): Add eassert because frame
      pointer should be saved by ftfont_driver.open.
      cf86e18b
  34. 04 Dec, 2013 2 commits
  35. 02 Dec, 2013 1 commit
  36. 25 Oct, 2013 1 commit