Permalink
Browse files

. 增加 setmenu --auto-num-all-on 参数。(issues #181)

  给所有标题编号。(--auto-num-on 参数仅给引导标题编号)
  注释:0x8274 00/01/02=禁止自动编号/仅给引导标题编号/给所有标题编号
        0x8275 标题编号与标题内容之间的字符。如:0x20=' '   0x2d='-'
        0x8276 返回当前标题编号。(按所有标题计)
  • Loading branch information...
yaya
yaya committed Aug 21, 2018
1 parent b519902 commit f4759eb298886b00ff487c4c3a50fe08bb2d424c
Showing with 18 additions and 6 deletions.
  1. +7 −0 ChangeLog_chenall.txt
  2. +8 −3 stage2/builtins.c
  3. +3 −3 stage2/stage2.c
View
@@ -1,4 +1,11 @@
更新说明:
2018-8-21(yaya)
增加 setmenu --auto-num-all-on 参数。
给所有标题编号。(--auto-num-on 参数仅给引导标题编号)
注释:0x8274 00/01/02=禁止自动编号/仅给引导标题编号/给所有标题编号
0x8275 标题编号与标题内容之间的字符。如:0x20=' ' 0x2d='-'
0x8276 返回当前标题编号。(按所有标题计)
2018-7-1(yaya)
增加 setmenu --triangle-on --triangle-off 参数,打开/关闭菜单三角形指示器。默认打开。
View
@@ -16569,6 +16569,11 @@ setmenu_func(char *arg, int flags)
arg++;
}
}
else if (grub_memcmp (arg, "--auto-num-all-on", 17) == 0)
{
*(unsigned char *)0x8274 = 2;
arg += 17;
}
else if (grub_memcmp (arg, "--auto-num-on", 13) == 0)
{
*(unsigned char *)0x8274 = 1;
@@ -16667,7 +16672,7 @@ static struct builtin builtin_setmenu =
"setmenu --parameter | --parameter | ... ",
"--ver-on* --ver-off --lang=en* --lang=zh --u\n"
"--left-align* --right-align --middle-align\n"
"--auto-num-off* --auto-num-on --triangle-on* --triangle-off\n"
"--auto-num-off* --auto-num-all-on --auto-num-on --triangle-on* --triangle-off\n"
"--highlight-short* --highlight-full\n"
"--font-spacing=FONT:LINE. default 0\n"
"--string=[X]=[-]Y=COLOR=\"STRING\" max 16 commands.\n"
@@ -17509,7 +17514,7 @@ int beep_func(char *arg, int flags)
{
if (safe_parse_maxint (&arg, &val))
{
if (!val)
if (val < 20)
*p++ = 0;
else
*p++ = 1193180 / (unsigned long)val;
@@ -17551,7 +17556,7 @@ int beep_func(char *arg, int flags)
i_count = 0;
goto play;
}
else
else if (beep_frequency)
console_beep();
if (!beep_mode)
View
@@ -386,12 +386,12 @@ print_entry (int y, int highlight,int entryno, char *config_entries)
if(!(menu_tab & 0x40))
{
gotoxy (MENU_BOX_X - 1, y);
grub_putchar(highlight ? (/*menu_num_ctrl[2] = entryno,*/menu_cfg[0]) : ' ', 255);
grub_putchar(highlight ? (menu_num_ctrl[2] = entryno,menu_cfg[0]) : ' ', 255);
}
else
{
gotoxy (MENU_BOX_E - 1, y);
grub_putchar(highlight ? (/*menu_num_ctrl[2] = entryno,*/menu_cfg[1]) : ' ', 255);
grub_putchar(highlight ? (menu_num_ctrl[2] = entryno,menu_cfg[1]) : ' ', 255);
}
}
@@ -410,7 +410,7 @@ print_entry (int y, int highlight,int entryno, char *config_entries)
end_offcet = 4;
}
if (!(c & menu_num_ctrl[0]) || !*entry || *entry == '\n')
if ((!(c & menu_num_ctrl[0]) && menu_num_ctrl[0] == 1) || !*entry || *entry == '\n')
printf(" ");
else
{

0 comments on commit f4759eb

Please sign in to comment.