Fixed escape and stop key definitions for the commodore machines
git-svn-id: svn://svn.cc65.org/cc65/trunk@1741 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -465,6 +465,24 @@ static void AnyKeyPrompt (void)
|
||||
|
||||
|
||||
|
||||
static char IsAbortKey (char C)
|
||||
/* Return true if C is an abort key */
|
||||
{
|
||||
#if defined(CH_ESC)
|
||||
if (C == CH_ESC) {
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
#if defined(CH_STOP)
|
||||
if (C == CH_STOP) {
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static char Input (char* Prompt, char* Buf, unsigned char Count)
|
||||
/* Read input from the user, return 1 on success, 0 if aborted */
|
||||
{
|
||||
@@ -503,8 +521,8 @@ static char Input (char* Prompt, char* Buf, unsigned char Count)
|
||||
} else if (c == '\n') {
|
||||
Buf [i] = '\0';
|
||||
done = 1;
|
||||
} else if (c == CH_ESC) {
|
||||
/* Abort */
|
||||
} else if (IsAbortKey (c)) {
|
||||
/* Abort */
|
||||
done = 2;
|
||||
}
|
||||
} while (!done);
|
||||
@@ -1500,4 +1518,4 @@ void DbgEntry (void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user