Deleted Added
full compact
menusets.4th (262701) menusets.4th (281843)
1\ Copyright (c) 2012 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.

--- 8 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\
1\ Copyright (c) 2012 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.

--- 8 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/menusets.4th 262701 2014-03-03 07:16:39Z dteske $
25\ $FreeBSD: stable/10/sys/boot/forth/menusets.4th 281843 2015-04-22 01:08:40Z dteske $
26
27marker task-menusets.4th
28
26
27marker task-menusets.4th
28
29vocabulary menusets-infrastructure
30only forth also menusets-infrastructure definitions
31
29variable menuset_use_name
30
31create menuset_affixbuf 255 allot
32create menuset_x 1 allot
33create menuset_y 1 allot
34
35: menuset-loadvar ( -- )
36

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

432: menuset-cleanup ( -- )
433 s" type" unsetenv
434 s" var" unsetenv
435 s" x" unsetenv
436 s" y" unsetenv
437 s" affix" unsetenv
438;
439
32variable menuset_use_name
33
34create menuset_affixbuf 255 allot
35create menuset_x 1 allot
36create menuset_y 1 allot
37
38: menuset-loadvar ( -- )
39

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

435: menuset-cleanup ( -- )
436 s" type" unsetenv
437 s" var" unsetenv
438 s" x" unsetenv
439 s" y" unsetenv
440 s" affix" unsetenv
441;
442
443only forth definitions also menusets-infrastructure
444
440: menuset-loadsetnum ( N -- )
441
442 menuset-checksetnum ( n -- )
443
444 \
445 \ From here out, we use temporary environment variables to make
446 \ dealing with variable-length strings easier.
447 \

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

532
533 \ ... menu_optionstext ...
534 s" set var=optionstext" evaluate
535 menuset-loadmenuvar
536
537 menuset-cleanup
538;
539
445: menuset-loadsetnum ( N -- )
446
447 menuset-checksetnum ( n -- )
448
449 \
450 \ From here out, we use temporary environment variables to make
451 \ dealing with variable-length strings easier.
452 \

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

537
538 \ ... menu_optionstext ...
539 s" set var=optionstext" evaluate
540 menuset-loadmenuvar
541
542 menuset-cleanup
543;
544
540: menuset-loadinitial ( -- )
541 s" menuset_initial" getenv dup -1 <> if
542 ?number 0<> if
543 menuset-loadsetnum
544 then
545 else
546 drop \ cruft
547 then
548;
549
550: menusets-unset ( -- )
551
552 s" menuset_initial" unsetenv
553
554 1 begin
555 dup menuset-checksetnum ( n n -- n )
556
557 dup menuset-setnum-namevar ( n n -- n )

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

610
611 1+ dup 65535 > ( n -- n' 0|-1 ) \ increment and test
612 until
613 drop ( n' -- ) \ loop iterator
614
615 s" buf" unsetenv
616 menuset-cleanup
617;
545: menusets-unset ( -- )
546
547 s" menuset_initial" unsetenv
548
549 1 begin
550 dup menuset-checksetnum ( n n -- n )
551
552 dup menuset-setnum-namevar ( n n -- n )

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

605
606 1+ dup 65535 > ( n -- n' 0|-1 ) \ increment and test
607 until
608 drop ( n' -- ) \ loop iterator
609
610 s" buf" unsetenv
611 menuset-cleanup
612;
613
614only forth definitions
615
616: menuset-loadinitial ( -- )
617 s" menuset_initial" getenv dup -1 <> if
618 ?number 0<> if
619 menuset-loadsetnum
620 then
621 else
622 drop \ cruft
623 then
624;