aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-09-14 16:26:07 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-09-14 16:26:07 -0700
commitdd5f204f879e3bc7b0fc9b682ea855c7dd499601 (patch)
tree178161872b85c6612c2bbcc8e78fee10496f15bb
parent9b41f832015ec8cf77c471e091237e97af397818 (diff)
downloadsyslinux-elf-syslinux-3.30-pre8.tar.gz
syslinux-elf-syslinux-3.30-pre8.tar.xz
syslinux-elf-syslinux-3.30-pre8.zip
Allow specifying * instead of any of the MENU COLOR fields.syslinux-3.30-pre8
-rw-r--r--README.menu37
-rw-r--r--com32/modules/readconfig.c22
2 files changed, 36 insertions, 23 deletions
diff --git a/README.menu b/README.menu
index 5d7b0fc8..6d309326 100644
--- a/README.menu
+++ b/README.menu
@@ -178,25 +178,28 @@ MENU COLOR element ansi foreground background
represents fully transparent, and #ffffffff represents opaque
white.
+
+ If any field is set to "*" then that field is left unchanged.
+
+
The current defaults are:
- timeout_msg
- screen 37;40 #80ffffff #00000000
- border 30;44 #40000000 #00000000
- title 1;36;44 #c00090f0 #00000000
- unsel 37;44 #90ffffff #00000000
- hotkey 1;37;44 #ffffffff #00000000
- sel 7;37;40 #cf101010 #20ff8000
- hotsel 1;7;37;40 #ff353535 #20ff8000
- scrollbar 30;44 #40000000 #00000000
- tabmsg 31;40 #90ffff00 #00000000
- cmdmark 1;36;40 #c000ffff #00000000
- cmdline 37;40 #c0ffffff #00000000
- pwdborder 30;47 #80ffffff #20ffffff
- pwdheader 31;47 #80ff8080 #20ffffff
- pwdentry 30;47 #80ffffff #20ffffff
- timeout_msg 37;40 #80ffffff #00000000
- timeout 1;37;40 #c0ffffff #00000000
+ menu color screen 37;40 #80ffffff #00000000
+ menu color border 30;44 #40000000 #00000000
+ menu color title 1;36;44 #c00090f0 #00000000
+ menu color unsel 37;44 #90ffffff #00000000
+ menu color hotkey 1;37;44 #ffffffff #00000000
+ menu color sel 7;37;40 #cf101010 #20ff8000
+ menu color hotsel 1;7;37;40 #ff353535 #20ff8000
+ menu color scrollbar 30;44 #40000000 #00000000
+ menu color tabmsg 31;40 #90ffff00 #00000000
+ menu color cmdmark 1;36;40 #c000ffff #00000000
+ menu color cmdline 37;40 #c0ffffff #00000000
+ menu color pwdborder 30;47 #80ffffff #20ffffff
+ menu color pwdheader 31;47 #80ff8080 #20ffffff
+ menu color pwdentry 30;47 #80ffffff #20ffffff
+ menu color timeout_msg 37;40 #80ffffff #00000000
+ menu color timeout 1;37;40 #c0ffffff #00000000
MENU WIDTH 80
diff --git a/com32/modules/readconfig.c b/com32/modules/readconfig.c
index 0a779568..24057b1b 100644
--- a/com32/modules/readconfig.c
+++ b/com32/modules/readconfig.c
@@ -420,15 +420,25 @@ void parse_config(const char *filename)
if ( (ep = looking_at(p, cptr->name)) ) {
p = skipspace(ep);
if (*p) {
- free(cptr->ansi);
- cptr->ansi = dup_word(&p);
+ if (!strcmp(p, "*")) {
+ p++;
+ } else {
+ free((void *)cptr->ansi);
+ cptr->ansi = dup_word(&p);
+ }
- p = skipspace(ep);
+ p = skipspace(p);
if (*p) {
- cptr->argb_fg = parse_argb(&p);
- p = skipspace(ep);
+ if (!strcmp(p, "*")) {
+ p++;
+ } else {
+ cptr->argb_fg = parse_argb(&p);
+ }
+
+ p = skipspace(p);
if (*p) {
- cptr->argb_bg = parse_argb(&p);
+ if (strcmp(p, "*"))
+ cptr->argb_bg = parse_argb(&p);
}
}
}