Commit graph

1208 commits

Author SHA1 Message Date
Lars Ingebrigtsen
c1b235ab6b Compilation for for systems with getaddrinfo_a
* process.c (Fmake_network_process): Make stuff work again on
systems with getaddrinfo_a.
2016-01-30 04:43:10 +01:00
Lars Ingebrigtsen
e5b2f25f35 Save correct server data
* process.c (connect_network_socket): Save the correct contact
info for servers.
2016-01-30 04:34:48 +01:00
Lars Ingebrigtsen
e99dc4a749 Compilation for for non-GNU systems
* process.c (Fmake_network_process): Make compilation work
again on hosts that don't have getaddrinfo_a.
2016-01-30 03:57:54 +01:00
Lars Ingebrigtsen
233e89cf23 Avoid memory leaks in async DNS
* process.c (check_for_dns): Free async DNS resources after
they've been used.
2016-01-30 03:51:04 +01:00
Lars Ingebrigtsen
0677d94e2d * process.c (check_for_dns): Free the result data. 2016-01-30 02:39:52 +01:00
Lars Ingebrigtsen
e9eb6107db Fix server connections
* process.c (Fmake_network_process): Make creating server
listening ports work again.
2016-01-30 02:25:08 +01:00
Lars Ingebrigtsen
860303cc4d Further make_network_process clean up
* process.c (Fmake_network_process): Remove setting of unused
family variable.
2016-01-30 01:33:30 +01:00
Lars Ingebrigtsen
4876011820 Clean up GETADDRINFO usage in make-network-process
* process.c (Fmake_network_process): Clean up the GETADDRINFO
handling.
2016-01-30 01:28:34 +01:00
Lars Ingebrigtsen
fdfb68690f Implement asynchronous name resolution
* process.c (Fmake_network_process): Do asynchronous DNS
lookups if we have getaddrinfo_a and the user requests :nowait.
(check_for_dns): New function.
(wait_reading_process_output): Check for pending name
resolution in the idle loop.

* process.h: Add structure for async DNS.
2016-01-30 00:49:18 +01:00
Lars Ingebrigtsen
44e235dd88 Fix memory leak
* process.c (connect_network_socket): Free previous sockaddr
before allocating a new one.
2016-01-29 00:36:11 +01:00
Lars Ingebrigtsen
7c6a60fa2c Return IP addresses in the correct order
* src/process.c (Fmake_network_process): Return the IP addresses
in the same order as getaddrinfo does.
(set_network_socket_coding_system): Clean up the code slightly.
2016-01-29 00:25:07 +01:00
Lars Ingebrigtsen
e09c0972c3 Refactor make_network_process
* src/process.c (set_network_socket_coding_system)
(connect_network_socket): Refactor out of
make_network_process to allow calling connect_network_socket
asynchronously.
(Fmake_network_process): Do nothing but parsing the parameters
and name resolution, leaving the connection to
connect_network_socket.
2016-01-28 23:50:47 +01:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Artur Malabarba
64c2bfbc4f * src/process.c (Fget_buffer_process): Improve docstring
Document the fact that it doesn't return dead processes.
2015-10-28 11:07:41 +00:00
Paul Eggert
63cfb75f3a Include-file cleanup for src directory
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.
2015-10-20 18:35:53 -07:00
Tassilo Horn
de7fc458e9 Revert my two recent process.c changes
Revert "Improve last commit to process.c" and "Remove callback-handled
channels from Available set" because they did not fix bug#21313.

