xref: /titanic_52/usr/src/man/man5/menusets.4th.5 (revision ba11c5b535a8958668f939901bdcacb3ee8b7570)
1*ba11c5b5SToomas Soome.\" Copyright (c) 2012 Devin Teske
2*ba11c5b5SToomas Soome.\" All rights reserved.
3*ba11c5b5SToomas Soome.\"
4*ba11c5b5SToomas Soome.\" Redistribution and use in source and binary forms, with or without
5*ba11c5b5SToomas Soome.\" modification, are permitted provided that the following conditions
6*ba11c5b5SToomas Soome.\" are met:
7*ba11c5b5SToomas Soome.\" 1. Redistributions of source code must retain the above copyright
8*ba11c5b5SToomas Soome.\"    notice, this list of conditions and the following disclaimer.
9*ba11c5b5SToomas Soome.\" 2. Redistributions in binary form must reproduce the above copyright
10*ba11c5b5SToomas Soome.\"    notice, this list of conditions and the following disclaimer in the
11*ba11c5b5SToomas Soome.\"    documentation and/or other materials provided with the distribution.
12*ba11c5b5SToomas Soome.\"
13*ba11c5b5SToomas Soome.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14*ba11c5b5SToomas Soome.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*ba11c5b5SToomas Soome.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*ba11c5b5SToomas Soome.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17*ba11c5b5SToomas Soome.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*ba11c5b5SToomas Soome.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*ba11c5b5SToomas Soome.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*ba11c5b5SToomas Soome.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*ba11c5b5SToomas Soome.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*ba11c5b5SToomas Soome.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*ba11c5b5SToomas Soome.\" SUCH DAMAGE.
24*ba11c5b5SToomas Soome.\"
25*ba11c5b5SToomas Soome.Dd Apr 22, 2017
26*ba11c5b5SToomas Soome.Dt MENUSETS.4TH 5
27*ba11c5b5SToomas Soome.Os
28*ba11c5b5SToomas Soome.Sh NAME
29*ba11c5b5SToomas Soome.Nm menusets.4th
30*ba11c5b5SToomas Soome.Nd loader dynamic submenu boot module
31*ba11c5b5SToomas Soome.Sh DESCRIPTION
32*ba11c5b5SToomas SoomeThe file that goes by the name of
33*ba11c5b5SToomas Soome.Nm
34*ba11c5b5SToomas Soomeis a set of commands designed to add submenu functionality to the dynamic menu
35*ba11c5b5SToomas Soomesystem provided by
36*ba11c5b5SToomas Soome.Xr menu.4th 5 .
37*ba11c5b5SToomas SoomeSubmenus are managed through a system of carefully named environment variables.
38*ba11c5b5SToomas SoomeThe commands of
39*ba11c5b5SToomas Soome.Nm
40*ba11c5b5SToomas Soomeby themselves are not enough for most uses.
41*ba11c5b5SToomas SoomePlease refer to the examples below for the most common situations, and to
42*ba11c5b5SToomas Soome.Xr menu.4th 5
43*ba11c5b5SToomas Soomefor additional commands.
44*ba11c5b5SToomas Soome.Pp
45*ba11c5b5SToomas SoomeBefore using any of the commands provided in
46*ba11c5b5SToomas Soome.Nm ,
47*ba11c5b5SToomas Soomeit must be included
48*ba11c5b5SToomas Soomethrough the command:
49*ba11c5b5SToomas Soome.Pp
50*ba11c5b5SToomas Soome.Dl include menusets.4th
51*ba11c5b5SToomas Soome.Pp
52*ba11c5b5SToomas SoomeThis line is present in the default
53*ba11c5b5SToomas Soome.Pa /boot/forth/menu-commands.4th
54*ba11c5b5SToomas Soomefile, so it is not needed (and should not be re-issued) in a normal setup.
55*ba11c5b5SToomas Soome.Pp
56*ba11c5b5SToomas SoomeThe commands provided by it are:
57*ba11c5b5SToomas Soome.Pp
58*ba11c5b5SToomas Soome.Bl -tag -width menuset-loadinitial -compact -offset indent
59*ba11c5b5SToomas Soome.It Ic menuset-loadsetnum
60*ba11c5b5SToomas SoomeTakes a single integer on the stack to identify the menuset environment
61*ba11c5b5SToomas Soomevariables to be activated (see environment variables below).
62*ba11c5b5SToomas Soome.It Ic menuset-loadinitial
63*ba11c5b5SToomas SoomeIf $menuset_initial is set, passes the value to menuset-loadsetnum.
64*ba11c5b5SToomas SoomeThe value must be a number.
65*ba11c5b5SToomas Soome.It Ic menusets-unset
66*ba11c5b5SToomas SoomeUnsets the environment variables associated with all menusets.
67*ba11c5b5SToomas SoomeIncrements starting at 1 and stops at the first unconfigured menuset.
68*ba11c5b5SToomas SoomeA menuset is considered configured if the caption for item 1 is set.
69*ba11c5b5SToomas Soome.El
70*ba11c5b5SToomas Soome.Pp
71*ba11c5b5SToomas SoomeThe environment variables that effect its behavior are:
72*ba11c5b5SToomas Soome.Bl -tag -width bootfile -offset indent
73*ba11c5b5SToomas Soome.It Va menuset_initial
74*ba11c5b5SToomas SoomeNumber to pass to menuset-loadsetnum when menuset-loadinitial is called.
75*ba11c5b5SToomas Soome.It Va menuset_nameN
76*ba11c5b5SToomas SoomeUsed to give a name to a menuset.
77*ba11c5b5SToomas Soome.El
78*ba11c5b5SToomas Soome.Pp
79*ba11c5b5SToomas SoomeWhen a menuset is NOT given a name (the default),
80*ba11c5b5SToomas Soomemenuset N is comprised of the following environment variables:
81*ba11c5b5SToomas Soome.Pp
82*ba11c5b5SToomas Soome.Bl -tag -width menusetN_caption[x][y] -compact -offset indent
83*ba11c5b5SToomas Soome.It Va ansisetN_caption[x]
84*ba11c5b5SToomas Soome-> ansi_caption[x]
85*ba11c5b5SToomas Soome.It Va ansisetN_caption[x][y]
86*ba11c5b5SToomas Soome-> ansi_caption[x][y]
87*ba11c5b5SToomas Soome.It Va menusetN_acpi
88*ba11c5b5SToomas Soome-> menu_acpi
89*ba11c5b5SToomas Soome.It Va menusetN_caption[x]
90*ba11c5b5SToomas Soome-> menu_caption[x]
91*ba11c5b5SToomas Soome.It Va menusetN_caption[x][y]
92*ba11c5b5SToomas Soome-> menu_caption[x][y]
93*ba11c5b5SToomas Soome.It Va menusetN_command[x]
94*ba11c5b5SToomas Soome-> menu_command[x]
95*ba11c5b5SToomas Soome.It Va menusetN_init
96*ba11c5b5SToomas Soome->
97*ba11c5b5SToomas Soome.Dq Li evaluated
98*ba11c5b5SToomas Soome.It Va menusetN_init[x]
99*ba11c5b5SToomas Soome-> menu_init[x]
100*ba11c5b5SToomas Soome.It Va menusetN_keycode[x]
101*ba11c5b5SToomas Soome-> menu_keycode[x]
102*ba11c5b5SToomas Soome.It Va menusetN_options
103*ba11c5b5SToomas Soome-> menu_options
104*ba11c5b5SToomas Soome.It Va menusetN_optionstext
105*ba11c5b5SToomas Soome-> menu_optionstext
106*ba11c5b5SToomas Soome.It Va menusetN_reboot
107*ba11c5b5SToomas Soome-> menu_reboot
108*ba11c5b5SToomas Soome.It Va toggledsetN_ansi[x]
109*ba11c5b5SToomas Soome-> toggled_ansi[x]
110*ba11c5b5SToomas Soome.It Va toggledsetN_text[x]
111*ba11c5b5SToomas Soome-> toggled_text[x]
112*ba11c5b5SToomas Soome.El
113*ba11c5b5SToomas Soome.Pp
114*ba11c5b5SToomas SoomeWhen you choose to give a menuset a name (by setting $menuset_nameN),
115*ba11c5b5SToomas Soomemenuset N is instead comprised of the following environment variables:
116*ba11c5b5SToomas Soome.Pp
117*ba11c5b5SToomas Soome.Bl -tag -width NAMEmenu_caption[x][y] -compact -offset indent
118*ba11c5b5SToomas Soome.It Va NAMEansi_caption[x]
119*ba11c5b5SToomas Soome-> ansi_caption[x]
120*ba11c5b5SToomas Soome.It Va NAMEansi_caption[x][y]
121*ba11c5b5SToomas Soome-> ansi_caption[x][y]
122*ba11c5b5SToomas Soome.It Va NAMEmenu_acpi
123*ba11c5b5SToomas Soome-> menu_acpi
124*ba11c5b5SToomas Soome.It Va NAMEmenu_caption[x]
125*ba11c5b5SToomas Soome-> menu_caption[x]
126*ba11c5b5SToomas Soome.It Va NAMEmenu_caption[x][y]
127*ba11c5b5SToomas Soome-> menu_caption[x][y]
128*ba11c5b5SToomas Soome.It Va NAMEmenu_command[x]
129*ba11c5b5SToomas Soome-> menu_command[x]
130*ba11c5b5SToomas Soome.It Va NAMEmenu_init
131*ba11c5b5SToomas Soome->
132*ba11c5b5SToomas Soome.Dq Li evaluated
133*ba11c5b5SToomas Soome.It Va NAMEmenu_init[x]
134*ba11c5b5SToomas Soome-> menu_init[x]
135*ba11c5b5SToomas Soome.It Va NAMEmenu_keycode[x]
136*ba11c5b5SToomas Soome-> menu_keycode[x]
137*ba11c5b5SToomas Soome.It Va NAMEmenu_options
138*ba11c5b5SToomas Soome-> menu_options
139*ba11c5b5SToomas Soome.It Va NAMEmenu_optionstext
140*ba11c5b5SToomas Soome-> menu_optionstext
141*ba11c5b5SToomas Soome.It Va NAMEmenu_reboot
142*ba11c5b5SToomas Soome-> menu_reboot
143*ba11c5b5SToomas Soome.It Va NAMEtoggled_ansi[x]
144*ba11c5b5SToomas Soome-> toggled_ansi[x]
145*ba11c5b5SToomas Soome.It Va NAMEtoggled_text[x]
146*ba11c5b5SToomas Soome-> toggled_text[x]
147*ba11c5b5SToomas Soome.El
148*ba11c5b5SToomas Soome.Pp
149*ba11c5b5SToomas Soomewhere
150*ba11c5b5SToomas Soome.Dq Li NAME
151*ba11c5b5SToomas Soomeis the value of $menuset_nameN.
152*ba11c5b5SToomas SoomeIn the case of $NAMEmenu_init ($menusetN_init when $menuset_nameN is unset),
153*ba11c5b5SToomas Soomethe value is evaluated as an FICL statement.
154*ba11c5b5SToomas SoomeThis can be used to dynamically adjust the menuset variables right before the
155*ba11c5b5SToomas Soomemenu is activated.
156*ba11c5b5SToomas Soome.Pp
157*ba11c5b5SToomas SoomeIn addition,
158*ba11c5b5SToomas Soome.Nm
159*ba11c5b5SToomas Soomeprovides the following FICL words:
160*ba11c5b5SToomas Soome.Pp
161*ba11c5b5SToomas Soome.Bl -tag -width menuset -compact -offset indent
162*ba11c5b5SToomas Soome.It Ic menuset-checksetnum ( N -- )
163*ba11c5b5SToomas SoomeGiven a single integer on the stack, sets a global variable
164*ba11c5b5SToomas Soome.Va menuset_use_name
165*ba11c5b5SToomas Soometo a boolean based on whether $menuset_nameN is set (true) or not (false).
166*ba11c5b5SToomas SoomeAlso sets $affix temporary variable (prefix or infix depending on
167*ba11c5b5SToomas Soomemenuset_use_name).
168*ba11c5b5SToomas SoomeAutomatically called by menuset-loadsetnum and menusets-unset.
169*ba11c5b5SToomas Soome.It Ic menuset-loadvar ( -- )
170*ba11c5b5SToomas SoomeUsed indirectly to shorten syntax and mitigate dictionary size.
171*ba11c5b5SToomas SoomeRequires the following temporary environment variables:
172*ba11c5b5SToomas Soome.Pp
173*ba11c5b5SToomas Soome.Bl -tag -width affix -compact -offset indent
174*ba11c5b5SToomas Soome.It Va type
175*ba11c5b5SToomas Soomeshould be set to one of: menu toggled ansi
176*ba11c5b5SToomas Soome.It Va var
177*ba11c5b5SToomas Soomeshould be set to one of: caption command keycode text ...
178*ba11c5b5SToomas Soome.It Va affix
179*ba11c5b5SToomas Soomeeither a prefix (menuset_use_name is true) or infix (menuset_use_name is false)
180*ba11c5b5SToomas Soome.El
181*ba11c5b5SToomas Soome.Pp
182*ba11c5b5SToomas SoomeIf the global
183*ba11c5b5SToomas Soome.Va menuset_use_name
184*ba11c5b5SToomas Soomeis true, the variable ${type}_${var} is made to
185*ba11c5b5SToomas Soomeequal the value of the variable ${affix}${type}_${var}
186*ba11c5b5SToomas Soome(note: in this case menuset-checksetnum has set $affix to $menuset_nameN).
187*ba11c5b5SToomas SoomeOtherwise (when
188*ba11c5b5SToomas Soome.Va menuset_use_name
189*ba11c5b5SToomas Soomeis false), the variable ${type}_${var} is made to
190*ba11c5b5SToomas Soomeequal the value of the variable ${type}set${affix}_${var}
191*ba11c5b5SToomas Soome(note: in this case menuset-checksetnum has set $affix to N).
192*ba11c5b5SToomas Soome.Pp
193*ba11c5b5SToomas SoomeBoth the global variable
194*ba11c5b5SToomas Soome.Va menuset_use_name
195*ba11c5b5SToomas Soomeand the environment variable $affix are automatically handled by
196*ba11c5b5SToomas Soomemenuset-checksetnum above (which is automatically called by
197*ba11c5b5SToomas Soomemenuset-loadsetnum).
198*ba11c5b5SToomas Soome.It Ic menuset-unloadvar ( -- )
199*ba11c5b5SToomas SoomeUsed indirectly to shorten syntax and mitigate dictionary size.
200*ba11c5b5SToomas SoomeLike menuset-loadvar except it unsets the menuset variable.
201*ba11c5b5SToomas SoomeIf global
202*ba11c5b5SToomas Soome.Va menuset_use_name
203*ba11c5b5SToomas Soomeis true ($affix is $menuset_nameN),
204*ba11c5b5SToomas Soomevariable ${affix}${type}_${var} is unset.
205*ba11c5b5SToomas SoomeOtherwise, $affix is N and variable ${type}set${affix}_${var} is unset.
206*ba11c5b5SToomas Soome.It Ic menuset-loadmenuvar ( -- )
207*ba11c5b5SToomas SoomeSets $type to
208*ba11c5b5SToomas Soome.Dq menu
209*ba11c5b5SToomas Soomeand calls menuset-loadvar.
210*ba11c5b5SToomas Soome.It Ic menuset-unloadmenuvar ( -- )
211*ba11c5b5SToomas SoomeSets $type to
212*ba11c5b5SToomas Soome.Dq menu
213*ba11c5b5SToomas Soomeand calls menuset-unloadvar.
214*ba11c5b5SToomas Soome.It Ic menuset-loadxvar ( -- )
215*ba11c5b5SToomas SoomeLike menuset-loadvar except it takes an additional temporary variable $x.
216*ba11c5b5SToomas SoomeIf the global
217*ba11c5b5SToomas Soome.Va menuset_use_name
218*ba11c5b5SToomas Soomeis true (making $affix equal $menuset_nameN),
219*ba11c5b5SToomas Soomesets variable ${type}_${var}[${x}] to variable ${affix}${type}_${var}[${x}].
220*ba11c5b5SToomas SoomeOtherwise ($affix being N), sets the same variable to instead
221*ba11c5b5SToomas Soome${type}set{affix}_${var}[${x}].
222*ba11c5b5SToomas Soome.It Ic menuset-unloadxvar ( -- )
223*ba11c5b5SToomas SoomeLike menuset-loadxvar except it unsets the menuset variable.
224*ba11c5b5SToomas SoomeIf global
225*ba11c5b5SToomas Soome.Va menuset_use_name
226*ba11c5b5SToomas Soomeis true, unsets ${affix}${type}_${var}[${x}].
227*ba11c5b5SToomas SoomeOtherwise, unsets ${type}set${affix}_${var}[${x}].
228*ba11c5b5SToomas Soome.It Ic menuset-loadansixvar ( -- )
229*ba11c5b5SToomas SoomeSets $type to
230*ba11c5b5SToomas Soome.Dq ansi
231*ba11c5b5SToomas Soomeand calls menuset-loadxvar
232*ba11c5b5SToomas Soome.It Ic menuset-unloadansixvar ( -- )
233*ba11c5b5SToomas SoomeSets $type to
234*ba11c5b5SToomas Soome.Dq ansi
235*ba11c5b5SToomas Soomeand calls menuset-unloadxvar
236*ba11c5b5SToomas Soome.It Ic menuset-loadmenuxvar ( -- )
237*ba11c5b5SToomas SoomeSets $type to
238*ba11c5b5SToomas Soome.Dq ansi
239*ba11c5b5SToomas Soomeand calls menuset-loadxvar
240*ba11c5b5SToomas Soome.It Ic menuset-unloadmenuxvar ( -- )
241*ba11c5b5SToomas SoomeSets $type to
242*ba11c5b5SToomas Soome.Dq ansi
243*ba11c5b5SToomas Soomeand calls menuset-unloadxvar
244*ba11c5b5SToomas Soome.It Ic menuset-loadtoggledxvar ( -- )
245*ba11c5b5SToomas SoomeSets $type to
246*ba11c5b5SToomas Soome.Dq toggled
247*ba11c5b5SToomas Soomeand calls menuset-loadxvar
248*ba11c5b5SToomas Soome.It Ic menuset-unloadtoggledxvar ( -- )
249*ba11c5b5SToomas SoomeSets $type to
250*ba11c5b5SToomas Soome.Dq toggled
251*ba11c5b5SToomas Soomeand calls menuset-unloadxvar
252*ba11c5b5SToomas Soome.It Ic menuset-loadxyvar ( -- )
253*ba11c5b5SToomas SoomeLike menuset-loadxvar except it takes an additional temporary variable $y.
254*ba11c5b5SToomas SoomeIf the global
255*ba11c5b5SToomas Soome.Va menuset_use_name
256*ba11c5b5SToomas Soomeis true ($affix is $menuset_nameN),
257*ba11c5b5SToomas Soomesets variable ${type}_${var}[${x}][${y}] to ${affix}${type}_${var}[${x}][${y}].
258*ba11c5b5SToomas SoomeOtherwise ($affix is N) sets the same variable to instead
259*ba11c5b5SToomas Soome${type}set${affix}_${var}[${x}][${y}].
260*ba11c5b5SToomas Soome.It Ic menuset-unloadxyvar ( -- )
261*ba11c5b5SToomas SoomeLike menuset-loadxyvar except it unsets the menuset variable.
262*ba11c5b5SToomas SoomeIf the global
263*ba11c5b5SToomas Soome.Va menuset_use_name
264*ba11c5b5SToomas Soomeis true, unsets ${affix}${type}_${var}[${x}][${y}].
265*ba11c5b5SToomas SoomeOtherwise, unsets ${type}set${affix}_${var}[${x}][${y}].
266*ba11c5b5SToomas Soome.It Ic menuset-loadansixyvar ( -- )
267*ba11c5b5SToomas SoomeSets $type to
268*ba11c5b5SToomas Soome.Dq ansi
269*ba11c5b5SToomas Soomeand calls menuset-loadxyvar.
270*ba11c5b5SToomas Soome.It Ic menuset-unloadansixyvar ( -- )
271*ba11c5b5SToomas SoomeSets $type to
272*ba11c5b5SToomas Soome.Dq ansi
273*ba11c5b5SToomas Soomeand calls menuset-unloadxyvar.
274*ba11c5b5SToomas Soome.It Ic menuset-loadmenuxyvar ( -- )
275*ba11c5b5SToomas SoomeSets $type to
276*ba11c5b5SToomas Soome.Dq menu
277*ba11c5b5SToomas Soomeand calls menuset-loadxyvar.
278*ba11c5b5SToomas Soome.It Ic menuset-unloadmenuxyvar ( -- )
279*ba11c5b5SToomas SoomeSets $type to
280*ba11c5b5SToomas Soome.Dq menu
281*ba11c5b5SToomas Soomeand calls menuset-unloadxyvar.
282*ba11c5b5SToomas Soome.It Ic menuset-setnum-namevar ( N -- C-Addr/U )
283*ba11c5b5SToomas SoomeTakes a single integer on the stack and replaces it with a string (in c-addr/u
284*ba11c5b5SToomas Soomeformat) whose value is
285*ba11c5b5SToomas Soome.Dq menuset_nameN .
286*ba11c5b5SToomas SoomeFor example, if given 1 returns
287*ba11c5b5SToomas Soome.Dq menuset_name1 .
288*ba11c5b5SToomas Soome.It Ic menuset-cleanup ( N -- )
289*ba11c5b5SToomas SoomeUnsets all the various temporary variables, currently
290*ba11c5b5SToomas Soome.Va type ,
291*ba11c5b5SToomas Soome.Va var ,
292*ba11c5b5SToomas Soome.Va x ,
293*ba11c5b5SToomas Soome.Va y ,
294*ba11c5b5SToomas Soomeand
295*ba11c5b5SToomas Soome.Va affix .
296*ba11c5b5SToomas Soome.El
297*ba11c5b5SToomas Soome.Pp
298*ba11c5b5SToomas SoomeFor all values of
299*ba11c5b5SToomas Soome.Dq Li x
300*ba11c5b5SToomas Soomeabove, use any number between 1 through 9. Sorry, double-digits are not
301*ba11c5b5SToomas Soomecurrently supported.
302*ba11c5b5SToomas SoomeFor all values of
303*ba11c5b5SToomas Soome.Dq Li N
304*ba11c5b5SToomas Soomeabove, use any number between 1 and 65535.
305*ba11c5b5SToomas Soome.Sh FILES
306*ba11c5b5SToomas Soome.Bl -tag -width /boot/menu-commands.4th -compact
307*ba11c5b5SToomas Soome.It Pa /boot/zfsloader
308*ba11c5b5SToomas SoomeThe
309*ba11c5b5SToomas Soome.Xr zfsloader 5 .
310*ba11c5b5SToomas Soome.It Pa /boot/forth/menu.4th
311*ba11c5b5SToomas SoomeDynamic menu module.
312*ba11c5b5SToomas Soome.It Pa /boot/forth/menu-commands.4th
313*ba11c5b5SToomas SoomeContains the goto_menu command.
314*ba11c5b5SToomas Soome.It Pa /boot/forth/menusets.4th
315*ba11c5b5SToomas Soome.Nm
316*ba11c5b5SToomas Soomeitself.
317*ba11c5b5SToomas Soome.It Pa /boot/loader.rc
318*ba11c5b5SToomas Soome.Xr loader 5
319*ba11c5b5SToomas Soomebootstrapping script.
320*ba11c5b5SToomas Soome.El
321*ba11c5b5SToomas Soome.Sh EXAMPLES
322*ba11c5b5SToomas SoomeA simple boot menu with a submenu:
323*ba11c5b5SToomas Soome.Pp
324*ba11c5b5SToomas Soome.Bd -literal -offset indent -compact
325*ba11c5b5SToomas Soomeinclude /boot/forth/menu.4th
326*ba11c5b5SToomas Soomeinclude /boot/forth/menu-commands.4th
327*ba11c5b5SToomas Soomemenu-init
328*ba11c5b5SToomas Soomeset menuset1_caption[1]="Boot"
329*ba11c5b5SToomas Soomeset menuset1_command[1]="boot"
330*ba11c5b5SToomas Soomeset menuset1_caption[2]="Submenu..."
331*ba11c5b5SToomas Soomeset menuset1_command[2]="2 goto_menu"
332*ba11c5b5SToomas Soomeset menuset2_caption[1]="Back"
333*ba11c5b5SToomas Soomeset menuset2_command[1]="1 goto_menu"
334*ba11c5b5SToomas Soomeset menuset_initial=2
335*ba11c5b5SToomas Soomemenuset-loadinitial
336*ba11c5b5SToomas Soomemenu-display
337*ba11c5b5SToomas Soome.Ed
338*ba11c5b5SToomas Soome.Pp
339*ba11c5b5SToomas SoomeThe same boot menu with named menusets:
340*ba11c5b5SToomas Soome.Pp
341*ba11c5b5SToomas Soome.Bd -literal -offset indent -compact
342*ba11c5b5SToomas Soomeinclude /boot/forth/menu.4th
343*ba11c5b5SToomas Soomeinclude /boot/forth/menu-commands.4th
344*ba11c5b5SToomas Soomemenu-init
345*ba11c5b5SToomas Soomeset menuset_name1=main
346*ba11c5b5SToomas Soomeset mainmenu_caption[1]="Boot"
347*ba11c5b5SToomas Soomeset mainmenu_command[1]="boot"
348*ba11c5b5SToomas Soomeset mainmenu_caption[2]="Submenu..."
349*ba11c5b5SToomas Soomeset mainmenu_command[2]="2 goto_menu"
350*ba11c5b5SToomas Soomeset menuset_name2=sub
351*ba11c5b5SToomas Soomeset submenu_caption[1]="Back"
352*ba11c5b5SToomas Soomeset submenu_command[1]="1 goto_menu"
353*ba11c5b5SToomas Soome.Ed
354*ba11c5b5SToomas Soome.Sh SEE ALSO
355*ba11c5b5SToomas Soome.Xr loader.conf 4 ,
356*ba11c5b5SToomas Soome.Xr beastie.4th 5 ,
357*ba11c5b5SToomas Soome.Xr loader 5 ,
358*ba11c5b5SToomas Soome.Xr loader.4th 5 ,
359*ba11c5b5SToomas Soome.Xr menu.4th 5
360