{ itz Wed Dec 16 23:22:16 PST 1998 use sigaction, the old code caused a signal loop under XEmacs } fpsigemptyset(sa.sa_mask); { And the winch (window-resize) hook .. } sa.sa_handler:=@gpm_winch_hook; sa.sa_flags:=0; fpsigaction(SIGWINCH,@sa,@gpm_saved_winch_hook); procedure gpm_winch_hook(signum:longint;SigInfo: PSigInfo; SigContext: PSigContext);cdecl; var win:winsize; begin if (sigactionhandler(SIG_IGN)<>gpm_saved_winch_hook.sa_handler) and (sigactionhandler(SIG_DFL)<>gpm_saved_winch_hook.sa_handler) then gpm_saved_winch_hook.sa_handler(signum,nil,nil); if fpioctl(gpm_consolefd,TIOCGWINSZ,@win)=-1 then exit; if (win.ws_col=0) or (win.ws_row=0) then begin win.ws_col:=80; win.ws_row:=25; end; gpm_mx:=win.ws_col - gpm_zerobased; gpm_my:=win.ws_row - gpm_zerobased; end; TWinSize termios