1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 09:51:22 -08:00
Commit graph

755 commits

Author SHA1 Message Date
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Juanma Barranquero
96c834b62a process.c: Fix typo in comment. 2009-12-29 01:51:07 +01:00
Stefan Monnier
84b318269c (Fmake_network_process): Fix up the tests for
"connectionless socket", so they DTRT for seqpacket sockets as well.
2009-12-03 19:01:36 +00:00
Stefan Monnier
f00c449ba1 (Qseqpacket): New symbol.
(HAVE_SEQPACKET): New macro.
(Fmake_network_process): Accept new :type `seqpacket'.
(init_process): Add `seqpacket' feature when applicable.
(syms_of_process): Initialize Qseqpacket.
2009-12-03 18:51:32 +00:00
Jan Djärv
872870b29a Use a select wrapper around the GLib event loop, thus taking into account GLib
timeouts and event sources.  This simplifies Gtk+-code a lot, and is needed
for handling GConf death/restart.

* xterm.c: #include xgselect.h.
(x_initialize): Call xgselect_initialize.

* xsettings.c (something_changedCB): C++ comments => C comments.
(init_gconf): Do not deal with any GLib file descriptors, xg_select
does that now.

* gtkutil.c (xg_timer, xg_process_timeouts, xg_start_timer)
(xg_stop_timer, menu_grab_callback_cnt, menu_grab_callback)
(scroll_bar_button_cb): Remove.
(create_menus): C++ comments => C comments. Don't bind grab-notify
event.
(xg_create_scroll_bar): Don't bind button-press-event and
button-release-event.

* process.c: Include xgselect.h if defined (USE_GTK) ||
defined (HAVE_GCONF).
(wait_reading_process_output): Call xg_select for the same condition.

* xgselect.c (xg_select): New function to better integrate with
GLib/Gtk event handling.  Needed if GConf daemon dies/restarts.

* xgselect.h: New file, declare xg_select, xgselect_initialize.

* Makefile.in (XOBJ): Add xgselect.o.
2009-11-21 15:28:59 +00:00
Andreas Schwab
62a6e103dd * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Remove
ignored second argument.  All callers changed.
* regex.c (STRING_CHAR, STRING_CHAR_AND_LENGTH, RE_STRING_CHAR)
(RE_STRING_CHAR_AND_LENGTH): Likewise.
* xdisp.c (string_char_and_length): Likewise.
2009-11-21 11:52:23 +00:00
Dan Nicolaescu
9143355208 * process.c (ifflag_def): Make flag_sym constant.
(Fnetwork_interface_info): Use a constant pointer.
(ifflag_table):
* xfns.c (cursor_bits):
* xdisp.c (power_letter):
* termcap.c (speeds, esctab):
* sysdep.c (baud_convert):
* keyboard.c (lispy_accent_codes, modifier_names):
* image.c (xbm_format, xpm_format, pbm_format, png_format)
(jpeg_format, tiff_format, gif_format, svg_format)
(interlace_start, interlace_increment, gs_format):
* gtkutil.c (separator_names):
* fringe.c (swap_nibble):
* fns.c (base64_value_to_char, base64_char_to_value):
* fileio.c (make_temp_name_tbl):
* coding.c (suffixes): Make constant.
2009-11-11 20:11:51 +00:00
Jan Djärv
e90292a90c Bug #4574. Common code for file/font dialog. Handle timers with glib-timers.
* keyboard.h: Declare timer_check.

* keyboard.c (timer_check_2): New function that does what the old
timer_check did.
(timer_check): Call timer_check_2 until -1 or a non-zero time is
returned, i.e. don't return -1 with timers pending.

* process.c: Remove extern declaration of timer_check.

* xmenu.c (x_menu_wait_for_event): Remove code that did a timeout
even if timer_check returned -1.

