summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-06-02 14:22:41 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-06-02 14:22:41 +0100
commita2c0e0519730ed1a3428330c9d2e90432451cfb2 (patch)
treee353bf190c1ad90151632adda31d15a5d298acb3 /framebuffer
parent31c3f4b81d02243b23aaee8e46552af063fac2ea (diff)
downloadnetsurf-a2c0e0519730ed1a3428330c9d2e90432451cfb2.tar.gz
netsurf-a2c0e0519730ed1a3428330c9d2e90432451cfb2.tar.bz2
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
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/convert_font.c3
1 files changed, 1 insertions, 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <math.h>
#include <assert.h>
#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;
}