1. 24 Apr, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Don't link libXft when using cairo · 5f4e8e2e
      YAMAMOTO Mitsuharu authored
      * configure.ac: Check cairo early.  Don't try Xft if cairo is used.
      * lwlib/lwlib-utils.h [USE_CAIRO]: Include cairo.h and fontconfig.h.
      (XftFont, XftDraw, XftColor, XGlyphInfo) [USE_CAIRO]: New typedefs.
      (XftFontOpenName, XftFontClose, XftDrawCreate, XftDrawDestroy)
      (XftDrawRect, XftDrawStringUtf8, XftTextExtentsUtf8) [USE_CAIRO]: New macros.
      (crxft_font_open_name, crxft_font_close, crxft_draw_create)
      (crxft_draw_rect, crxft_draw_string, crxft_text_extents) [USE_CAIRO]: New
      externs.
      * lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and
      cairo-xlib.h.
      (crxft_font_open_name, crxft_font_close, crxft_draw_create)
      (crxft_set_source_color, crxft_draw_rect, crxft_draw_string)
      (crxft_text_extents) [USE_CAIRO]: New Xft compatibility functions.
      * lwlib/xlwmenuP.h [USE_CAIRO]: Include lwlib-utils.h.
      * lwlib/xlwmenu.c (display_menu_item) [USE_CAIRO]: Call
      cairo_surface_mark_dirty and cairo_surface_flush.
      * lwlib/lwlib-Xaw.c [USE_CAIRO]: Include stdlib.h and lwlib-utils.h.
      (draw_text) [USE_CAIRO]: Call cairo_surface_flush.
      * src/xsettings.c [USE_CAIRO]: Include fontconfig.h
      (apply_xft_settings) [!HAVE_XFT]: Don't call XftDefaultSubstitute or
      XftDefaultSet.
      * lwlib/lwlib-Xaw.c:
      * lwlib/lwlib-int.h:
      * lwlib/xlwmenu.c:
      * lwlib/xlwmenuP.h:
      * src/xrdb.c:
      * src/xsettings.c:
      * src/xterm.c: Replace all #ifdef HAVE_XFT with #if defined USE_CAIRO ||
      defined HAVE_XFT.
      * src/xfns.c (x_default_font_parameter): Replace #ifdef HAVE_XFT with #if
      defined	USE_CAIRO || defined HAVE_XFT.
      5f4e8e2e
  2. 07 Apr, 2019 1 commit
  3. 15 Jan, 2019 1 commit
    • Daniel Colascione's avatar
      Add portable dumper · d12e5d00
      Daniel Colascione authored
      Add a new portable dumper as an alternative to unexec.  Use it by default.
      
      * src/dmpstruct.awk: New file.
      * src/doc.c (get_doc_string): use will_dump_p().
      * src/editfns.c (styled_format): silence compiler warning
      with UNINIT.
      * src/emacs-module.c (syms_of_module): staticpro ltv_mark.
      * src/emacs.c (gflags): new variable.
      (init_cmdargs): unwrap
      (string_starts_with_p, find_argument, dump_error_to_string)
      (load_pdump): new functions.
      (main): detect pdumper and --temacs invocation; actually load
      portable dump when detected; set gflags as appropriate; changes to
      init functions throughout to avoid passing explicit
      'initialized' argument.
      * src/eval.c (inhibit_lisp_code): remove unused variable.
      (init_eval_once_for_pdumper): new function.
      (init_eval_once): call it.
      * src/filelock.c: CANNOT_DUMP -> will_dump_p()
      * src/fingerprint-dummy.c: new file
      * src/fingerprint.h: new file
      * src/fns.c: CANNOT_DUMP -> will_dump_p(), etc.
      (weak_hash_tables): remove
      (hashfn_equal, hashfn_eql): un-staticify
      (make_hash_table): set new 'next_weak' hash table field; drop
      global weak_hash_tables logic.
      (copy_hash_table): drop global weak_hash_tables logic.
      (hash_table_rehash): new function.
      (hash_lookup, hash_put, hash_remove_from_table, hash_clear):
      rehash if needed.
      (sweep_weak_table): un-staticify; explain logic; bool-ify.
      (sweep_weak_hash_tables): remove function.
      * src/font.c (syms_of_font): remember pdumper stuff.
      * src/fontset.c (syms_of_fontset): remember pdumper stuff.
      * src/frame.c (make_initial_frame): don't reset Vframe_list.
      (init_frame_once_for_pdumper, init_frame_once): new functions.
      (syms_of_frame): remove redundant staticpro.
      * src/fringe.c (init_fringe_once_for_pdumper): new functin.
      (init_fringe_once): call it.
      * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper): new function.
      (syms_of_ftcrfont): call it.
      * src/ftfont.c (syms_of_ftfont_for_pdumper): new function.
      (syms_of_ftfont): call it.
      * src/ftxont.c (syms_of_ftxfont_for_pdumper): new function.
      (syms_of_ftxfont): call it.
      * src/gmalloc.c: adjust for pdumper througout
      (DUMPED): remove weird custom dumped indicator.
      * src/gnutls.c (syms_of_gnutls): pdumper note for
      gnutls_global_initialized.
      * src/image.c (syms_of_image): add pdumper comment,
      initializer note.
      * src/insdel.c (prepare_to_modify_buffer_1): account
      for buffer contents possibly being in dump image.
      * src/keyboard.c (syms_of_keyboard_for_pdumper): new function.
      (syms_of_keyboard): staticpro more; call pdumper syms function.
      * src/lisp.h: add comments throughout
      (gflags): declare.
      (will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p)
      (dumped_with_pdumper_p, will_dump_with_unexec_p)
      (dumped_with_unexec_p, definitely_will_not_unexec_p): new
      functions.
      (POWER_OF_2, ROUNDUP): move macros.
      (PSEUDOVECTOR_TYPE, PSEUDOVECTOR_TYPEP): take vectorlike header
      pointer instead of vector; constify.
      (Lisp_Hash_Table): add comment about need to rehash on access; add
      comment for next_weak.
      (HASH_KEY, HASH_VALUE, HASH_HASH, HASH_TABLE_SIZE): const-ify.
      (hash_table_rehash): declare.
      (hash_rehash_needed_p, hash_rehash_if_needed): new functions.
      (finalizers, doomed_finalizers): declare extern.
      (SUBR_SECTION_ATTRIBUTE): new macro.
      (staticvec, staticidx): un-static-ify.
      (sweep_weak_hash_tables): remove declaration.
      (sweep_weak_table): declare.
      (hashfn_eql, hashfn_equal): declare.
      (number_finalizers_run): new variable.
      (Vdead): externify when ENABLE_CHECKING.
      (gc_root_type): new enumeration.
      (gc_root_visitor): new struct.
      (visit_static_gc_roots): declare.
      (vectorlike_nbytes): declare.
      (vector_nbytes): define as trivial inline function wrapper for
      vectorlike_nbytes.
      (init_obarray_once): change signature.
      (primary_thread): extern-ify.
      (init_buffer): change signature.
      (init_frame_once): declare.
      * src/lread.c (readevalloop): adjust for new dumped predicates.
      (init_obarray_once): new function.
      (ndefsubr): new variable.
      (defsubr): increment it.
      (load_path_check): adjust for pdumper.
      (load_path_default): use pdumper functions; adjust for
      dump search.
      * src/macfont.m (macfont_init_font_change_handler): avoid
      shadowing global.
      (syms_of_macfont_for_pdumper): new function.
      (syms_of_macfont): call it.
      * src/menu.c (syms_of_menu): staticpro more stuff.
      * src/minibuf.c (Ftry_completion): rehash if needed.
      (init_minibuf_once_for_pdumper): new function.
      (init_minibuf_once): call it.
      * src/nsfont.m (syms_of_nsfns): staticpro more.
      * src/nsfont.m (syms_of_nsfont_for_pdumper): new function.
      (syms_of_nsfont): call it.
      * src/nsterm.m (syms_of_nsfont): remember pdumper stuff.
      * src/pdumper.c: new file.
      * src/pdumper.h: new file.
      * src/process.c (init_process_emacs): use new pdumper functions
      instead of CANNOT_DUMP.
      * src/profiler.c (syms_of_profiler_for_pdumper): new function.
      (syms_of_profiler_for_pdumper): call it.
      * src/search.c (syms_of_search_for_pdumper): new function.
      (syms_of_search_for_pdumper): call it.
      * src/sheap.c (bss_sbrk_did_unexec): remove.
      * src/sheap.h (bss_sbrk_did_unexec): remove.
      * src/syntax.c (syms_of_syntax): don't redundantly staticpro
      re_match_object.
      * src/sysdep.c: use will_dump_with_unexec_p() instead of bss
      hack thing.
      * src/syssignals.h (init_sigsegv): declare.
      * src/systime.h (init_timefns): remove bool from signature.
      * src/textprop.c (syms_of_textprop): move staticpro.
      * src/thread.c (main_thread_p): constify.
      * src/thread.h (main_thread_p): constify.
      * src/timefns.c (init_timefns): remove bool from signature.
      (syms_of_timefns_for_pdumper): new function.
      (syms_of_timefns): call it.
      * src/w32.c: rearrange code.
      * src/w32.h (w32_relocate): declare.
      * src/w32fns.c (syms_of_w32fns): add pdumper note.
      * src/w32font.c (syms_of_w32font_for_pdumper): new function.
      (syms_of_w32font): call it.
      * src/w32heap.c (using_dynamic_heap): new variable.
      (init_heap): use it.
      * src/w32menu.c (syms_of_w32menu): add pdumper note.
      * src/w32proc.c
      (ctrl_c_handler, mainCRTStartup, _start, open_input_file)
      (rva_to_section, close_file_data): move here.
      * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper):
      new function.
      (syms_of_w32uniscribe): call it.
      * src/window.c (init_window_once_for_pdumper): new function.
      (init_window_once): call it; staticpro more stuff.
      * src/xfont.c (syms_of_xfont_for_pdumper): new function.
      (syms_of_xfont): call it.
      * src/xftfont.c (syms_of_xftfont_for_pdumper): new function.
      (syms_of_xftfont): call it.
      * src/xmenu.c (syms_of_xmenu_for_pdumper): new function.
      (syms_of_xmenu): call it.
      * src/xselect.c (syms_of_xselect_for_pdumper): new function.
      (syms_of_xselect): call it.
      * src/xsettings.c (syms_of_xsettings): add more pdumper notes.
      * src/term.c (syms_of_xterm): add pdumper note.
      
      * src/dispnew.c (init_faces_initial): new function.
      (init_display_interactive): rename from init_display; use
      will_dump_p instead of !initialized.  Initialize faces early for
      pdumper if needed.
      (init_display): new function.
      (syms_of_display_for_pdumper): new function.
      (syms_of_display): call it.
      
      * src/dbusbind.c (syms_of_dbusbind): Add TODO for bus reset
      on pdumper load.
      
      * src/data.c (Fdefalias): Use will_dump_p
      instead of Vpurify_flag.
      (Fmake_variable_buffer_local): silence compiler warning with -Og
      by making valcontents UNINIT.
      (arith_driver): silence compiler warning with UNINIT.
      
      * src/conf_post.h (ATTRIBUTE_SECTION): new macro.
      
      * src/composite.c (composition_gstring_put_cache): rehash hash
      table if needed.
      
      * src/coding.c (init_coding_once, syms_of_coding): remember
      pdumper stuff.
      
      * src/charset.h (charset_table_size, charset_table_user): declare.
      
      * src/charset.c (charset_table_used, charset_table_size): un-static.
      (init_charset_oncem, syms_of_charset): remember pdumper stuff.
      
      * src/category.c (category_table_version): remove obsolete
      variable.
      
      * src/callint.c (syms_of_callint): staticpro 'preserved_fns'
      (init_callproc): use will_dump_p instead of !CANNOT_DUMP.
      
      * src/bytecode.c (exec_byte_code): rehash table tables if needed
      
      * src/buffer.c (alloc_buffer_text, free_buffer_text): account for
      pdumper
      (init_buffer_once): add TODO; remember stuff for pdumper.
      (init_buffer): don't take initialized argument; adjust
      for pdumper.
      
      * src/atimer.c (init_atimer): initialize subr only if
      !initialized.
      
      * src/alloc.c: (vector_marked_p, set_vector_marked)
      (vectorlike_marked_p, set_vectorlike_marked, cons_marked_p)
      (set_cons_marked, string_marked_p, set_string_marked)
      (symbol_marked_p, set_symbol_marked, interval_marked_p)
      (set_interval_marked): new accessor routines.  Use them
      instead of raw GC access throughout.
      (Vdead): make non-static when ENABLE_CHECKING.
      (vectorlike_nbytes): rename of 'vector_nbytes'; take a vectorlike
      header as input instead of a vector.
      (number_finalizers_run): new internal C variable.
      (mark_maybe_object): check for pdumper objects.
      (valid_pointer_p): don't be gratuitously inefficient under rr(1).
      (make_pure_c_string): add support for size_byte = -2 mode
      indicating that string data points into Emacs image rodata.
      (visit_vectorlike_root): visits GC roots embedded in
      vectorlike objects.
      (visit_buffer_root): visits GC roots embedded in
      our totally-not-a-buffer buffer global objects.
      (visit_static_gc_roots): visit GC roots in the Emacs data section.
      (mark_object_root_visitor): root callback used for conventional GC
      marking
      (weak_hash_tables): new internal variable for tracking found weak
      hash tables during GC.
      (mark_and_sweep_weak_table_contents): new weak hash table marking.
      (garbage_collect_1): use new GC root visitor machinery.
      (mark_vectorlike): accept a vectorlike_header instead of a
      Lisp_Vector.
      (mark_frame, mark_window, mark_hash_table): new functions.
      (mark_object): initialize 'm'; check for pdumper objects and use
      new mark-bit accessors throughout.  Remove some object-specific
      marking code and move to helper functions above.
      (survives_gc_p): check for pdumper objects.
      (gc-sweep): clear pdumper mark bits.
      (init_alloc_once_for_pdumper): new helper function for early init
      called both during normal init and pdumper load.
      (init_alloc_once): pdumper integration.
      
      * src/Makefile.in: Rewrite dumping for pdumper; add pdumper.o;
      invoke temacs with --temacs command line option; build dmpstruct.h
      from dmpstruct.awk; stop relying on CANNOT_DUMP; clean up pdumper
      intermediate files during build.
      
      * nextstep/Makefile.in: build emacs.pdmp into NS packages
      
      * lisp/startup.el: account for new '--temacs' and '--dump-file'
      command line option.
      
      * lisp/loadup.el: rewrite early init to account for pdumper; use
      injected 'dump-mode' variable (set via the new '--temacs' option)
      instead of parsing command line.
      
      * lisp/cus-start.el: Check 'dump-mode' instead of 'purify-flag',
      since the new 'dump-mode'
      
      * lib-src/make-fingerprint.c: new program
      
      * lib-src/Makefile.in: built make-fingerprint utility program
      
      * configure.ac: Add --with-pdumper toggle to control pdumper
      support; add --with-unexec toggle to control unexec support.
      Add --with-dumping option to control which dumping strategy we use
      by default.  Adjust for pdumper throughout.  Check for
      posix_madvise.
      
      * Makefile.in: Add @DUMPING@ substitution; add pdumper mode.
      
      * .gitignore: Add make-fingerprint, temacs.in, fingerprint.c,
      dmpstruct.h, and pdumper dump files.
      d12e5d00
  4. 01 Jan, 2019 1 commit
  5. 08 Aug, 2018 1 commit
    • Tom Tromey's avatar
      More macro renamings for bignum · d1ec3a0a
      Tom Tromey authored
      * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c,
      src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c,
      src/category.c, src/ccl.c, src/character.c, src/character.h,
      src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c,
      src/composite.c, src/composite.h, src/data.c, src/dbusbind.c,
      src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c,
      src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c,
      src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c,
      src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c,
      src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c,
      src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c,
      src/indent.c, src/insdel.c, src/intervals.c, src/json.c,
      src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h,
      src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c,
      src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c,
      src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c,
      src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c,
      src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c,
      src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h,
      src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c,
      src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c,
      src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c
      Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
      d1ec3a0a
  6. 16 Feb, 2018 1 commit
  7. 01 Jan, 2018 1 commit
  8. 26 Nov, 2017 1 commit
  9. 02 Oct, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to HTTP for gnu.org · 5172fa02
      Paul Eggert authored
      This fixes some URLs I omitted from my previous pass,
      notably those in lists.gnu.org.  Although lists.gnu.org
      does not yet support TLS 1.1, TLS 1.0 is better than nothing.
      * lisp/erc/erc.el (erc-official-location):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      Use https:, not http:.
      5172fa02
  10. 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
  11. 01 Jan, 2017 1 commit
  12. 22 Dec, 2016 1 commit
  13. 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
  14. 01 Jan, 2016 1 commit
  15. 10 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Fix DPI calculation when Xft/DPI is default · a9bb9d8f
      Paul Eggert authored
      * src/xsettings.c (parse_settings): Don't use Xft/DPI default
      value of -1, which evaluates to 2**32 - 1 (Bug#21152).
      Remove unnecessary cast while we're in the neighborhood.
      a9bb9d8f
  16. 14 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Use bool for boolean in xmenu.c, xml.c · 3ef29501
      Paul Eggert authored
      * xmenu.c (x_menu_set_in_use, popup_get_selection)
      (Fx_menu_bar_open_internal, popup_widget_loop)
      (x_activate_menubar, xg_crazy_callback_abort)
      (update_frame_menubar, set_frame_menubar)
      (initialize_frame_menubar, free_frame_menubar)
      (create_and_show_popup_menu, x_menu_show)
      (create_and_show_dialog, x_dialog_show):
      * xml.c (libxml2_loaded_p, init_libxml2_functions, parse_region)
      (Flibxml_parse_html_region, Flibxml_parse_xml_region):
      * xrdb.c (main) [TESTRM]:
      * xsettings.c (init_gsettings):
      * xterm.c (XFillRectangle, xg_scroll_callback)
      (xg_end_scroll_callback):
      * xterm.h (x_menu_set_in_use) [USE_GTK || USE_MOTIF]:
      Use bool for boolean.
      * xmenu.c (TRUE): Remove; no longer used.
      (show_help_event): Remove long-unused code.
      (set_frame_menubar): Remove "#if 1" and corresponding "#endif" lines.
      3ef29501
  17. 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
  18. 01 Jan, 2015 2 commits
  19. 27 Dec, 2014 1 commit
    • Paul Eggert's avatar
      Fix parse_settings to match internal documentation · 3d1afd11
      Paul Eggert authored
      * xsettings.c (parse_settings): Return the number of settings seen.
      Count the settings changes accurately.
      (read_settings): Don't confuse number of settings changes with
      the return code from XGetWindowProperty.
      3d1afd11
  20. 26 Dec, 2014 1 commit
    • Paul Eggert's avatar
      Use bool for boolean in xselect.c, xsettings.c · 7a305f8b
      Paul Eggert authored
      * xselect.c (x_get_local_selection, struct selection_data)
      (x_selection_request_lisp_error, struct prop_location)
      (x_handle_selection_request, x_convert_selection)
      (waiting_for_other_props_on_window, expect_property_change)
      (wait_for_property_change, x_handle_property_notify)
      (x_get_foreign_selection, x_get_window_property)
      (receive_incremental_selection)
      (x_get_window_property_as_lisp_data)
      (lisp_data_to_selection_data, Fx_get_selection_internal)
      (x_send_client_event):
      * xselect.c, xterm.h (x_handle_dnd_message):
      * xsettings.c (dpyinfo_valid, parse_settings, read_settings)
      (apply_xft_settings, read_and_apply_settings)
      (xft_settings_event, init_gsettings, init_xsettings)
      (syms_of_xsettings):
      Use bool for boolean.
      * xselect.c (x_get_window_property): Omit last arg, which was an
      unused boolean.
      * xsettings.c (apply_xft_settings): Remove 2nd arg, which was
      always true.  All callers changed.
      7a305f8b
  21. 10 May, 2014 1 commit
  22. 28 Feb, 2014 1 commit
    • Paul Eggert's avatar
      Fix a few crashes and leaks when cloning C strings. · 8268febf
      Paul Eggert authored
      * alloc.c, lisp.h (dupstring): New function.
      * gtkutil.c (xg_get_font):
      * term.c (tty_default_color_capabilities):
      * xsettings.c (store_monospaced_changed)
      (store_font_name_changed, parse_settings)
      (read_and_apply_settings, init_gsettings, init_gconf): Use it.
      This avoids some unlikely crashes due to accessing freed storage,
      and avoids some minor memory leaks in the more-typical case.
      8268febf
  23. 01 Jan, 2014 1 commit
  24. 29 Oct, 2013 1 commit
    • Dmitry Antipov's avatar
      Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'. · 2d9783e0
      Dmitry Antipov authored
      * ftxfont.c (ftxfont_get_gcs):
      * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
      * xfaces.c (x_free_colors, x_free_dpy_colors)
      (x_create_gc, unload_color):
      * xselect.c (x_property_data_to_lisp):
      * xsettings.c (parse_settings):
      * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
      (get_bits_and_offset): Adjust definition.
      * frame.c (XParseGeometry): Adjust locals.
      * lisp.h (toplevel): Adjust EMACS_UINT type definition.
      * regex.h (toplevel): Likewise for reg_syntax_t.
      2d9783e0
  25. 04 Oct, 2013 1 commit
    • Paul Eggert's avatar
      Use hardware support for byteswapping on glibc x86 etc. · 4eed3157
      Paul Eggert authored
      On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
      whereas the old swap64 needed 30.
      * admin/merge-gnulib (GNULIB_MODULES): Add byteswap.
      * lib/byteswap.in.h, m4/byteswap.m4: New files, copied from Gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * src/fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
      * src/sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
      Use byteswap.h's macros to swap bytes.
      * src/lisp.h (swap16, swap32, swap64): Remove.
      All uses replaced by bswap_16, bswap_32, bswap_64.
      4eed3157
  26. 22 Sep, 2013 1 commit
    • Daniel Colascione's avatar
      Add set operations for bool-vector. · 3e0b94e7
      Daniel Colascione authored
      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.
      3e0b94e7
  27. 17 Sep, 2013 2 commits
    • Paul Eggert's avatar
      Don't overuse 'const' in types of locals. · b7ad2f74
      Paul Eggert authored
      * bidi.c (bidi_count_bytes):
      * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
      (xg_event_is_for_scrollbar):
      * xselect.c (x_handle_property_notify)
      (x_handle_selection_notify, x_handle_dnd_message):
      * xsettings.c, xsettings.h (xft_settings_event):
      * xterm.c (x_handle_net_wm_state, handle_one_event)
      (x_menubar_window_to_frame, x_detect_focus_change)
      (construct_mouse_click, note_mouse_movement)
      (x_scroll_bar_to_input_event, x_scroll_bar_expose)
      (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
      (handle_one_xevent, x_handle_net_wm_state):
      * xterm.h (x_handle_property_notify, x_handle_selection_notify)
      (x_handle_dnd_message):
      Avoid unnecessary 'const', typically the second 'const' in
      'const foo * const arg', a 'const' that does not affect the API
      and doesn't significantly help the human reader.
      b7ad2f74
    • Dmitry Antipov's avatar
      * configure.ac: Do not check for g_type_init because we · 19452b86
      Dmitry Antipov authored
      require glib >= 2.28 for GTK3, glib >= 2.10 for GTK2,
      glib >= 2.26 for GSettings and glib >= 2.7.0 for GConf, so
      suitable glib should provide g_type_init unconditionally.
      * src/image.c (fn_g_type_init) [WINDOWSNT]: Define and load
      only if Glib < 2.36.0.
      (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
      * src/xsettings.c (init_gconf, init_gsettings): Do not check
      for g_type_init.
      19452b86
  28. 16 Sep, 2013 2 commits
    • Jan Djärv's avatar
      * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0 · 3f386383
      Jan Djärv authored
      before calling g_type_init.
      3f386383
    • Dmitry Antipov's avatar
      Do not copy X event in handle_one_xevent except KeyPress case. · 61582e6a
      Dmitry Antipov authored
      Wnen XEvent is processed, it is unlikely to be changed except
      KeyPress case, so we can avoid copying and use const pointer to
      const data to make sure that an event is not changed elsewhere.
      * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
      const' and do not create local copy except for the KeyPress event.
      Use casts to avoid a few glitches.  Adjust formatting.  Add comments.
      (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
      (x_handle_net_wm_state, x_menubar_window_to_frame)
      (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
      (x_scroll_bar_to_input_event, x_scroll_bar_expose)
      (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
      * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
      * xselect.c (x_handle_property_notify, x_handle_selection_notify)
      (x_handle_dnd_message):
      * xsettings.c (xft_settings_event):
      Use 'const XEvent * const' where appropriate.
      * xterm.h, gtkutil.h, xsettngs.h: Adjust related prototypes.
      61582e6a
  29. 30 Jul, 2013 1 commit
    • Dmitry Antipov's avatar
      * fringe.c (draw_window_fringes, update_window_fringes) · d7e6881a
      Dmitry Antipov authored
      (compute_fringe_widths):
      * w32term.c (x_draw_glyph_string):
      * window.c (candidate_window_p, Frecenter):
      * xfaces.c (realize_basic_faces, realize_default_face)
      (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
      (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
      * xfns.c (x_set_cursor_color, xic_free_xfontset):
      * xmenu.c (Fx_menu_bar_open_internal):
      * xselect.c (x_reply_selection_request, Fx_get_atom_name):
      * xsettings.c (xft_settings_event):
      * xterm.c (x_draw_glyph_string, x_had_errors_p):
      Use bool for booleans.  Adjust style and comments where
      appropriate.
      * dispextern.h (draw_window_fringes, update_window_fringes)
      (compute_fringe_widths):
      * xterm.h (x_had_errors_p): Adjust prototype.
      d7e6881a
  30. 10 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Port to C89. · 29abe551
      Paul Eggert authored
      * 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.
      29abe551
  31. 20 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * frame.h (struct frame): Drop resx and resy because the same data is · 42143acd
      Dmitry Antipov authored
      available from window system-specific output context.  Adjust users.
      (default_pixesls_per_inch_x, default_pixesls_per_inch_y): New
      functions to provide defaults when no window system available.
      (FRAME_RES_X, FRAME_RES_Y): New macros.
      (NUMVAL): Moved from xdisp.c.
      * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
      (Ffont_face_attributes, Fopen_font):
      * image.c (gs_load):
      * w32font.c (fill_in_logfont):
      * xdisp.c (calc_pixel_width_or_height):
      * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
      * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
      42143acd
  32. 01 Jan, 2013 1 commit
  33. 10 Oct, 2012 1 commit
    • Paul Eggert's avatar
      Clean out old termopts cruft. · 5f3f57be
      Paul Eggert authored
      * termopts.h (flow_control, meta_key): Remove unused decls.
      * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
      Don't include termopts.h.
      5f3f57be
  34. 23 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Simplify and avoid signal-handling races. · 4d7e6e51
      Paul Eggert authored
      * nt/inc/ms-w32.h (emacs_raise): New macro.
      * src/alloc.c (die):
      * src/sysdep.c (emacs_abort) [HAVE_NTGUI]:
      Avoid recursive loop if there's a fatal error in the function itself.
      * src/atimer.c (pending_atimers):
      * src/blockinput.h: Don't include "atimer.h"; no longer needed.
      (interrupt_input_pending): Remove.  All uses removed.
      pending_signals now counts both atimers and ordinary interrupts.
      This is less racy than having three separate pending-signal flags.
      (block_input, unblock_input, totally_unblock_input, unblock_input_to)
      (input_blocked_p):
      Rename from their upper-case counterparts BLOCK_INPUT,
      UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
      INPUT_BLOCKED_P, and turn into functions.  All uses changed.
      This makes it easier to access volatile variables more accurately.
      (BLOCK_INPUT_RESIGNAL): Remove.  All uses replaced by unblock_input ().
      (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
      that's more reliable if the code is buggy and sets
      interrupt_input_blocked to a negative value.  All uses changed.
      * src/atimer.c (deliver_alarm_signal):
      Remove.  No need to deliver this to the parent; any thread can
      handle this signal now.  All uses replaced by underlying handler.
      * src/atimer.c (turn_on_atimers):
      * src/dispnew.c (handle_window_change_signal):
      * src/emacs.c (handle_danger_signal):
      * src/keyboard.c (kbd_buffer_get_event):
      Don't reestablish signal handler; not needed with sigaction.
      * src/blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
      (UNBLOCK_INPUT_TO):
      Rework to avoid unnecessary accesses to volatile variables.
      (UNBLOCK_INPUT_TO): Now a function.
      (totally_unblock_input, unblock_input): New decls.
      * src/data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
      (init_data): Remove.  Necessary stuff now done in init_signal.
      * src/emacs.c, src/xdisp.c: Include "atimer.h", since we invoke atimer functions.
      * src/emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
      (fatal_error_code): Remove; no longer needed.
      (terminate_due_to_signal): Rename from fatal_error_backtrace, since
      it doesn't always backtrace.  All uses changed.  No need to reset
      signal to default, since sigaction and/or die does that for us now.
      Use emacs_raise (FOO), not kill (getpid (), FOO).
      (main): Check more-accurately whether we're dumping.
      Move fatal-error setup to sysdep.c
      * src/floatfns.c: Do not include "syssignal.h"; no longer needed.
      * src/gtkutil.c (xg_get_file_name, xg_get_font):
      Remove no-longer-needed signal-mask manipulation.
      * src/keyboard.c, src/process.c (POLL_FOR_INPUT):
      Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
      * src/keyboard.c (read_avail_input): Remove.
      All uses replaced by gobble_input.
      (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
      (kbd_buffer_store_event_hold, gobble_input):
      (record_asynch_buffer_change) [USABLE_SIGIO]:
      (store_user_signal_events):
      No need to mess with signal mask.
      (gobble_input): If blocking input and there are terminals, simply
      set pending_signals to 1 and return.  All hooks changed to not
      worry about whether input is blocked.
      (process_pending_signals): Clear pending_signals before processing
      them, in case a signal comes in while we're processing.
      By convention callers now test pending_signals before calling us.
      (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
      New functions, to support changes to blockinput.h.
      (handle_input_available_signal): Now extern.
      (reinvoke_input_signal): Remove.  All uses replaced by
      handle_async_input.
      (quit_count): Now volatile, since a signal handler uses it.
      (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.  All
      callers changed.  Block SIGINT only if not already blocked.
      Clear sigmask reliably, even if Fsignal returns, which it can.
      Omit unnecessary accesses to volatile var.
      (quit_throw_to_read_char): No need to restore sigmask.
      * src/keyboard.c (gobble_input, handle_user_signal):
      * src/process.c (wait_reading_process_output):
      Call signal-handling code rather than killing ourselves.
      * src/lisp.h: Include <float.h>, for...
      (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
      (pending_signals): Now volatile.
      (syms_of_data): Now const if IEEE floating point.
      (handle_input_available_signal) [USABLE_SIGIO]:
      (terminate_due_to_signal, record_child_status_change): New decls.
      * src/process.c (create_process): Avoid disaster if memory is exhausted
      while we're processing a vfork, by tightening the critical section
      around the vfork.
      (send_process_frame, process_sent_to, handle_pipe_signal)
      (deliver_pipe_signal): Remove.  No longer needed, as Emacs now
      ignores SIGPIPE.
      (send_process): No need for setjmp/longjmp any more, since the
      SIGPIPE stuff is now gone.  Instead, report an error if errno
      is EPIPE.
      (record_child_status_change): Now extern.  PID and W are now args.
      Return void, not bool.  All callers changed.
      * src/sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
      Remove.  All uses removed.  This bug should be fixed now in a
      different way.
      (wait_for_termination_1): Use waitpid rather than sigsuspend,
      and record the child status change directly.  This avoids the
      need to futz with the signal mask.
      (process_fatal_action): Move here from emacs.c.
      (emacs_sigaction_flags): New function, containing
      much of what used to be in emacs_sigaction_init.
      (emacs_sigaction_init): Use it.  Block nonfatal system signals that are
      caught by emacs, to make races less likely.
      (deliver_process_signal): Rename from handle_on_main_thread.
      All uses changed.
      (BACKTRACE_LIMIT_MAX): Now at top level.
      (thread_backtrace_buffer, threadback_backtrace_pointers):
      New static vars.
      (deliver_thread_signal, deliver_fatal_thread_signal):
      New functions, for more-accurate delivery of thread-specific signals.
      (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
      (deliver_arith_signal): Handle in this thread, not
      in the main thread, since it's triggered by this thread.
      (maybe_fatal_sig): New function.
      (init_signals): New arg DUMPING so that we can be more accurate
      about whether we're dumping.  Caller changed.
      Treat thread-specific signals differently from process-general signals.
      Block all signals while handling fatal error; that's safer.
      xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
      on IEEE hosts.
      When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
      Ignore SIGPIPE unless batch.
      (emacs_backtrace): Output backtrace for the appropriate thread,
      which is not necessarily the main thread.
      * src/syssignal.h: Include <stdbool.h>.
      (emacs_raise): New macro.
      * src/xterm.c (x_connection_signal): Remove; no longer needed
      now that we use sigaction.
      (x_connection_closed): No need to mess with sigmask now.
      (x_initialize): No need to reset SIGPIPE handler here, since
      init_signals does this for us now.
      
      Fixes: debbugs:12471
      4d7e6e51
  35. 15 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Port better to POSIX hosts lacking _setjmp. · 0328b6de
      Paul Eggert authored
      * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
      (_setjmp, _longjmp): Remove.
      * src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
      All instances of '#include <setjmp.h>' removed, if the
      only reason for the instance was because "lisp.h" was included.
      (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
      Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
      and _longjmp with the new symbols.  Emacs already uses _setjmp if
      available, so this change affects only POSIXish hosts that have
      sigsetjmp but not _setjmp, such as some versions of Solaris and
      Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
      * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
      (png_load_body) [HAVE_PNG]:
      (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
      (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
      Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
      since PNG requires jmp_buf.  This is the only exception to the
      general rule that we now use sys_setjmp and sys_longjmp.
      This exception is OK since this code does not change the signal
      mask or longjmp out of a signal handler.
      
      Fixes: debbugs:12446
      0328b6de
  36. 12 Jul, 2012 1 commit
  37. 09 Jul, 2012 1 commit
    • Dmitry Antipov's avatar
      Use make_formatted_string to avoid double length calculation. · a8290ec3
      Dmitry Antipov authored
      * lisp.h (make_formatted_string): New prototype.
      * alloc.c (make_formatted_string): New function.
      * buffer.c (Fgenerate_new_buffer_name): Use it.
      * dbus.c (syms_of_dbusbind): Likewise.
      * editfns.c (Fcurrent_time_zone): Likewise.
      * filelock.c (get_boot_time): Likewise.
      * frame.c (make_terminal_frame, set_term_frame_name)
      (x_report_frame_params): Likewise.
      * image.c (gs_load): Likewise.
      * minibuf.c (get_minibuffer): Likewise.
      * msdos.c (dos_set_window_size): Likewise.
      * process.c (make_process): Likewise.
      * xdisp.c (ensure_echo_area_buffers): Likewise.
      * xsettings.c (apply_xft_settings): Likewise.
      a8290ec3