diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2013-05-31 07:52:55 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2013-05-31 07:53:42 -0700 |
commit | be5a345d385d14bb740df7075c78dec5dcfbfc2a (patch) | |
tree | b3f0e5cd443277ace93ba33e4b71f62532dfc56e | |
parent | 4e682dcc05b0911365aa92c4f848daf013d3a635 (diff) | |
download | syslinux-be5a345d385d14bb740df7075c78dec5dcfbfc2a.tar.gz syslinux-be5a345d385d14bb740df7075c78dec5dcfbfc2a.tar.xz syslinux-be5a345d385d14bb740df7075c78dec5dcfbfc2a.zip |
font: load data as a single block
The only reason for a loop is to interleave data, which we don't need
anymore; instead the data is stored in packed form.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | core/font.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/core/font.c b/core/font.c index 113b004e..35f1b28a 100644 --- a/core/font.c +++ b/core/font.c @@ -1,7 +1,7 @@ -/* - * ----------------------------------------------------------------------- +/* ----------------------------------------------------------------------- * * * Copyright 1994-2008 H. Peter Anvin - All Rights Reserved + * Copyright 2013 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -9,8 +9,9 @@ * Boston MA 02111-1307, USA; either version 2 of the License, or * (at your option) any later version; incorporated herein by reference. * - * ----------------------------------------------------------------------- - * + * ----------------------------------------------------------------------- */ + +/* * * font.c * @@ -70,13 +71,8 @@ __export void loadfont(const char *filename) /* Load the actual font into the font buffer. */ memset(fontbuf, 0, 256*32); - - p = fontbuf; - for (i = 0; i < 256; i++) { - if (_fread(p, hdr.height, f) != hdr.height) - goto fail; - p += hdr.height; - } + if (_fread(p, 256*hdr.height, f) != 256*hdr.height) + goto fail; /* Loaded OK */ VGAFontSize = hdr.height; |