comparison src/process.c @ 21848:050ea21cec87

(Fset_process_inherit_coding_system_flag, Fstart_process): Store inherit_coding_system_flag as a Lisp_Object. (Fopen_network_stream): Likewise. (Fprocess_inherit_coding_system_flag): Access it as Lisp_Object. (read_process_output): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Wed, 29 Apr 1998 21:46:43 +0000
parents 98f624ae5507
children c66b85d05dd8
comparison
equal deleted inserted replaced
21847:8f34099fb8b4 21848:050ea21cec87
866 for the process which will run.") 866 for the process which will run.")
867 (process, flag) 867 (process, flag)
868 register Lisp_Object process, flag; 868 register Lisp_Object process, flag;
869 { 869 {
870 CHECK_PROCESS (process, 0); 870 CHECK_PROCESS (process, 0);
871 XPROCESS (process)->inherit_coding_system_flag = !NILP (flag); 871 XPROCESS (process)->inherit_coding_system_flag = flag;
872 return flag; 872 return flag;
873 } 873 }
874 874
875 DEFUN ("process-inherit-coding-system-flag", 875 DEFUN ("process-inherit-coding-system-flag",
876 Fprocess_inherit_coding_system_flag, Sprocess_inherit_coding_system_flag, 876 Fprocess_inherit_coding_system_flag, Sprocess_inherit_coding_system_flag,
881 the process output.") 881 the process output.")
882 (process) 882 (process)
883 register Lisp_Object process; 883 register Lisp_Object process;
884 { 884 {
885 CHECK_PROCESS (process, 0); 885 CHECK_PROCESS (process, 0);
886 return XPROCESS (process)->inherit_coding_system_flag ? Qt : Qnil; 886 return XPROCESS (process)->inherit_coding_system_flag;
887 } 887 }
888 888
889 DEFUN ("process-kill-without-query", Fprocess_kill_without_query, 889 DEFUN ("process-kill-without-query", Fprocess_kill_without_query,
890 Sprocess_kill_without_query, 1, 2, 0, 890 Sprocess_kill_without_query, 1, 2, 0,
891 "Say no query needed if PROCESS is running when Emacs is exited.\n\ 891 "Say no query needed if PROCESS is running when Emacs is exited.\n\
1271 XPROCESS (proc)->decoding_carryover = make_number (0); 1271 XPROCESS (proc)->decoding_carryover = make_number (0);
1272 XPROCESS (proc)->encoding_buf = make_uninit_string (0); 1272 XPROCESS (proc)->encoding_buf = make_uninit_string (0);
1273 XPROCESS (proc)->encoding_carryover = make_number (0); 1273 XPROCESS (proc)->encoding_carryover = make_number (0);
1274 1274
1275 XPROCESS (proc)->inherit_coding_system_flag 1275 XPROCESS (proc)->inherit_coding_system_flag
1276 = (NILP (buffer) || !inherit_process_coding_system) ? 0 : 1; 1276 = (NILP (buffer) || !inherit_process_coding_system
1277 ? Qnil : Qt);
1277 1278
1278 create_process (proc, (char **) new_argv, current_dir); 1279 create_process (proc, (char **) new_argv, current_dir);
1279 1280
1280 return unbind_to (count, proc); 1281 return unbind_to (count, proc);
1281 } 1282 }
2063 XPROCESS (proc)->decoding_buf = make_uninit_string (0); 2064 XPROCESS (proc)->decoding_buf = make_uninit_string (0);
2064 XPROCESS (proc)->decoding_carryover = make_number (0); 2065 XPROCESS (proc)->decoding_carryover = make_number (0);
2065 XPROCESS (proc)->encoding_buf = make_uninit_string (0); 2066 XPROCESS (proc)->encoding_buf = make_uninit_string (0);
2066 XPROCESS (proc)->encoding_carryover = make_number (0); 2067 XPROCESS (proc)->encoding_carryover = make_number (0);
2067 2068
2068 XPROCESS (proc)->inherit_coding_system_flag = 2069 XPROCESS (proc)->inherit_coding_system_flag
2069 NILP (buffer) || !inherit_process_coding_system ? 0 : 1; 2070 = (NILP (buffer) || !inherit_process_coding_system
2071 ? Qnil : Qt);
2070 2072
2071 UNGCPRO; 2073 UNGCPRO;
2072 return proc; 2074 return proc;
2073 } 2075 }
2074 #endif /* HAVE_SOCKETS */ 2076 #endif /* HAVE_SOCKETS */
2915 XSETINT (p->decoding_carryover, carryover); 2917 XSETINT (p->decoding_carryover, carryover);
2916 Vlast_coding_system_used = coding->symbol; 2918 Vlast_coding_system_used = coding->symbol;
2917 2919
2918 /* If the caller required, let the process associated buffer 2920 /* If the caller required, let the process associated buffer
2919 inherit the coding-system used to decode the process output. */ 2921 inherit the coding-system used to decode the process output. */
2920 if (p->inherit_coding_system_flag 2922 if (! NILP (p->inherit_coding_system_flag)
2921 && !NILP (p->buffer) && !NILP (XBUFFER (p->buffer)->name)) 2923 && !NILP (p->buffer) && !NILP (XBUFFER (p->buffer)->name))
2922 { 2924 {
2923 struct buffer *prev_buf = current_buffer; 2925 struct buffer *prev_buf = current_buffer;
2924 2926
2925 Fset_buffer (p->buffer); 2927 Fset_buffer (p->buffer);