comparison src/process.c @ 109179:8cfee7d2955f

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.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 08 Jul 2010 14:25:08 -0700
parents fdb79ffbe27c
children ff3561236472
comparison
equal deleted inserted replaced
109178:53f8ebcd9a97 109179:8cfee7d2955f
678 proc_encode_coding_system[outch]); 678 proc_encode_coding_system[outch]);
679 } 679 }
680 680
681 DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, 681 DEFUN ("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
689 DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0, 688 DEFUN ("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;
696 CHECK_STRING (name); 694 CHECK_STRING (name);
697 return Fcdr (Fassoc (name, Vprocess_alist)); 695 return Fcdr (Fassoc (name, Vprocess_alist));
698 } 696 }
699 697
700 DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, 698 DEFUN ("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.
702 BUFFER may be a buffer or the name of one. */) 700 BUFFER 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
708 if (NILP (buffer)) return Qnil; 705 if (NILP (buffer)) return Qnil;
709 buf = Fget_buffer (buffer); 706 buf = Fget_buffer (buffer);
768 765
769 DEFUN ("delete-process", Fdelete_process, Sdelete_process, 1, 1, 0, 766 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.
771 PROCESS may be a process, a buffer, the name of a process or buffer, or 768 PROCESS may be a process, a buffer, the name of a process or buffer, or
772 nil, indicating the current buffer's process. */) 769 nil, 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
778 process = get_process (process); 774 process = get_process (process);
779 p = XPROCESS (process); 775 p = XPROCESS (process);
836 connect -- when waiting for a non-blocking connection to complete. 832 connect -- when waiting for a non-blocking connection to complete.
837 failed -- when a non-blocking connection has failed. 833 failed -- when a non-blocking connection has failed.
838 nil -- if arg is a process name and no such process exists. 834 nil -- if arg is a process name and no such process exists.
839 PROCESS may be a process, a buffer, the name of a process, or 835 PROCESS may be a process, a buffer, the name of a process, or
840 nil, indicating the current buffer's process. */) 836 nil, 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;
846 841
847 if (STRINGP (process)) 842 if (STRINGP (process))
872 867
873 DEFUN ("process-exit-status", Fprocess_exit_status, Sprocess_exit_status, 868 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.
876 If PROCESS has not yet exited or died, return 0. */) 871 If 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)
882 update_status (XPROCESS (process)); 876 update_status (XPROCESS (process));
883 if (CONSP (XPROCESS (process)->status)) 877 if (CONSP (XPROCESS (process)->status))
887 881
888 DEFUN ("process-id", Fprocess_id, Sprocess_id, 1, 1, 0, 882 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.
890 This is the pid of the external process which PROCESS uses or talks to. 884 This is the pid of the external process which PROCESS uses or talks to.
891 For a network connection, this value is nil. */) 885 For 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. */
897 EMACS_INT pid; 890 EMACS_INT pid;
898 891
903 896
904 DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0, 897 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.
906 This is the name of the program invoked in PROCESS, 899 This is the name of the program invoked in PROCESS,
907 possibly modified to make it unique among process names. */) 900 possibly 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;
913 } 905 }
914 906
916 doc: /* Return the command that was executed to start PROCESS. 908 doc: /* Return the command that was executed to start PROCESS.
917 This is a list of strings, the first string being the program executed 909 This is a list of strings, the first string being the program executed
918 and the rest of the strings being the arguments given to it. 910 and the rest of the strings being the arguments given to it.
919 For a network or serial process, this is nil (process is running) or t 911 For 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;
926 } 917 }
927 918
928 DEFUN ("process-tty-name", Fprocess_tty_name, Sprocess_tty_name, 1, 1, 0, 919 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.
930 This is the terminal that the process itself reads and writes on, 921 This is the terminal that the process itself reads and writes on,
931 not the name of the pty that Emacs uses to talk with that terminal. */) 922 not 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;
937 } 927 }
938 928
939 DEFUN ("set-process-buffer", Fset_process_buffer, Sset_process_buffer, 929 DEFUN ("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
947 CHECK_PROCESS (process); 936 CHECK_PROCESS (process);
948 if (!NILP (buffer)) 937 if (!NILP (buffer))
957 946
958 DEFUN ("process-buffer", Fprocess_buffer, Sprocess_buffer, 947 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.
961 Output from PROCESS is inserted in this buffer unless PROCESS has a filter. */) 950 Output 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;
967 } 955 }
968 956
969 DEFUN ("process-mark", Fprocess_mark, Sprocess_mark, 957 DEFUN ("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;
977 } 964 }
978 965
990 - if the process' input coding system is no-conversion or raw-text, 977 - if the process' input coding system is no-conversion or raw-text,
991 it is a unibyte string (the non-converted input), or else 978 it is a unibyte string (the non-converted input), or else
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
1000 CHECK_PROCESS (process); 986 CHECK_PROCESS (process);
1001 p = XPROCESS (process); 987 p = XPROCESS (process);
1033 1019
1034 DEFUN ("process-filter", Fprocess_filter, Sprocess_filter, 1020 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.
1037 See `set-process-filter' for more info on filter functions. */) 1023 See `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;
1043 } 1028 }
1044 1029
1045 DEFUN ("set-process-sentinel", Fset_process_sentinel, Sset_process_sentinel, 1030 DEFUN ("set-process-sentinel", Fset_process_sentinel, Sset_process_sentinel,
1046 2, 2, 0, 1031 2, 2, 0,
1047 doc: /* Give PROCESS the sentinel SENTINEL; nil for none. 1032 doc: /* Give PROCESS the sentinel SENTINEL; nil for none.
1048 The sentinel is called as a function when the process changes state. 1033 The sentinel is called as a function when the process changes state.
1049 It gets two arguments: the process, and a string describing the change. */) 1034 It 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
1055 CHECK_PROCESS (process); 1039 CHECK_PROCESS (process);
1056 p = XPROCESS (process); 1040 p = XPROCESS (process);
1063 1047
1064 DEFUN ("process-sentinel", Fprocess_sentinel, Sprocess_sentinel, 1048 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.
1067 See `set-process-sentinel' for more info on sentinels. */) 1051 See `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;
1073 } 1056 }
1074 1057
1075 DEFUN ("set-process-window-size", Fset_process_window_size, 1058 DEFUN ("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);
1083 CHECK_NATNUM (width); 1065 CHECK_NATNUM (width);
1084 1066
1105 is more appropriate for saving the process buffer. 1087 is more appropriate for saving the process buffer.
1106 1088
1107 Binding the variable `inherit-process-coding-system' to non-nil before 1089 Binding the variable `inherit-process-coding-system' to non-nil before
1108 starting the process is an alternative way of setting the inherit flag 1090 starting the process is an alternative way of setting the inherit flag
1109 for the process which will run. */) 1091 for 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);
1115 return flag; 1096 return flag;
1116 } 1097 }
1120 1, 1, 0, 1101 1, 1, 0,
1121 doc: /* Return the value of inherit-coding-system flag for PROCESS. 1102 doc: /* Return the value of inherit-coding-system flag for PROCESS.
1122 If this flag is t, `buffer-file-coding-system' of the buffer 1103 If this flag is t, `buffer-file-coding-system' of the buffer
1123 associated with PROCESS will inherit the coding system used to decode 1104 associated with PROCESS will inherit the coding system used to decode
1124 the process output. */) 1105 the 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;
1130 } 1110 }
1131 1111
1133 Fset_process_query_on_exit_flag, Sset_process_query_on_exit_flag, 1113 Fset_process_query_on_exit_flag, Sset_process_query_on_exit_flag,
1134 2, 2, 0, 1114 2, 2, 0,
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.
1136 If the second argument FLAG is non-nil, Emacs will query the user before 1116 If the second argument FLAG is non-nil, Emacs will query the user before
1137 exiting or killing a buffer if PROCESS is running. */) 1117 exiting 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);
1143 return flag; 1122 return flag;
1144 } 1123 }
1145 1124
1146 DEFUN ("process-query-on-exit-flag", 1125 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);
1155 } 1133 }
1156 1134
1166 SERVICE) for a network connection or (PORT SPEED) for a serial 1144 SERVICE) for a network connection or (PORT SPEED) for a serial
1167 connection. If KEY is t, the complete contact information for the 1145 connection. If KEY is t, the complete contact information for the
1168 connection is returned, else the specific value for the keyword KEY is 1146 connection is returned, else the specific value for the keyword KEY is
1169 returned. See `make-network-process' or `make-serial-process' for a 1147 returned. See `make-network-process' or `make-serial-process' for a
1170 list of keywords. */) 1148 list 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
1176 CHECK_PROCESS (process); 1153 CHECK_PROCESS (process);
1177 contact = XPROCESS (process)->childp; 1154 contact = XPROCESS (process)->childp;
1195 } 1172 }
1196 1173
1197 DEFUN ("process-plist", Fprocess_plist, Sprocess_plist, 1174 DEFUN ("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;
1205 } 1181 }
1206 1182
1207 DEFUN ("set-process-plist", Fset_process_plist, Sset_process_plist, 1183 DEFUN ("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);
1215 1190
1216 XPROCESS (process)->plist = plist; 1191 XPROCESS (process)->plist = plist;
1221 in the process. Perhaps add it. */ 1196 in the process. Perhaps add it. */
1222 DEFUN ("process-connection", Fprocess_connection, Sprocess_connection, 1, 1, 0, 1197 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.
1224 The value is nil for a pipe, t or `pty' for a pty, or `stream' for 1199 The value is nil for a pipe, t or `pty' for a pty, or `stream' for
1225 a socket connection. */) 1200 a 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 }
1231 #endif 1205 #endif
1232 1206
1233 DEFUN ("process-type", Fprocess_type, Sprocess_type, 1, 1, 0, 1207 DEFUN ("process-type", Fprocess_type, Sprocess_type, 1, 1, 0,
1234 doc: /* Return the connection type of PROCESS. 1208 doc: /* Return the connection type of PROCESS.
1235 The value is either the symbol `real', `network', or `serial'. 1209 The value is either the symbol `real', `network', or `serial'.
1236 PROCESS may be a process, a buffer, the name of a process or buffer, or 1210 PROCESS may be a process, a buffer, the name of a process or buffer, or
1237 nil, indicating the current buffer's process. */) 1211 nil, 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);
1243 return XPROCESS (proc)->type; 1216 return XPROCESS (proc)->type;
1244 } 1217 }
1250 A 4 or 5 element vector represents an IPv4 address (with port number). 1223 A 4 or 5 element vector represents an IPv4 address (with port number).
1251 An 8 or 9 element vector represents an IPv6 address (with port number). 1224 An 8 or 9 element vector represents an IPv6 address (with port number).
1252 If optional second argument OMIT-PORT is non-nil, don't include a port 1225 If optional second argument OMIT-PORT is non-nil, don't include a port
1253 number in the string, even when present in ADDRESS. 1226 number in the string, even when present in ADDRESS.
1254 Returns nil if format of ADDRESS is invalid. */) 1227 Returns 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;
1260 1232
1261 if (STRINGP (address)) /* AF_LOCAL */ 1233 if (STRINGP (address)) /* AF_LOCAL */
1553 doc: /* Display a list of all processes. 1525 doc: /* Display a list of all processes.
1554 If optional argument QUERY-ONLY is non-nil, only processes with 1526 If optional argument QUERY-ONLY is non-nil, only processes with
1555 the query-on-exit flag set will be listed. 1527 the query-on-exit flag set will be listed.
1556 Any process listed as exited or signaled is actually eliminated 1528 Any process listed as exited or signaled is actually eliminated
1557 after the listing is made. */) 1529 after 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);
1563 return Qnil; 1534 return Qnil;
1564 } 1535 }
1565 1536
1566 DEFUN ("process-list", Fprocess_list, Sprocess_list, 0, 0, 0, 1537 DEFUN ("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 }
1572 1543
1573 /* Starting asynchronous inferior processes. */ 1544 /* Starting asynchronous inferior processes. */
1591 If you want to separate standard output from standard error, invoke 1562 If you want to separate standard output from standard error, invoke
1592 the command through a shell and redirect one of them using the shell 1563 the command through a shell and redirect one of them using the shell
1593 syntax. 1564 syntax.
1594 1565
1595 usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) 1566 usage: (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;
1602 register int i; 1571 register int i;
1603 int count = SPECPDL_INDEX (); 1572 int count = SPECPDL_INDEX ();
2502 2471
2503 #ifdef DATAGRAM_SOCKETS 2472 #ifdef DATAGRAM_SOCKETS
2504 DEFUN ("process-datagram-address", Fprocess_datagram_address, Sprocess_datagram_address, 2473 DEFUN ("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
2512 CHECK_PROCESS (process); 2480 CHECK_PROCESS (process);
2513 2481
2521 2489
2522 DEFUN ("set-process-datagram-address", Fset_process_datagram_address, Sset_process_datagram_address, 2490 DEFUN ("set-process-datagram-address", Fset_process_datagram_address, Sset_process_datagram_address,
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.
2525 Returns nil upon error setting address, ADDRESS otherwise. */) 2493 Returns 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;
2531 2498
2532 CHECK_PROCESS (process); 2499 CHECK_PROCESS (process);
2683 3, 4, 0, 2650 3, 4, 0,
2684 doc: /* For network process PROCESS set option OPTION to value VALUE. 2651 doc: /* For network process PROCESS set option OPTION to value VALUE.
2685 See `make-network-process' for a list of options and values. 2652 See `make-network-process' for a list of options and values.
2686 If optional fourth arg NO-ERROR is non-nil, don't signal an error if 2653 If optional fourth arg NO-ERROR is non-nil, don't signal an error if
2687 OPTION is not a supported option, return nil instead; otherwise return t. */) 2654 OPTION 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;
2694 2659
2695 CHECK_PROCESS (process); 2660 CHECK_PROCESS (process);
2772 :buffer "COM1" :stopbits 1 :parity 'odd :flowcontrol 'hw) 2737 :buffer "COM1" :stopbits 1 :parity 'odd :flowcontrol 'hw)
2773 2738
2774 \(serial-process-configure :port "\\\\.\\COM13" :bytesize 7) 2739 \(serial-process-configure :port "\\\\.\\COM13" :bytesize 7)
2775 2740
2776 usage: (serial-process-configure &rest ARGS) */) 2741 usage: (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;
2783 Lisp_Object proc = Qnil; 2746 Lisp_Object proc = Qnil;
2784 struct gcpro gcpro1; 2747 struct gcpro gcpro1;
2891 \(make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity 'odd) 2854 \(make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity 'odd)
2892 2855
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
2895 usage: (make-serial-process &rest ARGS) */) 2858 usage: (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;
2902 struct Lisp_Process *p; 2863 struct Lisp_Process *p;
2903 struct gcpro gcpro1; 2864 struct gcpro gcpro1;
3172 3133
3173 The original argument list, modified with the actual connection 3134 The original argument list, modified with the actual connection
3174 information, is available via the `process-contact' function. 3135 information, is available via the `process-contact' function.
3175 3136
3176 usage: (make-network-process &rest ARGS) */) 3137 usage: (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;
3183 struct Lisp_Process *p; 3142 struct Lisp_Process *p;
3184 #ifdef HAVE_GETADDRINFO 3143 #ifdef HAVE_GETADDRINFO
3888 DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0, 3847 DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0,
3889 doc: /* Return an alist of all network interfaces and their network address. 3848 doc: /* Return an alist of all network interfaces and their network address.
3890 Each element is a cons, the car of which is a string containing the 3849 Each element is a cons, the car of which is a string containing the
3891 interface name, and the cdr is the network address in internal 3850 interface name, and the cdr is the network address in internal
3892 format; see the description of ADDRESS in `make-network-process'. */) 3851 format; 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;
3897 int ifaces = 0; 3856 int ifaces = 0;
3898 int buf_size, s; 3857 int buf_size, s;
4023 doc: /* Return information about network interface named IFNAME. 3982 doc: /* Return information about network interface named IFNAME.
4024 The return value is a list (ADDR BCAST NETMASK HWADDR FLAGS), 3983 The return value is a list (ADDR BCAST NETMASK HWADDR FLAGS),
4025 where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address, 3984 where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address,
4026 NETMASK is the layer 3 network mask, HWADDR is the layer 2 addres, and 3985 NETMASK is the layer 3 network mask, HWADDR is the layer 2 addres, and
4027 FLAGS is the current flags of the interface. */) 3986 FLAGS 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;
4033 Lisp_Object elt; 3991 Lisp_Object elt;
4034 int s; 3992 int s;
4232 4190
4233 If optional fourth arg JUST-THIS-ONE is non-nil, only accept output 4191 If optional fourth arg JUST-THIS-ONE is non-nil, only accept output
4234 from PROCESS, suspending reading output from other processes. 4192 from PROCESS, suspending reading output from other processes.
4235 If JUST-THIS-ONE is an integer, don't run any timers either. 4193 If JUST-THIS-ONE is an integer, don't run any timers either.
4236 Return non-nil if we received any output before the timeout expired. */) 4194 Return 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
4242 if (! NILP (process)) 4199 if (! NILP (process))
4243 CHECK_PROCESS (process); 4200 CHECK_PROCESS (process);
5574 5531
5575 DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, 5532 DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p,
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.
5578 This is intended for use by asynchronous process output filters and sentinels. */) 5535 This 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 }
5583 5540
5584 /* Sending data to subprocess */ 5541 /* Sending data to subprocess */
5849 nil, indicating the current buffer's process. 5806 nil, indicating the current buffer's process.
5850 Called from program, takes three arguments, PROCESS, START and END. 5807 Called from program, takes three arguments, PROCESS, START and END.
5851 If the region is more than 500 characters long, 5808 If the region is more than 500 characters long,
5852 it is sent in several bunches. This may happen even for shorter regions. 5809 it is sent in several bunches. This may happen even for shorter regions.
5853 Output from processes can arrive in between bunches. */) 5810 Output 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;
5859 5815
5860 proc = get_process (process); 5816 proc = get_process (process);
5877 PROCESS may be a process, a buffer, the name of a process or buffer, or 5833 PROCESS may be a process, a buffer, the name of a process or buffer, or
5878 nil, indicating the current buffer's process. 5834 nil, indicating the current buffer's process.
5879 If STRING is more than 500 characters long, 5835 If STRING is more than 500 characters long,
5880 it is sent in several bunches. This may happen even for shorter strings. 5836 it is sent in several bunches. This may happen even for shorter strings.
5881 Output from processes can arrive in between bunches. */) 5837 Output 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);
5887 proc = get_process (process); 5842 proc = get_process (process);
5888 send_process (proc, SDATA (string), 5843 send_process (proc, SDATA (string),
5919 DEFUN ("process-running-child-p", Fprocess_running_child_p, 5874 DEFUN ("process-running-child-p", Fprocess_running_child_p,
5920 Sprocess_running_child_p, 0, 1, 0, 5875 Sprocess_running_child_p, 0, 1, 0,
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.
5922 If the operating system does not make it possible to find out, 5877 If the operating system does not make it possible to find out,
5923 return t unconditionally. */) 5878 return 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. */
5929 int gid; 5883 int gid;
5930 Lisp_Object proc; 5884 Lisp_Object proc;
6181 If the process is a shell, this means interrupt current subjob 6135 If the process is a shell, this means interrupt current subjob
6182 rather than the shell. 6136 rather than the shell.
6183 6137
6184 If CURRENT-GROUP is `lambda', and if the shell owns the terminal, 6138 If CURRENT-GROUP is `lambda', and if the shell owns the terminal,
6185 don't send the signal. */) 6139 don'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;
6191 } 6144 }
6192 6145
6193 DEFUN ("kill-process", Fkill_process, Skill_process, 0, 2, 0, 6146 DEFUN ("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.
6195 See function `interrupt-process' for more details on usage. */) 6148 See 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;
6201 } 6153 }
6202 6154
6203 DEFUN ("quit-process", Fquit_process, Squit_process, 0, 2, 0, 6155 DEFUN ("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.
6205 See function `interrupt-process' for more details on usage. */) 6157 See 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;
6211 } 6162 }
6212 6163
6213 DEFUN ("stop-process", Fstop_process, Sstop_process, 0, 2, 0, 6164 DEFUN ("stop-process", Fstop_process, Sstop_process, 0, 2, 0,
6214 doc: /* Stop process PROCESS. May be process or name of one. 6165 doc: /* Stop process PROCESS. May be process or name of one.
6215 See function `interrupt-process' for more details on usage. 6166 See function `interrupt-process' for more details on usage.
6216 If PROCESS is a network or serial process, inhibit handling of incoming 6167 If PROCESS is a network or serial process, inhibit handling of incoming
6217 traffic. */) 6168 traffic. */)
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)))
6223 { 6173 {
6224 struct Lisp_Process *p; 6174 struct Lisp_Process *p;
6245 DEFUN ("continue-process", Fcontinue_process, Scontinue_process, 0, 2, 0, 6195 DEFUN ("continue-process", Fcontinue_process, Scontinue_process, 0, 2, 0,
6246 doc: /* Continue process PROCESS. May be process or name of one. 6196 doc: /* Continue process PROCESS. May be process or name of one.
6247 See function `interrupt-process' for more details on usage. 6197 See function `interrupt-process' for more details on usage.
6248 If PROCESS is a network or serial process, resume handling of incoming 6198 If PROCESS is a network or serial process, resume handling of incoming
6249 traffic. */) 6199 traffic. */)
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)))
6255 { 6204 {
6256 struct Lisp_Process *p; 6205 struct Lisp_Process *p;
6287 doc: /* Send PROCESS the signal with code SIGCODE. 6236 doc: /* Send PROCESS the signal with code SIGCODE.
6288 PROCESS may also be a number specifying the process id of the 6237 PROCESS may also be a number specifying the process id of the
6289 process to signal; in this case, the process need not be a child of 6238 process to signal; in this case, the process need not be a child of
6290 this Emacs. 6239 this Emacs.
6291 SIGCODE may be an integer, or a symbol whose name is a signal name. */) 6240 SIGCODE 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
6297 if (INTEGERP (process)) 6245 if (INTEGERP (process))
6298 { 6246 {
6455 If PROCESS is a network connection, or is a process communicating 6403 If PROCESS is a network connection, or is a process communicating
6456 through a pipe (as opposed to a pty), then you cannot send any more 6404 through a pipe (as opposed to a pty), then you cannot send any more
6457 text to PROCESS after you call this function. 6405 text to PROCESS after you call this function.
6458 If PROCESS is a serial process, wait until all output written to the 6406 If PROCESS is a serial process, wait until all output written to the
6459 process has been transmitted to the serial port. */) 6407 process 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;
6465 6412
6466 if (DATAGRAM_CONN_P (process)) 6413 if (DATAGRAM_CONN_P (process))
6945 DEFUN ("set-process-coding-system", Fset_process_coding_system, 6892 DEFUN ("set-process-coding-system", Fset_process_coding_system,
6946 Sset_process_coding_system, 1, 3, 0, 6893 Sset_process_coding_system, 1, 3, 0,
6947 doc: /* Set coding systems of PROCESS to DECODING and ENCODING. 6894 doc: /* Set coding systems of PROCESS to DECODING and ENCODING.
6948 DECODING will be used to decode subprocess output and ENCODING to 6895 DECODING will be used to decode subprocess output and ENCODING to
6949 encode subprocess input. */) 6896 encode 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
6955 CHECK_PROCESS (process); 6901 CHECK_PROCESS (process);
6956 p = XPROCESS (process); 6902 p = XPROCESS (process);
6969 } 6915 }
6970 6916
6971 DEFUN ("process-coding-system", 6917 DEFUN ("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,
6979 XPROCESS (process)->encode_coding_system); 6924 XPROCESS (process)->encode_coding_system);
6980 } 6925 }
6984 doc: /* Set multibyteness of the strings given to PROCESS's filter. 6929 doc: /* Set multibyteness of the strings given to PROCESS's filter.
6985 If FLAG is non-nil, the filter is given multibyte strings. 6930 If FLAG is non-nil, the filter is given multibyte strings.
6986 If FLAG is nil, the filter is given unibyte strings. In this case, 6931 If FLAG is nil, the filter is given unibyte strings. In this case,
6987 all character code conversion except for end-of-line conversion is 6932 all character code conversion except for end-of-line conversion is
6988 suppressed. */) 6933 suppressed. */)
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
6994 CHECK_PROCESS (process); 6938 CHECK_PROCESS (process);
6995 p = XPROCESS (process); 6939 p = XPROCESS (process);
7001 } 6945 }
7002 6946
7003 DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p, 6947 DEFUN ("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;
7011 6954
7012 CHECK_PROCESS (process); 6955 CHECK_PROCESS (process);
7124 0, 0, 0, 7067 0, 0, 0,
7125 doc: /* Return a list of numerical process IDs of all running processes. 7068 doc: /* Return a list of numerical process IDs of all running processes.
7126 If this functionality is unsupported, return nil. 7069 If this functionality is unsupported, return nil.
7127 7070
7128 See `process-attributes' for getting attributes of a process given its ID. */) 7071 See `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 }
7133 7076
7134 DEFUN ("process-attributes", Fprocess_attributes, 7077 DEFUN ("process-attributes", Fprocess_attributes,
7180 etime -- elapsed time the process is running, in (HIGH LOW USEC) format 7123 etime -- elapsed time the process is running, in (HIGH LOW USEC) format
7181 pcpu -- percents of CPU time used by the process (floating-point number) 7124 pcpu -- percents of CPU time used by the process (floating-point number)
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 }
7191 7132
7192 void 7133 void
7831 7772
7832 /* Don't confuse make-docfile by having two doc strings for this function. 7773 /* Don't confuse make-docfile by having two doc strings for this function.
7833 make-docfile does not pay attention to #if, for good reason! */ 7774 make-docfile does not pay attention to #if, for good reason! */
7834 DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, 7775 DEFUN ("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 }
7841 7781
7842 /* Don't confuse make-docfile by having two doc strings for this function. 7782 /* Don't confuse make-docfile by having two doc strings for this function.
7843 make-docfile does not pay attention to #if, for good reason! */ 7783 make-docfile does not pay attention to #if, for good reason! */
7844 DEFUN ("process-inherit-coding-system-flag", 7784 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. */
7853 return inherit_process_coding_system ? Qt : Qnil; 7792 return inherit_process_coding_system ? Qt : Qnil;
7854 } 7793 }
7892 0, 0, 0, 7831 0, 0, 0,
7893 doc: /* Return a list of numerical process IDs of all running processes. 7832 doc: /* Return a list of numerical process IDs of all running processes.
7894 If this functionality is unsupported, return nil. 7833 If this functionality is unsupported, return nil.
7895 7834
7896 See `process-attributes' for getting attributes of a process given its ID. */) 7835 See `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 }
7901 7840
7902 DEFUN ("process-attributes", Fprocess_attributes, 7841 DEFUN ("process-attributes", Fprocess_attributes,
7948 etime -- elapsed time the process is running, in (HIGH LOW USEC) format 7887 etime -- elapsed time the process is running, in (HIGH LOW USEC) format
7949 pcpu -- percents of CPU time used by the process (floating-point number) 7888 pcpu -- percents of CPU time used by the process (floating-point number)
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 }
7959 7896
7960 void 7897 void