Commit graph

30602 commits

Author SHA1 Message Date
Paul Eggert
c9c49752e1 Fix more problems found by GCC 4.5.2's static checks. 2011-03-22 18:01:59 -07:00
Paul Eggert
b9b4b7cb4c Merge removals from trunk. 2011-03-22 17:53:37 -07:00
Paul Eggert
2c520ab5fb Merge from mainline. 2011-03-22 17:24:09 -07:00
Chong Yidong
c59da222fa Remove an apparently unnecessary XClearWindow call.
* src/xterm.c (x_clear_frame): Remove XClearWindow call.  This appears
not to be necessary, and produces flickering.
2011-03-22 14:15:52 -04:00
Paul Eggert
b12ef41167 Add Bug# 2011-03-22 09:43:12 -07:00
Paul Eggert
8abc3f1295 * coding.c (encode_coding_raw_text): Avoid unnecessary test
the first time through the loop, since we know p0 < p1 then.
This also avoids a gcc -Wstrict-overflow warning.
2011-03-22 09:20:45 -07:00
Paul Eggert
a2d2666036 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
leading to a memory leak, possible in functions like
load_charset_map_from_file that can allocate an unbounded number
of objects.
2011-03-22 02:08:11 -07:00
Paul Eggert
916c72e97a * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
that could (at least in theory) be that large.
2011-03-22 01:59:50 -07:00
Paul Eggert
b7cbbd6f01 * xdisp.c (pint2hrstr): Simplify and tune code slightly.
This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
2011-03-22 01:15:43 -07:00
Paul Eggert
19ab8a188a * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
This is less likely to overflow, and avoids undefined behavior if
overflow does occur.  All callers changed.  Use strtoul to scan
for the unsigned long integer.
2011-03-22 01:10:11 -07:00
Paul Eggert
f0641eff4f * scroll.c (do_scrolling): Work around GCC bug 48228.
See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
2011-03-22 00:48:10 -07:00
Paul Eggert
39f5e5198f * frame.c (validate_x_resource_name): Simplify count usage.
This also avoids a warning with gcc -Wstrict-overflow.
2011-03-21 11:12:38 -07:00
Paul Eggert
5ffe6683c3 Better version of previous patch. 2011-03-21 11:11:03 -07:00
Paul Eggert
7f650bb9a8 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
This also avoids a warning with gcc -Wstrict-overflow.
2011-03-21 11:09:45 -07:00
Paul Eggert
37dd57d1e5 Add Bug#. 2011-03-20 22:50:24 -07:00
Paul Eggert
6e5fa6bfce Merge from trunk and from gnulib stdio. 2011-03-20 22:34:48 -07:00
Paul Eggert
81e56e612d * fileio.c (Fcopy_file): Report error if fchown or fchmod fail. 2011-03-20 19:40:27 -07:00
Glenn Morris
66b874939b (Re)move autotools generated files from the repository.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00225.html

* autogen/: New directory, to be excluded from releases.
* autogen/copy_autogen, autogen/update_autogen: New scripts.
* autogen/README: New file.
* autogen/aclocal.m4, autogen/config.in, autogen/configure:
* autogen/Makefile.in: Add auto-updated generated files.

* autogen.sh: No longer a no-op, now it tests for autotools
and runs them as necessary.

* configure.in: Defaule maintainer-mode to on.

* aclocal.m4, configure, lib/Makefile.in: Remove files.

* src/config.in: Remove file.

* INSTALL.BZR, admin/make-tarball.txt: Update instructions.
2011-03-20 16:58:23 -07:00
Paul Eggert
699979fc4c Add Bug#. 2011-03-20 16:56:23 -07:00
Paul Eggert
dc1ca6a87f * emacs.c (Fdaemon_initialized): Do not ignore I/O errors. 2011-03-20 14:03:44 -07:00
Paul Eggert
c184bbfdfd Merge: Use socklen_t, not int, for socket lengths. 2011-03-20 09:55:33 -07:00
Paul Eggert
6a90a4f198 Merge from gnulib, for socklen_t. 2011-03-20 09:28:22 -07:00
Juanma Barranquero
45b6f6d5cb src/minibuf.c: Fix previous change.
* minibuf.c (Vcompleting_read_function): Don't declare, global variables
  are now in src/globals.h.
  (syms_of_minibuf): Remove spurious & from previous change.
