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
This commit is contained in:
Michael Drake 2014-06-02 14:22:41 +01:00
parent 31c3f4b81d
commit a2c0e05197
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}