- applied patches for the term gui from SF tracker by Sebastian

* fixed missing SIGHUP and SIQUIT on MinGW
  * fixed wrong colors if curses library supports more than 8
This commit is contained in:
Volker Ruppert 2008-06-22 08:32:59 +00:00
parent 678ac970aa
commit 457d320524

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: term.cc,v 1.40 2008-03-06 21:15:40 sshwarts Exp $
// $Id: term.cc,v 1.41 2008-06-22 08:32:59 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2000 MandrakeSoft S.A.
@ -126,9 +126,14 @@ static void do_scan(int key_event, int shift, int ctrl, int alt)
Bit32u bx_term_gui_c::get_sighandler_mask()
{
return (1<<SIGHUP)
return 0
#ifdef SIGHUP
| (1<<SIGHUP)
#endif
| (1<<SIGINT)
#ifdef SIGQUIT
| (1<<SIGQUIT)
#endif
#ifdef SIGSTOP
| (1<<SIGSTOP)
#endif
@ -154,9 +159,11 @@ void bx_term_gui_c::sighandler(int signo)
do_scan(BX_KEY_Z,0,1,0);
break;
#endif
#ifdef SIGHUP
case SIGHUP:
BX_PANIC(("Received SIGHUP: quit simulation"));
break;
#endif
default:
BX_INFO(("sig %d caught",signo));
break;
@ -200,9 +207,9 @@ void bx_term_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, uns
#if BX_HAVE_COLOR_SET
if (has_colors()) {
for (int i=0; i<COLORS; i++) {
for (int j=0; j<COLORS; j++) {
if ((i!=0)||(j!=0)) init_pair(i * COLORS + j, j, i);
for (int i=0; i<8; i++) {
for (int j=0; j<8; j++) {
if ((i!=0)||(j!=0)) init_pair(i * 8 + j, j, i);
}
}
}