Eugene Pressley
2005-Mar-24 05:01 UTC
[syslinux] Problems with menu.c32, and some feature request for menu.c32
I have found two bugs in the menu.c32 utility, part of the syslinux-3.08-pre5 build, and have a couple of requests. Problem 1: If you use the ^ symbol to define a number as a hotkey, ex. MENU LABEL ^1 Option #1 , the menu will not print the number highlighted. It will use it as a hot key, it just will not highlight it. It does highlight the hotkey if specify a letter, A-Z. Problem 2: When the statement "MENU PASSWD" is used to define a password the label that it is used in and all following labels require that password. All preceding LABELs do not require a password. Request #1: When a timeout is spedified it would be nice if a countdown timer could be place on the screen, say the lower right hand corner. This could be enabled/disabled through a menu option. Request #2: It would be nice if the following vars in the menu.c could be set in the config file so the program would not have to be recompiled to change these values. #define WIDTH 80 #define MARGIN 10 #define PASSWD_MARGIN 3 #define MENU_ROWS 12 #define TABMSG_ROW 18 #define CMDLINE_ROW 20 #define END_ROW 24 #define PASSWD_ROW 11 Request #3: Add an option to the config file that would enable HOTKEYING. What is hotkeying? Currently when you press a hotkey the menu item is highlighted and then you have to press enter to execute the menu item. HOTKEYING would, when the hotkey is pressed, highlight the menu item and automatically execute the menu item.
Geert Stappers
2005-Mar-31 15:55 UTC
[syslinux] Problems with menu.c32, and some feature request for menu.c32
On Mon, Mar 28, 2005 at 11:02:06AM -0500, Eugene Pressley top-quoted:> Well in those three days I did identify and correct the problem > with using a number (0-9) as the hot key. > The following is the section of code in menu.c32 responsible > for displaying the menu entries: > > display_entry(const struct menu_entry *entry, const char *attrib, > const char *hotattrib, int width) > { > const char *p = entry->displayname; > > while ( width ) { > if ( *p ) { > if ( *p == '^' ) { > p++; > /* if ( *p && (unsigned char)*p == entry->hotkey ) { */ > fputs(hotattrib, stdout); > putchar(*p++); > fputs(attrib, stdout); > width--; > /* } */ > } else { > putchar(*p++); > width--; > } > } else { > putchar(' '); > width--; > } > } > } > > As you can see I have commented out two lines that compse an If statement. > This was preventing numbers from being displayed as highlighted. > With this mod, if you use a number as a hot key it is > properly highlighted on the screen.I'm not a "menu guy" and _surely not_ a "highlighting in boot loader guy" But hey, who am I? Provide an unified diff (output of `diff -u foobar.c.tarball foobar.c`) to find out if your change is accepted ...> Regarding the response from Problem #2:<snip/>> Regarding the response from Request #1: > I understand the need to keep bloat down, but I am unclear how adding > a visible display of a timer that is already a part of the code would > add a significant amout of bloat to the code base.My interrest in syslinux, infact extlinux, is having a mean & lean bootloader. My computer are bought to work. As less as possible down-time. Quick booting is part of the high uptime. And the computers have no video screen attached, only a serial console. It is the cursor postitioning and highlighting code over a serial line that I hate.> > Regarding the response from Request #2:<snip/>> Regarding the response from Request #3<snip/>> I am in tinkering with the original source, > as is evidenced by the possible resolution to problem #1,<snip/> No time to skip back and forward to the numbered items. Inline quoting works fine. Cheers Geert Stappers
Maybe Matching Threads
- Problems with menu.c32,and some feature request for menu.c32
- RESEND: Problems with menu.c32, and some feature request for menu.c32
- Path simple menu integrated progress indicator
- Fix: hotkey uppercasing too wide
- [RFC PATCH] menu: support single key booting