Skip to content
Snippets Groups Projects
Commit 9add72d7 authored by rswindell's avatar rswindell
Browse files

Handle abort (^C) better - immediately return.

Replaced embedded ^A chars with \x01.
Use bright-background (\x01e) for selected answer, much more readable on
PETSCII terminals.
parent 273b210c
No related branches found
No related tags found
No related merge requests found
......@@ -22,13 +22,13 @@ if_true
print "\1?"
shift_str _question 2
end_if
printf "nbh[cb] y%s? " _question
printf "\x01n\x01b\x01h[\x01c\x01b] \x01y%s? " _question
:top
compare_str "N"
if_equal
print "h4w[No]nbh Yes "
print "\x01h\x014\x01w\x01e[No]\x01n\x01b\x01h Yes "
else
print "nbh No 4w[Yes]"
print "\x01n\x01b\x01h No \x014\x01w\x01e[Yes]"
end_if
int aborted
copy aborted _sys_status
......@@ -36,6 +36,13 @@ and aborted SS_ABORT
compare aborted SS_ABORT
if_not_equal
getkey
int aborted
copy aborted _sys_status
and aborted SS_ABORT
compare aborted SS_ABORT
if_equal
return
end_if
end_if
print "\b\b\b\b\b\b\b\b\b\1n\1h\1>"
if_equal
......
......@@ -22,13 +22,13 @@ if_true
print "\1?"
shift_str _question 2
end_if
printf "nbh[cb] y%s? " _question
printf "\x01n\x01b\x01h[\x01c\x01b] \x01y%s? " _question
:top
compare_str "Y"
if_equal
print "h4w[Yes]nbh No "
print "\x01h\x014\x01w\x01e[Yes]\x01n\x01b\x01h No "
else
print "nbh Yes 4w[No]"
print "\x01n\x01b\x01h Yes \x014\x01w\x01e[No]"
end_if
int aborted
copy aborted _sys_status
......@@ -36,6 +36,13 @@ and aborted SS_ABORT
compare aborted SS_ABORT
if_not_equal
getkey
int aborted
copy aborted _sys_status
and aborted SS_ABORT
compare aborted SS_ABORT
if_equal
return
end_if
end_if
print "\b\b\b\b\b\b\b\b\b\1n\1h\1>"
if_equal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment