diff options
-rw-r--r-- | src/font.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -29,12 +29,12 @@ #include <linux/font.h> #include "image.h" -#define BIT_TO_BYTE(i) ((i) / CHAR_BIT) -#define BITS_TO_BYTES(i) BIT_TO_BYTE((i) + CHAR_BIT - 1) -#define BIT_BYTE_SHIFT(i) (CHAR_BIT - 1 - ((i) % CHAR_BIT)) -#define FONT_H(f) ((size_t) (f)->desc.height) -#define FONT_W(f) ((size_t) (f)->desc.width) -#define FONT_W_BYTES(f) BITS_TO_BYTES(FONT_W(f)) +#define BIT_TO_BYTE(i) ((i) / CHAR_BIT) +#define BITS_TO_BYTES(i) BIT_TO_BYTE((i) + CHAR_BIT - 1) +#define BIT_BYTE_SHIFT(i) (CHAR_BIT - 1 - ((i) % CHAR_BIT)) +#define FONT_H(f) ((size_t) (f)->desc.height) +#define FONT_W(f) ((size_t) (f)->desc.width) +#define FONT_W_BYTES(f) BITS_TO_BYTES(FONT_W(f)) struct font { const struct font_desc desc; |