- 28 Jul, 2014 1 commit
-
-
Dmitry Antipov authored
* configure.ac (toplevel): Check whether GNU/Linux-specific timerfd functions and macros are available. * m4/clock_time.m4 (gl_CLOCK_TIME): Check for clock_getres as well. * src/atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h. (toplevel): Rename alarm_timer_ok to special_timer_available. [HAVE_TIMERFD]: Declare timerfd. [HAVE_CLOCK_GETRES]: Declare resolution. (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to system timer resolution. (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime. (timerfd_callback) [HAVE_TIMERFD]: New function. (atimer_result, debug_timer_callback, Fdebug_timer_check) [ENABLE_CHECKING]: New function for the sake of automated tests. (init_atimer) [HAVE_TIMERFD]: Setup timerfd. [HAVE_CLOCK_GETRES]: Likewise for system timer resolution. [ENABLE_CHECKING]: Defsubr test function. * src/atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype. * src/lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise. * src/process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function. * test/automated/timer-tests.el (timer-tests-debug-timer-check): New test.
-
- 26 Jul, 2014 2 commits
-
-
Paul Eggert authored
There is certainly nothing wrong with writing code like 'lo <= i && i <= hi', even if LO happens to a constant. There isn't even anything wrong in general with writing 'a <= b' if A happens to be a constant. At any rate stylistic changes shouldn't be done like this without discussion.
-
Andreas Schwab authored
* alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value) (Fgarbage_collect): Reorder conditions that are written backwards. * data.c (cons_to_unsigned): Likewise. * dispnew.c (update_frame_1, sit_for): Likewise. * fileio.c (file_offset): Likewise. * filelock.c (read_lock_data, lock_file): Likewise. * fns.c (larger_vector, make_hash_table, Fmake_hash_table): Likewise. * font.c (font_intern_prop, font_style_symbolic): Likewise. * lisp.h (FIXNUM_OVERFLOW_P): Likewise. * lread.c (read1): Likewise. * minibuf.c (read_minibuf_noninteractive): Likewise. * nsterm.m (x_set_frame_alpha): Likewise. * process.c (wait_reading_process_output): Likewise. * region-cache.c (delete_cache_boundaries): Likewise. * xterm.c (x_set_frame_alpha): Likewise.
-
- 08 Jul, 2014 2 commits
-
-
Paul Eggert authored
in previous patch: we want nonnegative fds, not nonzero fds.
-
Paul Eggert authored
(wait_reading_process_output, Fprocess_filter_multibyte_p): Check that infd is nonnegative before using it as an fd. (read_and_dispose_of_process_output, Fprocess_send_eof): Likewise, for outfd. (wait_reading_process_output): Omit unnecessary check of infd. Fixes: debbugs:17844
-
- 24 Jun, 2014 1 commit
-
-
Paul Eggert authored
* image.c (Fimagemagick_types): * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY): * process.c (Fmake_network_process): Rename C local identifier 'Qfoo to avoid giving the false impression that it stands for the symbol 'foo'.
-
- 13 Jun, 2014 1 commit
-
-
Paul Eggert authored
* lisp.h, process.c (wait_reading_process_input): Return int, not bool. All uses changed. * process.c (SELECT_CANT_DO_WRITE_MASK): Remove macro, replacing with ... (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense. All uses changed. (status_notify): New arg WAIT_PROC. Return int, not void. All uses changed. Fixes: debbugs:17647
-
- 09 Jun, 2014 1 commit
-
-
Paul Eggert authored
* doc/lispref/processes.texi (Accepting Output): * src/process.c (Faccept_process_output) (wait_reading_process_output): Mention that if PROCESS is non-nil, the return value is about PROCESS, not about other processes.
-
- 08 Jun, 2014 1 commit
-
-
Paul Eggert authored
* dispextern.h (set_vertical_scroll_bar, erase_phys_cursor) (load_color): * font.h (ftxfont_driver) [HAVE_XFT]: * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char): * lisp.h (get_frame_param): * menu.h (tty_menu_show): * process.h (conv_sockaddr_to_lisp, catch_child_signal): * termhooks.h (encode_terminal_code): * xterm.h (x_menu_wait_for_event): Always declare. * frame.c (get_frame_param): * fringe.c (max_used_fringe_bitmap): * ftxfont.c (ftxfont_driver): * keyboard.c (ignore_mouse_drag_p, make_ctrl_char): * menu.c (menu_items_inuse): * process.c (conv_sockaddr_to_lisp, catch_child_signal): * term.c (encode_terminal_code, tty_menu_show): * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor): * xfaces.c (load_color): * xmenu.c (x_menu_wait_for_event): Now always extern.
-
- 05 Jun, 2014 1 commit
-
-
Dmitry Antipov authored
* nt/inc/ms-w32.h (POLL_FOR_INPUT): Likewise. * src/keyboard.c, src/process.c: Do not define POLL_FOR_INPUT here because it will be defined in generated config.h if needed.
-
- 03 Jun, 2014 2 commits
-
-
Paul Eggert authored
* process.c (add_read_fd, delete_read_fd, add_write_fd) (delete_write_fd, wait_reading_process_output): Remove now-redundant easserts. * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes. Use INLINE_HEADER_BEGIN, INLINE_HEADER_END. (fd_CLR, fd_ISSET, fd_SET): New inline functions. (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
-
Paul Eggert authored
of p->infd against zero. Add easserts for infd having a plausible value.
-
- 27 May, 2014 1 commit
-
-
Paul Eggert authored
* process.c (process_send_signal): Fix race condition where a subprocess was reaped by a signal handler between the check for liveness and calling 'kill', which meant that Emacs could in theory kill an innocent bystander process. Do the fix by blocking SIGCHLD in a critical section that checks liveness before killing. Fixes: debbugs:17561
-
- 03 May, 2014 1 commit
-
-
Paul Eggert authored
* lib-src/emacsclient.c (WCONTINUED): Move to ../src/syswait.h. * src/process.c (handle_child_signal): Remove WCONTINUED ifdef, because WCONTINUED is always defined now. * src/syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c. Fixes: debbugs:15110 debbugs:17339
-
- 29 Apr, 2014 1 commit
-
-
Glenn Morris authored
Fixes: debbugs:15110
-
- 16 Apr, 2014 1 commit
-
-
Eli Zaretskii authored
src/unexcoff.c [MSDOS]: Include libc/atexit.h. (copy_text_and_data): Zero out the atexit chain pointer before dumping Emacs. src/termhooks.h (encode_terminal_code): Update prototype. src/term.c (encode_terminal_code) [DOS_NT]: Make it externally visible for all DOS_NT ports, not just WINDOWSNT. (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS. src/sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD unless it is defined. (emacs_pipe) [MSDOS]: Redirect to 'pipe'. src/process.c (close_on_exec, accept4, process_socket): Move into the "ifdef subprocesses" part. (catch_child_signal): Condition by "ifdef subprocesses". (syms_of_process) <Qinternal_default_process_sentinel> <Qinternal_default_process_filter>: Condition by "ifdef subprocesses". src/msdos.h: Add prototypes for new functions. (EINPROGRESS): Define. (O_CLOEXEC): Define to zero. src/msdos.c (check_window_system): Remove unnecessary an incompatible duplicate function. (sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New functions in support of new functionality. src/menu.c (single_menu_item): Add visual indication of submenu also for menus on MSDOS frames. (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS. src/lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define when async subprocesses aren't supported. src/font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition. src/emacs.c (close_output_streams): Zero out errno before calling close_stream. src/dired.c [MSDOS]: Include msdos.h. src/conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir. (DATA_START) [MSDOS]: Define. (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K. src/callproc.c (block_child_signal, unblock_child_signal) [MSDOS]: Ifdef away for MSDOS. (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS. (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant for MSDOS. (call_process) [MSDOS]: Fix call sequence of dostounix_filename. Use temporary file template that is compatible with mkostemp. Move vfork-related portions under #ifndef MSDOS. (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT. lisp/term/pc-win.el (x-list-fonts, x-get-selection-value): Provide doc strings, as required by snarf-documentation. msdos/sedlisp.inp: msdos/sedlibmk.inp: msdos/sedleim.inp: msdos/sed3v2.inp: msdos/sed2v2.inp: msdos/sed1v2.inp: Update Sed scripts for Emacs 24.4. msdos/inttypes.h: Add PRIdMAX. msdos/INSTALL: Update for Emacs 24.4. msdos/sedadmin.inp: New file.
-
- 05 Apr, 2014 1 commit
-
-
Paul Eggert authored
* alloc.c (memory_full): * charset.c (syms_of_charset): * doc.c (Fsnarf_documentation): * emacs.c (main): * font.c (BUILD_STYLE_TABLE): * keyboard.c (make_lispy_event): * profiler.c (setup_cpu_timer): * xgselect.c (xg_select): * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG): Use ARRAYELTS. * font.c (FONT_PROPERTY_TABLE_SIZE): Remove. Replace the only use with ARRAYELTS (font_property_table). * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
-
- 25 Mar, 2014 1 commit
-
-
Paul Eggert authored
* atimer.c (sigmask_atimers): Remove. Remaining use rewritten to use body of this function. * atimer.c (block_atimers, unblock_atimers): * callproc.c (block_child_signal, unblock_child_signal): * sysdep.c (block_tty_out_signal, unblock_tty_out_signal): New arg OLDSET. All callers changed. * atimer.c (block_atimers, unblock_atimers): * callproc.c (block_child_signal, unblock_child_signal): * keyboard.c (handle_interrupt): * sound.c (vox_configure, vox_close): Restore the old signal mask rather than unilaterally clearing bits from the mask, in case a handler is running within another handler. All callers changed. * lisp.h, process.c, process.h, term.c: Adjust decls and callers to match new API. * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE; signal handlers aren't supposed to use floating point anyway. (handle_arith_signal): Unblock just SIGFPE rather than clearing mask. Fixes: debbugs:15561
-
- 23 Mar, 2014 3 commits
-
-
Daniel Colascione authored
-
Daniel Colascione authored
-
Daniel Colascione authored
-
- 22 Mar, 2014 1 commit
-
-
Daniel Colascione authored
-
- 22 Feb, 2014 1 commit
-
-
Glenn Morris authored
* src/process.c (Finternal_default_process_filter) (Finternal_default_process_sentinel): Doc tweaks. * doc/lispref/processes.texi: Typo fixes. * etc/NEWS: Related markup.
-
- 21 Feb, 2014 1 commit
-
-
Glenn Morris authored
* doc/lispref/internals.texi (Process Internals): * doc/lispref/processes.texi (Deleting Processes, Output from Processes) (Process Buffers, Filter Functions, Accepting Output, Sentinels) (Network, Network Servers, Network Processes, Serial Ports): Filters and sentinels can no longer be nil. * doc/lispref/elisp.texi (Top): Menu update. * doc/misc/flymake.texi (Starting the syntax check process): Grammar fix. * doc/misc/tramp.texi (External packages): Grammar fix. Reword for default sentinel not being nil any more. * src/process.c (Fprocess_buffer, Faccept_process_output) (Finternal_default_process_filter, Finternal_default_process_sentinel): Doc fixes.
-
- 30 Jan, 2014 1 commit
-
-
Andreas Schwab authored
* process.c (create_process): Reset SIGPROF handler in the child. * callproc.c (call_process): Likewise.
-
- 20 Jan, 2014 1 commit
-
-
Glenn Morris authored
-
- 01 Jan, 2014 1 commit
-
-
Paul Eggert authored
-
- 18 Dec, 2013 2 commits
-
-
Paul Eggert authored
* lisp.h (GCPRO7): New macro. * lread.c (openp): Use bool for boolean; all callers changed. Protect save_string from GC. Don't assume that file descriptors are nonzero. Redo save_mtime comparison to avoid bogus GCC warning about uninitialized variable.
-
Glenn Morris authored
* src/lread.c (Fload): Pass load_prefer_newer to openp. Don't bother checking mtime if openp already did it. (openp): Add `newer' argument, to check all suffixes and find the newest file. (syms_of_lread) <load_prefer_newer>: New option. * src/callproc.c (call_process): * src/charset.c (load_charset_map_from_file): * src/emacs.c (init_cmdargs): * src/image.c (x_create_bitmap_from_file, x_find_image_file): * src/lisp.h (openp): * lread.c (Flocate_file_internal): * src/process.c (Fformat_network_address): * src/sound.c (Fplay_sound_internal): * src/w32.c (check_windows_init_file): * src/w32proc.c (sys_spawnve): Update for new arg spec of openp. * lisp/Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t. * etc/NEWS: Mention this. Fixes: debbugs:2061
-
- 15 Dec, 2013 1 commit
-
-
Eli Zaretskii authored
src/process.c (Fprocess_send_eof): Don't crash if someone tries to open a pty on MS-Windows.
-
- 23 Nov, 2013 1 commit
-
-
Glenn Morris authored
That seems more in keeping with the existing behavior of this function in other situations.
-
- 18 Nov, 2013 1 commit
-
-
Andreas Schwab authored
* process.c (get_process): Check that OBJ is a live buffer.
-
- 06 Nov, 2013 1 commit
-
-
Stefan Monnier authored
redisplay--mode-lines-cause. (redisplay_internal): Keep them uptodate. Remove redundant check of buffer_shared_and_changed. * *.[chm]: Number every assignment to update_mode_lines so we can track why it is set.
-
- 05 Nov, 2013 2 commits
-
-
Paul Eggert authored
* gnutls.c (Fgnutls_boot): Don't assume C99. * process.c (wait_reading_process_output): Fix typo in recent change.
-
Ted Zlatanov authored
* gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN. (Fgnutls_boot): Set process gnutls_p later, after initialization. * process.c (wait_reading_process_output, read_process_output) (send_process): Check gnutls_state is not NULL.
-
- 04 Nov, 2013 1 commit
-
-
Paul Eggert authored
Especially, C99 prohibits nesting a struct X inside struct Y if struct X has a flexible array member. Also, merge from gnulib, incorporating: 2013-11-03 intprops: port to Oracle Studio c99 * lib/intprops.h: Update from gnulib. * src/alloc.c (struct sdata): New type. (sdata): Implement in terms of struct sdata. Remove u member; all uses replaced by next_vector, set_next_vector. (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change. (SDATA_DATA_OFFSET): Now a constant, not a macro. (struct sblock): Rename first_data member to data, which is now a flexible array member. All uses changed. (next_vector, set_next_vector, large_vector_vec): New functions. (vector_alignment): New constant. (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too. (struct large-vector): Now merely a NEXT member, since the old approach ran afoul of stricter C99. All uses changed to use large_vector_vec or large_vector_offset. (large_vector_offset): New constant. * src/dispnew.c: Include tparam.h, for tgetent. Do not include term.h; no longer needed. * src/gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn. * src/lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int. (struct Lisp_Vector): Use a flexible array member for contents, instead of a union with a member that is an array of size 1. All uses changed. (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the fact that the struct no longer contains a union. (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay) (struct Lisp_Save_Value, struct Lisp_Free): Use unsigned, not int, for spacers, to avoid c99 warning. (union specbinding): Use unsigned, not bool, for bitfield, as bool is not portable to pre-C99 hosts.
-
- 17 Oct, 2013 1 commit
-
-
Paul Eggert authored
On my platform (Fedora 19 x86-64), this shrinks the Emacs executable (text+data) by 0.25%. * dispextern.h (erase_phys_cursor) [!WINDOWSNT]: (load_color) [!MSDOS]: * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]: * keyboard.h (make_ctrl_char) [!WINDOWSNT]: * lisp.h (check_existing): * process.h (conv_sockaddr_to_lisp, network_interface_list) (network_interface_info) [!WINDOWSNT]: * termhooks.h (encode_terminal_code) [!WINDOWSNT]: Remove extern decls. * fileio.c (check_existing): * keyboard.c (make_ctrl_char) [!WINDOWSNT]: * process.c (conv_sockaddr_to_lisp, network_interface_list) (network_interface_info) [!WINDOWSNT]: * term.c (encode_terminal_code) [!WINDOWSNT]: * xdisp.c (erase_phys_cursor) [!WINDOWSNT]: * xfaces.c (load_color) [!MSDOS]: Now static. * fileio.c (check_existing, check_executable, check_writable): * process.c (network_interface_list, network_interface_info): Move earlier, so that we don't need forward decls. * gnutls.c (fn_gnutls_transport_set_errno) (emacs_gnutls_transport_set_errno) [!WINDOWNT]: Remove; unused. * w32.c (init_environment): Use faccessat rather than check_existing, partly for consistency with the rest of the code in this file, partly so that check_existing can be static.
-
- 16 Oct, 2013 1 commit
-
-
Eli Zaretskii authored
src/w32.c (network_interface_get_info, network_interface_list) (network_interface_info): New functions. (GetAdaptersInfo_Proc): New typedef. (get_adapters_info): New wrapper function. (globals_of_w32): Initialize g_b_init_get_adapters_info. src/process.h (network_interface_list, network_interface_info): New prototypes. src/process.c (conv_sockaddr_to_lisp): Now externally-visible. (Fnetwork_interface_list, Fnetwork_interface_info): Define for all systems. Return non-nil for systems that HAVE_NET_IF_H and for WINDOWSNT. Doc fix. (syms_of_process): Defsubr Snetwork_interface_list and Snetwork_interface_info unconditionally.
-
- 24 Sep, 2013 2 commits
-
-
Daniel Colascione authored
-
Dmitry Antipov authored
This helps to avoid a few glitches dictated by C's aliasing rules. * lisp.h (struct Lisp_Vector): Use union for next and contents member. Adjust comment. Change related users. * alloc.c (next_in_free_list, set_next_in_free_list): Remove. Related users changed. * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c: * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c: * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c: * xfaces.c, xfont.c, xmenu.c: Related users changed.
-