280 drop ( getenv cruft ) then
281
282 2over ansi_caption[x][y] getenv dup -1 <> if 2dup +
283 1- c@ [char] ) = if 2drop Already tagged
284 else kerncapbuf 0 2swap strcat
285 2over strcat 5 pick 5 pick
286 ansi_caption[x][y] setenv then else
287 drop ( getenv cruft ) then
288
289 rot 1+ dup [char] 8 > if -rot 2drop TRUE ( break )
290 else -rot FALSE then until 2drop (
291 x y -- ) ;
292
293 Illumos kernel acpi-user-options has following values: default: 0 -
294 system will enable acpi based on bios date on: 1 - acpi is set on
295 off: 2 - acpi is set off madt: 4 - use only MADT legacy: 8 -
296 use legacy mode
297
298 : acpi-captions ( N -- )
299 first entry
300 dup s" [A]CPI.... default" rot 48 menu_caption[x][y] setenv
301 dup s" ^[1mA^[mCPI.... ^[32;7mdefault^[m" rot 48 ansi_caption[x][y] setenv
302
303 dup s" [A]CPI........ On" rot 49 menu_caption[x][y] setenv
304 dup s" ^[1mA^[mCPI........ ^[34;1mOn^[m" rot 49 ansi_caption[x][y] setenv
305
306 dup s" [A]CPI........ Off" rot 50 menu_caption[x][y] setenv
307 dup s" ^[1mA^[mCPI........ ^[34;1mOff^[m" rot 50 ansi_caption[x][y] setenv
308
309 dup s" [A]CPI....... MADT" rot 51 menu_caption[x][y] setenv
310 dup s" ^[1mA^[mCPI....... ^[34;1mMADT^[m" rot 51 ansi_caption[x][y] setenv
311
312 dup s" [A]CPI..... Legacy" rot 52 menu_caption[x][y] setenv
313 s" ^[1mA^[mCPI..... ^[34;1mLegacy^[m" rot 52 ansi_caption[x][y] setenv ;
314
315 Illumos console has following values: text, ttya, ttyb, ttyc, ttyd
316
317 : osconsole-captions ( N -- )
318 first entry
319 dup s" Os[C]onsole.. text" rot 48 menu_caption[x][y] setenv
320 dup s" Os^[1mC^[monsole.. ^[32;7mtext^[m" rot 48 ansi_caption[x][y] setenv
321
322 dup s" Os[C]onsole.. ttya" rot 49 menu_caption[x][y] setenv
323 dup s" Os^[1mC^[monsole.. ^[34;1mttya^[m" rot 49 ansi_caption[x][y] setenv
324
325 dup s" Os[C]onsole.. ttyb" rot 50 menu_caption[x][y] setenv
326 dup s" Os^[1mC^[monsole.. ^[34;1mttyb^[m" rot 50 ansi_caption[x][y] setenv
327
328 dup s" Os[C]onsole.. ttyc" rot 51 menu_caption[x][y] setenv
329 dup s" Os^[1mC^[monsole.. ^[34;1mttyc^[m" rot 51 ansi_caption[x][y] setenv
330
331 dup s" Os[C]onsole.. ttyd" rot 52 menu_caption[x][y] setenv
332 s" Os^[1mC^[monsole.. ^[34;1mttyd^[m" rot 52 ansi_caption[x][y] setenv ;
333
334 This function creates the list of menu items. This function is called by the
335 menu-display function. You need not call it directly. : menu-create ( -- )
336
337 Print the frame caption at (x,y) s" loader_menu_title" getenv dup -1 =
338 if drop s" Welcome to illumos" then TRUE ( use default alignment
339 ) s" loader_menu_title_align" getenv dup -1 <> if 2dup s" left"
340 compare-insensitive 0= if ( 1 ) 2drop ( c-addr/u ) drop ( bool )
341 menuX @ menuY @ 1- FALSE ( don't use default
342 alignment ) else ( 1 ) 2dup s" right" compare-insensitive 0= if ( 2 )
343 2drop ( c-addr/u ) drop ( bool ) menuX @ 42 + 4 -
344 over - menuY @ 1- FALSE ( don't use default alignment )
345 else ( 2 ) 2drop ( c-addr/u ) then ( 1 ) then else
346 drop ( getenv cruft ) then if ( use default center
347 alignement? ) menuX @ 19 + over 2 / - menuY @ 1- then at-xy
348 type
349
350 If $menu_init is set, evaluate it (allowing for whole menus to be
351 constructed dynamically -- as this function could conceivably set
352 the remaining environment variables to construct the menu entirely).
|
280 drop ( getenv cruft ) then
281
282 2over ansi_caption[x][y] getenv dup -1 <> if 2dup +
283 1- c@ [char] ) = if 2drop Already tagged
284 else kerncapbuf 0 2swap strcat
285 2over strcat 5 pick 5 pick
286 ansi_caption[x][y] setenv then else
287 drop ( getenv cruft ) then
288
289 rot 1+ dup [char] 8 > if -rot 2drop TRUE ( break )
290 else -rot FALSE then until 2drop (
291 x y -- ) ;
292
293 Illumos kernel acpi-user-options has following values: default: 0 -
294 system will enable acpi based on bios date on: 1 - acpi is set on
295 off: 2 - acpi is set off madt: 4 - use only MADT legacy: 8 -
296 use legacy mode
297
298 : acpi-captions ( N -- )
299 first entry
300 dup s" [A]CPI.............. default" rot 48 menu_caption[x][y] setenv
301 dup s" ^[1mA^[mCPI.............. ^[32;7mdefault^[m" rot 48
302 ansi_caption[x][y] setenv
303
304 dup s" [A]CPI.............. On" rot 49 menu_caption[x][y] setenv
305 dup s" ^[1mA^[mCPI.............. ^[34;1mOn^[m" rot 49 ansi_caption[x][y]
306 setenv
307
308 dup s" [A]CPI.............. Off" rot 50 menu_caption[x][y] setenv
309 dup s" ^[1mA^[mCPI.............. ^[34;1mOff^[m" rot 50 ansi_caption[x][y]
310 setenv
311
312 dup s" [A]CPI.............. MADT" rot 51 menu_caption[x][y] setenv
313 dup s" ^[1mA^[mCPI.............. ^[34;1mMADT^[m" rot 51 ansi_caption[x][y]
314 setenv
315
316 dup s" [A]CPI.............. Legacy" rot 52 menu_caption[x][y] setenv
317 s" ^[1mA^[mCPI.............. ^[34;1mLegacy^[m" rot 52 ansi_caption[x][y]
318 setenv ;
319
320 Illumos console has following values: text, ttya, ttyb, ttyc, ttyd
321
322 : osconsole-captions ( N -- )
323 first entry
324 dup s" Os[C]onsole............ text" rot 48 menu_caption[x][y] setenv
325 dup s" Os^[1mC^[monsole............ ^[32;7mtext^[m" rot 48
326 ansi_caption[x][y] setenv
327
328 dup s" Os[C]onsole............ ttya" rot 49 menu_caption[x][y] setenv
329 dup s" Os^[1mC^[monsole............ ^[34;1mttya^[m" rot 49
330 ansi_caption[x][y] setenv
331
332 dup s" Os[C]onsole............ ttyb" rot 50 menu_caption[x][y] setenv
333 dup s" Os^[1mC^[monsole............ ^[34;1mttyb^[m" rot 50
334 ansi_caption[x][y] setenv
335
336 dup s" Os[C]onsole............ ttyc" rot 51 menu_caption[x][y] setenv
337 dup s" Os^[1mC^[monsole............ ^[34;1mttyc^[m" rot 51
338 ansi_caption[x][y] setenv
339
340 dup s" Os[C]onsole............ ttyd" rot 52 menu_caption[x][y] setenv
341 s" Os^[1mC^[monsole............ ^[34;1mttyd^[m" rot 52 ansi_caption[x][y]
342 setenv ;
343
344 This function creates the list of menu items. This function is called by the
345 menu-display function. You need not call it directly. : menu-create ( -- )
346
347 Print the frame caption at (x,y) s" loader_menu_title" getenv dup -1 =
348 if drop s" Welcome to illumos" then TRUE ( use default alignment
349 ) s" loader_menu_title_align" getenv dup -1 <> if 2dup s" left"
350 compare-insensitive 0= if ( 1 ) 2drop ( c-addr/u ) drop ( bool )
351 menuX @ menuY @ 1- FALSE ( don't use default
352 alignment ) else ( 1 ) 2dup s" right" compare-insensitive 0= if ( 2 )
353 2drop ( c-addr/u ) drop ( bool ) menuX @ 42 + 4 -
354 over - menuY @ 1- FALSE ( don't use default alignment )
355 else ( 2 ) 2drop ( c-addr/u ) then ( 1 ) then else
356 drop ( getenv cruft ) then if ( use default center
357 alignement? ) menuX @ 19 + over 2 / - menuY @ 1- then at-xy
358 type
359
360 If $menu_init is set, evaluate it (allowing for whole menus to be
361 constructed dynamically -- as this function could conceivably set
362 the remaining environment variables to construct the menu entirely).
|