| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This reclaims a bit of performance when compiling with gcc -Og.
These functions were macros until I changed them in
2020-04-17T14:57:25Z!eggert@cs.ucla.edu.
* src/casefiddle.c (make_char_unibyte):
* src/ccl.c (GET_TRANSLATION_TABLE): Now inline.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/buffer.h (fetch_char_advance, fetch_char_advance_no_check)
(buf_next_char_len, next_char_len, buf_prev_char_len)
(prev_char_len, inc_both, dec_both): New inline functions,
replacing the old character.h macros FETCH_CHAR_ADVANCE,
FETCH_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS, INC_POS, BUF_DEC_POS,
DEC_POS, INC_BOTH, DEC_BOTH respectively. All callers changed.
These new functions all assume buffer primitives and so need
to be here rather than in character.h.
* src/casefiddle.c (make_char_unibyte): New static function,
replacing the old MAKE_CHAR_UNIBYTE macro. All callers changed.
(do_casify_unibyte_string): Use SINGLE_BYTE_CHAR_P instead
of open-coding it.
* src/ccl.c (GET_TRANSLATION_TABLE): New static function,
replacing the old macro of the same name.
* src/character.c (string_char): Omit 2nd arg. 3rd arg can no
longer be NULL. All callers changed.
* src/character.h (SINGLE_BYTE_CHAR_P): Move up.
(MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE, PREV_CHAR_BOUNDARY)
(STRING_CHAR_AND_LENGTH, STRING_CHAR_ADVANCE)
(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): Remove.
(make_char_multibyte): New static function, replacing
the old macro MAKE_CHAR_MULTIBYTE. All callers changed.
(CHAR_STRING_ADVANCE): Remove; all callers changed to use
CHAR_STRING.
(NEXT_CHAR_BOUNDARY): Remove; it was unused.
(raw_prev_char_len): New inline function, replacing the
old PREV_CHAR_BOUNDARY macro. All callers changed.
(string_char_and_length): New inline function, replacing the
old STRING_CHAR_AND_LENGTH macro. All callers changed.
(STRING_CHAR): Rewrite in terms of string_char_and_length.
(string_char_advance): New inline function, replacing the old
STRING_CHAR_ADVANCE macro. All callers changed.
(fetch_string_char_advance): New inline function, replacing the
old FETCH_STRING_CHAR_ADVANCE macro. All callers changed.
(fetch_string_char_as_multibyte_advance): New inline function,
replacing the old FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE macro.
All callers changed.
(fetch_string_char_advance_no_check): New inline function,
replacing the old FETCH_STRING_CHAR_ADVANCE_NO_CHECK macro. All
callers changed.
* src/regex-emacs.c (HEAD_ADDR_VSTRING): Remove; no longer used.
* src/syntax.c (scan_lists): Use dec_bytepos instead of
open-coding it.
* src/xdisp.c (string_char_and_length): Rename from
string_char_and_length to avoid name conflict with new function in
character.h. All callers changed.
|
|
|
|
| |
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
|
|
|
|
|
| |
* src/ccl.c (ccl_driver, Fccl_execute, Fccl_execute_on_string):
Don’t assume CCL registers fit into fixnums.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on Pip Cet’s review (Bug#36370#13).
* src/ccl.c (Fccl_execute_on_string): Use clearer indexing.
* src/dosfns.c (Fint86, Fdos_memput):
Avoid runtime checks for negative fixnums when debugging.
This restores the earlier machine code.
* src/lisp.h (XFIXNUM, XUFIXNUM): Use eassert, not eassume.
(XFIXNAT): At the start, merely eassert FIXNUMP rather
than eassuming FIXNATP. At the end, eassume that the
result is nonnegative. This restores help to the compiler
that the previous patch mistakenly removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few bits of the code were relying on the fact that XFIXNUM,
XFIXNAT, and XUFIXNUM do something even with arguments that
are not fixnums/fixnats. Separate these rare uses out into
XFIXNUM_RAW and XUFIXNUM_RAW.
Problem and original patch reported by Pip Cet (Bug#36370).
* src/ccl.c (Fccl_execute_on_string):
* src/fileio.c (Finsert_file_contents, a_write)
(Fdo_auto_save):
* src/process.c (conv_lisp_to_sockaddr):
* src/textprop.c (Fnext_single_char_property_change)
(Fprevious_single_char_property_change)
(Fnext_property_change, Fnext_single_property_change)
(Fprevious_property_change)
(Fprevious_single_property_change):
Don’t assume fixnums are nonnegative.
* src/ccl.c (Fccl_execute_on_string):
Fix range-checking bug if AREF (status, i) is out of int range.
* src/data.c (arith_driver): Use XFIXNUM_RAW as we want
efficient garbage if the value is not a fixnum.
* src/dosfns.c (Fint86, Fdos_memput):
Check that args are nonnegative.
* src/image.c (lookup_image): Check that args are in range.
* src/lisp.h (lisp_h_XHASH): Use XUFIXNUM_RAW, since this
is for hashing.
(lisp_h_XFIXNAT, XFIXNAT) [USE_LSB_TAG]: Remove macros.
(lisp_h_XFIXNUM_RAW, XFIXNUM_RAW) [USE_LSB_TAG]: New macros, with
the semantics of the old macros without _RAW.
(XFIXNUM_RAW, XUFIXNUM_RAW): New inline functions, with the
semantics of the old functions without _RAW.
(FIXNUMP): Move definition up to avoid forward use.
(XFIXNUM, XFIXNAT, XUFIXNUM): Use eassume to add a runtime
check (when debugging) that the argument has the proper form.
(XFIXNUM, XFIXNAT): Now inline functions only, since they
refer to their arguments more than once now that they use eassume.
* src/textprop.c (Fprevious_single_char_property_change):
Avoid fixnum overflow with invalid input.
(set_text_properties): Fix unlikely failure
to validate arguments, by using EQ instead of XFIXNAT.
* src/w32term.c (w32_draw_glyph_string):
* src/xterm.c (x_draw_glyph_string):
Treat negative minimums as 0 rather than as garbage patterns.
|
|\
| |
| |
| |
| |
| | |
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height. (Bug#33921)
|
| |
| |
| |
| | |
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the callers a bit easier to read, and doubtless
improves efficiency very slightly. It also simplifies
possible future changes to allow bignum indexes to buffers.
* src/alloc.c (allocate_vectorlike):
Prefer ptrdiff_t to size_t when either will do.
(make_vector): New function.
(Fmake_vector): Use it.
* src/buffer.c (syms_of_buffer):
* src/bytecode.c (syms_of_bytecode):
* src/category.c (Fmake_category_table, init_category_once):
* src/ccl.c (syms_of_ccl):
* src/character.c (syms_of_character):
* src/charset.c (Fdefine_charset_internal)
(Ffind_charset_region, Ffind_charset_string):
* src/chartab.c (copy_char_table):
* src/coding.c (Fdefine_coding_system_internal, syms_of_coding):
* src/composite.c (get_composition_id, Fcomposition_get_gstring):
* src/composite.h (LGLYPH_NEW):
* src/fns.c (concat, Flocale_info, make_hash_table):
* src/font.c (font_otf_ValueRecord, font_otf_anchor)
(build_style_table, syms_of_font):
* src/fontset.c (RFONT_DEF_NEW, fontset_find_font)
(dump_fontset, syms_of_fontset):
* src/image.c (xpm_make_color_table_v):
* src/keyboard.c (modify_event_symbol, menu_bar_items)
(parse_menu_item, parse_tool_bar_item, init_tool_bar_items)
(syms_of_keyboard):
* src/keymap.c (Fdefine_key, describe_map, describe_vector):
* src/lread.c (read_vector):
* src/macfont.m (macfont_shape):
* src/menu.c (init_menu_items):
* src/nsfns.m (ns_make_monitor_attribute_list):
* src/process.c (conv_sockaddr_to_lisp, network_interface_info):
* src/profiler.c (make_log):
* src/window.c (Fcurrent_window_configuration):
* src/xdisp.c (with_echo_area_buffer_unwind_data)
(format_mode_line_unwind_data):
* src/xfaces.c (Finternal_make_lisp_face)
(Fface_attributes_as_vector):
* src/xfns.c (x_make_monitor_attribute_list)
(Fx_display_monitor_attributes_list):
* src/xfont.c (syms_of_xfont):
* src/xselect.c (x_handle_dnd_message):
* src/xwidget.c (save_script_callback):
Prefer make_nil_vector (N) to Fmake_vector (make_fixnum (N), Qnil).
* src/callint.c (Fcall_interactively):
* src/charset.c (load_charset_map):
* src/chartab.c (Fmake_char_table, uniprop_encode_value_numeric):
* src/composite.c (get_composition_id)
* src/dispnew.c (Fframe_or_buffer_changed_p)
(syms_of_display):
* src/fns.c (make_hash_table, maybe_resize_hash_table):
* src/font.c (font_style_to_value):
* src/fontset.c (FONTSET_ADD, fontset_add):
* src/json.c (json_to_lisp):
* src/keymap.c (syms_of_keymap):
* src/lread.c (init_obarray):
* src/profiler.c (make_log, Fprofiler_cpu_log):
* src/term.c (term_get_fkeys_1):
Prefer make_vector (N, V) to Fmake_vector (make_fixnum (N), V).
* src/font.c (build_style_table):
* src/macfont.m (macfont_shape):
* src/process.c (conv_sockaddr_to_lisp, network_interface_info):
Prefer make_uninit_vector if the vector will be initialized soon.
* src/lisp.h (make_nil_vector): New function.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/json.c, src/keyboard.c, src/keyboard.h, 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/sysdep.c, src/term.c, src/terminal.c,
src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
|
|
|
|
| |
Run admin/update-copyright.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This incorporates:
2017-05-16 manywarnings: update for GCC 7
2017-05-15 sys_select: Avoid "was expanded before it was required"
* configure.ac (nw): Suppress GCC 7’s new -Wduplicated-branches and
-Wformat-overflow=2 options, due to too many false alarms.
* doc/misc/texinfo.tex, lib/strftime.c, m4/manywarnings.m4:
Copy from gnulib.
* m4/gnulib-comp.m4: Regenerate.
* src/coding.c (decode_coding_iso_2022):
Fix bug uncovered by -Wimplicit-fallthrough.
* src/conf_post.h (FALLTHROUGH): New macro.
Use it to mark all switch cases that fall through.
* src/editfns.c (styled_format): Use !, not ~, on bool.
* src/gtkutil.c (xg_check_special_colors):
When using sprintf, don’t trust Gtk to output colors in [0, 1] range.
(xg_update_scrollbar_pos): Avoid use of possibly-uninitialized bool;
this bug was actually caught by Clang.
* src/search.c (boyer_moore):
Tell GCC that CHAR_BASE, if nonzero, must be a non-ASCII character.
* src/xterm.c (x_draw_glyphless_glyph_string_foreground):
Tell GCC that glyph->u.glyphless.ch must be a character.
|
|
|
|
|
|
|
|
| |
There’s no longer need to have QUIT stand for a slug of C statements.
Use the more-obvious function-call syntax instead.
Also, use true and false when setting immediate_quit.
These changes should not affect the generated machine code.
* src/lisp.h (QUIT): Remove. All uses replaced by maybe_quit.
|
|\
| |
| |
| |
| | |
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
|
| |
| |
| |
| | |
Run admin/update-copyright.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
facb5e2 Update Emacs manual section related to character folding
4efea8e ; * etc/DEBUG: Fix a typo. (Bug#22984)
f8df21b Update admin/notes/unicode
950be68 Add symref-filepattern entries for c?perl-mode
8b8a6ad Don't use XRANDR 1.3 extensions if the server doesn't support them.
985dacf ; NEWS update for the last change in etags
741a6f8 Sync with gnulib
7352c6c Rework C source files to avoid ^(
a589e9a By default, etags produces unqualified Perl tag names
72c7438 Indent methods with keyword names correctly
28532a9 Propertize character literals and special global variables
differently
a7d6f39 ; Fix last change in NEWS
83b2a20 Change how /etc/NEWS presents character folding
b417c5a Revert "Revert "Backport: * lisp/isearch.el: Turn char-folding
off by default""
711ca36 Properly handle lambda as read function (bug 22961)
1b9d616 Propertize operator symbol names with symbol syntax class
9b16bc2 Stop recognizing :#{} as symbol in ruby-mode
366ec77 Allow using the left shift operator without spaces on both sides
02bf7cc Properly handle unquoting in wdired (bug 22938)
16cf469 ; Spelling fix and tighten up comment
f50bc04 Allow splat operator before percent literal
991c801 Don't apply the return value of goto-char as syntax class
6e63b3e Guard against nested percent literals
066f3bc Recognize iuwu-mod after an escaped newline
6f7a57c Fix symbolic mode string conversion for s and t
50b9826 Update 'ucs-names' database
993b2fb Improve doc string of 'shell-command'
b71c717 Make the code in movemail_strftime more general
cc057e4 Speed up redisplay of binary files with long series of nulls
e51b27e Remove the highlighting support for quoting 'like this' inside
Lisp docstrings
b1abce1 Restore leading space in movemail pop output
98b8d44 Fix bidi-paragraph-direction in Rmail view buffer
dc9d837 Don't misindent computed property generator methods
7923112 Fix mbox files produced by movemail on MS-Windows
c45a1ca doc string file descriptor exhaustion fix
265141b Fix Bug#22814
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
| |
* src/alloc.c (Fmake_vector):
* src/ccl.c (setup_ccl_program):
Use memset to clear array.
* src/alloc.c (Fvector, Fmake_byte_code):
* src/charset.c (Fdefine_charset_internal):
Use memcpy to copy array.
|
|
|
|
| |
Run admin/update-copyright.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string):
* src/buffer.c (record_overlay_string, overlay_strings):
* src/casefiddle.c (casify_object):
* src/ccl.c (Fccl_execute_on_string):
* src/character.c (char_width, c_string_width, lisp_string_width)
(count_size_as_multibyte, string_escape_byte8):
* src/coding.c (coding_alloc_by_realloc, produce_chars):
* src/data.c (arith_driver):
* src/dispnew.c (realloc_glyph_pool, init_display):
* src/editfns.c (styled_format):
* src/fns.c (Ffillarray):
* src/ftfont.c (ftfont_shape_by_flt):
* src/gnutls.c (gnutls_hex_string):
* src/gtkutil.c (get_utf8_string):
* src/image.c (x_to_xcolors, x_detect_edges, png_load_body):
* src/keymap.c (Fkey_description):
* src/lisp.h (SAFE_ALLOCA_LISP):
* src/term.c (encode_terminal_code):
* src/tparam.c (tparam1):
* src/xselect.c (x_property_data_to_lisp):
* src/xsmfns.c (smc_save_yourself_CB):
* src/xterm.c (x_term_init):
When checking for integer overflow, prefer INT_MULTIPLY_WRAPV to
more-complicated code involving division and/or
INT_MULTIPLY_OVERFLOW, and similarly for INT_ADD_WRAPV and
subtraction and/or INT_ADD_OVERFLOW.
* src/casefiddle.c (casify_object): Simplify multibyte size check.
* src/character.c: Remove some obsolete ‘#ifdef emacs’s.
* src/data.c (arith_driver): Also check for division overflow,
as that’s now possible given that the accumulator can now contain
any Emacs integer.
* src/lisp.h (lisp_word_count): Remove; no longer used.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove DEFSYMs that aren't used at the C level. Also:
* src/decompress.c (Qzlib_dll):
* src/font.c (Qunicode_sip):
* src/frame.c (Qtip_frame):
* src/ftfont.c (Qserif):
* src/gnutls.c (Qgnutls_dll):
* src/xml.c (Qlibxml2_dll):
Move from here ...
* src/w32fns.c (syms_of_w32fns): ... to here,
as these are used only on MS-Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib-src/ebrowse.c (dump_sym):
* lib-src/hexl.c (main):
* src/ccl.c (ccl_driver):
* src/character.c (string_escape_byte8):
* src/dbusbind.c (xd_retrieve_arg, xd_add_watch):
* src/gnutls.c (Fgnutls_boot):
* src/gtkutil.c (xg_check_special_colors):
* src/image.c (x_build_heuristic_mask):
* src/print.c (safe_debug_print, print_object):
* src/term.c (produce_glyphless_glyph):
* src/xdisp.c (get_next_display_element)
(produce_glyphless_glyph):
* src/xterm.c (x_draw_glyphless_glyph_string_foreground):
Don't use a signed format to print an unsigned integer, or vice
versa. GCC 5.1's new -Wformat-signedness option warns about this.
* src/image.c (png_load_body, jpeg_load_body):
Silence a bogus setjump diagnostic from GCC 5.1 (GCC bug 54561).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Run admin/update-copyright.
|
|
|
|
|
| |
* ccl.c (Fccl_execute_on_string):
* font.c (fon_intern_prop): Use make_specified_string.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Especially, C99 prohibits nesting a struct X inside struct Y if
struct X has a flexible array member.
Also, merge from gnulib, incorporating:
2013-11-03 intprops: port to Oracle Studio c99
* lib/intprops.h: Update from gnulib.
* src/alloc.c (struct sdata): New type.
(sdata): Implement in terms of struct sdata.
Remove u member; all uses replaced by next_vector, set_next_vector.
(SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
(SDATA_DATA_OFFSET): Now a constant, not a macro.
(struct sblock): Rename first_data member to data, which is now
a flexible array member. All uses changed.
(next_vector, set_next_vector, large_vector_vec): New functions.
(vector_alignment): New constant.
(roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
(struct large-vector): Now merely a NEXT member, since the old approach
ran afoul of stricter C99. All uses changed to use
large_vector_vec or large_vector_offset.
(large_vector_offset): New constant.
* src/dispnew.c: Include tparam.h, for tgetent.
Do not include term.h; no longer needed.
* src/gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
* src/lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
(struct Lisp_Vector): Use a flexible array member for contents,
instead of a union with a member that is an array of size 1.
All uses changed.
(ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
fact that the struct no longer contains a union.
(struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
(struct Lisp_Save_Value, struct Lisp_Free):
Use unsigned, not int, for spacers, to avoid c99 warning.
(union specbinding): Use unsigned, not bool, for bitfield, as
bool is not portable to pre-C99 hosts.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helps to avoid a few glitches dictated by C's aliasing rules.
* lisp.h (struct Lisp_Vector): Use union for next and
contents member. Adjust comment. Change related users.
* alloc.c (next_in_free_list, set_next_in_free_list): Remove.
Related users changed.
* buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
* composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
* lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
* xfaces.c, xfont.c, xmenu.c: Related users changed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it easier to visualize quantities on a number line.
This patch doesn't apply to all such range checks,
only to the range checks affected by the 2013-03-24 change.
This patch reverts most of the 2013-03-24 change.
* alloc.c (xpalloc, Fgarbage_collect):
* ccl.c (ccl_driver, resolve_symbol_ccl_program):
* character.c (string_escape_byte8):
* charset.c (read_hex):
* data.c (cons_to_unsigned):
* dispnew.c (update_frame_1):
* doc.c (Fsubstitute_command_keys):
* doprnt.c (doprnt):
* editfns.c (hi_time, decode_time_components):
* fileio.c (file_offset):
* fns.c (larger_vector, make_hash_table, Fmake_hash_table):
* font.c (font_intern_prop):
* frame.c (x_set_alpha):
* gtkutil.c (get_utf8_string):
* indent.c (check_display_width):
* keymap.c (Fkey_description):
* lisp.h (FIXNUM_OVERFLOW_P, vcopy):
* lread.c (read1):
* minibuf.c (read_minibuf_noninteractive):
* process.c (wait_reading_process_output):
* search.c (Freplace_match):
* window.c (get_phys_cursor_glyph):
* xdisp.c (redisplay_internal):
* xsmfns.c (smc_save_yourself_CB):
Prefer < to > for range checks.
* dispnew.c (sit_for): Don't mishandle NaNs.
This fixes a bug introduced in the 2013-03-24 change.
* editfns.c (decode_time_components): Don't hoist comparison.
This fixes another bug introduced in the 2013-03-24 change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
written backwards.
* blockinput.h (input_blocked_p): Likewise.
* bytecode.c (exec_byte_code): Likewise.
* callproc.c (call_process_kill, call_process_cleanup)
(Fcall_process): Likewise.
* ccl.c (ccl_driver, resolve_symbol_ccl_program)
(Fccl_execute_on_string): Likewise.
* character.c (string_escape_byte8): Likewise.
* charset.c (read_hex): Likewise.
* cm.c (calccost): Likewise.
* data.c (cons_to_unsigned): Likewise.
* dired.c (directory_files_internal, file_name_completion):
Likewise.
* dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
(sit_for): Likewise.
* doc.c (Fsubstitute_command_keys): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (hi_time, decode_time_components, Fformat): Likewise.
* emacsgtkfixed.c: Likewise.
* fileio.c (file_offset, Fwrite_region): Likewise.
* floatfns.c (Fexpt, fmod_float): Likewise.
* fns.c (larger_vector, make_hash_table, Fmake_hash_table):
Likewise.
* font.c (font_intern_prop): Likewise.
* frame.c (x_set_alpha): Likewise.
* gtkutil.c (get_utf8_string): Likewise.
* indent.c (check_display_width): Likewise.
* intervals.c (create_root_interval, rotate_right, rotate_left)
(split_interval_right, split_interval_left)
(adjust_intervals_for_insertion, delete_node)
(interval_deletion_adjustment, adjust_intervals_for_deletion)
(merge_interval_right, merge_interval_left, copy_intervals)
(set_intervals_multibyte_1): Likewise.
* keyboard.c (gobble_input, append_tool_bar_item): Likewise.
* keymap.c (Fkey_description): Likewise.
* lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
* lread.c (openp, read_integer, read1, string_to_number):
Likewise.
* menu.c (ensure_menu_items): Likewise.
* minibuf.c (read_minibuf_noninteractive): Likewise.
* print.c (printchar, strout): Likewise.
* process.c (create_process, Faccept_process_output)
(wait_reading_process_output, read_process_output, send_process)
(wait_reading_process_output): Likewise.
* profiler.c (make_log, handle_profiler_signal): Likewise.
* regex.c (re_exec): Likewise.
* regex.h: Likewise.
* search.c (looking_at_1, Freplace_match): Likewise.
* sysdep.c (get_child_status, procfs_ttyname)
(procfs_get_total_memory): Likewise.
* systime.h (EMACS_TIME_VALID_P): Likewise.
* term.c (dissociate_if_controlling_tty): Likewise.
* window.c (get_phys_cursor_glyph): Likewise.
* xdisp.c (init_iterator, redisplay_internal, redisplay_window)
(try_window_reusing_current_matrix, try_window_id, pint2hrstr):
Likewise.
* xfns.c (Fx_window_property): Likewise.
* xmenu.c (set_frame_menubar): Likewise.
* xselect.c (x_get_window_property, x_handle_dnd_message):
Likewise.
* xsmfns.c (smc_save_yourself_CB): Likewise.
* xterm.c (x_scroll_bar_set_handle): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* alloc.c (Fvector, Fmake_byte_code):
* ccl.c (Fregister_ccl_program):
* charset.c (Fdefine_charset_internal, define_charset_internal):
* coding.c (make_subsidiaries, Fdefine_coding_system_internal):
* composite.c (syms_of_composite):
* font.c (Fquery_font, Ffont_info, syms_of_font):
* fontset.c (FONT_DEF_NEW, Fset_fontset_font):
* ftfont.c (ftfont_shape_by_flt):
* indent.c (recompute_width_table):
* nsselect.m (clean_local_selection_data):
* syntax.c (init_syntax_once):
* w32unsubscribe.c (uniscribe_shape):
* window.c (Fcurrent_window_configuration):
* xfaces.c (Fx_family_fonts):
* xselect.c (selection_data_to_lisp_data): Use it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* admin/coccinelle/xzalloc.cocci: Semantic patch to convert
calls to xmalloc with following memset to xzalloc.
* src/lisp.h (xzalloc): New prototype. Omit needless casts.
* src/alloc.c (xzalloc): New function. Omit needless casts.
* src/charset.c: Omit needless casts. Convert all calls to
malloc with following memset to xzalloc.
* src/dispnew.c: Likewise.
* src/fringe.c: Likewise.
* src/image.c: Likewise.
* src/sound.c: Likewise.
* src/term.c: Likewise.
* src/w32fns.c: Likewise.
* src/w32font.c: Likewise.
* src/w32term.c: Likewise.
* src/xfaces.c: Likewise.
* src/xfns.c: Likewise.
* src/xterm.c: Likewise.
* src/atimer.c: Omit needless casts.
* src/buffer.c: Likewise.
* src/callproc.c: Likewise.
* src/ccl.c: Likewise.
* src/coding.c: Likewise.
* src/composite.c: Likewise.
* src/doc.c: Likewise.
* src/doprnt.c: Likewise.
* src/editfns.c: Likewise.
* src/emacs.c: Likewise.
* src/eval.c: Likewise.
* src/filelock.c: Likewise.
* src/fns.c: Likewise.
* src/gtkutil.c: Likewise.
* src/keyboard.c: Likewise.
* src/lisp.h: Likewise.
* src/lread.c: Likewise.
* src/minibuf.c: Likewise.
* src/msdos.c: Likewise.
* src/print.c: Likewise.
* src/process.c: Likewise.
* src/region-cache.c: Likewise.
* src/search.c: Likewise.
* src/sysdep.c: Likewise.
* src/termcap.c: Likewise.
* src/terminal.c: Likewise.
* src/tparam.c: Likewise.
* src/w16select.c: Likewise.
* src/w32.c: Likewise.
* src/w32reg.c: Likewise.
* src/w32select.c: Likewise.
* src/w32uniscribe.c: Likewise.
* src/widget.c: Likewise.
* src/xdisp.c: Likewise.
* src/xmenu.c: Likewise.
* src/xrdb.c: Likewise.
* src/xselect.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the old days this wasn't portable, since some sprintf
implementations returned char *. But they died out years ago and
Emacs already assumes sprintf returns int.
Similarly for float_to_string.
This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
* ccl.c (ccl_driver):
* character.c (string_escape_byte8):
* data.c (Fnumber_to_string):
* doprnt.c (doprnt):
* print.c (print_object):
* xdisp.c (message_dolog):
* xfns.c (syms_of_xfns):
Use sprintf or float_to_string result to avoid need to call strlen.
* data.c (Fnumber_to_string):
Use make_unibyte_string, since the string must be ASCII.
* lisp.h, print.c (float_to_string): Now returns int length.
* term.c (produce_glyphless_glyph):
Use sprintf result rather than recomputing it.
|
|
|
|
|
|
|
| |
* font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
* print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.
|
|\ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|