From a2c0e0519730ed1a3428330c9d2e90432451cfb2 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 2 Jun 2014 14:22:41 +0100 Subject: Avoid use of math.h To update the generated source file, first build the converter: $ gcc -O2 -Wall framebuffer/convert_font.c \ -o build-Linux-framebuffer/tools/convert_font And then use it to generate the souce file: $ build-Linux-framebuffer/tools/convert_font \ framebuffer/res/fonts/glyph_data \ framebuffer/GEN_font_internal.c --- framebuffer/convert_font.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framebuffer/convert_font.c b/framebuffer/convert_font.c index a381ac10f..6f5d3c20f 100644 --- a/framebuffer/convert_font.c +++ b/framebuffer/convert_font.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #define GLYPH_LEN 16 @@ -762,7 +761,7 @@ static bool assemble_codepoint(const char* c, int n, int *id) return false; } - *id += v * pow(16, 3 - n); + *id += v << (4 * (3 - n)); return true; } -- cgit v1.2.1