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>
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)
{
if (cm->fkeyhelp[fkey].textname) {
eprintf("\n");
- cat_file(cm->fkeyhelp[fkey].textname);
+ get_msg_file((char *)cm->fkeyhelp[fkey].textname);
}
}
outb(0, 0x80);
}
-extern void get_msg_file(char *);
extern void loadfont(char *);
extern void loadkeys(char *);