1. 01 Jan, 2020 1 commit
  2. 16 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Remove obsolete Lint directives · 2c2f0eb9
      Paul Eggert authored
      Most of the directives were wrong anyway.  Apparently
      traditional lint hasn’t been used to check Emacs for years.
      * src/callint.c (Finteractive):
      * src/cm.c (evalcost):
      * src/emacs.c (main):
      * src/eval.c (call1, call2, call3, call4, call5, call6, call7, call8):
      * src/fns.c (concat2, concat3, nconc2):
      * src/term.c (calculate_ins_del_char_costs):
      Omit ARGSUSED comments.
      * src/eval.c (call1): Omit VARARGS comment.
      2c2f0eb9
  3. 09 Jul, 2019 1 commit
    • Paul Eggert's avatar
      Use fewer locks when accessing stdio · f8ab9083
      Paul Eggert authored
      * src/alloc.c, src/bidi.c, src/emacs-module.c, src/pdumper.c:
      * src/regex-emacs.c, src/unexhp9k800.c, src/unexmacosx.c:
      * src/widget.c, src/xdisp.c, src/xselect.c, src/xterm.c:
      Include sysstdio.h instead of stdio.h, to avoid locking
      stdio streams in many cases.
      * src/alloc.c (test_setjmp):
      * src/bidi.c (bidi_dump_cached_states):
      * src/cm.c (calccost):
      * src/dispnew.c (init_display_interactive):
      * src/emacs.c (main):
      * src/image.c (convert_mono_to_color_image):
      * src/minibuf.c (read_minibuf_noninteractive):
      * src/nsfont.m (ns_descriptor_to_entity)
      (ns_dump_glyphstring):
      * src/nsterm.h (NSTRACE_MSG_NO_DASHES):
      * src/nsterm.m (ns_mouse_position)
      (sendEvent:, keyDown:, performDragOperation:):
      * src/pdumper.c (dump_fingerprint, print_paths_to_root_1):
      * src/print.c (debug_print):
      * src/regex-emacs.c (debug_putchar, print_fastmap)
      (print_partial_compiled_pattern, print_compiled_pattern)
      (print_double_string, regex_compile):
      * src/term.c (vfatal):
      * src/unexhp9k800.c (read_header):
      * src/unexmacosx.c (unexec_error):
      * src/widget.c (EmacsFrameInitialize):
      * src/xdisp.c (message_to_stderr, vmessage, dump_glyph_row)
      (Fdump_glyph_matrix, Fdump_frame_glyph_matrix, dump_glyph_string):
      * src/xfaces.c (Fdump_colors, Fdump_face):
      * src/xselect.c (x_clipboard_manager_error_2):
      * src/xterm.c (x_initialize):
      * src/xwidget.c (WEBKIT_FN_INIT):
      Prefer unlocked calls like fputs to locked calls like fprintf.
      * src/charset.c (read_hex):
      * src/cm.c (cmputc, cmcheckmagic):
      * src/dispnew.c (update_frame, update_frame_with_menu)
      (update_frame_1, Fsend_string_to_terminal, Fding)
      (bitch_at_user):
      * src/emacs.c (main, Fdump_emacs):
      * src/emacs-module.c (module_abort):
      * src/fileio.c (Fdo_auto_save):
      * src/image.c (slurp_file)
      (png_read_from_file, png_load_body, our_stdio_fill_input_buffer):
      * src/keyboard.c (record_char, kbd_buffer_get_event)
      (handle_interrupt):
      * src/lread.c (readbyte_from_stdio, read1):
      * src/minibuf.c (read_minibuf_noninteractive):
      * src/print.c (printchar_to_stream, strout)
      (Fredirect_debugging_output):
      * src/sysdep.c (reset_sys_modes, close_output_streams)
      (procfs_ttyname, procfs_get_total_memory):
      * src/term.c (tty_ring_bell, tty_send_additional_strings)
      (tty_set_terminal_modes, tty_reset_terminal_modes)
      (tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
      (tty_write_glyphs_with_face, tty_insert_glyphs)
      (tty_menu_activate):
      * src/xfaces.c (Fx_load_color_file):
      Simplify by using ordinary calls like putc to explicitly-unlocked
      calls like putc_unlocked, since the ordinary calls are now
      unlocked anyway.
      * src/emacs.c (main, Fdump_emacs):
      * src/pdumper.c (Fdump_emacs_portable):
      Coalesce adjacent printfs.
      * src/nsterm.h: Include sysstdio.h as this file’s macros rely on it.
      * src/regex-emacs.c (print_compiled_pattern):
      Omit redundant fflush.
      * src/sysstdio.h: Include unlocked-io.h.
      (clearerr_unlocked, feof_unlocked, ferror_unlocked)
      (fflush_unlocked, fgets_unlocked, fputc_unlocked)
      (fputs_unlocked, fread_unlocked, fwrite_unlocked)
      (getc_unlocked, getchar_unlocked, putc_unlocked)
      (putchar_unlocked): Remove these macros; now done by unlocked-io.h.
      * src/xwidget.c: Include sysstdio.h.
      f8ab9083
  4. 01 Jan, 2019 1 commit
  5. 01 Jan, 2018 1 commit
  6. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  7. 22 Jun, 2017 1 commit
    • Paul Eggert's avatar
      Use unlocked stdio more systematically · f6ef15cf
      Paul Eggert authored
      This can improve performance significantly on stdio-bottlenecked code.
      E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop.
      * admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io.
      * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c:
      * lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c:
      * lib-src/profile.c, lib-src/update-game-score.c:
      Include unlocked-io.h instead of stdio.h, since these programs are
      single-threaded.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib.
      * src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c:
      * src/lread.c, src/term.c:
      Include sysstdio.h, possibly instead of stdio.h, to define
      the unlocked functions if the system does not provide them.
      * src/charset.c, src/lread.c (getc_unlocked):
      Remove, since sysstdio.h now defines it if needed.
      * src/cm.c (cmputc, cmcheckmagic):
      * src/dispnew.c (update_frame, update_frame_with_menu)
      (update_frame_1, Fsend_string_to_terminal, Fding, bitch_at_user):
      * src/emacs.c (main, Fdump_emacs):
      * src/fileio.c (Fdo_auto_save, Fset_binary_mode):
      * src/image.c (slurp_file, png_read_from_file, png_load_body)
      (our_stdio_fill_input_buffer):
      * src/keyboard.c (record_char, kbd_buffer_get_event, handle_interrupt):
      * src/lread.c (readbyte_from_file):
      * src/minibuf.c (read_minibuf_noninteractive):
      * src/print.c (printchar_to_stream, strout)
      (Fredirect_debugging_output):
      * src/sysdep.c (reset_sys_modes, procfs_ttyname)
      (procfs_get_total_memory):
      * src/term.c (tty_ring_bell, tty_send_additional_strings)
      (tty_set_terminal_modes, tty_reset_terminal_modes)
      (tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
      (tty_write_glyphs_with_face, tty_insert_glyphs)
      (tty_menu_activate):
      * src/xfaces.c (Fx_load_color_file):
      Use unlocked stdio when it should be safe.
      * src/sysstdio.h (clearerr_unlocked, feof_unlocked, ferror_unlocked)
      (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
      (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
      (putc_unlocked, putchar_unloced): Provide substitutes if not declared.
      f6ef15cf
  8. 01 Jan, 2017 1 commit
  9. 08 Jun, 2016 1 commit
  10. 10 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      Work around Bug#22884 by rewording comments and strings to avoid ‘(’
      at the start of a line unless it starts a function.  This change
      is a short-term hack; in the longer run we plan to fix cc-mode’s
      performance for C files that have ‘(’ at the start of a line in a
      comment or string.
      7352c6c6
  11. 01 Jan, 2016 1 commit
  12. 21 Oct, 2015 1 commit
    • Paul Eggert's avatar
      Include-file cleanup for src directory · 63cfb75f
      Paul Eggert authored
      Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707).
      In a few cases, add ‘#include "foo.h"’ if the file needs foo.h
      but does not include it directly.  As a general rule, a source
      file should include foo.h if it needs the interfaces that foo.h
      defines.
      * src/alloc.c: Don’t include process.h.  Include dispextern.h,
      systime.h.
      * src/atimer.c: Don’t include blockinput.h.
      * src/buffer.c: Include coding.h, systime.h.  Don’t include
      keyboard.h, coding.h.
      * src/callint.c: Don’t include commands.h, keymap.h.
      * src/callproc.c: Don’t include character.h, ccl.h, composite.h,
      systty.h, termhooks.h.
      * src/casetab.c: Don’t include character.h.
      * src/category.c: Don’t include charset.h, keymap.h.
      * src/ccl.h: Don’t include character.h.
      * src/character.c: Don’t include charset.h.
      * src/charset.c: Don’t include disptab.h.
      * src/chartab.c: Don’t include ccl.h.
      * src/cm.c: Don’t include frame.h, termhooks.h.
      * src/cmds.c: Don’t include window.h, dispextern.h.
      * src/coding.c: Don’t include window.h, frame.h.
      * src/composite.c: Include composite.h.  Don’t include window.h,
      font.h.
      * src/data.c: Don’t include syssignal.h, termhooks.h, font.h.
      * src/dbusbind.c: Don’t include frame.h.
      * src/decompress.c: Don’t include character.h.
      * src/dired.c: Don’t include character.h, commands.h, charset.h.
      * src/dispnew.c: Don’t include character.h, indent.h, intervals.h,
      process.h, timespec.h.  Include systime.h.
      * src/doc.c: Include coding.h.  Don’t include keyboard.h.
      * src/editfns.c: Include composite.h.  Don’t include frame.h.
      * src/emacs.c: Include fcntl.h, coding.h.  Don’t include
      commands.h, systty.h..
      * src/fileio.c: Don’t include intervals.h, dispextern.h.
      Include composite.h.
      * src/filelock.c: Don’t include character.h, systime.h.
      * src/fns.c: Don’t include time.h, commands.h, keyboard.h,
      keymap.h, frame.h, blockinput.h, xterm.h.  Include composite.h.
      * src/font.c: Include termhooks.h.
      * src/font.h: Don’t include ccl.h, frame.h.  Add forward decls of
      struct composition_it, struct face, struct glyph_string.
      * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h,
      intervals.h, window.h, termhooks.h.
      * src/frame.c: Don’t include character.h, commands.h, font.h.
      * src/frame.h: Don’t include dispextern.h.
      * src/fringe.c: Don’t include character.h.
      * src/ftcrfont.c: Don’t include dispextern.h, frame.h,
      character.h, charset.h, fontset.h.
      * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h,
      fontset.h.
      * src/ftxfont.c: Don’t include dispextern.h, character.h,
      charset.h, fontset.h.
      * src/gfilenotify.c: Don’t include frame.h, process.h.
      * src/gtkutil.c: Include dispextern.h, frame.h, systime.h.
      Don’t include syssignal.h, buffer.h, charset.h, font.h.
      * src/gtkutil.h: Don’t include frame.h.
      * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h.
      Don’t include character.h.
      * src/indent.c: Don’t include keyboard.h, termchar.h.
      * src/inotify.c: Don’t include character.h, frame.h.
      * src/insdel.c: Include composite.h.  Don’t include blockinput.h.
      * src/intervals.c: Don’t include character.h, keyboard.h.
      * src/intervals.h: Don’t include dispextern.h, composite.h.
      * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h.
      Include coding.h.
      * src/keyboard.h: Don’t incldue systime.h.
      * src/keymap.c: Don’t include charset.h, frame.h.
      * src/lread.c: Include dispextern.h and systime.h.
      Don’t include frame.h.  Include systime.h.
      * src/macros.c: Don’t include commands.h, character.h, buffer.h.
      * src/menu.c: Include character.h, coding.h.  Don’t include
      dispextern.h.
      * src/menu.h: Don’t include systime.h.
      * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h,
      intervals.h, termhooks.h.
      * src/print.c: Include coding.h.  Don’t include keyboard.h,
      window.h, dispextern.h, termchar.h, termhooks.h, font.h.
      Add forward decl of struct terminal.
      * src/process.c: Don’t include termhooks.h, commands.h,
      dispextern.h, composite.h.
      * src/region-cache.c: Don’t include character.h.
      * src/scroll.c: Don’t include keyboard.h, window.h.
      * src/search.c: Don’t include category.h, commands.h.
      * src/sound.c: Don’t include dispextern.h.
      * src/syntax.c: Don’t include command.h, keymap.h.
      * src/sysdep.c: Don’t include window.h, dispextern.h.
      * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’,
      * src/term.c: Don’t include systty.h, intervals.h, xterm.h.
      * src/terminal.c: Include character.h.
      Don’t include charset.h, coding.h.
      * src/textprop.c: Don’t include character.h.
      * src/undo.c: Don’t include character.h, commands.h, window.h.
      * src/unexsol.c: Don’t include character.h, charset.h.
      * src/widget.c: Include widget.h.  Don’t include keyboard.h,
      window.h, dispextern.h, blockinput.h, character.h, font.h.
      * src/widgetprv.h: Don’t include widget.h.
      * src/window.c: Don’t include character.h, menu.h, intervals.h.
      * src/xdisp.c: Include composite.h, systime.h.  Don’t include
      macros.h, process.h.
      * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h,
      intervals.h.
      * src/xfns.c: Don’t include menu.h, character.h, intervals.h,
      epaths.h, fontset.h, systime.h, atimer.h, termchar.h.
      * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h.
      * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h.
      * src/xgselect.c: Don’t include timespec.h, frame.h.
      Include systime.h.
      * src/xgselect.h: Don’t include time.h.
      Use a forward decl to struct timespec instead.
      * src/xmenu.c: Don’t include keymap.h, character.h, charset.h,
      dispextern.h.  Include systime.h.
      * src/xml.c: Don’t include character.h.
      * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h.
      * src/xselect.c: Don’t include dispextern.h, character.h,
      buffer.h, process.h.
      * src/xsmfns.c: Don’t include systime.h, sysselect.h.
      * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h,
      intervals.h process.h, keymap.h, xgselect.h.  Include composite.h.
      63cfb75f
  13. 01 Jan, 2015 2 commits
  14. 01 Jan, 2014 1 commit
  15. 24 Mar, 2013 1 commit
    • Andreas Schwab's avatar
      Reorder conditions that are written backwards · 908589fd
      Andreas Schwab authored
      * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
      written backwards.
      * blockinput.h (input_blocked_p): Likewise.
      * bytecode.c (exec_byte_code): Likewise.
      * callproc.c (call_process_kill, call_process_cleanup)
      (Fcall_process): Likewise.
      * ccl.c (ccl_driver, resolve_symbol_ccl_program)
      (Fccl_execute_on_string): Likewise.
      * character.c (string_escape_byte8): Likewise.
      * charset.c (read_hex): Likewise.
      * cm.c (calccost): Likewise.
      * data.c (cons_to_unsigned): Likewise.
      * dired.c (directory_files_internal, file_name_completion):
      Likewise.
      * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
      (sit_for): Likewise.
      * doc.c (Fsubstitute_command_keys): Likewise.
      * doprnt.c (doprnt): Likewise.
      * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
      * emacsgtkfixed.c: Likewise.
      * fileio.c (file_offset, Fwrite_region): Likewise.
      * floatfns.c (Fexpt, fmod_float): Likewise.
      * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
      Likewise.
      * font.c (font_intern_prop): Likewise.
      * frame.c (x_set_alpha): Likewise.
      * gtkutil.c (get_utf8_string): Likewise.
      * indent.c (check_display_width): Likewise.
      * intervals.c (create_root_interval, rotate_right, rotate_left)
      (split_interval_right, split_interval_left)
      (adjust_intervals_for_insertion, delete_node)
      (interval_deletion_adjustment, adjust_intervals_for_deletion)
      (merge_interval_right, merge_interval_left, copy_intervals)
      (set_intervals_multibyte_1): Likewise.
      * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
      * keymap.c (Fkey_description): Likewise.
      * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
      * lread.c (openp, read_integer, read1, string_to_number):
      Likewise.
      * menu.c (ensure_menu_items): Likewise.
      * minibuf.c (read_minibuf_noninteractive): Likewise.
      * print.c (printchar, strout): Likewise.
      * process.c (create_process, Faccept_process_output)
      (wait_reading_process_output, read_process_output, send_process)
      (wait_reading_process_output): Likewise.
      * profiler.c (make_log, handle_profiler_signal): Likewise.
      * regex.c (re_exec): Likewise.
      * regex.h: Likewise.
      * search.c (looking_at_1, Freplace_match): Likewise.
      * sysdep.c (get_child_status, procfs_ttyname)
      (procfs_get_total_memory): Likewise.
      * systime.h (EMACS_TIME_VALID_P): Likewise.
      * term.c (dissociate_if_controlling_tty): Likewise.
      * window.c (get_phys_cursor_glyph): Likewise.
      * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
      Likewise.
      * xfns.c (Fx_window_property): Likewise.
      * xmenu.c (set_frame_menubar): Likewise.
      * xselect.c (x_get_window_property, x_handle_dnd_message):
      Likewise.
      * xsmfns.c (smc_save_yourself_CB): Likewise.
      * xterm.c (x_scroll_bar_set_handle): Likewise.
      908589fd
  16. 11 Feb, 2013 1 commit
  17. 01 Jan, 2013 1 commit
  18. 15 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Port better to POSIX hosts lacking _setjmp. · 0328b6de
      Paul Eggert authored
      * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
      (_setjmp, _longjmp): Remove.
      * src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
      All instances of '#include <setjmp.h>' removed, if the
      only reason for the instance was because "lisp.h" was included.
      (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
      Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
      and _longjmp with the new symbols.  Emacs already uses _setjmp if
      available, so this change affects only POSIXish hosts that have
      sigsetjmp but not _setjmp, such as some versions of Solaris and
      Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
      * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
      (png_load_body) [HAVE_PNG]:
      (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
      (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
      Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
      since PNG requires jmp_buf.  This is the only exception to the
      general rule that we now use sys_setjmp and sys_longjmp.
      This exception is OK since this code does not change the signal
      mask or longjmp out of a signal handler.
      
      Fixes: debbugs:12446
      0328b6de
  19. 04 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Simplify redefinition of 'abort' (Bug#12316). · 1088b922
      Paul Eggert authored
      Do not try to redefine the 'abort' function.  Instead, redo
      the code so that it calls 'emacs_abort' rather than 'abort'.
      This removes the need for the NO_ABORT configure-time macro
      and makes it easier to change the abort code to do a backtrace.
      * configure.ac (NO_ABRT): Remove.
      * admin/CPP-DEFINES (NO_ABORT): Remove.
      * nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
      * src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
      * src/emacs.c (abort) [!DOS_NT && !NO_ABORT]:
      Remove; sysdep.c's emacs_abort now takes its place.
      * src/lisp.h (emacs_abort): New decl.  All calls from Emacs code to
      'abort' changed to use 'emacs_abort'.
      * src/msdos.c (dos_abort) [defined abort]: Remove; not used.
      (abort) [!defined abort]: Rename to ...
      (emacs_abort): ... new name.
      * src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
      the place of the old 'abort' in emacs.c.
      * src/w32.c, src/w32fns.c (abort): Do not #undef.
      * src/w32.c (emacs_abort): Rename from w32_abort.
      1088b922
  20. 11 Jan, 2012 1 commit
  21. 05 Jan, 2012 1 commit
  22. 10 Jul, 2011 1 commit
    • Andreas Schwab's avatar
      Protoize · 268c2c36
      Andreas Schwab authored
      * src/alloc.c (reset_malloc_hooks): Protoize.
      * src/cm.c (losecursor): Likewise.
      * src/ralloc.c (r_alloc_check): Likewise.
      268c2c36
  23. 23 Mar, 2011 1 commit
  24. 19 Mar, 2011 1 commit
    • Paul Eggert's avatar
      Make tparam.h and terminfo.c consistent. · af8a867c
      Paul Eggert authored
      * 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.
      af8a867c
  25. 09 Mar, 2011 1 commit
    • Paul Eggert's avatar
      * cm.c (calccost, cmgoto): Use const pointers where appropriate. · fbceeba2
      Paul Eggert authored
      * cm.h (struct cm): Likewise.
      * dispextern.h (do_line_insertion_deletion_costs): Likewise.
      * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
      * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
      (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
      (turn_on_face, init_tty): Likewise.
      * termchar.h (struct tty_display_info): Likewise.
      * term.c (tgetflag, tgetnum, tgetstr): Redefine to use const pointers.
      fbceeba2
  26. 08 Mar, 2011 1 commit
  27. 25 Jan, 2011 1 commit
  28. 15 Jan, 2011 1 commit
  29. 02 Jan, 2011 1 commit
  30. 07 Jul, 2010 1 commit
    • Andreas Schwab's avatar
      Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp · 72af86bd
      Andreas Schwab authored
      * 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.
      72af86bd
  31. 05 Jul, 2010 1 commit
  32. 03 Jul, 2010 1 commit
    • Juanma Barranquero's avatar
      Fix prototypes. · 3a35a84c
      Juanma Barranquero authored
      * src/cm.c (evalcost): Fix arg type.
      * src/cm.h (evalcost): Fix prototype.
      * src/lisp.h (memory_warnings): Fix prototype.
      
      * lib-src/ebrowse.c (match_qualified_namespace_alias):
        Pass sym* to find_namespace, not link*.
      * lib-src/emacsclient.c (send_to_emacs, quote_argument): Arg s is HSOCKET.
      * lib-src/sorted-doc.c (qsort_compare): New typedef.
        (main): Use it to cast cmpdoc.
      3a35a84c
  33. 02 Jul, 2010 1 commit
    • Jan D's avatar
      Remove __P and P_ from .c and .m files and definition of P_ · f57e2426
      Jan D authored
      * lisp.h:
      * atimer.h: Remove define for P_.
      
      * alloc.c: Remove __P and P_ from .c and .m files.
      * atimer.c:
      * buffer.c:
      * callint.c:
      * category.c:
      * charset.c:
      * chartab.c:
      * cm.c:
      * coding.c:
      * composite.c:
      * data.c:
      * dired.c:
      * dispnew.c:
      * doc.c:
      * editfns.c:
      * emacs.c:
      * eval.c:
      * fileio.c:
      * filelock.c:
      * fns.c:
      * font.c:
      * fontset.c:
      * frame.c:
      * ftfont.c:
      * ftxfont.c:
      * gmalloc.c:
      * gtkutil.c:
      * image.c:
      * indent.c:
      * intervals.c:
      * keyboard.c:
      * keymap.c:
      * lread.c:
      * marker.c:
      * menu.c:
      * minibuf.c:
      * print.c:
      * process.c:
      * scroll.c:
      * search.c:
      * sound.c:
      * strftime.c:
      * syntax.c:
      * sysdep.c:
      * term.c:
      * terminal.c:
      * textprop.c:
      * unexalpha.c:
      * w32console.c:
      * w32fns.c:
      * w32font.c:
      * w32menu.c:
      * w32term.c:
      * w32uniscribe.c:
      * window.c:
      * xdisp.c:
      * xfaces.c:
      * xfns.c:
      * xfont.c:
      * xftfont.c:
      * xmenu.c:
      * xselect.c:
      * xterm.c: Likewise.
      
      * ebrowse.c: Remove P_ and __P.
      * etags.c:
      * movemail.c:
      * pop.c:
      * update-game-score.c: Likewise.
      f57e2426
  34. 12 Mar, 2010 1 commit
    • Eli Zaretskii's avatar
      Don't use termcap.c on Posix platforms, only on MS-DOS. · 6da23aaa
      Eli Zaretskii authored
       configure.in <AC_CHECK_HEADERS>: Remove termcap.h.
       configure: Regenerated.
       src/Makefilie.in (termcapobj): Move termcap.o from here...
       (MSDOS_OBJ): ...to here.
       (termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is
       now identical to when LIBS_TERMCAP is defined.
       src/term.c: Remove (ifdef'ed away) inclusion of termcap.h.
       src/cm.c: Remove (ifdef'ed away) inclusion of termcap.h.
       src/config.in: Regenerated.
      6da23aaa
  35. 13 Jan, 2010 1 commit
  36. 19 Oct, 2009 1 commit
    • Dan Nicolaescu's avatar
      * alloc.c: Do not define struct catchtag. · d7306fe6
      Dan Nicolaescu authored
      * eval.c: Move struct catchtag definition ...
      * lisp.h: ... here.
      
      * image.c: Move png.h #include earlier to avoid warnings.
      
      * xterm.c:
      * xsmfns.c:
      * xselect.c:
      * xrdb.c:
      * xmenu.c:
      * xftfont.c:
      * xfont.c:
      * xfns.c:
      * xfaces.c:
      * xdisp.c:
      * window.c:
      * widget.c:
      * w32xfns.c:
      * w32uniscribe.c:
      * w32term.c:
      * w32select.c:
      * w32reg.c:
      * w32proc.c:
      * w32menu.c:
      * w32inevt.c:
      * w32heap.c:
      * w32font.c:
      * w32fns.c:
      * w32console.c:
      * w32.c:
      * w16select.c:
      * vm-limit.c:
      * unexsol.c:
      * unexec.c:
      * unexcw.c:
      * unexaix.c:
      * undo.c:
      * tparam.c:
      * textprop.c:
      * terminfo.c:
      * terminal.c:
      * termcap.c:
      * term.c:
      * syntax.c:
      * sound.c:
      * sheap.c:
      * search.c:
      * scroll.c:
      * region-cache.c:
      * regex.c:
      * ralloc.c:
      * process.c:
      * print.c:
      * msdos.c:
      * minibuf.c:
      * menu.c:
      * marker.c:
      * macros.c:
      * keymap.c:
      * keyboard.c:
      * intervals.c:
      * insdel.c:
      * indent.c:
      * gtkutil.c:
      * ftxfont.c:
      * ftfont.c:
      * fringe.c:
      * frame.c:
      * fontset.c:
      * font.c:
      * fns.c:
      * floatfns.c:
      * filelock.c:
      * fileio.c:
      * emacs.c:
      * editfns.c:
      * dosfns.c:
      * doprnt.c:
      * doc.c:
      * dispnew.c:
      * dired.c:
      * dbusbind.c:
      * data.c:
      * composite.c:
      * coding.c:
      * cmds.c:
      * cm.c:
      * chartab.c:
      * charset.c:
      * character.c:
      * ccl.c:
      * category.c:
      * casetab.c:
      * casefiddle.c:
      * callproc.c:
      * callint.c:
      * bytecode.c:
      * buffer.c:
      * atimer.c: Include setjmp.h.  (Bug#4643)
      
      * xlwmenu.c:
      * lwlib.c:
      * lwlib-utils.c:
      * lwlib-Xm.c:
      * lwlib-Xlw.c:
      * lwlib-Xaw.c: Include setjmp.h.
      d7306fe6
  37. 08 Jan, 2009 1 commit
  38. 14 May, 2008 1 commit
  39. 08 Jan, 2008 1 commit