1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

329 Commits

Author SHA1 Message Date
Paul Eggert
7393bcbb8b * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
This no-op macro hasn't been needed for many years.
* src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
2012-07-30 11:56:42 -07:00
Paul Eggert
b46a6a83b3 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
* lisp/org/ob-lilypond.el (ly-w32-ly-path): Rename from ly-win32-ly-path.
(ly-w32-pdf-path): Rename from ly-win32-pdf-path.
(ly-w32-midi-path): Rename from ly-win32-midi-path.
(ly-determine-ly-path, ly-determine-pdf-path, ly-determine-midi-path):
Check for "windows-nt", not "win32", in system-type.
* src/regex.c (MAX_BUF_SIZE): Remove some incorrect and
long-ago-commented-out code that talks about "WIN32".
* src/w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
All uses changed.
2012-07-29 01:18:29 -07:00
Paul Eggert
e99a530f8c Simplify by avoiding confusing use of strncpy etc. 2012-07-10 14:48:34 -07:00
Paul Eggert
38182d901d More xmalloc and related cleanup.
* alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
* callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
* doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
* font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
* gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
* nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
* regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
* sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
* xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
* xterm.c:
Omit needless casts involving void * pointers and allocation.
Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
as the former is more robust if P's type is changed.
Prefer xzalloc to xmalloc + memset 0.
Simplify malloc-or-realloc to realloc.
Don't worry about xmalloc returning a null pointer.
Prefer xstrdup to xmalloc + strcpy.
* editfns.c (Fmessage_box): Grow message_text by at least 80 when
growing it.
* keyboard.c (apply_modifiers_uncached): Prefer local array to
alloca of a constant.
2012-07-05 11:35:48 -07:00
Paul Eggert
63807d4757 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
since GCC 4.4.6 issues a bogus warning for them.
2012-07-03 17:36:28 -07:00
Paul Eggert
cf38a720e8 Clean out last vestiges of the old HAVE_CONFIG_H stuff. 2012-06-25 18:05:39 -07:00
Andreas Schwab
e5560ff7d2 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
(BUF_FETCH_MULTIBYTE_CHAR): Likewise.
* character.c (_fetch_multibyte_char_p): Remove.
* alloc.c: Include "character.h" before "buffer.h".
* bidi.c: Likewise.
* buffer.c: Likewise.
* bytecode.c: Likewise.
* callint.c: Likewise.
* callproc.c: Likewise.
* casefiddle.c: Likewise.
* casetab.c: Likewise.
* category.c: Likewise.
* cmds.c: Likewise.
* coding.c: Likewise.
* composite.c: Likewise.
* dired.c: Likewise.
* dispnew.c: Likewise.
* doc.c: Likewise.
* dosfns.c: Likewise.
* editfns.c: Likewise.
* emacs.c: Likewise.
* fileio.c: Likewise.
* filelock.c: Likewise.
* font.c: Likewise.
* fontset.c: Likewise.
* fringe.c: Likewise.
* indent.c: Likewise.
* insdel.c: Likewise.
* intervals.c: Likewise.
* keyboard.c: Likewise.
* keymap.c: Likewise.
* lread.c: Likewise.
* macros.c: Likewise.
* marker.c: Likewise.
* minibuf.c: Likewise.
* nsfns.m: Likewise.
* nsmenu.m: Likewise.
* print.c: Likewise.
* process.c: Likewise.
* regex.c: Likewise.
* region-cache.c: Likewise.
* search.c: Likewise.
* syntax.c: Likewise.
* term.c: Likewise.
* textprop.c: Likewise.
* undo.c: Likewise.
* unexsol.c: Likewise.
* w16select.c: Likewise.
* w32fns.c: Likewise.
* w32menu.c: Likewise.
* window.c: Likewise.
* xdisp.c: Likewise.
* xfns.c: Likewise.
* xmenu.c: Likewise.
* xml.c: Likewise.
* xselect.c: Likewise.
2012-06-16 14:24:15 +02:00
Andreas Schwab
95988fcfa8 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
account for preceding backslashes.  (Bug#11663)
2012-06-10 10:39:19 +02:00
Paul Eggert
261cb4bb75 Assume C89 or later.
* configure.in (AC_C_PROTOTYPES, AC_C_VOLATILE, AC_C_CONST)
(POINTER_TYPE, PROTOTYPES): Remove.
* admin/CPP-DEFINES: Remove NULL, const.
* lib-src/etags.c (static, const): Remove macros.
(PTR): Remove; all uses replaced with void *.  Omit needless casts.
* src/alloc.c, src/buffer.c, lisp.h: Replace POINTER_TYPE with void.
* alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
(xrealloc):
* buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
* editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
* textprop.c, tparam.c (NULL): Remove.
* ralloc.c, vm-limit.c (POINTER): Assume void * works.
* regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
* regex.h (_RE_ARGS): Remove.  All uses rewritten to use prototypes.
* unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
* xterm.c (input_signal_count): Assume volatile works.
2012-05-21 08:36:54 -07:00
Paul Eggert
b8df54ffbe configure: new option --enable-gcc-warnings
I have been using this change for many months in my private copy
of Emacs, and have used it to find several bugs.  It's mature
enough to publish now.
* Makefile.in (GNULIB_MODULES): Add warnings, manywarnings.
* configure.in: Support --enable-gcc-warnings, in the style of
other GNU packages such as coreutils.
(C_WARNINGS_SWITCH): Remove, replacing with...
(WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable.
(PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I,
when including system files with GCC.
* etc/NEWS: Mention --enable-gcc-warnings.
* lib/Makefile.am (AM_CFLAGS): New macro.
* m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
* lib-src/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(BASE_CFLAGS): Use new macros rather than old.
* lwlib/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* oldXMenu/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* src/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* src/process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
* src/regex.c: Ignore -Wstrict-overflow.  If !emacs, also ignore
-Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
-Wunused-result, -Wunused-variable.  This should go away once
the Emacs and Gnulib regex code is merged.
(xmalloc, xrealloc): Now static.
2012-04-09 00:45:59 -07:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
fa46310344 Spelling fixes. 2011-12-05 00:55:25 -08:00
Juanma Barranquero
c701515351 Fix typos. 2011-11-15 18:37:37 +01:00
Eli Zaretskii
a6fc3b5c53 Support MSVC build with newer versions of Visual Studio.
Small portions of the changes by Fabrice Popineau <fabrice.popineau@supelec.fr>.

 src/makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
 Nmake barfs on that.  Use $(OBJ*_c) variables instead, defined on
 nt/gmake.defs.
 src/lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
 which are not supported by MSVC.
 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
 bitfields.
 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
 types in bitfields.
 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
 src/w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
 src/w32.c: Don't include w32api.h for MSVC.
 (init_environment) [_MSC_VER]: Call sys_access, not _access.
 src/s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
 e_* cousins.
 (alloca) [_MSC_VER]: Define to _alloca.
 src/lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
 src/regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
 nt/makefile.w32-in (clean-other-dirs-nmake)
 (distclean-other-dirs-nmake, maintainer-clean-other-dirs-nmake):
 Update for current structure of doc/ subdirectories.
 nt/gmake.defs (OBJ0_c, OBJ1_c, OBJ2_c): New variables.
 nt/INSTALL: Update for newer versions of MSVC.
 lib/makefile.w32-in (FRC): New dummy target.
 (TAGS): Depend on FRC.

Fixes: debbugs:9960
2011-11-05 13:34:56 +02:00
Juanma Barranquero
5e617bc2b6 Whitespace changes. 2011-09-09 03:06:52 +02:00
Andreas Schwab
213bd7f2f1 * regex.c (re_iswctype): Remove some redundant boolean conversions. 2011-08-04 16:25:21 +02:00
Andreas Schwab
31011111a1 * src/regex.c (re_comp): Protoize.
(re_exec): Fix return type.
(regexec): Fix type of `ret'.
2011-07-30 15:20:04 +02:00
Andreas Schwab
f3fcc40d5e * regex.c (re_iswctype): Convert return values to boolean. 2011-07-28 11:34:13 +02:00
Paul Eggert
da85a02af7 Merge from trunk. 2011-07-10 23:05:57 -07:00
Andreas Schwab
1dae0f0aad Protoize
* 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.
2011-07-10 10:20:10 +02:00
Paul Eggert
0e926e561c Assume freestanding C89 headers, string.h, stdlib.h. 2011-07-06 18:32:56 -07:00
Paul Eggert
9cfdb3ec08 [ChangeLog]
Assume support for memcmp, memcpy, memmove, memset.
This simplifies the code a bit.  All current platforms have these,
as they are required for C89.  If this turns into a problem we
can add the gnulib modules for these (a 1-line change to Makefile.in).
* configure.in: Don't check for memcmp, memcpy, memmove, memset.
[lib-src/ChangeLog]
Assume support for memcmp, memcpy, memmove, memset.
* etags.c (absolute_filename): Assume memmove exists.
[src/ChangeLog]
Assume support for memcmp, memcpy, memmove, memset.
* lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
* regex.c (memcmp, memcpy):
Remove; we assume C89 now.

* gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
(__malloc_safe_bcopy): Remove; no longer needed.
2011-07-04 22:27:49 -07:00
Eli Zaretskii
d1dfb56cc8 Fix regex.c, syntax.c and friends for buffers > 2GB.
src/syntax.h (struct gl_state_s): Declare character position members
 EMACS_INT.
 src/syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
 src/textprop.c (verify_interval_modification, interval_of): Declare
 arguments EMACS_INT.
 src/intervals.c (adjust_intervals_for_insertion): Declare arguments
 EMACS_INT.
 src/intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
 src/indent.c (Fvertical_motion): Local variable it_start is now
 EMACS_INT.
 src/regex.c (re_match, re_match_2, re_match_2_internal)
 (bcmp_translate, regcomp, regexec, print_double_string)
 (group_in_compile_stack, re_search, re_search_2, regex_compile)
 (re_compile_pattern, re_exec): Declare arguments and local
 variables `size_t' and `ssize_t' and return values `regoff_t', as
 appropriate.
 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
 <compile_stack_type>: `size' and `avail' are now `size_t'.
 src/regex.h <regoff_t>: Use ssize_t, not int.
 (re_search, re_search_2, re_match, re_match_2): Arguments that
 specify buffer/string position and length are now ssize_t and
 size_t.  Return type is regoff_t.
2011-04-16 21:26:30 +03:00
Paul Eggert
4da6032440 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src. 2011-03-15 14:33:24 -07:00
Paul Eggert
5da9919f99 Use functions, not macros, for up- and down-casing. 2011-03-15 14:14:06 -07:00
Paul Eggert
b313f9d863 * regex.c (RETALLOC_IF): Define only if needed.
(WORDCHAR_P): Likewise.  This one is never needed, but is used
only in a comment talking about a compiler bug, so put inside
the #if 0 of that comment.
(CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
(PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
Remove; unused.
2011-03-15 11:53:29 -07:00
Paul Eggert
da053e48b1 * regex.c (regex_compile, re_match_2_internal): Mark locals as initialized. 2011-03-15 11:43:04 -07:00
Paul Eggert
952db0d7ad * regex.c (FREE_VAR): Rewrite so as not to use empty "else",
which gcc can warn about.
2011-03-15 11:40:00 -07:00
Paul Eggert
8fb3179241 * regex.c (re_match_2_internals): Fix one more "not". 2011-03-15 11:37:02 -07:00
Paul Eggert
abbd1bcfec * regex.c: (regex_compile, re_search_2, re_match_2_internal):
Remove unused local vars.
2011-03-15 11:32:28 -07:00
Paul Eggert
19ed544587 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
Rename locals to avoid shadowing.
(regex_compile, re_match_2_internal): Move locals to avoid shadowing.
2011-03-15 11:27:53 -07:00
Paul Eggert
5b0534c888 * regex.c: conform to C89 pointer rules 2011-02-04 21:48:19 -08:00
Glenn Morris
95df8112a0 Refill some long/short copyright headers. 2011-01-26 00:36:39 -08:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Paul Eggert
15ef875582 Merge from mainline. 2011-01-17 11:24:36 -08:00
Paul Eggert
8865d794dc * regex.c (analyse_first): Remove unreachable 'continue' statement. 2011-01-16 23:34:14 -08:00
Paul Eggert
8a1f4a98c1 Merge from mainline. 2011-01-14 10:14:17 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Paul Eggert
4004364e67 Include <unistd.h> unilaterally. 2011-01-09 00:12:35 -08:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Dan Nicolaescu
d2762c8641 Convert definitions to standard C.
* src/strftime.c (LOCALE_PARAM_DECL): Update for standard C.
(LOCALE_PARAM, LOCALE_PARAM_PROTO): Remove, unused.
(memcpy_lowcase, so_week_days, extra_args_spec, emacs_strftimeu):
Convert definitions to standard C.
* src/regex.c: Do not include <stdlib.h>, config.h does it.
Include unistd.h.
(xrealloc, init_syntax_once, re_match, regcomp, regexec)
(regerror, regfree): Convert definitions to standard C.
* src/mktime.c (my_mktime_localtime_r, ydhms_tm_diff, ranged_convert)
(__mktime_internal): Convert definitions to standard C.
2010-11-15 22:44:51 -08:00
Juanma Barranquero
220d91b834 Merge changes from emacs-23 branch. 2010-10-14 16:32:27 +02:00
Juanma Barranquero
51e4f4a88d Fix typos in docstrings, comments and ChangeLogs.
* lisp/composite.el (compose-region):
* src/ccl.c (Fccl_execute_on_string): Fix typo in docstring.
2010-10-12 17:16:57 +02:00
Andreas Schwab
72af86bd8c Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free, xstrdup, allocate_string)
(allocate_string_data, compact_small_strings, Fmake_string)
(make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string, make_float)
(Fcons, allocate_terminal, allocate_frame, make_pure_string)
(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
memcpy, memmove, memset, memcmp.
* atimer.c (start_atimer, set_alarm): Likewise.
* buffer.c (clone_per_buffer_values, report_overlay_modification)
(mmap_realloc, init_buffer_once): Likewise.
* callint.c (Fcall_interactively): Likewise.
* callproc.c (Fcall_process, Fcall_process_region, child_setup)
(getenv_internal_1): Likewise.
* casefiddle.c (casify_object): Likewise.
* ccl.c (ccl_driver): Likewise.
* character.c (str_as_multibyte, str_to_multibyte): Likewise.
* charset.c (load_charset_map_from_file)
(load_charset_map_from_file, load_charset_map_from_vector)
(Fdefine_charset_internal): Likewise.
* cm.c (Wcm_clear): Likewise.
* coding.c (decode_eol, decode_coding_object)
(Fset_coding_system_priority, make_subsidiaries): Likewise.
* data.c (Faset): Likewise.
* dired.c (directory_files_internal, file_name_completion_stat):
Likewise.
* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
(clear_glyph_row, copy_row_except_pointers)
(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix)
(build_frame_matrix_from_leaf_window, mirrored_line_dance)
(mirror_line_dance, scrolling_window): Likewise.
* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (Fuser_full_name, make_buffer_string_both)
(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
* emacs.c (sort_args): Likewise.
* eval.c (Fapply, Ffuncall): Likewise.
* fileio.c (Ffile_name_directory, make_temp_name)
(Fexpand_file_name, search_embedded_absfilename)
(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
(auto_save_error): Likewise.
* fns.c (Fstring_equal, Fcopy_sequence, concat)
(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
(internal_equal, Fclear_string, larger_vector, copy_hash_table)
(Fmake_hash_table): Likewise.
* fringe.c (Fdefine_fringe_bitmap): Likewise.
* ftfont.c (ftfont_text_extents): Likewise.
* getloadavg.c (getloadavg): Likewise.
* image.c (define_image_type, make_image, make_image_cache)
(x_create_x_image_and_pixmap, xbm_image_p)
(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
(tiff_image_p, tiff_read_from_memory, gif_image_p)
(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
Likewise.
* indent.c (scan_for_column, compute_motion): Likewise.
* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
(insert_1_both, insert_from_gap, replace_range_2): Likewise.
* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
(kbd_buffer_store_event_hold, apply_modifiers_uncached)
(store_user_signal_events, menu_bar_items, tool_bar_items)
(process_tool_bar_item, append_tool_bar_item)
(read_char_minibuf_menu_prompt, read_key_sequence)
(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
Likewise.
* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
Likewise.
* lisp.h (STRING_COPYIN): Likewise.
* lread.c (Fload, read1, oblookup): Likewise.
* msdos.c (Frecent_doskeys): Likewise.
* nsfns.m (Fx_create_frame): Likewise.
* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
Likewise.
* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
Likewise.
* nsmenu.m (ns_update_menubar): Likewise.
* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
* print.c (print_unwind, printchar, strout, print_string)
(print_error_message): Likewise.
* process.c (conv_lisp_to_sockaddr, set_socket_option)
(Fmake_network_process, Fnetwork_interface_list)
(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
(init_process): Likewise.
* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
Likewise.
* scroll.c (do_scrolling, do_direct_scrolling)
(scrolling_max_lines_saved): Likewise.
* search.c (search_buffer, wordify, Freplace_match): Likewise.
* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
* syntax.c (skip_chars, skip_syntaxes): Likewise.
* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
(emacs_set_tty): Likewise.
* term.c (encode_terminal_code, calculate_costs)
(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
Likewise.
* termcap.c (tgetst1, gobble_line): Likewise.
* termhooks.h (EVENT_INIT): Likewise.
* tparam.c (tparam1): Likewise.
* unexalpha.c (unexec): Likewise.
* unexec.c (write_segment): Likewise.
* unexmacosx.c (unexec_write_zero): Likewise.
* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
* w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(w32font_open_internal, compute_metrics, Fx_select_font):
Likewise.
* w32menu.c (set_frame_menubar, add_menu_item)
(w32_menu_display_help, w32_free_submenu_strings): Likewise.
* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
* w32uniscribe.c (uniscribe_list_family): Likewise.
* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
* window.c (make_window, replace_window, set_window_buffer)
(Fsplit_window): Likewise.
* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
(add_to_log, message3, x_consider_frame_title)
(append_space_for_newline, extend_face_to_end_of_line)
(decode_mode_spec_coding, init_glyph_string): Likewise.
* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
(face_attr_equal_p, make_realized_face, make_face_cache)
(free_realized_faces, lookup_named_face, smaller_face)
(face_with_height, lookup_derived_face)
(x_supports_face_attributes_p, Finternal_set_font_selection_order)
(Finternal_set_font_selection_order, realize_default_face)
(compute_char_face, face_at_buffer_position)
(face_for_overlay_string, face_at_string_position, merge_faces):
Likewise.
* xfns.c (xic_create_fontsetname, Fx_create_frame)
(Fx_window_property, x_create_tip_frame)
(Fx_backspace_delete_keys_p): Likewise.
* xfont.c (xfont_list, xfont_match, xfont_list_family)
(xfont_text_extents): Likewise.
* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
* xrdb.c (magic_file_p, x_get_resource): Likewise.
* xselect.c (x_queue_event, x_get_window_property)
(receive_incremental_selection): Likewise.
* xsmfns.c (x_session_check_input): Likewise.
* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
Likewise.
* character.h (BCOPY_SHORT): Removed.
* config.in: Regenerate.
* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
* emacs.c (main) [PROFILING]: Don't declare
dump_opcode_frequencies.
* lisp.h (safe_bcopy): Remove declaration.
(memset) [!HAVE_MEMSET]: Declare.
(memcpy) [!HAVE_MEMCPY]: Likewise.
(memmove) [!HAVE_MEMMOVE]: Likewise.
(memcmp) [!HAVE_MEMCMP]: Likewise.
* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
Don't define.
(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
(BCOPY_DOWNWARD_SAFE): Don't define.
* sysdep.c (memset) [!HAVE_MEMSET]: Define.
(memcpy) [!HAVE_MEMCPY]: Define.
(memmove) [!HAVE_MEMMOVE]: Define.
(memcmp) [!HAVE_MEMCMP]: Define.

* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.

* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
(HAVE_BZERO): Don't edit.

* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
(malloc_widget_value, free_widget_info, allocate_widget_instance)
(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
memset, memcpy, memcmp.
* lwlib-utils.c (XtApplyToWidgets): Likewise.
* xlwmenu.c (XlwMenuInitialize): Likewise.
* lwlib.h (lwlib_bcopy): Remove declaration.

* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
memcpy, memmove, memset.
* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.

* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
Remove.

* configure.in: Don't check for bcopy, bcmp, bzero.  Don't include
<strings.h> and don't define bcopy, bzero, BCMP in config.h.
2010-07-08 00:18:28 +02:00
Juanma Barranquero
438105ed4d Fix prototypes.
* dired.c (file_name_completion_stat): Use DIRENTRY, not struct dirent.
* fileio.c (read_non_regular, read_non_regular_quit): Pass Lisp_Object,
  as required by internal_condition_case_1.
* regex.c (bcmp_translate): Use RE_TRANSLATE_TYPE, not Lisp_Object.
  (analyse_first): Fix "const const".
2010-07-04 13:51:28 +02:00
Dan Nicolaescu
971de7fb15 Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* 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/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
2010-07-04 00:50:25 -07:00
Andreas Schwab
639b2760f1 Merge from emacs-23 2010-06-10 00:08:50 +02:00
Juanma Barranquero
409f291913 Remove obsolete macro BASE_LEADING_CODE_P.
* character.h (BASE_LEADING_CODE_P): Remove.
* regex.c [!emacs] (BASE_LEADING_CODE_P): Remove.
* buffer.c (Fset_buffer_multibyte):
* indent.c (scan_for_column, compute_motion):
* insdel.c (count_combining_before, count_combining_after):
  Use LEADING_CODE_P instead of BASE_LEADING_CODE_P.
2010-06-05 02:41:32 +02:00
Juanma Barranquero
aa3830c497 Remove obsolete pre-unicode2 macros.
* character.h (MULTIBYTE_FORM_LENGTH, PARSE_MULTIBYTE_SEQ): Remove.
* composite.c (composition_reseat_it):
* data.c (Faset):
* fns.c (Ffillarray):
* regex.c (re_search_2): Use BYTES_BY_CHAR_HEAD.
  [!emacs] (BYTES_BY_CHAR_HEAD): Define instead of MULTIBYTE_FORM_LENGTH.
2010-06-03 21:02:32 +02:00
Juanma Barranquero
78edd3b72d Fix typos. 2010-06-03 17:34:35 +02:00