summaryrefslogtreecommitdiff
path: root/com32/cmenu/simple.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:20 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:20 -0700
commit14b44f22241785ae6c6eaca236916c9d6d9da4c1 (patch)
tree102be915c770a8e5aae2c4323b9d8a9d02e2bf9d /com32/cmenu/simple.c
parentc70547f6be05bf7f030278fb32da9e32efc135e1 (diff)
downloadsyslinux-14b44f22241785ae6c6eaca236916c9d6d9da4c1.tar.gz
Run Nindent on com32/cmenu/simple.c
Automatically reformat com32/cmenu/simple.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/cmenu/simple.c')
-rw-r--r--com32/cmenu/simple.c97
1 files changed, 50 insertions, 47 deletions
diff --git a/com32/cmenu/simple.c b/com32/cmenu/simple.c
index 92e8ab12..4f602a9a 100644
--- a/com32/cmenu/simple.c
+++ b/com32/cmenu/simple.c
@@ -20,60 +20,63 @@
int main(void)
{
- t_menuitem * curr;
+ t_menuitem *curr;
- // Change the video mode here
- // setvideomode(0)
+ // Change the video mode here
+ // setvideomode(0)
- // Choose the default title and setup default values for all attributes....
- init_menusystem(NULL);
- set_window_size(1,1,23,78); // Leave one row/col border all around
+ // Choose the default title and setup default values for all attributes....
+ init_menusystem(NULL);
+ set_window_size(1, 1, 23, 78); // Leave one row/col border all around
- // Choose the default values for all attributes and char's
- // -1 means choose defaults (Actually the next 4 lines are not needed)
- //set_normal_attr (-1,-1,-1,-1);
- //set_status_info (-1,-1);
- //set_title_info (-1,-1);
- //set_misc_info(-1,-1,-1,-1);
+ // Choose the default values for all attributes and char's
+ // -1 means choose defaults (Actually the next 4 lines are not needed)
+ //set_normal_attr (-1,-1,-1,-1);
+ //set_status_info (-1,-1);
+ //set_title_info (-1,-1);
+ //set_misc_info(-1,-1,-1,-1);
- // menuindex = add_named_menu("name"," Menu Title ",-1);
- // add_item("Item string","Status String",TYPE,"any string",NUM)
- // TYPE = OPT_RUN | OPT_EXITMENU | OPT_SUBMENU | OPT_CHECKBOX | OPT_INACTIVE
- // "any string" useful for storing kernel names
- // In case of OPT_SUBMENU, "any string" can be set to "name" of menu to be linked
- // in which case value NUM is ignored
- // NUM = index of submenu if OPT_SUBMENU,
- // 0/1 default checked state if OPT_CHECKBOX
- // unused otherwise.
+ // menuindex = add_named_menu("name"," Menu Title ",-1);
+ // add_item("Item string","Status String",TYPE,"any string",NUM)
+ // TYPE = OPT_RUN | OPT_EXITMENU | OPT_SUBMENU | OPT_CHECKBOX | OPT_INACTIVE
+ // "any string" useful for storing kernel names
+ // In case of OPT_SUBMENU, "any string" can be set to "name" of menu to be linked
+ // in which case value NUM is ignored
+ // NUM = index of submenu if OPT_SUBMENU,
+ // 0/1 default checked state if OPT_CHECKBOX
+ // unused otherwise.
- add_named_menu("testing"," Testing ",-1);
- add_item("Self Loop","Go to testing",OPT_SUBMENU,"testing",0);
- add_item("Memory Test","Perform extensive memory testing",OPT_RUN, "memtest",0);
- add_item("Exit this menu","Go one level up",OPT_EXITMENU,"exit",0);
+ add_named_menu("testing", " Testing ", -1);
+ add_item("Self Loop", "Go to testing", OPT_SUBMENU, "testing", 0);
+ add_item("Memory Test", "Perform extensive memory testing", OPT_RUN,
+ "memtest", 0);
+ add_item("Exit this menu", "Go one level up", OPT_EXITMENU, "exit", 0);
- add_named_menu("rescue"," Rescue Options ",-1);
- add_item("Linux Rescue","linresc",OPT_RUN,"linresc",0);
- add_item("Dos Rescue","dosresc",OPT_RUN,"dosresc",0);
- add_item("Windows Rescue","winresc",OPT_RUN,"winresc",0);
- add_item("Exit this menu","Go one level up",OPT_EXITMENU,"exit",0);
+ add_named_menu("rescue", " Rescue Options ", -1);
+ add_item("Linux Rescue", "linresc", OPT_RUN, "linresc", 0);
+ add_item("Dos Rescue", "dosresc", OPT_RUN, "dosresc", 0);
+ add_item("Windows Rescue", "winresc", OPT_RUN, "winresc", 0);
+ add_item("Exit this menu", "Go one level up", OPT_EXITMENU, "exit", 0);
- add_named_menu("main"," Main Menu ",-1);
- add_item("Prepare","prep",OPT_RUN,"prep",0);
- add_item("Rescue options...","Troubleshoot a system",OPT_SUBMENU,"rescue",0);
- add_item("Testing...","Options to test hardware",OPT_SUBMENU,"testing",0);
- add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU, "exit", 0);
+ add_named_menu("main", " Main Menu ", -1);
+ add_item("Prepare", "prep", OPT_RUN, "prep", 0);
+ add_item("Rescue options...", "Troubleshoot a system", OPT_SUBMENU,
+ "rescue", 0);
+ add_item("Testing...", "Options to test hardware", OPT_SUBMENU, "testing",
+ 0);
+ add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU, "exit", 0);
- curr = showmenus(find_menu_num("main")); // Initial menu is the one called "main"
+ curr = showmenus(find_menu_num("main")); // Initial menu is the one called "main"
- if (curr)
- {
- if (curr->action == OPT_RUN)
- {
- if (issyslinux()) runsyslinuxcmd(curr->data);
- else csprint(curr->data,0x07);
- return 1;
- }
- csprint("Error in programming!",0x07);
- }
- return 0;
+ if (curr) {
+ if (curr->action == OPT_RUN) {
+ if (issyslinux())
+ runsyslinuxcmd(curr->data);
+ else
+ csprint(curr->data, 0x07);
+ return 1;
+ }
+ csprint("Error in programming!", 0x07);
+ }
+ return 0;
}