[syslinux:elflink] font: load data as a single block
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Fri May 31 08:09:10 PDT 2013
Commit-ID: be5a345d385d14bb740df7075c78dec5dcfbfc2a
Gitweb: http://www.syslinux.org/commit/be5a345d385d14bb740df7075c78dec5dcfbfc2a
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Fri, 31 May 2013 07:52:55 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Fri, 31 May 2013 07:53:42 -0700
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 at linux.intel.com>
---
core/font.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/core/font.c b/core/font.c
index 113b004..35f1b28 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;
More information about the Syslinux-commits
mailing list