2011-03-20 14:57:22 +01:00
Leo Liu
3ec03f7e46 New variable completing-read-function to customize completing-read 2011-03-20 18:35:27 +08:00
Paul Eggert
c939f91b4d Add Bug#8298. 2011-03-19 22:15:59 -07:00
Paul Eggert
12d8b6ab59 * process.c (create_process): Use 'volatile' to avoid vfork clobbering. 2011-03-19 20:07:54 -07:00
Paul Eggert
7b8081265e * process.c (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros. 2011-03-19 19:48:50 -07:00
Paul Eggert
f990b4e5d9 * process.c (process_send_signal): Add cast to avoid pointer signedness problem. 2011-03-19 19:45:19 -07:00
Paul Eggert
0da4933597 * process.c (Fnetwork_interface_info): Fix pointer signedness. 2011-03-19 19:42:34 -07:00
Paul Eggert
4dc343ee36 * process.c (Fmake_network_process): Define label "retry_connect" only if needed. 2011-03-19 19:41:23 -07:00
Paul Eggert
b93aacde82 * process.c: Rename or move locals to avoid shadowing.
(list_processes_1, Fmake_network_process):
(read_process_output_error_handler, exec_sentinel_error_handler):
Rename or move locals.
2011-03-19 19:40:14 -07:00
Paul Eggert
af8a867c62 Make tparam.h and terminfo.c consistent.
* cm.c (tputs, tgoto, BC, UP): Remove extern decls.  Include
tparam.h instead, since it declares them.
* cm.h (PC): Remove extern decl; tparam.h now does this.
* deps.mk (cm.o, terminfo.o): Depend on tparam.h.
* terminfo.c: Include tparam.h, to check interfaces.
(tparm): Make 1st arg a const pointer in decl.  Put it at top level.
(tparam): Adjust signature to match interface in tparam.h;
this removes some undefined behavior.  Check that outstring and len
are zero, which they always are with Emacs.
* tparam.h (PC, BC, UP): New extern decls.
2011-03-19 15:46:50 -07:00
Chong Yidong
b14e3e21ec Merge changes from emacs-23 branch 2011-03-19 14:49:31 -04:00
Chong Yidong
20f5695598 Backport fix for Bug#8219 from trunk.
* buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
(BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
These macros can no longer be used for assignment.

* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign
struct members directly, instead of using BUF_BEGV etc.
(record_buffer_markers, fetch_buffer_markers): New functions for
recording and fetching special buffer markers.
(set_buffer_internal_1, set_buffer_temp): Use them.

* lread.c (unreadchar): Use SET_BUF_PT_BOTH.

* insdel.c (adjust_point): Use SET_BUF_PT_BOTH.

* intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
(get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.

* xdisp.c (hscroll_window_tree):
(reconsider_clip_changes): Use PT instead of BUF_PT.
2011-03-19 12:42:53 -04:00
Paul Eggert
001a7ab41b * xftfont.c (xftfont_open): Rename locals to avoid shadowing. 2011-03-18 22:07:42 -07:00
Paul Eggert
0248044d31 * xftfont.c (xftfont_shape): Now static, and defined only if needed. 2011-03-18 22:05:19 -07:00
Paul Eggert
49eaafbac1 * ftfont.c: (get_adstyle_property, ftfont_pattern_entity):
(ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
Rename locals to avoid shadowing.
2011-03-18 22:03:30 -07:00
Paul Eggert
e932860f4b * ftfont.c (ftfont_list): Remove unused local. 2011-03-18 21:57:02 -07:00
Paul Eggert
a00924bbce * ftfont.c (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
(OTF_TAG_SYM): Omit macro if not needed.
2011-03-18 21:56:15 -07:00
Juanma Barranquero
f2b726e626 src/makefile.w32-in: Update dependencies. 2011-03-19 04:22:14 +01:00
Paul Eggert
8ff096c18c * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. 2011-03-18 19:49:10 -07:00
Paul Eggert
e2be39f6af * xfont.c (xfont_list_family): Mark var as initialized. 2011-03-18 19:45:11 -07:00
Paul Eggert
c9735e30ca * xml.c (make_dom): Now static. 2011-03-18 19:43:47 -07:00
Paul Eggert
11b6112221 Add Bug#. 2011-03-18 19:42:49 -07:00
Paul Eggert
8e52e65207 * composite.c (find_automatic_composition): Mark vars as initialized, with a FIXME. 2011-03-18 18:02:49 -07:00
Paul Eggert
80e079b231 * composite.c (composition_update_it): Mark var as initialized. 2011-03-18 17:58:10 -07:00
Paul Eggert
b246f9329c * composite.c (composition_reseat_it): Remove unused locals.
(find_automatic_composition, composition_adjust_point): Likewise.
2011-03-18 17:18:31 -07:00
Paul Eggert
8f5201aeeb * composite.c (composition_compute_stop_pos): Rename local to
avoid shadowing.
2011-03-18 17:16:45 -07:00
Paul Eggert
760fbc2c7d character.h: Rename locals to avoid shadowing.
* character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
(FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
(FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
(BUF_DEC_POS): Be more systematic about renaming local temporaries
to avoid shadowing.
2011-03-18 17:12:53 -07:00
Paul Eggert
ff08eb8560 * textprop.c (property_change_between_p): Remove; unused. 2011-03-18 09:42:05 -07:00