diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/boot/sys/boot/forth/menu.4th | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/usr/src/boot/sys/boot/forth/menu.4th b/usr/src/boot/sys/boot/forth/menu.4th index 811db1e5b7..e60d5b8d6a 100644 --- a/usr/src/boot/sys/boot/forth/menu.4th +++ b/usr/src/boot/sys/boot/forth/menu.4th @@ -549,28 +549,22 @@ also menu-infrastructure definitions then ; -\ Takes a single integer on the stack and updates the timeout display. The -\ integer must be between 0 and 9 (we will only update a single digit in the -\ source message). +\ Takes an integer on the stack and updates the timeout display. \ : menu-timeout-update ( N -- ) - \ Enforce minimum/maximum - dup 9 > if drop 9 then + \ Enforce minimum dup 0 < if drop 0 then - s" Autoboot in N seconds. [Space] to pause" ( n -- n c-addr/u ) + menu_timeout_x @ menu_timeout_y @ at-xy \ position cursor - 2 pick 0> if - rot 48 + -rot ( n c-addr/u -- n' c-addr/u ) \ convert to ASCII - 12 +c! ( n' c-addr/u -- c-addr/u ) \ replace 'N' above - - menu_timeout_x @ menu_timeout_y @ at-xy \ position cursor - type ( c-addr/u -- ) \ print message + dup 0> if + s" Autoboot in " type + dup . s" second" type + 1 > if [char] s emit then + s" . [Space] to pause " type else - menu_timeout_x @ menu_timeout_y @ at-xy \ position cursor - spaces ( n c-addr/u -- n c-addr ) \ erase message - 2drop ( n c-addr -- ) + drop 40 spaces \ erase message then at-bl |