This reverts commits bfa1aa8e2b and
27f871907c..
2015-10-03 06:02:11 +02:00
Tassilo Horn
bfa1aa8e2b Improve last commit to process.c 2015-09-22 10:20:17 +02:00
Tassilo Horn
27f871907c Remove callback-handled channels from Available set
* src/process.c (wait_reading_process_output): Remove channel from
Available set if it is handled by a callback, e.g., dbus or
inotify (bug#21313).
2015-09-22 07:43:39 +02:00
Paul Eggert
032ce1c7d1 Omit unnecessary \ before paren in C docstrings
Although \( is needed in docstrings in Elisp code, it is not needed in
docstrings in C code, since C function definitiions do not start with
a parenthesis.  The backslashes made the docstrings a bit harder to
read and to format in columns.  Also, some C docstrings had ( in
column 1 and this did not appear to be causing any problems.  So,
simplify C docstrings by replacing \( with ( and \) with ).
2015-09-16 16:26:07 -07:00
Paul Eggert
a1cd8c96ca Prefer NUMBERP to spelling it out
* src/editfns.c (styled_format):
* src/frame.h (NUMVAL):
* src/image.c (parse_image_spec):
* src/lisp.h (CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER):
* src/process.c (Fsignal_process):
* src/xdisp.c (calc_pixel_width_or_height, on_hot_spot_p):
* src/xfaces.c (check_lface_attrs):
* src/xselect.c (x_fill_property_data, x_send_client_event):
Use NUMBERP rather than INTEGERP || FLOATP.
2015-09-10 09:53:51 -07:00
Stefan Monnier
645c8597e7 * src/process.c (status_notify): Avoid global redisplay (bug#11822)
* src/process.c (status_notify): Only set the update_mode_line on the
relevant buffers rather than setting it globally.
2015-09-08 09:06:49 -04:00
Robert Pluim
ac9da24198 Avoid read error messages from 'inotify'
* src/process.c (wait_reading_process_output): Add a
'tls_available' set and manipulate it instead of 'Available' when
checking TLS inputs.  Assign the value to 'Available' only if we
find any TLS data waiting to be read.  This avoids error messages
from 'inotify' that tries to read data it shouldn't.  (Bug#21337)
2015-09-05 11:37:29 +03:00
Paul Eggert
a3c31adea4 Docstring fixes re quotes in C code
Fix some docstring quoting problems, mostly by escaping apostrophe.
2015-09-01 06:23:21 -07:00
Paul Eggert
60d1b18734 Assume GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS
This removes the need for GCPRO1 etc.  Suggested by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00918.html
* doc/lispref/internals.texi (Writing Emacs Primitives):
* etc/NEWS:
Document the change.
* src/alloc.c (gcprolist, dump_zombies, MAX_ZOMBIES, zombies)
(nzombies, ngcs, avg_zombies, max_live, max_zombies, avg_live)
(Fgc_status, check_gcpros, relocatable_string_data_p, gc-precise):
* src/bytecode.c (mark_byte_stack) [BYTE_MARK_STACK]:
* src/eval.c (gcpro_level) [DEBUG_GCPRO]:
* src/lisp.h (struct handler.gcpro, struct gcpro, GC_MARK_STACK)
(GC_USE_GCPROS_AS_BEFORE, GC_MAKE_GCPROS_NOOPS)
(GC_MARK_STACK_CHECK_GCPROS, GC_USE_GCPROS_CHECK_ZOMBIES)
(BYTE_MARK_STACK, GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6)
(GCPRO7, UNGCPRO, RETURN_UNGCPRO):
Remove.  All uses removed.  The code now assumes
GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS.
* src/bytecode.c (relocate_byte_stack):
Rename from unmark_byte_stack, since it now only relocates.
All callers changed.
* src/frame.c (make_frame): Add an IF_LINT to pacify GCC 5.2
with GCPROs removed.
* src/systime.h: Use EMACS_LISP_H as the canary instead of GCPRO1.
* test/automated/finalizer-tests.el (finalizer-basic)
(finalizer-circular-reference, finalizer-cross-reference)
(finalizer-error):
* test/automated/generator-tests.el (cps-test-iter-close-finalizer):
Remove tests, as they depend on gc-precise.
2015-08-26 19:24:58 -07:00
Paul Eggert
ad23626030 Avoid duplicate calls to current_timespec
* src/process.c (wait_reading_process_output):
Cache current_timespec results as long as we're not waiting.
2015-07-05 19:21:50 -07:00
Ian Kelling
f469c17b9c Avoid returning early reading process output due to SIGIO
* src/process.c (wait_reading_process_output): Extend the behavior of
not breaking due to not finding output when a timer has lowered the
timeout to include when SIGIO lowers the timeout.
2015-07-05 19:21:49 -07:00
Ian Kelling
12a2691fb2 Don't return as fast reading any process output
* src/process.c (wait_reading_process_output):
The patch for Bug#17647 returns too fast sometimes when reading
from any processes. Revert part of it, and limit the timeout more
sensibly (Bug#20978).
2015-07-05 19:21:49 -07:00
Ian Kelling
6e2fcc213d Refactor timeouts in wait_reading_process_output
* src/process.c (wait_reading_process_output):
Simplify timeouts with an enum.  Remove a redundant condition.
(Bug#20978)
2015-07-05 19:21:49 -07:00
Ian Kelling
91cbc7b729 ; Rename local var nsecs to adaptive_nsecs
* src/process.c (wait_reading_process_output): Rename inner nsecs to
adaptive_nsecs.  There is already an nsecs, and this function is
confusing enough (Bug#20978).
2015-07-05 19:21:49 -07:00
Ian Kelling
082eda1cbe ; Rename local var to match function name
* src/process.c (wait_reading_process_output, status_notify):
Previously the function wait_reading_process_input was renamed to the
more logical wait_reading_process_output.  Make its local variables
consistent with that change (Bug#20978).
2015-07-05 19:21:49 -07:00
Ian Kelling
5dc66dbc15 Remove ADAPTIVE_READ_BUFFERING ifdef
* src/process.c (make-process, make-pipe-process, deactivate_process)
(wait_reading_process_output, read_process_output, send_process)
(init_process_emacs): ifdef ADAPTIVE_READ_BUFFERING was originally
added in case there was an operating system in which it was not
useful.  That was 11 years ago and it hasn't happened.  Make
development easier by not considering the effect of changes on a
theoretical OS where this is disabled (Bug#20978).
2015-07-05 19:21:48 -07:00
Ian Kelling
08150826ae ; Minor cleanup of wait_reading_process_output
* src/process.c (wait_reading_process_output):
Simplify logic.  Fix DOS version comments (Bug#20978).
2015-07-05 19:21:48 -07:00
Ian Kelling
cbeeab2eab accept-process-output fix
This is a followon to the fix for Bug#17647 (Bug#20976).
* src/process.c (status_notify): Fix too high return in some cases.
2015-07-05 15:15:01 -07:00
Paul Eggert
00119c6cb6 Port to Solaris 10 sparc + Sun C 5.13
* configure.ac (SETUP_SLAVE_PTY) [sol2* | unixware]:
Adjust to process.c change.
* src/process.c (create_process): Declare volatile variables at
top level of this function, so that they're less likely to be
reused later in the function in the code executed by the vforked
child.  Do not declare locals used only in the vforked child, as
they might share memory with locals still live in the parent.
Instead, use the same variables in the child as in the parent.
This works around a subtle bug that causes a garbage collector
crash when Emacs is built with Sun C 5.13 sparc on Solaris 10.
2015-06-11 22:50:30 -07:00
Paul Eggert
32e53667a9 Fix "not a tty" bug on Solaris 10
* configure.ac (PTY_OPEN): Define to plain 'open'
on SVR4-derived hosts, so that the O_CLOEXEC flag isn't set.
* src/process.c (allocate_pty): Set the O_CLOEXEC flag after
calling PTY_TTY_NAME_SPRINTF, for the benefit of SVR4-derived
hosts that call grantpt which does its work via a setuid subcommand
(Bug#19191, Bug#19927, Bug#20555, Bug#20686).
Also, set O_CLOEXEC even if PTY_OPEN is not defined, since it
seems relevant in that case too.
2015-06-11 16:42:10 -07:00
Paul Eggert
0c2a3cf62a Remove unused DEFSYMs
Remove DEFSYMs that aren't used at the C level.  Also:
* src/decompress.c (Qzlib_dll):
* src/font.c (Qunicode_sip):
* src/frame.c (Qtip_frame):
* src/ftfont.c (Qserif):
* src/gnutls.c (Qgnutls_dll):
* src/xml.c (Qlibxml2_dll):
Move from here ...
* src/w32fns.c (syms_of_w32fns): ... to here,
as these are used only on MS-Windows.
2015-05-31 11:50:01 -07:00
Paul Eggert
75f8653bfe Don't misencode C-generated messages
Also, be more consistent about calls to 'Fmessage' vs 'message'.
* src/alloc.c (Fgc_status):
Prefer AUTO_STRING to build_string for Fmessage call.
* src/data.c (Fmake_variable_buffer_local)
(Fmake_local_variable, Fmake_variable_frame_local):
* src/doc.c (store_function_docstring):
Use Fmessage, not message, since the argument can contain
non-ASCII characters, and this can cause the resulting message
to be incorrectly encoded for the current environment.
* src/fns.c (maybe_resize_hash_table):
* src/xselect.c (x_clipboard_manager_save_all):
Use message, not Fmessage, since Fmessage's power isn't needed here.
* src/process.c (Fmake_network_process): Reword message to avoid %s.
* src/xdisp.c (vmessage): Document restrictions on message contents.
(message_nolog) [false]: Remove unused code.
2015-05-30 11:19:31 -07:00
Paul Eggert
69d0a2d898 Omit -Wstrict-overflow workaround in GCC 5
* src/process.c: Remove workaround for GCC -Wstrict-overflow bug
if it's GCC 5 or later, as the bug appears to be fixed in GCC 5.1.
2015-04-29 20:31:03 -07:00
Paul Eggert
2c1b860494 Don't freeze with unreadable processes
Don't freeze if an exiting process can't be read from. (Bug#19860).
This fixes a bug I introduced in
2014-07-08T07:24:07Z@eggert@cs.ucla.edu
"* process.c: Add sanity checks for file descriptors."
Dmitry Gutov did most of the legwork in finding the problem.
* src/process.c (wait_reading_process_output):
Treat non-running processes that can't be read from
the same as other non-running processes.
2015-04-25 16:17:50 -07:00
Glenn Morris
e3bfb5191f Avoid non-nil current-load-list at startup
* src/process.c (init_process_emacs): Move Fprovide statement...
(syms_of_process): ... to here.
2015-04-20 20:29:48 -04:00
Daiki Ueno
7c7b96eba0 Respect more keyword args in `make-process'
* process.c (Fmake_process): Respect `:sentinel' and `:filter'
keywords as documented.
2015-04-11 16:06:07 +09:00
Paul Eggert
e3ee455d29 Fix problems found by --enable-gcc-warnings
* src/process.c (create_process, Fmake_pipe_process)
(Fmake_network_process): Omit unused locals.
2015-04-10 19:36:54 -07:00
Daiki Ueno
f55ea05bdf Add facility to collect stderr of async subprocess
* src/w32.h (register_aux_fd): New function declaration.
* src/w32.c (register_aux_fd): New function.
* src/process.h (struct Lisp_Process): New member stderrproc.
* src/process.c (PIPECONN_P): New macro.
(PIPECONN1_P): New macro.
(Fdelete_process, Fprocess_status, Fset_process_buffer)
(Fset_process_filter, Fset_process_sentinel, Fstop_process)
(Fcontinue_process): Handle pipe process specially.
(create_process): Respect p->stderrproc.
(Fmake_pipe_process): New function.
(Fmake_process): Add new keyword argument :stderr.
(wait_reading_process_output): Specially handle a pipe process when
it gets an EOF.
(syms_of_process): Register Qpipe and Smake_pipe_process.

* doc/lispref/processes.texi (Asynchronous Processes): Document
`make-pipe-process' and `:stderr' keyword of `make-process'.

* lisp/subr.el (start-process): Suggest to use `make-process' handle
standard error separately.

* test/automated/process-tests.el (process-test-stderr-buffer)
(process-test-stderr-filter): New tests.

* etc/NEWS: Mention new process type `pipe' and its usage with the
`:stderr' keyword of `make-process'.
2015-04-11 07:59:27 +09:00
Paul Eggert
087fdee723 Assume !BROKEN_NON_BLOCKING_CONNECT
From a suggestion by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00824.html
* process.c (NON_BLOCKING_CONNECT): Simplify by assuming that
BROKEN_NON_BLOCKING_CONNECT is not defined.
(SELECT_CAN_DO_WRITE_MASK): Remove, and assume it's now true.
2015-03-27 10:37:14 -07:00
Daniel Colascione
23a98c7a53 Make process-running-child-p return foreground process group ID
* etc/NEWS: Mention change to `process-running-child-p`.

* src/process.c (Fprocess_running_child_p): Return number identifier of
the foreground process group if we know it.
2015-03-24 10:23:24 -07:00
Paul Eggert
24960fc72c Minor refactoring of new Fmake_process code
* process.c (Fmake_process): Refactor to avoid call to Flength, to
avoid cast to 'char **', and to reduce indenting and reuse of locals.
2015-03-23 08:57:34 -07:00
Daiki Ueno
47e0e31932 Generalize start-process with keyword args
* src/process.c (Fmake_process): New function.
(create_process, create_pty): Check p->pty_flag instead of
Vprocess_connection_type.
(syms_of_process): Register QCcommand, QCconnection_type, Qpty,
Qpipe, and Smake_process.  Unregister Sstart_process.

* lisp/subr.el (start-process): New function, ported from the C
implementation.

* doc/lispref/processes.texi (Asynchronous Processes): Mention
`make-process'.

* etc/NEWS: Mention `make-process'.
2015-03-23 16:27:29 +09:00
Paul Eggert
a3689d3c66 Count MANY function args more reliably
* alloc.c (Fgc_status, purecopy, unbind_to, garbage_collect_1):
* buffer.c (Fbuffer_list, Fkill_buffer):
* callint.c (read_file_name, Fcall_interactively):
* charset.c (Fset_charset_priority, syms_of_charset):
* chartab.c (uniprop_encode_value_numeric):
* coding.c (syms_of_coding):
* composite.c (syms_of_composite):
* data.c (wrong_range):
* dbusbind.c (syms_of_dbusbind):
* dired.c (file_attributes):
* editfns.c (Fdecode_time, update_buffer_properties, format2):
* eval.c (run_hook_with_args_2, apply1, call1, call2, call3)
(call4, call5, call6, call7):
* fileio.c (Finsert_file_contents, choose_write_coding_system)
(Fcar_less_than_car, build_annotations, auto_save_error):
* filelock.c (get_boot_time):
* fns.c (internal_equal, nconc2, Fyes_or_no_p, Fwidget_apply):
(maybe_resize_hash_table, secure_hash):
* font.c (font_style_to_value, font_open_by_name, Flist_fonts):
* fontset.c (fontset_add, Fset_fontset_font):
* ftfont.c (ftfont_lookup_cache):
* gtkutil.c (xg_get_font):
* insdel.c (signal_before_change, signal_after_change):
* keymap.c (append_key):
* lread.c (load_warn_old_style_backquotes, Fload, init_lread):
* minibuf.c (Fread_buffer):
* print.c (print_preprocess):
* process.c (Fformat_network_address, Fmake_network_process)
(server_accept_connection):
* sound.c (Fplay_sound_internal):
* term.c (Fsuspend_tty, Fresume_tty):
* window.c (window_list):
* xdisp.c (run_redisplay_end_trigger_hook, add_to_log)
(message_with_string):
* xfaces.c (Fx_list_fonts):
* xfont.c (syms_of_xfont):
* xselect.c (x_handle_selection_request)
(x_handle_selection_clear, x_clear_frame_selections)
(x_clipboard_manager_error_1):
Prefer CALLMANY and CALLN to counting args by hand.
* doc.c (reread_doc_file): Remove unused code.
* fns.c (concat2, concat3): Redo to avoid need for local-var vector.
(cmpfn_user_defined, hashfn_user_defined, Fmaphash):
Prefer call1 and call2 to Ffuncall.
* keyboard.c (safe_run_hook_funcall, safe_run_hooks):
Use struct literal rather than a local var, for simplicity.
* keymap.c (where_is_internal): Use NULL rather than a pointer
to unused args.
* lisp.h (CALLMANY, CALLN): New macros.
* sound.c (Fplay_sound_internal): Coalesce duplicate code.
Fixes: bug#19634
2015-01-25 09:11:25 -08:00
Dmitry Antipov
7ee2733f1e Tiny lisp.h cleanup
* lisp.h (XTERMINAL): Add eassert.
* process.c (make_lisp_proc): Now static here.
2015-01-16 14:41:20 +03:00
Dmitry Antipov
3b48f99542 Tune pseudovector allocation assuming Qnil == 0
* alloc.c (allocate_pseudovector): Use memset for both
Lisp_Objects and regular slots.  Add zerolen arg.
* lisp.h (allocate_pseudovector): Adjust prototype.
(ALLOCATE_PSEUDOVECTOR): Adjust user.
(ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
(allocate_hash_table, allocate_window, allocate_frame)
(allocate_process, allocate_terminal): Remove prototypes.
* fns.c (allocate_hash_table): Now static here.
* frame.c (allocate_frame):
* process.c (allocate_process):
* terminal.c (allocate_terminal):
* window.c (allocate_window): Now static here.
Use ALLOCATE_ZEROED_PSEUDOVECTOR.  Add comment.
2015-01-16 11:42:24 +03:00