aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/readconfig.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-12-04 12:02:39 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-12-04 12:02:39 +0000
commit5984a5105fff9910b1da45f1bee35c297e67d47d (patch)
tree27afda8a50c22b5bde0764bfa292c7070e6dd841 /com32/elflink/ldlinux/readconfig.c
parentec2fb01506829d1346498542e7f2a42ff5645726 (diff)
downloadsyslinux-5984a5105fff9910b1da45f1bee35c297e67d47d.tar.gz
syslinux-5984a5105fff9910b1da45f1bee35c297e67d47d.tar.xz
syslinux-5984a5105fff9910b1da45f1bee35c297e67d47d.zip
ldlinux: Use get_msg_file() for F-keys
The file that we display with the F-keys may contain background or foreground color codes and so needs to be interpreted by get_msg_file() instead of just printing the color codes as ascii to the screen with cat_file(). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/readconfig.c')
-rw-r--r--com32/elflink/ldlinux/readconfig.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index cc57dd8e..64c20a05 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -636,21 +636,7 @@ static char *is_message_name(char *cmdstr, enum message_number *msgnr)
return NULL;
}
-static int cat_file(const char *filename)
-{
- FILE *f;
- char line[2048];
-
- f = fopen(filename, "r");
- if (!f)
- return -1;
-
- while (fgets(line, sizeof(line), f) != NULL)
- eprintf("%s", line);
-
- fclose(f);
- return 0;
-}
+extern void get_msg_file(char *);
void cat_help_file(int key)
{
@@ -704,7 +690,7 @@ void cat_help_file(int key)
if (cm->fkeyhelp[fkey].textname) {
eprintf("\n");
- cat_file(cm->fkeyhelp[fkey].textname);
+ get_msg_file((char *)cm->fkeyhelp[fkey].textname);
}
}
@@ -748,7 +734,6 @@ static inline void io_delay(void)
outb(0, 0x80);
}
-extern void get_msg_file(char *);
extern void loadfont(char *);
extern void loadkeys(char *);