* gtkutil.c (xg_dialog_response_cb): data is now a struct xg_dialog_data
(pop_down_dialog): Destroy widget (if any), cancel timer and unref
the event loop.
(xg_maybe_add_timer, xg_dialog_run): New functions (bug #4574).
(xg_get_file_name, xg_get_font_name): Call xg_dialog_run (bug #4574).
Destroy the dialog after xg_dialog_run.
2009-11-10 19:06:40 +00:00
Dan Nicolaescu
d67b4f80db * xterm.c (syms_of_xterm):
* xselect.c (syms_of_xselect):
* xmenu.c (syms_of_xmenu):
* xfns.c (syms_of_xfns):
* xfaces.c (syms_of_xfaces):
* xdisp.c (syms_of_xdisp):
* window.c (syms_of_window):
* w32fns.c (syms_of_w32fns):
* undo.c (syms_of_undo):
* textprop.c (syms_of_textprop):
* terminal.c (syms_of_terminal):
* syntax.c (syms_of_syntax):
* sound.c (syms_of_sound):
* search.c (syms_of_search):
* print.c (syms_of_print):
* minibuf.c (syms_of_minibuf):
* macros.c (syms_of_macros):
* keymap.c (syms_of_keymap, initial_define_key)
(initial_define_lispy_key):
* keyboard.c (syms_of_keyboard):
* insdel.c (syms_of_insdel):
* image.c (syms_of_image):
* fringe.c (syms_of_fringe):
* frame.c (syms_of_frame):
* fontset.c (syms_of_fontset):
* fns.c (syms_of_fns):
* fns.c (syms_of_fns):
* fileio.c (syms_of_fileio):
* fileio.c (syms_of_fileio):
* eval.c (syms_of_eval):
* doc.c (syms_of_doc):
* dispnew.c (syms_of_display):
* dired.c (syms_of_dired):
* dbusbind.c (syms_of_dbusbind):
* data.c (syms_of_data):
* composite.c (syms_of_composite):
* coding.c (syms_of_coding):
* cmds.c (syms_of_cmds):
* charset.c (define_charset_internal, syms_of_character):
* ccl.c (syms_of_ccl):
* category.c (syms_of_category, init_category_once):
* casetab.c (syms_of_casetab):
* casefiddle.c (syms_of_casefiddle):
* callint.c (syms_of_callint):
* bytecode.c (syms_of_bytecode):
* buffer.c (keys_of_buffer, syms_of_buffer):
* alloc.c (syms_of_alloc):
* process.c (syms_of_process, init_process):
* lread.c (syms_of_lread, init_obarray):
* font.c (build_style_table):
* emacs.c (syms_of_emacs, main): Replace calls to intern with
intern_c_string, calls to make_pure_string with
make_pure_c_string.  Use pure_cons instead of Fcons.

* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.

* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it.  Make the name const char*.

* font.c (struct table_entry): Remove unused member.  Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.

* emacs.c (struct standard_args): Make name and longname constant.
2009-11-06 06:50:52 +00:00
Dan Nicolaescu
5e2327cf92 * process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.

* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it.  Make the name const char*.

* lisp.h (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Update prototypes.
(DEFUN, EXFUN): Support for prototypes is now required.
(intern_c_string): New prototype.
(struct Lisp_Subr): Make symbol_name constant.

* font.c (struct table_entry): Remove unused member.  Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.

* emacs.c (struct standard_args): Make name and longname constant.

* character.h (DEFSYM): Use intern_c_string.
2009-11-06 06:07:46 +00:00
Dan Nicolaescu
019d2c4c58 * process.c (create_pty): Remove conditionals for no longer
supported systems: UNIPLUS and RTU.
2009-10-19 05:13:31 +00:00
Dan Nicolaescu
d7306fe6b1 * alloc.c: Do not define struct catchtag.
* 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.
2009-10-19 04:27:09 +00:00
Adrian Robert
fa24b11499 (list_processes_1): Use long format in printf, and cast argument. 2009-10-13 01:03:46 +00:00
Nick Roberts
42371deb98 *** empty log message *** 2009-08-30 05:00:59 +00:00
Nick Roberts
a70d537146 (wait_reading_process_output): Keep the descriptor
when pty is used by a non-child process, e.g., in I/O buffer of
GDB this allows inferior to be restarted.
2009-08-30 04:54:34 +00:00
Kenichi Handa
550c8289fd (send_process): Use encode_coding_object instead of
encode_coding_string to perform eol-conversion even if the string
is unibyte.
2009-08-27 11:13:33 +00:00
Chong Yidong
e42bdf0159 * process.c (status_notify): Don't perform redisplay.
(Fdelete_process, list_processes_1, process_send_signal):
Expliticly perform redisplay.
(wait_reading_process_output): Always check process status, but
don't perform redisplay unless DO_DISPLAY is non-zero (Bug#2930).
2009-08-17 21:04:05 +00:00
Eli Zaretskii
8b9fc63661 (create_pty): Fix last change. 2009-08-14 09:17:11 +00:00
Nick Roberts
850d0752fb (create_pty): New function.
(Fstart_process): Use it to allow Emacs to just associate a pty
with the buffer.  See associated change in gdb-mi.el.
(list_processes_1): Deal with no program name.
(start_process_unwind): Use pid == -2 to mean no process.
2009-08-13 13:22:55 +00:00
Juri Linkov
10be7e0dd9 (Fset_process_query_on_exit_flag): Mention killing
a buffer in docstring.
2009-07-18 21:07:12 +00:00
Andreas Schwab
347f3cd3dd Simplify last change. 2009-06-28 20:25:49 +00:00
Andreas Schwab
b96075879a (send_process): Keep decoded string in a local
variable and protect it from GC.  (Bug#3521)
2009-06-28 20:12:20 +00:00
Ken Raeburn
4735b74e57 (status_message): Pass Faset index argument as a lisp object, so as to work
with USE_LISP_UNION_TYPE.
2009-06-20 23:23:55 +00:00
Kenichi Handa
66bd43d1d3 (status_message): Fix previous change. Be sure to
decode a localized string.
2009-06-15 13:21:14 +00:00
Chong Yidong
0bcbaaaaa8 * process.c (status_message): Fix handling of multibyte signal
string (Bug#3499).
2009-06-09 18:26:36 +00:00
Andreas Schwab
59c4c60fb1 (read_process_output): Make sure the current buffer is
always restored.
2009-05-02 11:54:43 +00:00
YAMAMOTO Mitsuharu
7e3386cbfd (create_process): Clean up merger residues of 2008-07-17 change. 2009-04-29 05:15:47 +00:00
Andreas Schwab
77bf07e14e * fns.c (Flocale_info): Protect vector from GC during decoding.
* process.c (Fstart_process): Protect argv strings from GC during
encoding.
2009-04-28 19:02:26 +00:00
Miles Bader
a20878b6d8 Rename system-process-attributes' to process-attributes'
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1553
2009-02-23 05:06:36 +00:00
Andreas Schwab
b5bfebec13 (send_process): Properly relocate pointer into data
when using encoded data.
2009-02-10 22:32:39 +00:00
Chong Yidong
c3eff1b099 (wait_reading_process_output): Use process_pending_signals. 2009-01-29 14:34:38 +00:00
Juanma Barranquero
fff4e45990 * dbusbind.c (Fdbus_register_signal):
* process.c (conv_sockaddr_to_lisp):
* w32fns.c (Fw32_battery_status): Use empty_unibyte_string.
2009-01-18 03:58:09 +00:00
Eli Zaretskii
6a1bab0e5c (Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess)
(Qttname, Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime)
(Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs)
(Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime) [!subprocesses]: Define.
(syms_of_process) [!subprocesses]: Intern and staticpro them.
(Flist_system_processes, Fsystem_process_attributes) [!subprocesses]: Call
list_system_processes and system_process_attributes instead of returning Qnil.
2009-01-03 15:03:59 +00:00
Eli Zaretskii
89c874cfd7 (top level) <Qtime, Qctime>: New variables.
(syms_of_process): staticpro them.
(Fsystem_process_attributes): Add their documentation to the doc string.
2009-01-02 15:06:02 +00:00
Andreas Schwab
63136da6ca (conv_sockaddr_to_lisp): Add workaround for
getsockname bug on BSD.
2009-01-01 15:58:38 +00:00
Dan Nicolaescu
900d51fcda * process.c: (Flist_system_processes):
(Fsystem_process_attributes): Undo previous change, these functions
are duplicated for the benefit of #ifndef subprocesses.
2008-12-19 22:53:15 +00:00
Dan Nicolaescu
3d7de9fb39 * process.c: (Flist_system_processes):
(Fsystem_process_attributes): Fix strange CVS problem, return the
correct value.
2008-12-19 22:19:49 +00:00
Dan Nicolaescu
06e111a6ef Reorganize implementation of Flist_system_processes and
Fsystem_process_attributes.  No functional changes.
* process.c: Don't #include pwd.h, grp.h and limits.h.
(Flist_system_processes): Just call list_system_processes.
(Fsystem_process_attributes): Just call system_process_attributes.
(procfs_list_system_processes, time_from_jiffies)
(ltime_from_jiffies, get_up_time, procfs_ttyname, MAJOR, MINOR)
(procfs_get_total_memory, procfs_system_process_attributes): Move ...

* sysdep.c: ... here.  Include pwd.h, grp.h and limits.h.
(list_system_processes): Rename from
procfs_list_system_processes.  Enclose in #ifdef HAVE_PROCFS.
Provide a do nothing implementation.
(system_process_attributes): Rename from
procfs_list_system_processes.
(ltime_from_jiffies, get_up_time, procfs_ttyname, MAJOR, MINOR)
(procfs_get_total_memory):  Enclose in #ifdef GNU_LINUX.

* w32.c (list_system_processes): Rename from
w32_list_system_processes.
(system_process_attributes): Rename from
w32_system_process_attributes.

* s/gnu-linux.h (LISTPROC, PROCATTR): Remove.

* process.h (w32_list_system_processes)
(w32_system_process_attributes): Remove.
(list_system_processes, system_process_attributes): New
prototypes.

* config.nt (LISTPROC, PROCATTR): Remove.
2008-12-19 19:50:35 +00:00
Dan Nicolaescu
0e3635c29a Include <limits.h>. 2008-12-16 08:04:45 +00:00
Juanma Barranquero
3c309f345b * process.c (Fsystem_process_attributes, syms_of_process):
Fix typo in name of Ssystem_process_attributes.
  Reported by Ulrich Mueller <ulm@kph.uni-mainz.de>.
2008-12-11 08:46:35 +00:00
Eli Zaretskii
b5ec91a5c0 (procfs_system_process_attributes): If `nread' has a negative value, assign
zero to it.
2008-12-05 16:49:20 +00:00
Eli Zaretskii
2fdc7d0031 (procfs_system_process_attributes): Don't use cmd, cmdsize, and q without
initializing them first.
2008-12-05 07:09:16 +00:00
Eli Zaretskii
b63a740b3b (procfs_system_process_attributes): Multiply `pcpu' by 100, so it's in
percents as advertised.
2008-10-02 20:04:58 +00:00
Martin Rudalics
2a7bb8823c (Faccept_process_output): Fix doc-string. 2008-10-02 08:04:54 +00:00
Eli Zaretskii
63870e7eca (procfs_system_process_attributes): Fix last change. 2008-09-19 17:22:25 +00:00
Eli Zaretskii
a1e422f32d (procfs_system_process_attributes): Fix cmdline in case /proc/PID/cmdline
is empty.
2008-09-19 17:21:16 +00:00
Roland Winkler
a7713d6639 (Fsystem_process_attributes): Doc fix. 2008-09-07 19:47:29 +00:00
Roland Winkler
ea92add1fe (Fsystem_process_attributes): Doc fix. 2008-09-06 23:00:17 +00:00
Andreas Schwab
8399d035cc (procfs_system_process_attributes): Fix portability
problems.
2008-08-23 18:04:42 +00:00
Eli Zaretskii
8c57b2e5b5 [!subprocesses]: Define QCname.
(syms_of_process): Intern and staticpro it.
2008-08-23 16:48:55 +00:00