aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-08 14:25:08 -0700
committerDan Nicolaescu2010-07-08 14:25:08 -0700
commit5842a27bbfb7efa6872824e501bc7ec98b631553 (patch)
treed173899af9cbed9d90d94cfc710e6ecc06dd1f6b /src/process.c
parent71c44c04bb996abe77db8efd88255fde06532b10 (diff)
downloademacs-5842a27bbfb7efa6872824e501bc7ec98b631553.tar.gz
emacs-5842a27bbfb7efa6872824e501bc7ec98b631553.zip
Convert DEFUNs to standard C.
* src/alloc.c: Convert DEFUNs to standard C. * src/buffer.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/dosfns.c: * src/editfns.c: * src/emacs.c: * src/eval.c: * src/fileio.c: * src/filelock.c: * src/floatfns.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/image.c: * src/indent.c: * src/insdel.c: * src/keyboard.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/menu.c: * src/minibuf.c: * src/msdos.c: * src/nsfns.m: * src/nsmenu.m: * src/nsselect.m: * src/print.c: * src/process.c: * src/search.c: * src/sound.c: * src/syntax.c: * src/term.c: * src/terminal.c: * src/textprop.c: * src/undo.c: * src/w16select.c: * src/w32console.c: * src/w32fns.c: * src/w32font.c: * src/w32menu.c: * src/w32proc.c: * src/w32select.c: * src/window.c: * src/xdisp.c: * src/xfaces.c: * src/xfns.c: * src/xmenu.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: Likewise.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c185
1 files changed, 61 insertions, 124 deletions
diff --git a/src/process.c b/src/process.c
index 789f6df2df2..1eefae1adc9 100644
--- a/src/process.c
+++ b/src/process.c
@@ -680,16 +680,14 @@ setup_process_coding_systems (Lisp_Object process)
680 680
681DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, 681DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0,
682 doc: /* Return t if OBJECT is a process. */) 682 doc: /* Return t if OBJECT is a process. */)
683 (object) 683 (Lisp_Object object)
684 Lisp_Object object;
685{ 684{
686 return PROCESSP (object) ? Qt : Qnil; 685 return PROCESSP (object) ? Qt : Qnil;
687} 686}
688 687
689DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0, 688DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0,
690 doc: /* Return the process named NAME, or nil if there is none. */) 689 doc: /* Return the process named NAME, or nil if there is none. */)
691 (name) 690 (register Lisp_Object name)
692 register Lisp_Object name;
693{ 691{
694 if (PROCESSP (name)) 692 if (PROCESSP (name))
695 return name; 693 return name;
@@ -700,8 +698,7 @@ DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0,
700DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, 698DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0,
701 doc: /* Return the (or a) process associated with BUFFER. 699 doc: /* Return the (or a) process associated with BUFFER.
702BUFFER may be a buffer or the name of one. */) 700BUFFER may be a buffer or the name of one. */)
703 (buffer) 701 (register Lisp_Object buffer)
704 register Lisp_Object buffer;
705{ 702{
706 register Lisp_Object buf, tail, proc; 703 register Lisp_Object buf, tail, proc;
707 704
@@ -770,8 +767,7 @@ DEFUN ("delete-process", Fdelete_process, Sdelete_process, 1, 1, 0,
770 doc: /* Delete PROCESS: kill it and forget about it immediately. 767 doc: /* Delete PROCESS: kill it and forget about it immediately.
771PROCESS may be a process, a buffer, the name of a process or buffer, or 768PROCESS may be a process, a buffer, the name of a process or buffer, or
772nil, indicating the current buffer's process. */) 769nil, indicating the current buffer's process. */)
773 (process) 770 (register Lisp_Object process)
774 register Lisp_Object process;
775{ 771{
776 register struct Lisp_Process *p; 772 register struct Lisp_Process *p;
777 773
@@ -838,8 +834,7 @@ failed -- when a non-blocking connection has failed.
838nil -- if arg is a process name and no such process exists. 834nil -- if arg is a process name and no such process exists.
839PROCESS may be a process, a buffer, the name of a process, or 835PROCESS may be a process, a buffer, the name of a process, or
840nil, indicating the current buffer's process. */) 836nil, indicating the current buffer's process. */)
841 (process) 837 (register Lisp_Object process)
842 register Lisp_Object process;
843{ 838{
844 register struct Lisp_Process *p; 839 register struct Lisp_Process *p;
845 register Lisp_Object status; 840 register Lisp_Object status;
@@ -874,8 +869,7 @@ DEFUN ("process-exit-status", Fprocess_exit_status, Sprocess_exit_status,
874 1, 1, 0, 869 1, 1, 0,
875 doc: /* Return the exit status of PROCESS or the signal number that killed it. 870 doc: /* Return the exit status of PROCESS or the signal number that killed it.
876If PROCESS has not yet exited or died, return 0. */) 871If PROCESS has not yet exited or died, return 0. */)
877 (process) 872 (register Lisp_Object process)
878 register Lisp_Object process;
879{ 873{
880 CHECK_PROCESS (process); 874 CHECK_PROCESS (process);
881 if (XPROCESS (process)->raw_status_new) 875 if (XPROCESS (process)->raw_status_new)
@@ -889,8 +883,7 @@ DEFUN ("process-id", Fprocess_id, Sprocess_id, 1, 1, 0,
889 doc: /* Return the process id of PROCESS. 883 doc: /* Return the process id of PROCESS.
890This is the pid of the external process which PROCESS uses or talks to. 884This is the pid of the external process which PROCESS uses or talks to.
891For a network connection, this value is nil. */) 885For a network connection, this value is nil. */)
892 (process) 886 (register Lisp_Object process)
893 register Lisp_Object process;
894{ 887{
895 /* Assignment to EMACS_INT stops GCC whining about limited range of 888 /* Assignment to EMACS_INT stops GCC whining about limited range of
896 data type. */ 889 data type. */
@@ -905,8 +898,7 @@ DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0,
905 doc: /* Return the name of PROCESS, as a string. 898 doc: /* Return the name of PROCESS, as a string.
906This is the name of the program invoked in PROCESS, 899This is the name of the program invoked in PROCESS,
907possibly modified to make it unique among process names. */) 900possibly modified to make it unique among process names. */)
908 (process) 901 (register Lisp_Object process)
909 register Lisp_Object process;
910{ 902{
911 CHECK_PROCESS (process); 903 CHECK_PROCESS (process);
912 return XPROCESS (process)->name; 904 return XPROCESS (process)->name;
@@ -918,8 +910,7 @@ This is a list of strings, the first string being the program executed
918and the rest of the strings being the arguments given to it. 910and the rest of the strings being the arguments given to it.
919For a network or serial process, this is nil (process is running) or t 911For a network or serial process, this is nil (process is running) or t
920\(process is stopped). */) 912\(process is stopped). */)
921 (process) 913 (register Lisp_Object process)
922 register Lisp_Object process;
923{ 914{
924 CHECK_PROCESS (process); 915 CHECK_PROCESS (process);
925 return XPROCESS (process)->command; 916 return XPROCESS (process)->command;
@@ -929,8 +920,7 @@ DEFUN ("process-tty-name", Fprocess_tty_name, Sprocess_tty_name, 1, 1, 0,
929 doc: /* Return the name of the terminal PROCESS uses, or nil if none. 920 doc: /* Return the name of the terminal PROCESS uses, or nil if none.
930This is the terminal that the process itself reads and writes on, 921This is the terminal that the process itself reads and writes on,
931not the name of the pty that Emacs uses to talk with that terminal. */) 922not the name of the pty that Emacs uses to talk with that terminal. */)
932 (process) 923 (register Lisp_Object process)
933 register Lisp_Object process;
934{ 924{
935 CHECK_PROCESS (process); 925 CHECK_PROCESS (process);
936 return XPROCESS (process)->tty_name; 926 return XPROCESS (process)->tty_name;
@@ -939,8 +929,7 @@ not the name of the pty that Emacs uses to talk with that terminal. */)
939DEFUN ("set-process-buffer", Fset_process_buffer, Sset_process_buffer, 929DEFUN ("set-process-buffer", Fset_process_buffer, Sset_process_buffer,
940 2, 2, 0, 930 2, 2, 0,
941 doc: /* Set buffer associated with PROCESS to BUFFER (a buffer, or nil). */) 931 doc: /* Set buffer associated with PROCESS to BUFFER (a buffer, or nil). */)
942 (process, buffer) 932 (register Lisp_Object process, Lisp_Object buffer)
943 register Lisp_Object process, buffer;
944{ 933{
945 struct Lisp_Process *p; 934 struct Lisp_Process *p;
946 935
@@ -959,8 +948,7 @@ DEFUN ("process-buffer", Fprocess_buffer, Sprocess_buffer,
959 1, 1, 0, 948 1, 1, 0,
960 doc: /* Return the buffer PROCESS is associated with. 949 doc: /* Return the buffer PROCESS is associated with.
961Output from PROCESS is inserted in this buffer unless PROCESS has a filter. */) 950Output from PROCESS is inserted in this buffer unless PROCESS has a filter. */)
962 (process) 951 (register Lisp_Object process)
963 register Lisp_Object process;
964{ 952{
965 CHECK_PROCESS (process); 953 CHECK_PROCESS (process);
966 return XPROCESS (process)->buffer; 954 return XPROCESS (process)->buffer;
@@ -969,8 +957,7 @@ Output from PROCESS is inserted in this buffer unless PROCESS has a filter. */)
969DEFUN ("process-mark", Fprocess_mark, Sprocess_mark, 957DEFUN ("process-mark", Fprocess_mark, Sprocess_mark,
970 1, 1, 0, 958 1, 1, 0,
971 doc: /* Return the marker for the end of the last output from PROCESS. */) 959 doc: /* Return the marker for the end of the last output from PROCESS. */)
972 (process) 960 (register Lisp_Object process)
973 register Lisp_Object process;
974{ 961{
975 CHECK_PROCESS (process); 962 CHECK_PROCESS (process);
976 return XPROCESS (process)->mark; 963 return XPROCESS (process)->mark;
@@ -992,8 +979,7 @@ The string argument is normally a multibyte string, except:
992- if `default-enable-multibyte-characters' is nil, it is a unibyte 979- if `default-enable-multibyte-characters' is nil, it is a unibyte
993 string (the result of converting the decoded input multibyte 980 string (the result of converting the decoded input multibyte
994 string to unibyte with `string-make-unibyte'). */) 981 string to unibyte with `string-make-unibyte'). */)
995 (process, filter) 982 (register Lisp_Object process, Lisp_Object filter)
996 register Lisp_Object process, filter;
997{ 983{
998 struct Lisp_Process *p; 984 struct Lisp_Process *p;
999 985
@@ -1035,8 +1021,7 @@ DEFUN ("process-filter", Fprocess_filter, Sprocess_filter,
1035 1, 1, 0, 1021 1, 1, 0,
1036 doc: /* Returns the filter function of PROCESS; nil if none. 1022 doc: /* Returns the filter function of PROCESS; nil if none.
1037See `set-process-filter' for more info on filter functions. */) 1023See `set-process-filter' for more info on filter functions. */)
1038 (process) 1024 (register Lisp_Object process)
1039 register Lisp_Object process;
1040{ 1025{
1041 CHECK_PROCESS (process); 1026 CHECK_PROCESS (process);
1042 return XPROCESS (process)->filter; 1027 return XPROCESS (process)->filter;
@@ -1047,8 +1032,7 @@ DEFUN ("set-process-sentinel", Fset_process_sentinel, Sset_process_sentinel,
1047 doc: /* Give PROCESS the sentinel SENTINEL; nil for none. 1032 doc: /* Give PROCESS the sentinel SENTINEL; nil for none.
1048The sentinel is called as a function when the process changes state. 1033The sentinel is called as a function when the process changes state.
1049It gets two arguments: the process, and a string describing the change. */) 1034It gets two arguments: the process, and a string describing the change. */)
1050 (process, sentinel) 1035 (register Lisp_Object process, Lisp_Object sentinel)
1051 register Lisp_Object process, sentinel;
1052{ 1036{
1053 struct Lisp_Process *p; 1037 struct Lisp_Process *p;
1054 1038
@@ -1065,8 +1049,7 @@ DEFUN ("process-sentinel", Fprocess_sentinel, Sprocess_sentinel,
1065 1, 1, 0, 1049 1, 1, 0,
1066 doc: /* Return the sentinel of PROCESS; nil if none. 1050 doc: /* Return the sentinel of PROCESS; nil if none.
1067See `set-process-sentinel' for more info on sentinels. */) 1051See `set-process-sentinel' for more info on sentinels. */)
1068 (process) 1052 (register Lisp_Object process)
1069 register Lisp_Object process;
1070{ 1053{
1071 CHECK_PROCESS (process); 1054 CHECK_PROCESS (process);
1072 return XPROCESS (process)->sentinel; 1055 return XPROCESS (process)->sentinel;
@@ -1075,8 +1058,7 @@ See `set-process-sentinel' for more info on sentinels. */)
1075DEFUN ("set-process-window-size", Fset_process_window_size, 1058DEFUN ("set-process-window-size", Fset_process_window_size,
1076 Sset_process_window_size, 3, 3, 0, 1059 Sset_process_window_size, 3, 3, 0,
1077 doc: /* Tell PROCESS that it has logical window size HEIGHT and WIDTH. */) 1060 doc: /* Tell PROCESS that it has logical window size HEIGHT and WIDTH. */)
1078 (process, height, width) 1061 (register Lisp_Object process, Lisp_Object height, Lisp_Object width)
1079 register Lisp_Object process, height, width;
1080{ 1062{
1081 CHECK_PROCESS (process); 1063 CHECK_PROCESS (process);
1082 CHECK_NATNUM (height); 1064 CHECK_NATNUM (height);
@@ -1107,8 +1089,7 @@ is more appropriate for saving the process buffer.
1107Binding the variable `inherit-process-coding-system' to non-nil before 1089Binding the variable `inherit-process-coding-system' to non-nil before
1108starting the process is an alternative way of setting the inherit flag 1090starting the process is an alternative way of setting the inherit flag
1109for the process which will run. */) 1091for the process which will run. */)
1110 (process, flag) 1092 (register Lisp_Object process, Lisp_Object flag)
1111 register Lisp_Object process, flag;
1112{ 1093{
1113 CHECK_PROCESS (process); 1094 CHECK_PROCESS (process);
1114 XPROCESS (process)->inherit_coding_system_flag = !NILP (flag); 1095 XPROCESS (process)->inherit_coding_system_flag = !NILP (flag);
@@ -1122,8 +1103,7 @@ DEFUN ("process-inherit-coding-system-flag",
1122If this flag is t, `buffer-file-coding-system' of the buffer 1103If this flag is t, `buffer-file-coding-system' of the buffer
1123associated with PROCESS will inherit the coding system used to decode 1104associated with PROCESS will inherit the coding system used to decode
1124the process output. */) 1105the process output. */)
1125 (process) 1106 (register Lisp_Object process)
1126 register Lisp_Object process;
1127{ 1107{
1128 CHECK_PROCESS (process); 1108 CHECK_PROCESS (process);
1129 return XPROCESS (process)->inherit_coding_system_flag ? Qt : Qnil; 1109 return XPROCESS (process)->inherit_coding_system_flag ? Qt : Qnil;
@@ -1135,8 +1115,7 @@ DEFUN ("set-process-query-on-exit-flag",
1135 doc: /* Specify if query is needed for PROCESS when Emacs is exited. 1115 doc: /* Specify if query is needed for PROCESS when Emacs is exited.
1136If the second argument FLAG is non-nil, Emacs will query the user before 1116If the second argument FLAG is non-nil, Emacs will query the user before
1137exiting or killing a buffer if PROCESS is running. */) 1117exiting or killing a buffer if PROCESS is running. */)
1138 (process, flag) 1118 (register Lisp_Object process, Lisp_Object flag)
1139 register Lisp_Object process, flag;
1140{ 1119{
1141 CHECK_PROCESS (process); 1120 CHECK_PROCESS (process);
1142 XPROCESS (process)->kill_without_query = NILP (flag); 1121 XPROCESS (process)->kill_without_query = NILP (flag);
@@ -1147,8 +1126,7 @@ DEFUN ("process-query-on-exit-flag",
1147 Fprocess_query_on_exit_flag, Sprocess_query_on_exit_flag, 1126 Fprocess_query_on_exit_flag, Sprocess_query_on_exit_flag,
1148 1, 1, 0, 1127 1, 1, 0,
1149 doc: /* Return the current value of query-on-exit flag for PROCESS. */) 1128 doc: /* Return the current value of query-on-exit flag for PROCESS. */)
1150 (process) 1129 (register Lisp_Object process)
1151 register Lisp_Object process;
1152{ 1130{
1153 CHECK_PROCESS (process); 1131 CHECK_PROCESS (process);
1154 return (XPROCESS (process)->kill_without_query ? Qnil : Qt); 1132 return (XPROCESS (process)->kill_without_query ? Qnil : Qt);
@@ -1168,8 +1146,7 @@ connection. If KEY is t, the complete contact information for the
1168connection is returned, else the specific value for the keyword KEY is 1146connection is returned, else the specific value for the keyword KEY is
1169returned. See `make-network-process' or `make-serial-process' for a 1147returned. See `make-network-process' or `make-serial-process' for a
1170list of keywords. */) 1148list of keywords. */)
1171 (process, key) 1149 (register Lisp_Object process, Lisp_Object key)
1172 register Lisp_Object process, key;
1173{ 1150{
1174 Lisp_Object contact; 1151 Lisp_Object contact;
1175 1152
@@ -1197,8 +1174,7 @@ list of keywords. */)
1197DEFUN ("process-plist", Fprocess_plist, Sprocess_plist, 1174DEFUN ("process-plist", Fprocess_plist, Sprocess_plist,
1198 1, 1, 0, 1175 1, 1, 0,
1199 doc: /* Return the plist of PROCESS. */) 1176 doc: /* Return the plist of PROCESS. */)
1200 (process) 1177 (register Lisp_Object process)
1201 register Lisp_Object process;
1202{ 1178{
1203 CHECK_PROCESS (process); 1179 CHECK_PROCESS (process);
1204 return XPROCESS (process)->plist; 1180 return XPROCESS (process)->plist;
@@ -1207,8 +1183,7 @@ DEFUN ("process-plist", Fprocess_plist, Sprocess_plist,
1207DEFUN ("set-process-plist", Fset_process_plist, Sset_process_plist, 1183DEFUN ("set-process-plist", Fset_process_plist, Sset_process_plist,
1208 2, 2, 0, 1184 2, 2, 0,
1209 doc: /* Replace the plist of PROCESS with PLIST. Returns PLIST. */) 1185 doc: /* Replace the plist of PROCESS with PLIST. Returns PLIST. */)
1210 (process, plist) 1186 (register Lisp_Object process, Lisp_Object plist)
1211 register Lisp_Object process, plist;
1212{ 1187{
1213 CHECK_PROCESS (process); 1188 CHECK_PROCESS (process);
1214 CHECK_LIST (plist); 1189 CHECK_LIST (plist);
@@ -1223,8 +1198,7 @@ DEFUN ("process-connection", Fprocess_connection, Sprocess_connection, 1, 1, 0,
1223 doc: /* Return the connection type of PROCESS. 1198 doc: /* Return the connection type of PROCESS.
1224The value is nil for a pipe, t or `pty' for a pty, or `stream' for 1199The value is nil for a pipe, t or `pty' for a pty, or `stream' for
1225a socket connection. */) 1200a socket connection. */)
1226 (process) 1201 (Lisp_Object process)
1227 Lisp_Object process;
1228{ 1202{
1229 return XPROCESS (process)->type; 1203 return XPROCESS (process)->type;
1230} 1204}
@@ -1235,8 +1209,7 @@ DEFUN ("process-type", Fprocess_type, Sprocess_type, 1, 1, 0,
1235The value is either the symbol `real', `network', or `serial'. 1209The value is either the symbol `real', `network', or `serial'.
1236PROCESS may be a process, a buffer, the name of a process or buffer, or 1210PROCESS may be a process, a buffer, the name of a process or buffer, or
1237nil, indicating the current buffer's process. */) 1211nil, indicating the current buffer's process. */)
1238 (process) 1212 (Lisp_Object process)
1239 Lisp_Object process;
1240{ 1213{
1241 Lisp_Object proc; 1214 Lisp_Object proc;
1242 proc = get_process (process); 1215 proc = get_process (process);
@@ -1252,8 +1225,7 @@ An 8 or 9 element vector represents an IPv6 address (with port number).
1252If optional second argument OMIT-PORT is non-nil, don't include a port 1225If optional second argument OMIT-PORT is non-nil, don't include a port
1253number in the string, even when present in ADDRESS. 1226number in the string, even when present in ADDRESS.
1254Returns nil if format of ADDRESS is invalid. */) 1227Returns nil if format of ADDRESS is invalid. */)
1255 (address, omit_port) 1228 (Lisp_Object address, Lisp_Object omit_port)
1256 Lisp_Object address, omit_port;
1257{ 1229{
1258 if (NILP (address)) 1230 if (NILP (address))
1259 return Qnil; 1231 return Qnil;
@@ -1555,8 +1527,7 @@ If optional argument QUERY-ONLY is non-nil, only processes with
1555the query-on-exit flag set will be listed. 1527the query-on-exit flag set will be listed.
1556Any process listed as exited or signaled is actually eliminated 1528Any process listed as exited or signaled is actually eliminated
1557after the listing is made. */) 1529after the listing is made. */)
1558 (query_only) 1530 (Lisp_Object query_only)
1559 Lisp_Object query_only;
1560{ 1531{
1561 internal_with_output_to_temp_buffer ("*Process List*", 1532 internal_with_output_to_temp_buffer ("*Process List*",
1562 list_processes_1, query_only); 1533 list_processes_1, query_only);
@@ -1565,7 +1536,7 @@ after the listing is made. */)
1565 1536
1566DEFUN ("process-list", Fprocess_list, Sprocess_list, 0, 0, 0, 1537DEFUN ("process-list", Fprocess_list, Sprocess_list, 0, 0, 0,
1567 doc: /* Return a list of all processes. */) 1538 doc: /* Return a list of all processes. */)
1568 () 1539 (void)
1569{ 1540{
1570 return Fmapcar (Qcdr, Vprocess_alist); 1541 return Fmapcar (Qcdr, Vprocess_alist);
1571} 1542}
@@ -1593,9 +1564,7 @@ the command through a shell and redirect one of them using the shell
1593syntax. 1564syntax.
1594 1565
1595usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) 1566usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */)
1596 (nargs, args) 1567 (int nargs, register Lisp_Object *args)
1597 int nargs;
1598 register Lisp_Object *args;
1599{ 1568{
1600 Lisp_Object buffer, name, program, proc, current_dir, tem; 1569 Lisp_Object buffer, name, program, proc, current_dir, tem;
1601 register unsigned char **new_argv; 1570 register unsigned char **new_argv;
@@ -2504,8 +2473,7 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int
2504DEFUN ("process-datagram-address", Fprocess_datagram_address, Sprocess_datagram_address, 2473DEFUN ("process-datagram-address", Fprocess_datagram_address, Sprocess_datagram_address,
2505 1, 1, 0, 2474 1, 1, 0,
2506 doc: /* Get the current datagram address associated with PROCESS. */) 2475 doc: /* Get the current datagram address associated with PROCESS. */)
2507 (process) 2476 (Lisp_Object process)
2508 Lisp_Object process;
2509{ 2477{
2510 int channel; 2478 int channel;
2511 2479
@@ -2523,8 +2491,7 @@ DEFUN ("set-process-datagram-address", Fset_process_datagram_address, Sset_proce
2523 2, 2, 0, 2491 2, 2, 0,
2524 doc: /* Set the datagram address for PROCESS to ADDRESS. 2492 doc: /* Set the datagram address for PROCESS to ADDRESS.
2525Returns nil upon error setting address, ADDRESS otherwise. */) 2493Returns nil upon error setting address, ADDRESS otherwise. */)
2526 (process, address) 2494 (Lisp_Object process, Lisp_Object address)
2527 Lisp_Object process, address;
2528{ 2495{
2529 int channel; 2496 int channel;
2530 int family, len; 2497 int family, len;
@@ -2685,9 +2652,7 @@ DEFUN ("set-network-process-option",
2685See `make-network-process' for a list of options and values. 2652See `make-network-process' for a list of options and values.
2686If optional fourth arg NO-ERROR is non-nil, don't signal an error if 2653If optional fourth arg NO-ERROR is non-nil, don't signal an error if
2687OPTION is not a supported option, return nil instead; otherwise return t. */) 2654OPTION is not a supported option, return nil instead; otherwise return t. */)
2688 (process, option, value, no_error) 2655 (Lisp_Object process, Lisp_Object option, Lisp_Object value, Lisp_Object no_error)
2689 Lisp_Object process, option, value;
2690 Lisp_Object no_error;
2691{ 2656{
2692 int s; 2657 int s;
2693 struct Lisp_Process *p; 2658 struct Lisp_Process *p;
@@ -2774,9 +2739,7 @@ Examples:
2774\(serial-process-configure :port "\\\\.\\COM13" :bytesize 7) 2739\(serial-process-configure :port "\\\\.\\COM13" :bytesize 7)
2775 2740
2776usage: (serial-process-configure &rest ARGS) */) 2741usage: (serial-process-configure &rest ARGS) */)
2777 (nargs, args) 2742 (int nargs, Lisp_Object *args)
2778 int nargs;
2779 Lisp_Object *args;
2780{ 2743{
2781 struct Lisp_Process *p; 2744 struct Lisp_Process *p;
2782 Lisp_Object contact = Qnil; 2745 Lisp_Object contact = Qnil;
@@ -2893,9 +2856,7 @@ Examples:
2893\(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) 2856\(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil)
2894 2857
2895usage: (make-serial-process &rest ARGS) */) 2858usage: (make-serial-process &rest ARGS) */)
2896 (nargs, args) 2859 (int nargs, Lisp_Object *args)
2897 int nargs;
2898 Lisp_Object *args;
2899{ 2860{
2900 int fd = -1; 2861 int fd = -1;
2901 Lisp_Object proc, contact, port; 2862 Lisp_Object proc, contact, port;
@@ -3174,9 +3135,7 @@ The original argument list, modified with the actual connection
3174information, is available via the `process-contact' function. 3135information, is available via the `process-contact' function.
3175 3136
3176usage: (make-network-process &rest ARGS) */) 3137usage: (make-network-process &rest ARGS) */)
3177 (nargs, args) 3138 (int nargs, Lisp_Object *args)
3178 int nargs;
3179 Lisp_Object *args;
3180{ 3139{
3181 Lisp_Object proc; 3140 Lisp_Object proc;
3182 Lisp_Object contact; 3141 Lisp_Object contact;
@@ -3890,7 +3849,7 @@ DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_lis
3890Each element is a cons, the car of which is a string containing the 3849Each element is a cons, the car of which is a string containing the
3891interface name, and the cdr is the network address in internal 3850interface name, and the cdr is the network address in internal
3892format; see the description of ADDRESS in `make-network-process'. */) 3851format; see the description of ADDRESS in `make-network-process'. */)
3893 () 3852 (void)
3894{ 3853{
3895 struct ifconf ifconf; 3854 struct ifconf ifconf;
3896 struct ifreq *ifreqs = NULL; 3855 struct ifreq *ifreqs = NULL;
@@ -4025,8 +3984,7 @@ The return value is a list (ADDR BCAST NETMASK HWADDR FLAGS),
4025where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address, 3984where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address,
4026NETMASK is the layer 3 network mask, HWADDR is the layer 2 addres, and 3985NETMASK is the layer 3 network mask, HWADDR is the layer 2 addres, and
4027FLAGS is the current flags of the interface. */) 3986FLAGS is the current flags of the interface. */)
4028 (ifname) 3987 (Lisp_Object ifname)
4029 Lisp_Object ifname;
4030{ 3988{
4031 struct ifreq rq; 3989 struct ifreq rq;
4032 Lisp_Object res = Qnil; 3990 Lisp_Object res = Qnil;
@@ -4234,8 +4192,7 @@ If optional fourth arg JUST-THIS-ONE is non-nil, only accept output
4234from PROCESS, suspending reading output from other processes. 4192from PROCESS, suspending reading output from other processes.
4235If JUST-THIS-ONE is an integer, don't run any timers either. 4193If JUST-THIS-ONE is an integer, don't run any timers either.
4236Return non-nil if we received any output before the timeout expired. */) 4194Return non-nil if we received any output before the timeout expired. */)
4237 (process, seconds, millisec, just_this_one) 4195 (register Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, Lisp_Object just_this_one)
4238 register Lisp_Object process, seconds, millisec, just_this_one;
4239{ 4196{
4240 int secs, usecs = 0; 4197 int secs, usecs = 0;
4241 4198
@@ -5576,7 +5533,7 @@ DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_
5576 0, 0, 0, 5533 0, 0, 0,
5577 doc: /* Returns non-nil if Emacs is waiting for input from the user. 5534 doc: /* Returns non-nil if Emacs is waiting for input from the user.
5578This is intended for use by asynchronous process output filters and sentinels. */) 5535This is intended for use by asynchronous process output filters and sentinels. */)
5579 () 5536 (void)
5580{ 5537{
5581 return (waiting_for_user_input_p ? Qt : Qnil); 5538 return (waiting_for_user_input_p ? Qt : Qnil);
5582} 5539}
@@ -5851,8 +5808,7 @@ Called from program, takes three arguments, PROCESS, START and END.
5851If the region is more than 500 characters long, 5808If the region is more than 500 characters long,
5852it is sent in several bunches. This may happen even for shorter regions. 5809it is sent in several bunches. This may happen even for shorter regions.
5853Output from processes can arrive in between bunches. */) 5810Output from processes can arrive in between bunches. */)
5854 (process, start, end) 5811 (Lisp_Object process, Lisp_Object start, Lisp_Object end)
5855 Lisp_Object process, start, end;
5856{ 5812{
5857 Lisp_Object proc; 5813 Lisp_Object proc;
5858 int start1, end1; 5814 int start1, end1;
@@ -5879,8 +5835,7 @@ nil, indicating the current buffer's process.
5879If STRING is more than 500 characters long, 5835If STRING is more than 500 characters long,
5880it is sent in several bunches. This may happen even for shorter strings. 5836it is sent in several bunches. This may happen even for shorter strings.
5881Output from processes can arrive in between bunches. */) 5837Output from processes can arrive in between bunches. */)
5882 (process, string) 5838 (Lisp_Object process, Lisp_Object string)
5883 Lisp_Object process, string;
5884{ 5839{
5885 Lisp_Object proc; 5840 Lisp_Object proc;
5886 CHECK_STRING (string); 5841 CHECK_STRING (string);
@@ -5921,8 +5876,7 @@ DEFUN ("process-running-child-p", Fprocess_running_child_p,
5921 doc: /* Return t if PROCESS has given the terminal to a child. 5876 doc: /* Return t if PROCESS has given the terminal to a child.
5922If the operating system does not make it possible to find out, 5877If the operating system does not make it possible to find out,
5923return t unconditionally. */) 5878return t unconditionally. */)
5924 (process) 5879 (Lisp_Object process)
5925 Lisp_Object process;
5926{ 5880{
5927 /* Initialize in case ioctl doesn't exist or gives an error, 5881 /* Initialize in case ioctl doesn't exist or gives an error,
5928 in a way that will cause returning t. */ 5882 in a way that will cause returning t. */
@@ -6183,8 +6137,7 @@ rather than the shell.
6183 6137
6184If CURRENT-GROUP is `lambda', and if the shell owns the terminal, 6138If CURRENT-GROUP is `lambda', and if the shell owns the terminal,
6185don't send the signal. */) 6139don't send the signal. */)
6186 (process, current_group) 6140 (Lisp_Object process, Lisp_Object current_group)
6187 Lisp_Object process, current_group;
6188{ 6141{
6189 process_send_signal (process, SIGINT, current_group, 0); 6142 process_send_signal (process, SIGINT, current_group, 0);
6190 return process; 6143 return process;
@@ -6193,8 +6146,7 @@ don't send the signal. */)
6193DEFUN ("kill-process", Fkill_process, Skill_process, 0, 2, 0, 6146DEFUN ("kill-process", Fkill_process, Skill_process, 0, 2, 0,
6194 doc: /* Kill process PROCESS. May be process or name of one. 6147 doc: /* Kill process PROCESS. May be process or name of one.
6195See function `interrupt-process' for more details on usage. */) 6148See function `interrupt-process' for more details on usage. */)
6196 (process, current_group) 6149 (Lisp_Object process, Lisp_Object current_group)
6197 Lisp_Object process, current_group;
6198{ 6150{
6199 process_send_signal (process, SIGKILL, current_group, 0); 6151 process_send_signal (process, SIGKILL, current_group, 0);
6200 return process; 6152 return process;
@@ -6203,8 +6155,7 @@ See function `interrupt-process' for more details on usage. */)
6203DEFUN ("quit-process", Fquit_process, Squit_process, 0, 2, 0, 6155DEFUN ("quit-process", Fquit_process, Squit_process, 0, 2, 0,
6204 doc: /* Send QUIT signal to process PROCESS. May be process or name of one. 6156 doc: /* Send QUIT signal to process PROCESS. May be process or name of one.
6205See function `interrupt-process' for more details on usage. */) 6157See function `interrupt-process' for more details on usage. */)
6206 (process, current_group) 6158 (Lisp_Object process, Lisp_Object current_group)
6207 Lisp_Object process, current_group;
6208{ 6159{
6209 process_send_signal (process, SIGQUIT, current_group, 0); 6160 process_send_signal (process, SIGQUIT, current_group, 0);
6210 return process; 6161 return process;
@@ -6215,8 +6166,7 @@ DEFUN ("stop-process", Fstop_process, Sstop_process, 0, 2, 0,
6215See function `interrupt-process' for more details on usage. 6166See function `interrupt-process' for more details on usage.
6216If PROCESS is a network or serial process, inhibit handling of incoming 6167If PROCESS is a network or serial process, inhibit handling of incoming
6217traffic. */) 6168traffic. */)
6218 (process, current_group) 6169 (Lisp_Object process, Lisp_Object current_group)
6219 Lisp_Object process, current_group;
6220{ 6170{
6221#ifdef HAVE_SOCKETS 6171#ifdef HAVE_SOCKETS
6222 if (PROCESSP (process) && (NETCONN_P (process) || SERIALCONN_P (process))) 6172 if (PROCESSP (process) && (NETCONN_P (process) || SERIALCONN_P (process)))
@@ -6247,8 +6197,7 @@ DEFUN ("continue-process", Fcontinue_process, Scontinue_process, 0, 2, 0,
6247See function `interrupt-process' for more details on usage. 6197See function `interrupt-process' for more details on usage.
6248If PROCESS is a network or serial process, resume handling of incoming 6198If PROCESS is a network or serial process, resume handling of incoming
6249traffic. */) 6199traffic. */)
6250 (process, current_group) 6200 (Lisp_Object process, Lisp_Object current_group)
6251 Lisp_Object process, current_group;
6252{ 6201{
6253#ifdef HAVE_SOCKETS 6202#ifdef HAVE_SOCKETS
6254 if (PROCESSP (process) && (NETCONN_P (process) || SERIALCONN_P (process))) 6203 if (PROCESSP (process) && (NETCONN_P (process) || SERIALCONN_P (process)))
@@ -6289,8 +6238,7 @@ PROCESS may also be a number specifying the process id of the
6289process to signal; in this case, the process need not be a child of 6238process to signal; in this case, the process need not be a child of
6290this Emacs. 6239this Emacs.
6291SIGCODE may be an integer, or a symbol whose name is a signal name. */) 6240SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6292 (process, sigcode) 6241 (Lisp_Object process, Lisp_Object sigcode)
6293 Lisp_Object process, sigcode;
6294{ 6242{
6295 pid_t pid; 6243 pid_t pid;
6296 6244
@@ -6457,8 +6405,7 @@ through a pipe (as opposed to a pty), then you cannot send any more
6457text to PROCESS after you call this function. 6405text to PROCESS after you call this function.
6458If PROCESS is a serial process, wait until all output written to the 6406If PROCESS is a serial process, wait until all output written to the
6459process has been transmitted to the serial port. */) 6407process has been transmitted to the serial port. */)
6460 (process) 6408 (Lisp_Object process)
6461 Lisp_Object process;
6462{ 6409{
6463 Lisp_Object proc; 6410 Lisp_Object proc;
6464 struct coding_system *coding; 6411 struct coding_system *coding;
@@ -6947,8 +6894,7 @@ DEFUN ("set-process-coding-system", Fset_process_coding_system,
6947 doc: /* Set coding systems of PROCESS to DECODING and ENCODING. 6894 doc: /* Set coding systems of PROCESS to DECODING and ENCODING.
6948DECODING will be used to decode subprocess output and ENCODING to 6895DECODING will be used to decode subprocess output and ENCODING to
6949encode subprocess input. */) 6896encode subprocess input. */)
6950 (process, decoding, encoding) 6897 (register Lisp_Object process, Lisp_Object decoding, Lisp_Object encoding)
6951 register Lisp_Object process, decoding, encoding;
6952{ 6898{
6953 register struct Lisp_Process *p; 6899 register struct Lisp_Process *p;
6954 6900
@@ -6971,8 +6917,7 @@ encode subprocess input. */)
6971DEFUN ("process-coding-system", 6917DEFUN ("process-coding-system",
6972 Fprocess_coding_system, Sprocess_coding_system, 1, 1, 0, 6918 Fprocess_coding_system, Sprocess_coding_system, 1, 1, 0,
6973 doc: /* Return a cons of coding systems for decoding and encoding of PROCESS. */) 6919 doc: /* Return a cons of coding systems for decoding and encoding of PROCESS. */)
6974 (process) 6920 (register Lisp_Object process)
6975 register Lisp_Object process;
6976{ 6921{
6977 CHECK_PROCESS (process); 6922 CHECK_PROCESS (process);
6978 return Fcons (XPROCESS (process)->decode_coding_system, 6923 return Fcons (XPROCESS (process)->decode_coding_system,
@@ -6986,8 +6931,7 @@ If FLAG is non-nil, the filter is given multibyte strings.
6986If FLAG is nil, the filter is given unibyte strings. In this case, 6931If FLAG is nil, the filter is given unibyte strings. In this case,
6987all character code conversion except for end-of-line conversion is 6932all character code conversion except for end-of-line conversion is
6988suppressed. */) 6933suppressed. */)
6989 (process, flag) 6934 (Lisp_Object process, Lisp_Object flag)
6990 Lisp_Object process, flag;
6991{ 6935{
6992 register struct Lisp_Process *p; 6936 register struct Lisp_Process *p;
6993 6937
@@ -7003,8 +6947,7 @@ suppressed. */)
7003DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p, 6947DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p,
7004 Sprocess_filter_multibyte_p, 1, 1, 0, 6948 Sprocess_filter_multibyte_p, 1, 1, 0,
7005 doc: /* Return t if a multibyte string is given to PROCESS's filter.*/) 6949 doc: /* Return t if a multibyte string is given to PROCESS's filter.*/)
7006 (process) 6950 (Lisp_Object process)
7007 Lisp_Object process;
7008{ 6951{
7009 register struct Lisp_Process *p; 6952 register struct Lisp_Process *p;
7010 struct coding_system *coding; 6953 struct coding_system *coding;
@@ -7126,7 +7069,7 @@ DEFUN ("list-system-processes", Flist_system_processes, Slist_system_processes,
7126If this functionality is unsupported, return nil. 7069If this functionality is unsupported, return nil.
7127 7070
7128See `process-attributes' for getting attributes of a process given its ID. */) 7071See `process-attributes' for getting attributes of a process given its ID. */)
7129 () 7072 (void)
7130{ 7073{
7131 return list_system_processes (); 7074 return list_system_processes ();
7132} 7075}
@@ -7182,9 +7125,7 @@ integer or floating point values.
7182 pmem -- percents of total physical memory used by process's resident set 7125 pmem -- percents of total physical memory used by process's resident set
7183 (floating-point number) 7126 (floating-point number)
7184 args -- command line which invoked the process (string). */) 7127 args -- command line which invoked the process (string). */)
7185 (pid) 7128 ( Lisp_Object pid)
7186
7187 Lisp_Object pid;
7188{ 7129{
7189 return system_process_attributes (pid); 7130 return system_process_attributes (pid);
7190} 7131}
@@ -7833,8 +7774,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
7833 make-docfile does not pay attention to #if, for good reason! */ 7774 make-docfile does not pay attention to #if, for good reason! */
7834DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, 7775DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0,
7835 0) 7776 0)
7836 (name) 7777 (register Lisp_Object name)
7837 register Lisp_Object name;
7838{ 7778{
7839 return Qnil; 7779 return Qnil;
7840} 7780}
@@ -7845,8 +7785,7 @@ DEFUN ("process-inherit-coding-system-flag",
7845 Fprocess_inherit_coding_system_flag, Sprocess_inherit_coding_system_flag, 7785 Fprocess_inherit_coding_system_flag, Sprocess_inherit_coding_system_flag,
7846 1, 1, 0, 7786 1, 1, 0,
7847 0) 7787 0)
7848 (process) 7788 (register Lisp_Object process)
7849 register Lisp_Object process;
7850{ 7789{
7851 /* Ignore the argument and return the value of 7790 /* Ignore the argument and return the value of
7852 inherit-process-coding-system. */ 7791 inherit-process-coding-system. */
@@ -7894,7 +7833,7 @@ DEFUN ("list-system-processes", Flist_system_processes, Slist_system_processes,
7894If this functionality is unsupported, return nil. 7833If this functionality is unsupported, return nil.
7895 7834
7896See `process-attributes' for getting attributes of a process given its ID. */) 7835See `process-attributes' for getting attributes of a process given its ID. */)
7897 () 7836 (void)
7898{ 7837{
7899 return list_system_processes (); 7838 return list_system_processes ();
7900} 7839}
@@ -7950,9 +7889,7 @@ integer or floating point values.
7950 pmem -- percents of total physical memory used by process's resident set 7889 pmem -- percents of total physical memory used by process's resident set
7951 (floating-point number) 7890 (floating-point number)
7952 args -- command line which invoked the process (string). */) 7891 args -- command line which invoked the process (string). */)
7953 (pid) 7892 ( Lisp_Object pid)
7954
7955 Lisp_Object pid;
7956{ 7893{
7957 return system_process_attributes (pid); 7894 return system_process_attributes (pid);
7958} 7895}