Commit graph

31189 commits

Author SHA1 Message Date
Paul Eggert
7400048f60 * gnutls.c: Remove unused macros.
(fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
(fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
Remove macros that are defined and never used.
Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
2011-05-22 17:03:40 -07:00
Chong Yidong
abb71cf449 Remove var mistakenly introduced in 2011-05-22T19:46:47Z!cyd@stupidchicken.com.
* src/xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
(Fx_get_selection_internal): Minor cleanup.
(Fx_own_selection_internal): Rename arguments for consistency with
select.el.
2011-05-22 17:57:43 -04:00
Paul Eggert
6307db3930 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure. 2011-05-22 14:12:04 -07:00
Chong Yidong
f3d4e0a47d * src/xselect.c (syms_of_xselect): Include character.h; use DEFSYM. 2011-05-22 15:39:54 -04:00
Glenn Morris
a57471f935 Merge from emacs-23; up to 2010-06-11T18:51:00Z!juri@jurta.org. 2011-05-20 19:15:34 -07:00
Glenn Morris
33cf345f0c * src/Makefile.in (SOME_MACHINE_OBJECTS): Add some more files. 2011-05-20 19:04:48 -07:00
Glenn Morris
32078c8d48 * src/Makefile.in ($(etc)/DOC): Make second command line even shorter. 2011-05-20 19:02:42 -07:00
YAMAMOTO Mitsuharu
4d8ade8957 * dispnew.c (scrolling_window): Don't exclude the case that the
last enabled row in the desired matrix touches the bottom boundary.
2011-05-21 10:56:45 +09:00
Eli Zaretskii
7285dc67f4 Fix the MSDOS build as follows from 2011-05-19T06:04:16Z!rgm@gnu.org, 2011-05-20T00:41:03Z!rgm@gnu.org.
config.bat: Concatenate lisp.mk onto the end of src/Makefile.
 msdos/sed1v2.inp (make-docfile commands): Recognize only if the line
 begins with a TAB.  Use $(etc) rather than a literal "../etc".
 (`sed SED-COMMAND $(srcdir)/lisp.mk`): Edit to replace with "$(lisp).
 (@lisp_frag@): Edit out.
 msdos/sedlibmk.inp (GNULIB_GROUP_MEMBER, HAVE_GROUP_MEMBER): Edit to
 zero.
 src/callproc.c (Fcall_process) [MSDOS]: Fix arguments to
 report_file_error introduced by the change from 2011-05-07.
2011-05-20 12:47:59 +03:00
Paul Eggert
89d1bd225c * systime.h (Time): Define only if emacs is defined.
This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
where the include path doesn't have X11/X.h by default.  See
<http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
2011-05-19 23:37:13 -07:00
Kenichi Handa
e23640bb69 merge trunk 2011-05-20 09:54:09 +09:00
Kenichi Handa
31bfc35cca composite.c (find_automatic_composition): Fix previous change. 2011-05-20 09:51:38 +09:00
Glenn Morris
b9704ad993 Remove $shortlisp from src/Makefile.in.
* configure.in (lisp_frag): New output file.

* src/lisp.mk: New file, split from Makefile.in, and inheriting its
  copyright years.
* src/Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
(shortlisp): Remove.
($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.

* lisp/loadup.el, doc/misc/Makefile.in: Comment changes.
2011-05-19 17:41:03 -07:00
Glenn Morris
4a72048482 Remove the SOME_MACHINE_LISP distinction in src/Makefile.in.
See discussion in http://debbugs.gnu.org/8302

* configure.in (NS_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
(WINDOW_SUPPORT): Remove output variables that are no longer used.

* lib-src/makefile.w32-in (echolisp): Remove rule that is no longer needed.
(clean): No more echolisp.tmp.

* .bzrignore: Remove lib-src/echolisp.tmp.

* lisp/emacs-lisp/autoload.el (batch-update-autoloads):
Set autoload-excludes by parsing lisp/loadup.el rather than Makefiles.

* lisp/loadup.el: Update commentary.

* msdos/sed1x.inp (TOOLTIP_SUPPORT, WINDOW_SUPPORT):
* msdos/sed1v2.inp (MSDOS_SUPPORT, NS_SUPPORT, MOUSE_SUPPORT)
(TOOLTIP_SUPPORT, WINDOW_SUPPORT): No need to edit these any more.

* src/Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
(REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
(BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
(lisp): Set the order to that of loadup.el.
(shortlisp): Make it a copy of $lisp.
(SOME_MACHINE_LISP): Remove.
($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
Use just $shortlisp, not $SOME_MACHINE_LISP too.
2011-05-18 23:04:16 -07:00
Kenichi Handa
23373930da merge trunk 2011-05-19 09:37:36 +09:00
Kenichi Handa
a28d439601 Make find_automatic_composition more efficient. 2011-05-18 23:11:50 +09:00
Juanma Barranquero
a2b1fa8ede src/makefile.w32-in: Update dependencies. 2011-05-18 13:32:07 +02:00
Christoph Scholtes
3c24731f34 Last commit was missing updated source file. 2011-05-17 21:03:15 -06:00
Christoph Scholtes
8e1f561099 * menu.c: Include limits.h (fixes the MS-Windows build broken by
revision 2011-05-18T00:52:24Z!eggert@cs.ucla.edu).
2011-05-17 21:00:08 -06:00
Paul Eggert
cdfa6eab5a Add header for integer overflow fixes. 2011-05-17 17:47:42 -07:00
Paul Eggert
7025ee0019 Merge from mainline. 2011-05-17 17:39:40 -07:00
Courtney Bane
04f2d78b95 * src/term.c (Fresume_tty): Restore hooks before reinitializing.
Fixes: debbugs:8687
2011-05-17 21:26:48 -03:00
Paul Eggert
ef3ff03613 * character.c: Minor spelling and indenting fixes. 2011-05-15 22:18:38 -07:00
Paul Eggert
07156b3538 * w32menu.c: Change 'unsigned long' to 'Time' in #if-0 code. 2011-05-15 22:17:23 -07:00
Paul Eggert
06d6db334e * insdel.c (count_size_as_multibyte): Check for string overflow. 2011-05-15 22:15:51 -07:00
Paul Eggert
2b4560a850 * character.c (lisp_string_width): Check for string overflow.
Use EMACS_INT, not int, for string indexes and lengths; in
particular, 2nd arg is now EMACS_INT, not int.  Do not crash if
the resulting string length overflows an EMACS_INT; instead,
report a string overflow if no precision given.  When checking for
precision exhaustion, use a check that cannot possibly have
integer overflow.  (Bug#8675)
* character.h (lisp_string_width): Adjust to new signature.
2011-05-15 22:08:59 -07:00
Paul Eggert
cb93f9bef0 * alloc.c (string_overflow): New function.
(Fmake_string): Use it.  This doesn't change behavior, but saves
a few bytes and will simplify future changes.
* character.c (string_escape_byte8): Likewise.
* lisp.h (string_overflow): New decl.
2011-05-15 18:11:54 -07:00
Paul Eggert
067a69a2d3 Merge: user-interface timestamps and other int overflow patches. 2011-05-15 10:17:44 -07:00
Paul Eggert
9fbd68410f * msdos.c (mouse_get_pos): Likewise.
* w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
2011-05-14 12:06:08 -07:00
Paul Eggert
1a1f336685 Fixups, following up to the user-interface timestamp change.
* nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
for UI timestamps, instead of unsigned long.
* w32gui.h (Time): Define by including "systime.h" rather than by
declaring it ourselves.  (Bug#8664)
2011-05-14 02:03:53 -07:00
Paul Eggert
66699ad312 * fns.c: Fix misspellings. 2011-05-13 11:08:56 -07:00
Paul Eggert
2d165e9dc5 * editfns.c (Fformat): Fix several integer overflow problems.
For example, without this change, (format "%2147483648d" 1) dumps
core on x86-64 GNU/Linux.  Use EMACS_INT, not size_t, for sizes,
since we prefer using signed values, and EMACS_INT will be big
enough soon, even on 32-bit hosts.  Also, prefer EMACS_INT to int
for sizes.  Don't assume that pI is either "l" or ""; it might be
"ll" or "I64".  Check for width and precision greater than
INT_MAX, as this can make sprintf go kaflooey.  (Bug#8668)
2011-05-12 23:12:24 -07:00
Paul Eggert
bcfc5c821c Omit newline. 2011-05-12 18:11:23 -07:00
Paul Eggert
d4e3e4d3ad * dispextern.h (struct image): Don't assume time_t <= unsigned long.
* image.c (clear_image_cache): Likewise.
2011-05-12 18:10:46 -07:00
Paul Eggert
f6a24d1990 * term.c (term_mouse_position): Don't assume time_t wraparound. 2011-05-12 13:30:05 -07:00
Paul Eggert
08dc5ae68e Be more systematic about user-interface timestamps.
Before, the code sometimes used 'Time', sometimes 'unsigned long',
and sometimes 'EMACS_UINT', to represent these timestamps.  This
change causes it to use 'Time' uniformly, as that's what X uses.
This makes the code easier to follow, and makes it easier to catch
integer overflow bugs such as Bug#8664.
* frame.c (Fmouse_position, Fmouse_pixel_position):
Use Time, not unsigned long, for user-interface timestamps.
* keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
(button_down_time, make_lispy_position, make_lispy_movement): Likewise.
* keyboard.h (last_event_timestamp): Likewise.
* menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
* menu.h (xmenu_show): Likewise.
* term.c (term_mouse_position): Likewise.
* termhooks.h (struct input_event.timestamp): Likewise.
(struct terminal.mouse_position_hook): Likewise.
* xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
* xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
* systime.h (Time): New decl.  Pull it in from <X11/X.h> if
HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
what it was before.
* menu.h, termhooks.h: Include "systime.h", for Time.
2011-05-12 13:23:33 -07:00
Paul Eggert
86db42d223 Add Bug#. 2011-05-12 13:00:02 -07:00
Paul Eggert
8e55734abd * keyboard.c (make_lispy_event): Fix problem in integer overflow.
Don't assume that the difference between two unsigned long values
can fit into an integer.  At this point, we know button_down_time
<= event->timestamp, so the difference must be nonnegative, so
there's no need to cast the result if double-click-time is
nonnegative, as it should be; check that it's nonnegative, just in
case.  This bug is triggered when events are more than 2**31 ms
apart (about 25 days).
2011-05-12 12:37:40 -07:00
Paul Eggert
6434756cc5 * xselect.c (x_own_selection): Remove needless cast to unsigned long. 2011-05-12 10:18:58 -07:00
Paul Eggert
841f1b75c4 * xselect.c (last_event_timestamp): Remove duplicate decl. 2011-05-12 09:38:09 -07:00
Glenn Morris
79b70037f6 Put ChangeLog entries in the correct files. 2011-05-12 09:30:17 -07:00
Paul Eggert
d230cb74b5 * frame.h (struct frame): Use int for menu_bar_items_used
instead of EMACS_INT, since it always fits in int.
2011-05-12 09:25:30 -07:00
Paul Eggert
3e26f69c4f * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
that always fit in int.  Use a sentinel instead of a counter, to
avoid a temp and to allay GCC's concerns about possible int overflow.
2011-05-12 09:16:40 -07:00
Glenn Morris
d2fc7e3d0f Merge from emacs-23; up to 2010-06-10T12:56:11Z!michael.albinus@gmx.de. 2011-05-12 00:07:06 -07:00
Paul Eggert
5cc152c080 * menu.c (grow_menu_items): Check for int overflow. 2011-05-11 23:48:32 -07:00
Paul Eggert
d89eb65e6d * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils. 2011-05-11 23:46:26 -07:00
Paul Eggert
5235bd3eb1 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
Before, the code was not consistent.  These values cannot exceed
2**31 - 1 so there's no need to make them unsigned.
(x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
(x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
(x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
as modifiers.
* xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
2011-05-11 16:16:52 -07:00
Paul Eggert
bc827e23be * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
(XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
presumably because the widths might not match.
2011-05-11 14:42:11 -07:00
Drew Adams
e531bdfff1 src/textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655). 2011-05-11 18:38:18 +02:00
Paul Eggert
78eb494eca * window.c (size_window): Avoid needless test at loop start. 2011-05-10 22:29:31 -07:00