more c-c fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@359 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
777817f8db
commit
401ad9c9fc
@ -926,6 +926,7 @@ ReadlineGetc(int sno)
|
|||||||
ProcessSIGINT();
|
ProcessSIGINT();
|
||||||
PrologMode &= ~ConsoleGetcMode;
|
PrologMode &= ~ConsoleGetcMode;
|
||||||
if (PrologMode & AbortMode) {
|
if (PrologMode & AbortMode) {
|
||||||
|
Error(PURE_ABORT, TermNil, "");
|
||||||
ErrorMessage = "Abort";
|
ErrorMessage = "Abort";
|
||||||
return(console_post_process_read_char(EOF, s, sno));
|
return(console_post_process_read_char(EOF, s, sno));
|
||||||
}
|
}
|
||||||
@ -1301,6 +1302,7 @@ ConsoleGetc(int sno)
|
|||||||
PrologMode &= ~ConsoleGetcMode;
|
PrologMode &= ~ConsoleGetcMode;
|
||||||
newline = TRUE;
|
newline = TRUE;
|
||||||
if (PrologMode & AbortMode) {
|
if (PrologMode & AbortMode) {
|
||||||
|
Error(PURE_ABORT, TermNil, "");
|
||||||
ErrorMessage = "Abort";
|
ErrorMessage = "Abort";
|
||||||
return(console_post_process_read_char(EOF, s, sno));
|
return(console_post_process_read_char(EOF, s, sno));
|
||||||
}
|
}
|
||||||
|
@ -1072,7 +1072,6 @@ InteractSIGINT(int ch) {
|
|||||||
if (PrologMode & ConsoleGetcMode) {
|
if (PrologMode & ConsoleGetcMode) {
|
||||||
PrologMode |= AbortMode;
|
PrologMode |= AbortMode;
|
||||||
} else {
|
} else {
|
||||||
getc(stdin);
|
|
||||||
Error(PURE_ABORT, TermNil, "");
|
Error(PURE_ABORT, TermNil, "");
|
||||||
/* in case someone mangles the P register */
|
/* in case someone mangles the P register */
|
||||||
#if _MSC_VER || defined(__MINGW32__)
|
#if _MSC_VER || defined(__MINGW32__)
|
||||||
@ -1235,6 +1234,7 @@ HandleSIGINT (int sig)
|
|||||||
#if HAVE_LIBREADLINE
|
#if HAVE_LIBREADLINE
|
||||||
if (PrologMode & ConsoleGetcMode) {
|
if (PrologMode & ConsoleGetcMode) {
|
||||||
fprintf(stderr, "Action (h for help): ");
|
fprintf(stderr, "Action (h for help): ");
|
||||||
|
rl_point = rl_end = 0;
|
||||||
#if HAVE_RL_SET_PROMPT
|
#if HAVE_RL_SET_PROMPT
|
||||||
rl_set_prompt("Action (h for help): ");
|
rl_set_prompt("Action (h for help): ");
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user