1. 06 Jul, 2012 1 commit
  2. 05 Jul, 2012 2 commits
    • Paul Eggert's avatar
      More xmalloc and related cleanup. · 38182d90
      Paul Eggert authored
      * 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.
      38182d90
    • Dmitry Antipov's avatar
      Cleanup xmalloc. · 23f86fce
      Dmitry Antipov authored
      * admin/coccinelle/xzalloc.cocci: Semantic patch to convert
      calls to xmalloc with following memset to xzalloc.
      * src/lisp.h (xzalloc): New prototype.  Omit needless casts.
      * src/alloc.c (xzalloc): New function.  Omit needless casts.
      * src/charset.c: Omit needless casts.  Convert all calls to
      malloc with following memset to xzalloc.
      * src/dispnew.c: Likewise.
      * src/fringe.c: Likewise.
      * src/image.c: Likewise.
      * src/sound.c: Likewise.
      * src/term.c: Likewise.
      * src/w32fns.c: Likewise.
      * src/w32font.c: Likewise.
      * src/w32term.c: Likewise.
      * src/xfaces.c: Likewise.
      * src/xfns.c: Likewise.
      * src/xterm.c: Likewise.
      * src/atimer.c: Omit needless casts.
      * src/buffer.c: Likewise.
      * src/callproc.c: Likewise.
      * src/ccl.c: Likewise.
      * src/coding.c: Likewise.
      * src/composite.c: Likewise.
      * src/doc.c: Likewise.
      * src/doprnt.c: Likewise.
      * src/editfns.c: Likewise.
      * src/emacs.c: Likewise.
      * src/eval.c: Likewise.
      * src/filelock.c: Likewise.
      * src/fns.c: Likewise.
      * src/gtkutil.c: Likewise.
      * src/keyboard.c: Likewise.
      * src/lisp.h: Likewise.
      * src/lread.c: Likewise.
      * src/minibuf.c: Likewise.
      * src/msdos.c: Likewise.
      * src/print.c: Likewise.
      * src/process.c: Likewise.
      * src/region-cache.c: Likewise.
      * src/search.c: Likewise.
      * src/sysdep.c: Likewise.
      * src/termcap.c: Likewise.
      * src/terminal.c: Likewise.
      * src/tparam.c: Likewise.
      * src/w16select.c: Likewise.
      * src/w32.c: Likewise.
      * src/w32reg.c: Likewise.
      * src/w32select.c: Likewise.
      * src/w32uniscribe.c: Likewise.
      * src/widget.c: Likewise.
      * src/xdisp.c: Likewise.
      * src/xmenu.c: Likewise.
      * src/xrdb.c: Likewise.
      * src/xselect.c: Likewise.
      23f86fce
  3. 03 Jul, 2012 1 commit
    • Tom Tromey's avatar
      Auto-generate EXFUN using make-docfile · 404dbd37
      Tom Tromey authored
      src
      	* window.c (Fset_window_margins, Fset_window_fringes)
      	(Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
      	* textprop.c (Fprevious_property_change): No longer static.
      	* syntax.c (Fsyntax_table_p): No longer static.
      	* process.c (Fget_process, Fprocess_datagram_address): No longer
      	static.
      	* keymap.c (Flookup_key, Fcopy_keymap): No longer static.
      	* keyboard.c (Fcommand_execute): No longer static.
      	Remove EXFUN.
      	* insdel.c (Fcombine_after_change_execute): No longer static.
      	* image.c (Finit_image_library): No longer static.
      	* fileio.c (Fmake_symbolic_link): No longer static.
      	* eval.c (Ffetch_bytecode): No longer static.
      	* editfns.c (Fuser_full_name): No longer static.
      	* doc.c: (Fdocumentation_property, Fsnarf_documentation): No
      	longer static.
      	* buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
      	static.
      	* dired.c (Ffile_attributes): No longer static.
      	* composite.c (Fcomposition_get_gstring): No longer static.
      	* callproc.c (Fgetenv_internal): No longer static.
      
      	* ccl.h: Remove EXFUNs.
      	* buffer.h: Remove EXFUNs.
      	* dispextern.h: Remove EXFUNs.
      	* intervals.h: Remove EXFUNs.
      	* fontset.h: Remove EXFUN.
      	* font.h: Remove EXFUNs.
      	* dosfns.c (system_process_attributes): Remove EXFUN.
      	* keymap.h: Remove EXFUNs.
      	* lisp.h: Remove EXFUNs.
      	* w32term.h: Remove EXFUNs.
      	* window.h: Remove EXFUNs.
      	* xsettings.h: Remove EXFUN.
      	* xterm.h: Remove EXFUN.
      
      lib-src
      	* make-docfile.c (enum global_type) <FUNCTION>: New constant.
      	(struct global) <value>: New field.
      	(add_global): Add 'value' argument.
      	(compare_globals): Sort functions at the end.
      	(close_emacs_globals): New function.
      	(write_globals): Handle functions.
      	(scan_c_file): Call add_global for DEFUN.
      404dbd37
  4. 30 Jun, 2012 2 commits
    • Eli Zaretskii's avatar
      Adapt the MS-DOS build to the latest changes. · 0d23c240
      Eli Zaretskii authored
       msdos/mainmake.v2 (bootstrap-clean): Do a maintainer-clean in lib, not
       bootstrap-clean (which doesn't exist).
       msdos/inttypes.h (PRIuMAX) [__DJGPP__ < 2.04]: Define to "llu".
       msdos/sedleim.inp (MKDIR_P): Edit to DOS "md" command.
       msdos/sed1v2.inp: (LIB_CLOCK_GETTIME): Edit to empty.
       Remove lines that invoke PAXCTL.
       (clean): Fix recipe not to run Unixy shell commands.
       msdos/sed2v2.inp (GETTIMEOFDAY_TIMEZONE): Edit to 'struct timezone'.
       (HAVE_STRNCASECMP): Edit to 1.
       msdos/sed3v2.inp (LIB_CLOCK_GETTIME): Edit to empty.
       (C_SWITCH_SYSTEM): Add "-I../msdos".
       msdos/sedlibmk.inp (GNULIB_GETTIMEOFDAY, GNULIB_PSELECT)
       (GNULIB_SELECT, HAVE_STRUCT_TIMEVAL, HAVE_SYS_SELECT_H)
       (HAVE_SYS_TIME_H, NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H)
       (NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H, NEXT_SYS_SELECT_H)
       (NEXT_SYS_TIME_H, REPLACE_GETTIMEOFDAY, REPLACE_PSELECT)
       (REPLACE_STRUCT_TIMEVAL): Edit to appropriate values.
       (BUILT_SOURCES): Edit out sys/select.h and sys/time.h.
       (mostlyclean-local, distclean-generic): Fix recipe not to run
       Unixy shell commands.
      
       src/sysselect.h [DOS_NT]: Don't include sys/select.h.
       src/s/ms-w32.h (select, pselect): Don't define here, they are
       defined in sysselect.h
       src/sysselect.h (pselect) [!HAVE_PSELECT]: Redirect to sys_select.
       src/sysdep.c: Don't include dos.h and dosfns.h.
       src/process.c (sys_select):
       src/msdos.c (sys_select): Accept one more argument and ignore it.
       src/msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
       adapt data types and code to that.
       src/dosfns.c:
       src/msdos.c (gettime, settime): Define away the prototypes in dos.h,
       which clashes with the gnulib function of the same name.
      
       lisp/emacs-lisp/timer.el (timer-until): Subtract results of
       float-time, instead of taking float-time of the result of
       time-subtract, since float-time signals an error for negative time
       arguments.
      0d23c240
    • Andreas Schwab's avatar
      * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first · af5a5a98
      Andreas Schwab authored
      argument.
      * character.c, charset.c, menu.c, process.c, window.c: Adjust all
      uses.
      af5a5a98
  5. 28 Jun, 2012 1 commit
    • Dmitry Antipov's avatar
      Generalize run-time debugging checks. · a54e2c05
      Dmitry Antipov authored
      * configure.in (ENABLE_CHECKING): Update comment.
      * src/dispextern.h (XASSERTS): Remove.
      * src/fontset.c (xassert): Remove.
      Convert from xassert to eassert.
      * src/alloc.c: Convert from xassert to eassert.
      * src/bidi.c: Likewise.
      * src/dispnew.c: Likewise.
      * src/fns.c: Likewise.
      * src/fringe.c: Likewise.
      * src/ftfont.c: Likewise.
      * src/gtkutil.c: Likewise.
      * src/image.c: Likewise.
      * src/keyboard.c: Likewise.
      * src/menu.c: Likewise.
      * src/process.c: Likewise.
      * src/scroll.c: Likewise.
      * src/sound.c: Likewise.
      * src/term.c: Likewise.
      * src/w32console.c: Likewise.
      * src/w32fns.c: Likewise.
      * src/w32term.c: Likewise.
      * src/window.c: Likewise.
      * src/xdisp.c: Likewise.
      * src/xfaces.c: Likewise.
      * src/xfns.c: Likewise.
      * src/xselect.c: Likewise.
      * src/xterm.c: Likewise.
      a54e2c05
  6. 26 Jun, 2012 1 commit
    • Dmitry Antipov's avatar
      * alloc.c (allocate_window): Zero out non-Lisp part of newly · 62efea5e
      Dmitry Antipov authored
      allocated window.
      (allocate_process): Likewise for new process.
      (allocate_terminal): Changed to use offsetof.
      (allocate_frame): Likewise.
      * frame.c (make_frame): Omit redundant initialization.
      * window.c (make_parent_window): Use memset.
      (make_window): Omit redundant initialization.
      * process.c (make_process): Omit redundant initialization.
      * terminal.c (create_terminal): Likewise.
      62efea5e
  7. 24 Jun, 2012 3 commits
  8. 23 Jun, 2012 1 commit
    • Eli Zaretskii's avatar
      Avoid compiler warnings in comparing time_t. · b82c1755
      Eli Zaretskii authored
       src/dispnew.c (sit_for, Fsleep_for):
       src/keyboard.c (kbd_buffer_get_event):
       src/process.c (Faccept_process_output): Avoid compiler warnings when
       comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
      b82c1755
  9. 22 Jun, 2012 1 commit
  10. 18 Jun, 2012 1 commit
  11. 17 Jun, 2012 1 commit
    • Troels Nielsen's avatar
      Ensure correct ordering of process writes. · 20ca2e94
      Troels Nielsen authored
      * process.c (make_process): Initialize write_queue.
      (write_queue_push, write_queue_pop): New functions.
      (send_process): Use them to maintain correct ordering of process writes.
      
      Fixes: debbugs:10815
      20ca2e94
  12. 16 Jun, 2012 1 commit
    • Andreas Schwab's avatar
      * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline. · e5560ff7
      Andreas Schwab authored
      (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.
      e5560ff7
  13. 22 Apr, 2012 1 commit
  14. 20 Apr, 2012 1 commit
    • Chong Yidong's avatar
      Fixes for pty handling in gdb-mi.el and process.c. · f30d612a
      Chong Yidong authored
      * lisp/progmodes/gdb-mi.el (gdb): Revert 2012-04-19 change.
      (gdb-inferior-io--init-proc): New function.
      (gdb-init-1): Use it.
      (gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty,
      responsible for allocating a new pty and hooking it to gdb when
      the old pty gets an EIO due to process exit.
      (gdb-delchar-or-quit): New command.  Bind it in gdb-mi buffers.
      (gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area.
      (gdb-inferior-io--maybe-delete-pty): Move into gdb-reset.
      
      * src/process.c (wait_reading_process_output): If EIO occurs on a pty,
      set the status to "failed" and ensure that sentinel is run.
      
      * doc/lispref/processes.texi (Asynchronous Processes): Mention nil
      argument to start-process.
      f30d612a
  15. 18 Apr, 2012 2 commits
    • Glenn Morris's avatar
      More small doc and lispref edits related to processes · 4373fd43
      Glenn Morris authored
      * doc/lispref/processes.texi (Serial Ports, Byte Packing, Bindat Spec)
      (Bindat Functions): Copyedits.
      
      * src/process.c (Fset_process_inherit_coding_system_flag)
      (Fset_process_query_on_exit_flag): Doc fix (mention return value).
      (Fmake_network_process, Fmake_serial_process): Doc fix.
      
      * admin/FOR-RELEASE: Related markup.
      4373fd43
    • Glenn Morris's avatar
      More process-related doc and manual small edits · 016a35df
      Glenn Morris authored
      * doc/lispref/processes.texi (Output from Processes, Filter Functions):
      Mention waiting-for-user-input-p.
      (Sentinels, Query Before Exit, System Processes, Transaction Queues):
      (Network Servers, Datagrams, Network Processes, Network Options)
      (Network Feature Testing, Serial Ports): Copyedits.
      (Network): Add encrypted network overview paragraph.
      Cross-reference the Emacs-GnuTLS manual.  Use @acronym.
      
      * lisp/net/network-stream.el (open-network-stream): Doc fix.
      
      * src/process.c (Fset_process_inherit_coding_system_flag)
      (Fset_process_query_on_exit_flag): Doc fix (mention return value).
      (Fmake_network_process): Doc fix.
      016a35df
  16. 09 Apr, 2012 3 commits
    • Chong Yidong's avatar
    • Ted Zlatanov's avatar
      Limit number of GnuTLS handshakes per connection. · a18ecafa
      Ted Zlatanov authored
      * gnutls.c (gnutls_log_function2i): Convenience log function.
      (emacs_gnutls_read): Use new log functions,
      `gnutls_handshakes_tried' process member, and
      `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
      attempts per process (connection).
      
      * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.  Add
      convenience `GNUTLS_LOG2i' macro.
      
      * process.c (make_process):
      * process.h: Add integer `gnutls_handshakes_tried' member to
      process struct.
      a18ecafa
    • Paul Eggert's avatar
      configure: new option --enable-gcc-warnings · b8df54ff
      Paul Eggert authored
      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.
      b8df54ff
  17. 23 Mar, 2012 1 commit
  18. 21 Jan, 2012 1 commit
  19. 11 Jan, 2012 1 commit
  20. 05 Jan, 2012 1 commit
  21. 30 Dec, 2011 1 commit
  22. 06 Dec, 2011 1 commit
  23. 28 Nov, 2011 1 commit
  24. 26 Nov, 2011 1 commit
    • Paul Eggert's avatar
      Rename locals to avoid shadowing. · 5b76caa4
      Paul Eggert authored
      * fileio.c (Finsert_file_contents):
      Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
      * process.c (wait_reading_process_output):
      Rename inner 'proc' to 'p' to avoid shadowing.
      Indent for consistency with usual Emacs style.
      5b76caa4
  25. 25 Nov, 2011 1 commit
  26. 21 Nov, 2011 2 commits
  27. 20 Nov, 2011 1 commit
  28. 17 Nov, 2011 1 commit
  29. 15 Nov, 2011 1 commit
  30. 07 Nov, 2011 1 commit
  31. 29 Oct, 2011 1 commit
  32. 27 Oct, 2011 1 commit