summaryrefslogtreecommitdiffstats
path: root/tools/bitmap_to_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bitmap_to_c.c')
-rw-r--r--tools/bitmap_to_c.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/bitmap_to_c.c b/tools/bitmap_to_c.c
index e9cd4db2..c4e1df10 100644
--- a/tools/bitmap_to_c.c
+++ b/tools/bitmap_to_c.c
@@ -24,12 +24,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
+#include <spice/macros.h>
-#define ALIGN(a, b) (((a) + ((b) - 1)) & ~((b) - 1))
-#define TRUE 1
-#define FALSE 0
-
#define TAB " "
#define ERROR(str) printf("%s: error: %s\n", prog_name, str); exit(-1);
@@ -143,7 +140,7 @@ static Pixmap *init_bitmap(size_t input_size, uint8_t *buf)
if (file_header->header.bpp == 32) {
stride = file_header->header.width * sizeof(uint32_t);
} else if (file_header->header.bpp == 24) {
- stride = ALIGN(file_header->header.width * 3, 4);
+ stride = SPICE_ALIGN(file_header->header.width * 3, 4);
} else {
ERROR("unsupported bpp");
return NULL;