diff options
-rw-r--r-- | com32/elflink/ldlinux/readconfig.c | 19 | ||||
-rw-r--r-- | core/font.inc | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c index 906cbe05..61da2ff3 100644 --- a/com32/elflink/ldlinux/readconfig.c +++ b/com32/elflink/ldlinux/readconfig.c @@ -727,6 +727,7 @@ static inline void io_delay(void) } extern void get_msg_file(void); +extern void loadfont(void); extern char syslinux_banner[]; extern char copyright_str[]; @@ -1135,7 +1136,25 @@ do_include: refstr_put(filename); } else if (looking_at(p, "font")) { + com32sys_t reg; + char *filename, *dst = KernelName; + size_t len = FILENAME_MAX - 1; + + filename = refstrdup(skipspace(p + 4)); + + while (len-- && not_whitespace(*filename)) + *dst++ = *filename++; + *dst = '\0'; + memset(®, 0, sizeof(reg)); + reg.edi.w[0] = OFFS_WRT(KernelName, 0); + call16(core_open, ®, ®); + if (!(reg.eflags.l & EFLAGS_ZF)) + call16(loadfont, ®, NULL); + else + printf("File not found\n"); + + refstr_put(filename); } else if (looking_at(p, "kbdmap")) { } diff --git a/core/font.inc b/core/font.inc index 12236358..9e840e4c 100644 --- a/core/font.inc +++ b/core/font.inc @@ -25,6 +25,7 @@ ; loadfont.err: jmp close ; Tailcall the close routine + global loadfont loadfont: mov di,trackbuf mov cx,4 |