Deleted Added
full compact
delay.4th (256281) delay.4th (281843)
1\ Copyright (c) 2008-2011 Devin Teske <dteske@FreeBSD.org>
1\ Copyright (c) 2008-2015 Devin Teske <dteske@FreeBSD.org>
2\ All rights reserved.
3\
4\ Redistribution and use in source and binary forms, with or without
5\ modification, are permitted provided that the following conditions
6\ are met:
7\ 1. Redistributions of source code must retain the above copyright
8\ notice, this list of conditions and the following disclaimer.
9\ 2. Redistributions in binary form must reproduce the above copyright

--- 7 unchanged lines hidden (view full) ---

17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23\ SUCH DAMAGE.
24\
2\ All rights reserved.
3\
4\ Redistribution and use in source and binary forms, with or without
5\ modification, are permitted provided that the following conditions
6\ are met:
7\ 1. Redistributions of source code must retain the above copyright
8\ notice, this list of conditions and the following disclaimer.
9\ 2. Redistributions in binary form must reproduce the above copyright

--- 7 unchanged lines hidden (view full) ---

17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23\ SUCH DAMAGE.
24\
25\ $FreeBSD: stable/10/sys/boot/forth/delay.4th 238431 2012-07-14 01:45:35Z dteske $
25\ $FreeBSD: stable/10/sys/boot/forth/delay.4th 281843 2015-04-22 01:08:40Z dteske $
26
27marker task-delay.4th
28
26
27marker task-delay.4th
28
29vocabulary delay-processing
30only forth also delay-processing definitions
31
292 constant delay_default \ Default delay (in seconds)
303 constant etx_key \ End-of-Text character produced by Ctrl+C
3113 constant enter_key \ Carriage-Return character produce by ENTER
3227 constant esc_key \ Escape character produced by ESC or Ctrl+[
33
34variable delay_tstart \ state variable used for delay timing
35variable delay_delay \ determined configurable delay duration
36variable delay_cancelled \ state variable for user cancellation
37variable delay_showdots \ whether continually print dots while waiting
38
322 constant delay_default \ Default delay (in seconds)
333 constant etx_key \ End-of-Text character produced by Ctrl+C
3413 constant enter_key \ Carriage-Return character produce by ENTER
3527 constant esc_key \ Escape character produced by ESC or Ctrl+[
36
37variable delay_tstart \ state variable used for delay timing
38variable delay_delay \ determined configurable delay duration
39variable delay_cancelled \ state variable for user cancellation
40variable delay_showdots \ whether continually print dots while waiting
41
42only forth definitions also delay-processing
43
39: delay_execute ( -- )
40
41 \ make sure that we have a command to execute
42 s" delay_command" getenv dup -1 = if
43 drop exit
44 then
45
46 \ read custom time-duration (if set)

--- 58 unchanged lines hidden (view full) ---

105
106 \ did the user press either Ctrl-C or Escape?
107 delay_cancelled @ if
108 2drop \ we don't need the command string anymore
109 else
110 evaluate \ evaluate/execute the command string
111 then
112;
44: delay_execute ( -- )
45
46 \ make sure that we have a command to execute
47 s" delay_command" getenv dup -1 = if
48 drop exit
49 then
50
51 \ read custom time-duration (if set)

--- 58 unchanged lines hidden (view full) ---

110
111 \ did the user press either Ctrl-C or Escape?
112 delay_cancelled @ if
113 2drop \ we don't need the command string anymore
114 else
115 evaluate \ evaluate/execute the command string
116 then
117;
118
119only forth definitions