menu.4th (238431) | menu.4th (241310) |
---|---|
1\ Copyright (c) 2003 Scott Long <scottl@freebsd.org> 2\ Copyright (c) 2003 Aleksander Fafula <alex@fafula.com> | 1\ Copyright (c) 2003 Scott Long <scottl@freebsd.org> 2\ Copyright (c) 2003 Aleksander Fafula <alex@fafula.com> |
3\ Copyright (c) 2006-2011 Devin Teske <dteske@FreeBSD.org> | 3\ Copyright (c) 2006-2012 Devin Teske <dteske@FreeBSD.org> |
4\ All rights reserved. 5\ 6\ Redistribution and use in source and binary forms, with or without 7\ modification, are permitted provided that the following conditions 8\ are met: 9\ 1. Redistributions of source code must retain the above copyright 10\ notice, this list of conditions and the following disclaimer. 11\ 2. Redistributions in binary form must reproduce the above copyright --- 7 unchanged lines hidden (view full) --- 19\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25\ SUCH DAMAGE. 26\ | 4\ All rights reserved. 5\ 6\ Redistribution and use in source and binary forms, with or without 7\ modification, are permitted provided that the following conditions 8\ are met: 9\ 1. Redistributions of source code must retain the above copyright 10\ notice, this list of conditions and the following disclaimer. 11\ 2. Redistributions in binary form must reproduce the above copyright --- 7 unchanged lines hidden (view full) --- 19\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25\ SUCH DAMAGE. 26\ |
27\ $FreeBSD: head/sys/boot/forth/menu.4th 238431 2012-07-14 01:45:35Z dteske $ | 27\ $FreeBSD: head/sys/boot/forth/menu.4th 241310 2012-10-07 15:37:30Z dteske $ |
28 29marker task-menu.4th 30 31\ Frame drawing 32include /boot/frames.4th 33 34f_double \ Set frames to double (see frames.4th). Replace with 35 \ f_single if you want single frames. --- 343 unchanged lines hidden (view full) --- 379 then 380 true 381; 382 383\ This function prints the appropriate menuitem basename to the stack if an 384\ ACPI option is to be presented to the user, otherwise returns -1. Used 385\ internally by menu-create, you need not (nor should you) call this directly. 386\ | 28 29marker task-menu.4th 30 31\ Frame drawing 32include /boot/frames.4th 33 34f_double \ Set frames to double (see frames.4th). Replace with 35 \ f_single if you want single frames. --- 343 unchanged lines hidden (view full) --- 379 then 380 true 381; 382 383\ This function prints the appropriate menuitem basename to the stack if an 384\ ACPI option is to be presented to the user, otherwise returns -1. Used 385\ internally by menu-create, you need not (nor should you) call this directly. 386\ |
387: acpimenuitem ( -- C-Addr | -1 ) | 387: acpimenuitem ( -- C-Addr/U | -1 ) |
388 389 arch-i386? if 390 acpipresent? if 391 acpienabled? if 392 loader_color? if 393 s" toggled_ansi[x]" 394 else 395 s" toggled_text[x]" --- 92 unchanged lines hidden (view full) --- 488 menurow @ 2 + menurow ! 489 menurow @ menuY @ + 490 at-xy 491 ." Options:" 492 then 493 494 \ If this is the ACPI menu option, act accordingly. 495 dup menuacpi @ = if | 388 389 arch-i386? if 390 acpipresent? if 391 acpienabled? if 392 loader_color? if 393 s" toggled_ansi[x]" 394 else 395 s" toggled_text[x]" --- 92 unchanged lines hidden (view full) --- 488 menurow @ 2 + menurow ! 489 menurow @ menuY @ + 490 at-xy 491 ." Options:" 492 then 493 494 \ If this is the ACPI menu option, act accordingly. 495 dup menuacpi @ = if |
496 acpimenuitem ( -- C-Addr | -1 ) | 496 acpimenuitem ( -- C-Addr/U | -1 ) |
497 else 498 loader_color? if 499 s" ansi_caption[x]" 500 else 501 s" menu_caption[x]" 502 then 503 then 504 | 497 else 498 loader_color? if 499 s" ansi_caption[x]" 500 else 501 s" menu_caption[x]" 502 then 503 then 504 |
505 ( C-Addr | -1 ) | 505 ( C-Addr/U | -1 ) |
506 dup -1 <> if 507 \ replace 'x' with current iteration 508 -rot 2dup 13 + c! rot 509 510 \ test for environment variable 511 getenv dup -1 <> if | 506 dup -1 <> if 507 \ replace 'x' with current iteration 508 -rot 2dup 13 + c! rot 509 510 \ test for environment variable 511 getenv dup -1 <> if |
512 printmenuitem ( C-Addr -- N ) | 512 printmenuitem ( C-Addr/U -- N ) |
513 514 s" menukeyN !" \ generate cmd to store result 515 -rot 2dup 7 + c! rot 516 517 evaluate 518 else 519 drop 520 then --- 500 unchanged lines hidden --- | 513 514 s" menukeyN !" \ generate cmd to store result 515 -rot 2dup 7 + c! rot 516 517 evaluate 518 else 519 drop 520 then --- 500 unchanged lines hidden --- |