X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fconsole-tty.c;h=56cd3250124736fd15a65cfd4283c0c5ac51a07a;hb=166ba1350d802535b6a6ea7ea0bc29c56a71b7ec;hp=c57c0f7da2dcbaf363e25c2eed9cdd11449f5723;hpb=937bb3ce20f4819a75e8234cb91a1acaa19847f8;p=chise%2Fxemacs-chise.git.1 diff --git a/src/console-tty.c b/src/console-tty.c index c57c0f7..56cd325 100644 --- a/src/console-tty.c +++ b/src/console-tty.c @@ -38,9 +38,6 @@ Boston, MA 02111-1307, USA. */ #ifdef FILE_CODING #include "file-coding.h" #endif -#ifdef HAVE_GPM -#include "gpmevent.h" -#endif DEFINE_CONSOLE_TYPE (tty); DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); @@ -118,27 +115,23 @@ tty_init_console (struct console *con, Lisp_Object props) tty_con->instream = make_filedesc_input_stream (tty_con->infd, 0, -1, 0); tty_con->outstream = make_filedesc_output_stream (tty_con->outfd, 0, -1, 0); -#ifdef MULE +#ifdef FILE_CODING tty_con->instream = make_decoding_input_stream (XLSTREAM (tty_con->instream), - Fget_coding_system (Vkeyboard_coding_system)); + Fget_coding_system (Qkeyboard)); Lstream_set_character_mode (XLSTREAM (tty_con->instream)); tty_con->outstream = make_encoding_output_stream (XLSTREAM (tty_con->outstream), - Fget_coding_system (Vterminal_coding_system)); -#endif /* MULE */ + Fget_coding_system (Qterminal)); +#endif /* FILE_CODING */ tty_con->terminal_type = terminal_type; tty_con->controlling_process = controlling_process; -#ifdef HAVE_GPM - connect_to_gpm (con); -#endif - if (NILP (CONSOLE_NAME (con))) CONSOLE_NAME (con) = Ffile_name_nondirectory (tty); { - int tty_pg; - int controlling_tty_pg; + pid_t tty_pg; + pid_t controlling_tty_pg; int cfd; /* OK, the only sure-fire way I can think of to determine @@ -166,12 +159,12 @@ tty_init_console (struct console *con, Lisp_Object props) } static void -tty_mark_console (struct console *con, void (*markobj) (Lisp_Object)) +tty_mark_console (struct console *con) { struct tty_console *tty_con = CONSOLE_TTY_DATA (con); - markobj (tty_con->terminal_type); - markobj (tty_con->instream); - markobj (tty_con->outstream); + mark_object (tty_con->terminal_type); + mark_object (tty_con->instream); + mark_object (tty_con->outstream); } static int @@ -260,7 +253,7 @@ CODESYS defaults to the value of `keyboard-coding-system'. { set_decoding_stream_coding_system (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream), - Fget_coding_system (NILP (codesys) ? Vkeyboard_coding_system : codesys)); + Fget_coding_system (NILP (codesys) ? Qkeyboard : codesys)); return Qnil; } @@ -284,11 +277,13 @@ CODESYS defaults to the value of `terminal-coding-system'. { set_encoding_stream_coding_system (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream), - Fget_coding_system (NILP (codesys) ? Vterminal_coding_system : codesys)); + Fget_coding_system (NILP (codesys) ? Qterminal : codesys)); + /* Redraw tty */ + face_property_was_changed (Vdefault_face, Qfont, Qtty); return Qnil; } -/* ### Move this function to lisp */ +/* #### Move this function to lisp */ DEFUN ("set-console-tty-coding-system", Fset_console_tty_coding_system, 0, 2, 0, /* Set the input and output coding systems of tty console CONSOLE to CODESYS. @@ -372,6 +367,12 @@ console_type_create_tty (void) } void +reinit_console_type_create_tty (void) +{ + REINITIALIZE_CONSOLE_TYPE (tty); +} + +void image_instantiator_format_create_glyphs_tty (void) { IIFORMAT_VALID_CONSOLE (tty, nothing);