summaryrefslogtreecommitdiff
path: root/com32/menu/menumain.c
Commit message (Collapse)AuthorAgeFilesLines
* menu: Apply VSHIFT to scrollbarBruno Levert2016-06-141-1/+2
| | | | | | | When VSHIFT is used, the scrollbar's position is relative to the old position. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* com32: Use z size specifier for printf-ing size_t variableMartin Str|mberg2015-01-051-1/+1
| | | | | | | | | Use the z size specifier to printf-ing size_t variables to get rid of gcc warning format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ Author: Martin Str|mberg <ams@ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* Centralize shift_is_held(), make it work to force the command linesyslinux-6.03-pre11H. Peter Anvin2014-04-201-5/+0
| | | | | | | Holding down shift is supposed to force a command line unless noescape is provided; make it behave that way. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* kbd: Make getting the keyboard shift state a firmware methodH. Peter Anvin2014-04-201-11/+1
| | | | | | | Getting the keyboard shift state is a firmware method. It is unfortunately unclear if it is even possible on EFI. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* bios: Use int 0x16, ah=0x02 to probe for shift flagssyslinux-6.03-pre10H. Peter Anvin2014-04-171-3/+11
| | | | | | | | At least one USB keyboard BIOS has been reported to not properly handle the keyboard flags in memory. See if actually using INT 16h works better. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'lwip' into elflinkMatt Fleming2013-02-261-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Welcome to Syslinux 5.10. Conflicts: NEWS com32/lib/Makefile com32/lib/sys/open.c com32/lib/syslinux/ipappend.c com32/modules/Makefile com32/modules/prdhcp.c core/Makefile core/cmdline.inc core/com32.inc core/comboot.inc core/configinit.inc core/fs/chdir.c core/fs/fs.c core/fs/pxe/dnsresolv.c core/fs/pxe/pxe.c core/fs/pxe/pxe.h core/idle.c core/include/ctype.h core/init.inc core/mem/init.c core/parseconfig.inc core/runkernel.inc core/syslinux.ld core/ui.inc doc/comboot.txt version
* | Revert "menu: Make "menu clear" the default"Matt Fleming2012-11-271-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6ab02b6682c0b693b3e4f9afcc2ab8775f804f0a. People are reporting that the above commit causes a regression in behaviour between 4.0x and 5.0x. It also makes the MENU CLEAR directive obsolete and requires that users change their existing config files to restore the old behaviour. The commit was intended to solve the same bug that commit 87320b8de8f3 ("ldlinux: Disable VGA graphics when loading a kernel") addresses but without breaking vesacon, see, commit e04ee714164d ('Revert "ldlinux: Disable VGA graphics when loading a kernel"') for more details. Reported-by: Ady <ady-sf@hotmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge branch 'master' into elflinkMatt Fleming2012-10-241-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | The following conflict is a result of the fact comapi_chainboot was only stubbed out on the 'elflink' branch but was properly marked as obsolete in 'master'. Conflicts: core/comboot.inc
| * | menu: Disallow navigation to a disabled entry via *any* keyMatt Fleming2012-10-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generalise the fix from commit c823574f53c1 ("menu: Don't highlight disabled entries") as it only handled the case where we navigated to a disabled last entry by pressing Ctrl + N or the DOWN arrow key. Obviously, we can navigate with other keys such as END, PGDN, etc so we need to handle all cases. Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | menu: Don't highlight disabled entriesMatt Fleming2012-10-091-2/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | There's an off-by-one bug in the menu input handling code which makes it possible to highlight/select the last entry in a menu even if that entry is disabled. It should be noted that you can't actually *do* anything with the disabled entry, i.e. edit or execute it. Still, allowing it to be highlighted does look a little strange. Reported-by: Matt Sephton <matt.sephton@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | ldlinux: Stop using the internal KT_* image typesMatt Fleming2012-07-201-2/+4
| | | | | | | | | | | | | | The KT_* image types were never meant to be used outside of com32/menu, so use the external image types from syslinux/boot.h Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | menu: Supply the command type to execute()Matt Fleming2012-07-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The old execute() was much more forgiving when passing a COM32 module as KT_NONE, as the old code for loading a kernel could also handle COM32 modules. This isn't the case with new_linux_kernel(), and COM32 modules really need to take the create_args_and_load() path in execute(). Without this change loading .c32 files from vesamenu.c32/menu.c32 fails. Reported-by: Helmut Hullen <Hullen@t-online.de> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | menu: Make "menu clear" the defaultH. Peter Anvin2012-03-271-3/+7
|/ | | | | | | | | | Make "menu clear" the default... it was sort of implicitly so at least for vesamenu when using the old system, since we would end up zapping the mode when any output happened, but that no longer is the case. Also move the cursor to the top of the screen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* menu: clear the timeout line on MENU HIDDENKEYH. Peter Anvin2011-04-111-2/+5
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* menu: Add "menu hiddenkey" to make terminating menu hidden a commandH. Peter Anvin2011-04-111-1/+1
| | | | | | | Use "menu hiddenkey" together with "menu hidden" for a one-keystroke action. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* menu: add MENU HELPH. Peter Anvin2010-06-261-0/+7
| | | | | | | Add a feature to display fullscreen help via menu selection entry (inspired by the Debian install disc menus.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Replacing strncpy by strlcpyErwan Velu2010-06-221-1/+1
| | | | | As reported by hpa, strlcpy is safer and could prevent some bugs. So I replaced all strncpy by strlcpy calls.
* MENU IMMEDIATE: hotkeys which do not require Entersyslinux-4.00-pre47H. Peter Anvin2010-05-271-6/+16
| | | | | | | The normal behavior for a hotkey is to jump to a specific menu entry. With MENU IMMEDIATE, it activates the menu entry as well. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* menu: add MENU CLEAR optionH. Peter Anvin2010-02-031-0/+3
| | | | | | Add MENU CLEAR to clear the screen on menu exit. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* menu: when running hidden, clear the screen before final bootH. Peter Anvin2010-02-031-5/+17
| | | | | | | Clear away the countdown message before actually running the final boot. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* vesacon: don't display the cursor when doing a quiet bootH. Peter Anvin2009-12-071-0/+2
| | | | | | | | | Don't display the cursor on the graphical screen while doing a quiet boot. When doing a quiet boot we will probably show the graphical screen for a fair bit of time; as a result, we really don't want a completely bogus cursor blob on the bottom of the screen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'softres'H. Peter Anvin2009-12-071-3/+9
|\
| * vesamenu: add MENU RESOLUTION to be able to set nonstandard resH. Peter Anvin2009-12-071-3/+9
| | | | | | | | | | | | | | | | Add a MENU RESOLUTION command to make it possible to set a nonstandard resolution. If the nonstandard resolution is unavailable, we revert to the text mode screen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | menu: initialize cm (current menu) before empty checkH. Peter Anvin2009-08-171-1/+2
| | | | | | | | | | | | | | | | | | The empty check in the menu system used "cm", but before "cm" had actually been initialized. Move the "cm" initialization earlier so we do the right thing here. Reported-by: CKSoon <cksoon79@yahoo.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | menu: fix Ctrl-W (word erase) when editing a command lineH. Peter Anvin2009-08-131-1/+1
|/ | | | | | | The Ctrl-W (word erase) key was broken: it would think the command line got longer, not shorter, resulting in havoc. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge commit 'syslinux-3.82'H. Peter Anvin2009-06-091-1/+4
|\ | | | | | | | | | | | | Conflicts: com32/menu/menumain.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * simple menu: make ONTIMEOUT work with MENU HIDDENSergey Vlasov2009-06-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | The command invoked when no keys were pressed for the specified time (ONTIMEOUT) may be different from the menu item initially selected when the menu is displayed (DEFAULT or MENU DEFAULT). Unfortunately, this did not work together with MENU HIDDEN (which is exactly the case when having a separate ONTIMEOUT command makes the most sense). Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Run Nindent on com32/menu/menumain.cH. Peter Anvin2009-05-291-910/+936
|/ | | | | | | | | Automatically reformat com32/menu/menumain.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>
* Don't set the autocr flag on the serial console; clean up crapsyslinux-3.81-pre12H. Peter Anvin2009-05-231-5/+0
| | | | | | | | | | | | | libutil would set the autocr flag on the serial console, which really never was any point -- we already do \n -> \r\n conversion explicitly in the serial code. This was always very annoying to deal with if the menu was interrupted. Furthermore, drop completely unnecessary initialization/deinitialization routines that completely duplicated other code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* menu: modify MENU SAVE to be a cascading defaultH. Peter Anvin2009-04-141-1/+1
| | | | | | | Change MENU SAVE to be a cascading default that can be reverted with MENU NOSAVE. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Implement MENU SAVE; fix COM32 setadv functionsyslinux-3.74-pre18H. Peter Anvin2009-04-061-0/+9
| | | | | | | | Implement MENU SAVE, which allows the menu system to retain the previous selection from one boot to another. In the process, fix the syslinux_setadv() function. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* menu: avoid leaving obvious password turds in memoryH. Peter Anvin2008-08-261-2/+11
| | | | | | Avoid leaving obvious password turds in memory. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Simple menu: really avoid disabled entriessyslinux-3.71-pre2H. Peter Anvin2008-07-021-22/+30
| | | | Really, really try to avoid stepping on disabled entries...
* Prevent inclusion of system include files when inappropriateH. Peter Anvin2008-03-031-1/+1
| | | | | Use "-nostdinc -iwithprefix include" to prevent the inclusion of system header files, but still permitting *compiler* header files.
* simple menu: break off execute() into its own source fileH. Peter Anvin2008-03-021-55/+0
| | | | | Break off execute() into its own source file, with the intent of being able to re-use it for a CLI module.
* Make sure color directives get attached to the proper menu.H. Peter Anvin2008-02-191-1/+1
| | | | | Color directives would always end up attached to the root menu, no matter what menu declaration they where actually located in.
* simple menu: fix the handling of '+' and '-' given disabled entriesH. Peter Anvin2008-02-191-4/+8
| | | | | When encountering disabled entries, we want to keep going. Given that these particular keys have nonstandard scrolling, but the handling there.
* Fix the scrollbar handling for insanely huge menusH. Peter Anvin2008-02-191-3/+2
| | | | | The handling of the scrollbar for insanely huge menus was broken, causing it to disappear off the bottom of the menu window.
* simple menu: remember the cursor position on a per-menu basisH. Peter Anvin2008-02-191-6/+11
| | | | | For each menu, remember what the current position of the cursor and the scroll is.
* Add support for MENU EXIT; no marker for MENU GOTOH. Peter Anvin2008-02-191-4/+19
|
* When entering a new menu, go to the default entry for that menu.H. Peter Anvin2008-02-191-1/+2
|
* Allow MENU LABEL <-> MENU TITLE for submenus to work both waysH. Peter Anvin2008-02-191-1/+1
| | | | Allow either "MENU LABEL" or "MENU TITLE" to default for each other.
* simple menu: The use of realloc() requires indirect pointersH. Peter Anvin2008-02-191-22/+29
| | | | | | Since we store pointers to struct menu_entry, we can't put it in storage that is subject to realloc(). Accordingly, make menu_entries an indirect array instead.
* simple menu: first cut at working submenusH. Peter Anvin2008-02-191-2/+37
| | | | | With this edit, the submenu system seems to have minimal functionality.
* Simple menu: use refstrings consistently; now works againH. Peter Anvin2008-02-191-1/+1
| | | | | Switch consistently to using refstrings; we now seem to have original functionality back.
* submenu snapshot: it compiles now...H. Peter Anvin2008-02-191-100/+127
|
* Submenu support: development snapshotH. Peter Anvin2008-02-191-146/+1
| | | | Development snapshot before converting to refstrings
* If we're showing a scrollbar, always show at least one unitH. Peter Anvin2008-02-161-1/+1
| | | | | In the simple menu system, if we're showing a scrollbar at all, always show at least one unit of it.
* com32/*: move _GNU_SOURCE definitions into MakefilesH. Peter Anvin2008-02-101-1/+0
| | | | | We need _GNU_SOURCE when compiling for Linux in enough places. Just move it to the LNXCFLAGS definition in the Makefiles.
* simple menu: update copyright notices; clean whitespaceH. Peter Anvin2008-02-101-1/+1
|