comparison src/console-tty.c @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 8de8e3f6228a
children 183866b06e0b
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
113 tty_con->is_stdio = 0; 113 tty_con->is_stdio = 0;
114 } 114 }
115 115
116 tty_con->instream = make_filedesc_input_stream (tty_con->infd, 0, -1, 0); 116 tty_con->instream = make_filedesc_input_stream (tty_con->infd, 0, -1, 0);
117 tty_con->outstream = make_filedesc_output_stream (tty_con->outfd, 0, -1, 0); 117 tty_con->outstream = make_filedesc_output_stream (tty_con->outfd, 0, -1, 0);
118 #ifdef MULE 118 #ifdef FILE_CODING
119 tty_con->instream = 119 tty_con->instream =
120 make_decoding_input_stream (XLSTREAM (tty_con->instream), 120 make_decoding_input_stream (XLSTREAM (tty_con->instream),
121 Fget_coding_system (Vkeyboard_coding_system)); 121 Fget_coding_system (Qkeyboard));
122 Lstream_set_character_mode (XLSTREAM (tty_con->instream)); 122 Lstream_set_character_mode (XLSTREAM (tty_con->instream));
123 tty_con->outstream = 123 tty_con->outstream =
124 make_encoding_output_stream (XLSTREAM (tty_con->outstream), 124 make_encoding_output_stream (XLSTREAM (tty_con->outstream),
125 Fget_coding_system (Vterminal_coding_system)); 125 Fget_coding_system (Qterminal));
126 #endif /* MULE */ 126 #endif /* FILE_CODING */
127 tty_con->terminal_type = terminal_type; 127 tty_con->terminal_type = terminal_type;
128 tty_con->controlling_process = controlling_process; 128 tty_con->controlling_process = controlling_process;
129 129
130 if (NILP (CONSOLE_NAME (con))) 130 if (NILP (CONSOLE_NAME (con)))
131 CONSOLE_NAME (con) = Ffile_name_nondirectory (tty); 131 CONSOLE_NAME (con) = Ffile_name_nondirectory (tty);
132 { 132 {
133 int tty_pg; 133 pid_t tty_pg;
134 int controlling_tty_pg; 134 pid_t controlling_tty_pg;
135 int cfd; 135 int cfd;
136 136
137 /* OK, the only sure-fire way I can think of to determine 137 /* OK, the only sure-fire way I can think of to determine
138 whether a particular TTY is our controlling TTY is to check 138 whether a particular TTY is our controlling TTY is to check
139 if it has the same foreground process group as our controlling 139 if it has the same foreground process group as our controlling
251 */ 251 */
252 (console, codesys)) 252 (console, codesys))
253 { 253 {
254 set_decoding_stream_coding_system 254 set_decoding_stream_coding_system
255 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream), 255 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream),
256 Fget_coding_system (NILP (codesys) ? Vkeyboard_coding_system : codesys)); 256 Fget_coding_system (NILP (codesys) ? Qkeyboard : codesys));
257 return Qnil; 257 return Qnil;
258 } 258 }
259 259
260 DEFUN ("console-tty-output-coding-system", Fconsole_tty_output_coding_system, 260 DEFUN ("console-tty-output-coding-system", Fconsole_tty_output_coding_system,
261 0, 1, 0, /* 261 0, 1, 0, /*
275 */ 275 */
276 (console, codesys)) 276 (console, codesys))
277 { 277 {
278 set_encoding_stream_coding_system 278 set_encoding_stream_coding_system
279 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream), 279 (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream),
280 Fget_coding_system (NILP (codesys) ? Vterminal_coding_system : codesys)); 280 Fget_coding_system (NILP (codesys) ? Qterminal : codesys));
281 /* Redraw tty */ 281 /* Redraw tty */
282 face_property_was_changed (Vdefault_face, Qfont, Qtty); 282 face_property_was_changed (Vdefault_face, Qfont, Qtty);
283 return Qnil; 283 return Qnil;
284 } 284 }
285 285