#| -*-Scheme-*-
-$Id: tterm.scm,v 1.41 2005/10/23 21:07:19 cph Exp $
+$Id: tterm.scm,v 1.42 2005/12/25 17:04:39 riastradh Exp $
Copyright 1990,1991,1993,1994,1998,1999 Massachusetts Institute of Technology
Copyright 2001,2002,2003,2004,2005 Massachusetts Institute of Technology
unspecific)
(define (console-enter! screen)
+ (add-event-receiver! event:console-resize resize-screen)
(maybe-output screen (ts-enter-termcap-mode (screen-description screen)))
(set-screen-cursor-x! screen false)
(set-screen-cursor-y! screen false))
(define (console-exit! screen)
+ (remove-event-receiver! event:console-resize resize-screen)
(let ((description (screen-description screen)))
(move-cursor screen 0 (fix:-1+ (screen-y-size screen)))
(exit-standout-mode screen)
/* -*-C-*-
-$Id: osscheme.c,v 1.14 2003/02/14 18:28:22 cph Exp $
+$Id: osscheme.c,v 1.15 2005/12/25 17:04:39 riastradh Exp $
Copyright (c) 1990-2000, 2002 Massachusetts Institute of Technology
#endif /* __OS2__ */
+void
+DEFUN_VOID (request_console_resize_interrupt)
+{
+ REQUEST_INTERRUPT (INT_Global_3);
+}
+
void
DEFUN_VOID (request_character_interrupt)
{
/* -*-C-*-
-$Id: osscheme.h,v 1.13 2003/02/14 18:28:22 cph Exp $
+$Id: osscheme.h,v 1.14 2005/12/25 17:04:39 riastradh Exp $
Copyright (c) 1990-2000 Massachusetts Institute of Technology
extern int EXFUN (test_and_clear_attention_interrupt, (void));
#endif /* __OS2__ */
+extern void EXFUN (request_console_resize_interrupt, (void));
extern void EXFUN (request_character_interrupt, (void));
extern void EXFUN (request_timer_interrupt, (void));
extern void EXFUN (request_suspend_interrupt, (void));
/* -*-C-*-
-$Id: uxsig.c,v 1.42 2005/07/04 13:51:19 cph Exp $
+$Id: uxsig.c,v 1.43 2005/12/25 17:04:39 riastradh Exp $
Copyright 1990,1991,1992,1993,1994,1996 Massachusetts Institute of Technology
Copyright 2000,2001,2005 Massachusetts Institute of Technology
stop_signal_default (SIGTSTP);
}
+static
+DEFUN_STD_HANDLER (sighnd_console_resize,
+{
+ extern void EXFUN (UX_initialize_tty, (void));
+ UX_initialize_tty ();
+ request_console_resize_interrupt ();
+})
+
+
/* The following conditionalization would more naturally be expressed
by conditionalizing the code inside the handler, but the Sun
compiler won't accept this conditionalization. */
bind_handler (SIGSYS, sighnd_software_trap);
bind_handler (SIGABRT, sighnd_software_trap);
bind_handler (SIGPROF, sighnd_software_trap);
+ bind_handler (SIGWINCH, sighnd_console_resize);
}
{
struct signal_descriptor * scan = signal_descriptors;
#| -*-Scheme-*-
-$Id: intrpt.scm,v 14.25 2004/10/01 03:39:02 cph Exp $
+$Id: intrpt.scm,v 14.26 2005/12/25 17:04:39 riastradh Exp $
Copyright 1986,1987,1988,1990,1991,1992 Massachusetts Institute of Technology
-Copyright 1993,1994,2004 Massachusetts Institute of Technology
+Copyright 1993,1994,2004,2005 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
(fixed-objects-vector-slot 'INTERRUPT-MASK-VECTOR))
(set! index:termination-vector
(fixed-objects-vector-slot 'MICROCODE-TERMINATIONS-PROCEDURES))
+ (set! event:console-resize (make-event-distributor))
(set! hook/clean-input/flush-typeahead false)
(set! hook/clean-input/keep-typeahead false)
(set! hook/^B-interrupt false)
(define-integrable character-slot 4)
(define-integrable after-gc-slot 5)
(define-integrable timer-slot 6)
+(define-integrable console-resize-slot 7)
(define-integrable suspend-slot 8)
;; Room for Descartes profiler interrupt handlers
(define-integrable illegal-interrupt-slot 15)
;; prevent us from getting into a loop just running the daemons.
(clear-interrupts! interrupt-bit/after-gc))
+(define event:console-resize)
+(define (console-resize-handler interrupt-code interrupt-enables)
+ interrupt-code interrupt-enables
+ (clear-interrupts! interrupt-bit/global-3)
+ (event-distributor/invoke! event:console-resize))
+
(define ((illegal-interrupt-handler interrupt-bit)
interrupt-code interrupt-enables)
(clear-interrupts! interrupt-bit)
(vector-set! interrupt-mask-vector suspend-slot
interrupt-mask/timer-ok)
+ (vector-set! system-interrupt-vector console-resize-slot
+ console-resize-handler)
+ (vector-set! interrupt-mask-vector console-resize-slot
+ interrupt-mask/all)
+
(vector-set! termination-vector
(microcode-termination 'GC-OUT-OF-SPACE)
gc-out-of-space-handler)
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.570 2005/12/23 04:15:45 cph Exp $
+$Id: runtime.pkg,v 14.571 2005/12/25 17:04:39 riastradh Exp $
Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
(define-package (runtime interrupt-handler)
(files "intrpt")
(parent (runtime))
+ (export ()
+ event:console-resize)
(export (runtime emacs-interface)
hook/^G-interrupt
hook/clean-input/flush-typeahead)