| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
* src/lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
installation and source directories as well.
|
| |
|
| |
|
|
|
|
| |
Some packages use them to denote characters with modifiers.
|
| |
|
|
|
|
| |
(read1): Likewise. (Bug#9608)
|
|
|
|
| |
Fixes: debbugs:9493
|
| |
|
|
|
|
| |
Use esprintf, not sprintf, in case result does not fit in int.
|
|\ |
|
| |
| |
| |
| |
| | |
src/lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
has no `load' handler, try opening the file locally.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
* src/lread.c (read1): Read ## as empty symbol.
* src/print.c (print_object): Print empty symbol as ##.
|
|/ |
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
* src/lread.c (read_integer): Unread even EOF character.
(read1): Likewise. Properly record start position of symbol.
|
| |
| |
| |
| | |
symbol character follows.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* lread.c (syms_of_lread): Clarify that is isn't only
`eval-buffer' and `eval-defun' that's affected by
`lexical-binding'.
Fixes: debbugs:8460
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
(mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Protoize.
* src/data.c (fmod): Likewise.
* src/dispnew.c (swap_glyphs_in_rows): Likewise.
* src/emacs.c (memory_warning_signal): Likewise.
* src/floatfns.c (float_error): Likewise.
* src/font.c (check_gstring, check_otf_features, otf_tag_symbol)
(otf_open, font_otf_capability, generate_otf_features)
(font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
Likewise.
* src/image.c (pbm_read_file): Likewise.
* src/indent.c (string_display_width): Likewise.
* src/intervals.c (check_for_interval, search_for_interval)
(inc_interval_count, count_intervals, root_interval)
(adjust_intervals_for_insertion, make_new_interval): Likewise.
* src/lread.c (defalias): Likewise.
* src/regex.c (set_image_of_range_1, set_image_of_range)
(regex_grow_registers): Likewise.
* src/sysdep.c (strerror): Likewise.
* src/termcap.c (valid_filename_p, tprint, main): Likewise.
* src/tparam.c (main): Likewise.
* src/unexhp9k800.c (run_time_remap, save_data_space)
(update_file_ptrs, read_header, write_header, calculate_checksum)
(copy_file, copy_rest, display_header): Likewise.
* src/widget.c (mark_shell_size_user_specified, create_frame_gcs):
Likewise.
* src/xdisp.c (check_it): Likewise.
* src/xfaces.c (register_color, unregister_color, unregister_colors):
Likewise.
* src/xfns.c (print_fontset_result): Likewise.
* src/xrdb.c (member, fatal, main): Likewise.
|
|/
|
|
|
|
|
|
|
|
|
| |
* fns.c (hash_string): New function, taken from sxhash_string.
Do not discard information about ASCII character case; this
discarding is no longer needed.
(sxhash-string): Use it. Change sig to match it. Caller changed.
* lisp.h: Declare it.
* lread.c (hash_string): Remove, since we now use fns.c's version.
The fns.c version returns a wider integer if --with-wide-int is
specified, so this should help the quality of the hashing a bit.
|
|
|
|
| |
`defvar' or `defconst' (bug#7154).
|
| |
|
| |
|
|
|
|
|
|
|
| |
(Fload, openp, read_buffer_size, read1)
(substitute_object_recurse, read_vector, read_list, map_obarray):
Use ptrdiff_t, not int, for sizes.
(read1): Use EMACS_INT, not int, for sizes.
|
|
|
|
|
|
|
|
| |
(read_integer): Radix is now EMACS_INT, not int,
to improve quality of diagnostics for out-of-range radices.
Calculate buffer size correctly for out-of-range radices.
(read1): Check for integer overflow in radices, and in
read-circle numbers.
|
| |
|
|
|
|
|
|
|
|
|
| |
(saved_doc_string_size, saved_doc_string_length)
(prev_saved_doc_string_size, prev_saved_doc_string_length):
Now ptrdiff_t, not int.
(read1): Don't assume doc string length fits in int. Check for
out-of-range doc string lengths.
(read_list): Don't assume file position fits in int.
|
| |
|
|
|
|
| |
xsignal1.
|
|
|
|
|
|
| |
All uses changed. This doesn't fix a bug, but it simplifies the
code away from its former Hollerith-constant appearance, and it's
one less 'int' to worry about when looking at integer-overflow issues.
|
| |
|
|
|
|
|
|
| |
These casts should not be needed on 32-bit hosts, either.
* keyboard.c (read_char):
* lread.c (Fload): Remove casts to unsigned.
|
|
|
|
| |
src/lread.c: Include limits.h.
|
|\ |
|
| |
| |
| |
| | |
marker. (Bug#8610)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use string_to_number to do the actual conversion; this avoids
rounding errors and fixes some other screwups. Without this fix,
for example, #x1fffffffffffffff was misread as -2305843009213693952.
(digit_to_number): Move earlier, for benefit of read_integer.
Return -1 if the digit is out of range for the base, -2 if it is
not a digit in any supported base.
|
| | |
|
|/
|
|
|
|
|
|
|
| |
Normally we prefer signed values; but hashing is special, because
it's better to use unsigned division on hash table sizes so that
the remainder is nonnegative. Also, size_t is the natural width
for hashing into memory. The previous code used 'int', which doesn't
retain enough info to hash well into very large tables.
(oblookup, oblookup_last_bucket_number, Funintern): Likewise.
|
|
|
|
|
| |
(ASIZE): Now contains previous implementation of XVECTOR_SIZE
instead of invoking XVECTOR_SIZE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC 4.6.0 optimizes based on type-based alias analysis. For
example, if b is of type struct buffer * and v of type struct
Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
!= &v->size, and therefore "v->size = 1; b->size = 2; return
v->size;" must therefore return 1. This assumption is incorrect
for Emacs, since it type-puns struct Lisp_Vector * with many other
types. To fix this problem, this patch adds a new type struct
vector_header that documents the constraints on layout of vectors
and pseudovectors, and helps optimizing compilers not get fooled
by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
* lisp.h (XVECTOR_SIZE): New convenience macro. All previous uses of
XVECTOR (foo)->size replaced to use this macro, to avoid the hassle
of writing XVECTOR (foo)->header.size.
(XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR.
(XSETTYPED_PVECTYPE): New macro, specifying the name of the size
member.
(XSETPVECTYPE): Rewrite in terms of new macro.
(XSETPVECTYPESIZE): New macro, specifying both type and size.
This is a bit clearer, and further avoids the possibility of
undesirable aliasing.
(XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
(XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR
and XVECTOR_HEADER_SIZE.
(XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
since Lisp_Subr is a special case (no "next" field).
(ASIZE): Rewrite in terms of XVECTOR_SIZE.
(struct vector_header): New type.
(TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
object, to help avoid aliasing.
(PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
(SUBRP): Likewise, since Lisp_Subr is a special case.
* lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
(struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
(struct Lisp_Hash_Table): Combine first two members into a single
struct vector_header member. All uses of "size" and "next" members
changed to be "header.size" and "header.next".
* buffer.h (struct buffer): Likewise.
* font.h (struct font_spec, struct font_entity, struct font): Likewise.
* frame.h (struct frame): Likewise.
* process.h (struct Lisp_Process): Likewise.
* termhooks.h (struct terminal): Likewise.
* window.c (struct save_window_data, struct saved_window): Likewise.
* window.h (struct window): Likewise.
* alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
* buffer.c (init_buffer_once): Likewise.
* lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
special case.
* process.c (Fformat_network_address): Use local var for size,
for brevity.
|
| |
|
|
|
|
| |
without overflow.
|
| |
|
| |
|
|\ |
|