1 /* -*- c -*- ------------------------------------------------------------- *
3 * Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
14 #define NULL ((void *) 0)
25 // Change the video mode here
28 // Choose the default title and setup default values for all attributes....
29 init_menusystem(NULL
);
30 set_window_size(1,1,23,78); // Leave one row/col border all around
32 // Choose the default values for all attributes and char's
33 // -1 means choose defaults (Actually the next 4 lines are not needed)
34 //set_normal_attr (-1,-1,-1,-1);
35 //set_status_info (-1,-1);
36 //set_title_info (-1,-1);
37 //set_misc_info(-1,-1,-1,-1);
39 // menuindex = add_named_menu("name"," Menu Title ",-1);
40 // add_item("Item string","Status String",TYPE,"any string",NUM)
41 // TYPE = OPT_RUN | OPT_EXITMENU | OPT_SUBMENU | OPT_CHECKBOX | OPT_INACTIVE
42 // "any string" useful for storing kernel names
43 // In case of OPT_SUBMENU, "any string" can be set to "name" of menu to be linked
44 // in which case value NUM is ignored
45 // NUM = index of submenu if OPT_SUBMENU,
46 // 0/1 default checked state if OPT_CHECKBOX
49 add_named_menu("testing"," Testing ",-1);
50 add_item("Self Loop","Go to testing",OPT_SUBMENU
,"testing",0);
51 add_item("Memory Test","Perform extensive memory testing",OPT_RUN
, "memtest",0);
52 add_item("Exit this menu","Go one level up",OPT_EXITMENU
,"exit",0);
54 add_named_menu("rescue"," Rescue Options ",-1);
55 add_item("Linux Rescue","linresc",OPT_RUN
,"linresc",0);
56 add_item("Dos Rescue","dosresc",OPT_RUN
,"dosresc",0);
57 add_item("Windows Rescue","winresc",OPT_RUN
,"winresc",0);
58 add_item("Exit this menu","Go one level up",OPT_EXITMENU
,"exit",0);
60 add_named_menu("main"," Main Menu ",-1);
61 add_item("Prepare","prep",OPT_RUN
,"prep",0);
62 add_item("Rescue options...","Troubleshoot a system",OPT_SUBMENU
,"rescue",0);
63 add_item("Testing...","Options to test hardware",OPT_SUBMENU
,"testing",0);
64 add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU
, "exit", 0);
66 curr
= showmenus(find_menu_num("main")); // Initial menu is the one called "main"
70 if (curr
->action
== OPT_RUN
)
72 if (issyslinux()) runsyslinuxcmd(curr
->data
);
73 else csprint(curr
->data
,0x07);
76 csprint("Error in programming!",0x07);