- 18 Jun, 2011 11 commits
-
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
Do not rely on integer wraparound.
-
Paul Eggert authored
-
- 17 Jun, 2011 11 commits
-
-
Paul Eggert authored
* xdisp.c (forward_to_next_line_start) (back_to_previous_visible_line_start) (reseat_at_next_visible_line_start, next_element_from_buffer): Don't arbitrarily truncate the value of 'selective' to int.
-
Paul Eggert authored
-
Paul Eggert authored
not EMACS_UINT, for indexes.
-
Paul Eggert authored
(composition_gstring_p, composition_reseat_it) (composition_adjust_point): Use EMACS_INT, not int.
-
Paul Eggert authored
-
Paul Eggert authored
(init_buffer_once): Check at compile-time, not run-time.
-
Paul Eggert authored
(struct sortstrlist.size, struct sortlist.used): Don't truncate size to int.
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
- 16 Jun, 2011 7 commits
-
-
Paul Eggert authored
Without this, prin1 mishandles Lisp_Misc_Save_Value printing on hosts with pre-C99 libraries, because pD is wrongly defined to "t".
-
Paul Eggert authored
* fileio.c (Finsert_file_contents): * insdel.c (insert_from_buffer_1, replace_range, replace_range_2): Remove the old (too-loose) buffer overflow checks. They weren't needed, since make_gap checks for buffer overflow. * insdel.c (make_gap_larger): Catch buffer overflows that were missed. The old code merely checked for Emacs fixnum overflow, and relied on undefined (wraparound) behavior. The new code avoids undefined behavior, and also checks for ptrdiff_t and/or size_t overflow.
-
Paul Eggert authored
Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
(insert_from_buffer_1, replace_range, replace_range_2): * insdel.c (make_gap_larger): * editfns.c (Finsert_char): * fileio.c (Finsert_file_contents): Use it, to normalize wording.
-
Paul Eggert authored
-
- 15 Jun, 2011 3 commits
-
-
Paul Eggert authored
(GET_CCL_RANGE, IN_INT_RANGE): Use it.
-
Stefan Monnier authored
-
Paul Eggert authored
(emacs_lseek): New static function. (Finsert_file_contents, Fwrite_region): Use it. Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
-
- 14 Jun, 2011 8 commits
-
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
-
Paul Eggert authored
(Fsafe_length): Return a float if the value is not representable as a fixnum. This shouldn't happen except in contrived situations. Use same QUIT_COUNT_HEURISTIC as Flength now does.
-
Paul Eggert authored
Use EMACS_INT, not int, to avoid unwanted truncation on 64-bit hosts. Check for QUIT every 1024 entries rather than every other entry; that's faster and is responsive enough. Report an error instead of overflowing an integer.
-
Paul Eggert authored
(header_size, word_size): New constants. (allocate_vectorlike): Don't check size overflow here. (allocate_vector): Check it here instead, since this is the only caller of allocate_vectorlike that could cause overflow. Check that the new vector's length is representable as a fixnum.
-
Jan Djärv authored
* configure.in: Add emacsgtkfixed.o to GTK_OBJ if HAVE_GTK3. * src/emacsgtkfixed.c, src/emacsgtkfixed.h: New files. * src/gtkutil.c: Include src/emacsgtkfixed.h if HAVE_GTK3. (int_gtk_range_get_value): Move to the scroll bar part of the file. (style_changed_cb): Call update_theme_scrollbar_width and call x_set_scroll_bar_default_width and xg_frame_set_char_size for all frames. (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505). Call gtk_window_set_resizable if HAVE_GTK3. (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width and height if HAVE_GTK3 (Bug#8505). (scroll_bar_width_for_theme): New variable. (update_theme_scrollbar_width): New function. (xg_get_default_scrollbar_width): Move code to update_theme_scrollbar_width, just return scroll_bar_width_for_theme. (xg_initialize): Call update_theme_scrollbar_width. * src/gtkutil.h (xg_get_default_scrollbar_width): Remove argument. * src/xfns.c (x_set_scroll_bar_default_width): Remove argument to xg_get_default_scrollbar_width.
-
Paul Eggert authored
The previous code was bogus. For example, next_almost_prime (32) returned 39, which is undesirable as it is a multiple of 3; and next_almost_prime (24) returned 25, which is a multiple of 5 so why was the code bothering to check for multiples of 7?
-