This commit is contained in:
jl777
2019-02-17 22:29:58 -11:00
parent f513e5d1f5
commit ef4844d5a3
4 changed files with 29 additions and 18 deletions

View File

@@ -264,7 +264,7 @@ over:
when 'Q':
after = FALSE;
q_comm = TRUE;
if ( quit(0) > 0 )
if ( _quit() > 0 )
{
if ( rs->guiflag != 0 )
{

View File

@@ -141,7 +141,8 @@ void getltchars(void);
void leave(int);
void my_exit(int st);
void playltchars(void);
int32_t quit(int);
void quit(int);
int32_t _quit();
void resetltchars(void);
void set_order(int *order, int numthings);
void tstp(int ignored);

View File

@@ -174,7 +174,7 @@ readchar(struct rogue_state *rs)
if (ch == 3)
{
quit(0);
_quit();
return(27);
}
if ( rs != 0 && rs->guiflag != 0 )

View File

@@ -613,26 +613,13 @@ playit(struct rogue_state *rs)
endit(0);
}
/*
* quit:
* Have player make certain, then exit.
*/
int32_t quit(int sig)
int32_t _quit()
{
struct rogue_state *rs = &globalR;
int oy, ox, c;
//fprintf(stderr,"inside quit(%d)\n",sig);
if ( rs->guiflag != 0 )
{
NOOP(sig);
/*
* Reset the signal in case we got here via an interrupt
*/
if (!q_comm)
mpos = 0;
}
getyx(curscr, oy, ox);
msg(rs,"really quit?");
sleep(1);
@@ -673,6 +660,29 @@ int32_t quit(int sig)
}
}
/*
* quit:
* Have player make certain, then exit.
*/
void quit(int sig)
{
struct rogue_state *rs = &globalR;
int oy, ox, c;
//fprintf(stderr,"inside quit(%d)\n",sig);
if ( rs->guiflag != 0 )
{
NOOP(sig);
/*
* Reset the signal in case we got here via an interrupt
*/
if (!q_comm)
mpos = 0;
}
_quit();
}
/*
* leave:
* Leave quickly, but curteously