comparison src/console.c @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents 859a2309aef8
children e04119814345
comparison
equal deleted inserted replaced
29:7976500f47f9 30:ec9a17fef872
902 } 902 }
903 # endif 903 # endif
904 #endif /* BSD */ 904 #endif /* BSD */
905 } 905 }
906 906
907 DEFUN ("suspend-console", Fsuspend_console, 0, 1, "", /*
908 Suspend a console. For tty consoles, it sends a signal to suspend
909 the process in charge of the tty, and removes the devices and
910 frames of that console from the display.
911
912 If optional arg CONSOLE is non-nil, it is the console to be suspended.
913 Otherwise it is assumed to be the selected console.
914
915 Some operating systems cannot stop processes and resume them later.
916 On such systems, who knows what will happen.
917 */
918 (console))
919 {
920 Lisp_Object devcons;
921 Lisp_Object framecons;
922 struct console *c;
923 struct gcpro gcpro1;
924
925 if (NILP (console))
926 console=Fselected_console();
927
928 GCPRO1 (console);
929
930 c = decode_console(console);
931
932 if (CONSOLE_TTY_P (c))
933 {
934 CONSOLE_DEVICE_LOOP (devcons, c)
935 {
936 struct device *d = XDEVICE (XCAR (devcons));
937 DEVICE_FRAME_LOOP (framecons, d)
938 {
939 Fmake_frame_invisible(XCAR(framecons), Qt);
940 }
941 }
942 reset_one_console(c);
943 sys_suspend_process(XINT(Fconsole_tty_controlling_process(console)));
944 }
945
946 UNGCPRO;
947 return Qnil;
948 }
949
950 DEFUN ("resume-console", Fresume_console, 1, 1, "", /*
951 Re-initialize a previously suspended console. For tty consoles,
952 do stuff to the tty to make it sane again.
953 */
954 (console))
955 {
956 Lisp_Object devcons;
957 Lisp_Object framecons;
958 struct console *c;
959 struct gcpro gcpro1, gcpro2, gcpro3;
960
961 GCPRO2 (console, devcons);
962
963 c = decode_console(console);
964
965 if (CONSOLE_TTY_P(c))
966 {
967 CONSOLE_DEVICE_LOOP (devcons, c)
968 {
969 struct device *d = XDEVICE (XCAR (devcons));
970 DEVICE_FRAME_LOOP (framecons, d)
971 {
972 Fmake_frame_visible(XCAR(framecons));
973 }
974 }
975 init_one_console(c);
976 }
977
978 UNGCPRO;
979 return Qnil;
980 }
981
907 DEFUN ("set-input-mode", Fset_input_mode, 3, 5, 0, /* 982 DEFUN ("set-input-mode", Fset_input_mode, 3, 5, 0, /*
908 Set mode of reading keyboard input. 983 Set mode of reading keyboard input.
909 First arg is ignored, for backward compatibility. 984 First arg is ignored, for backward compatibility.
910 Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal 985 Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal
911 (no effect except in CBREAK mode). 986 (no effect except in CBREAK mode).
1005 DEFSUBR (Fconsole_list); 1080 DEFSUBR (Fconsole_list);
1006 DEFSUBR (Fconsole_device_list); 1081 DEFSUBR (Fconsole_device_list);
1007 DEFSUBR (Fconsole_enable_input); 1082 DEFSUBR (Fconsole_enable_input);
1008 DEFSUBR (Fconsole_disable_input); 1083 DEFSUBR (Fconsole_disable_input);
1009 DEFSUBR (Fconsole_on_window_system_p); 1084 DEFSUBR (Fconsole_on_window_system_p);
1010 1085 DEFSUBR (Fsuspend_console);
1086 DEFSUBR (Fresume_console);
1087
1011 DEFSUBR (Fsuspend_emacs); 1088 DEFSUBR (Fsuspend_emacs);
1012 DEFSUBR (Fset_input_mode); 1089 DEFSUBR (Fset_input_mode);
1013 DEFSUBR (Fcurrent_input_mode); 1090 DEFSUBR (Fcurrent_input_mode);
1014 1091
1015 defsymbol (&Qconsolep, "consolep"); 1092 defsymbol (&Qconsolep, "consolep");