about summary refs log tree commit diff
path: root/converter/other/fiasco/lib/dither.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other/fiasco/lib/dither.c')
-rw-r--r--converter/other/fiasco/lib/dither.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/converter/other/fiasco/lib/dither.c b/converter/other/fiasco/lib/dither.c
index a39afa3c..accd9dd6 100644
--- a/converter/other/fiasco/lib/dither.c
+++ b/converter/other/fiasco/lib/dither.c
@@ -38,14 +38,8 @@
 #include "pm_config.h"
 #include "config.h"
 
-#if HAVE_STRING_H
-#	include <string.h>
-#else /* not HAVE_STRING_H */
-#	include <strings.h>
-#endif /* not HAVE_STRING_H */
-#if STDC_HEADERS
-#	include <stdlib.h>
-#endif /* not STDC_HEADERS */
+#include <string.h>
+#include <stdlib.h>
 
 #include "types.h"
 #include "macros.h"
@@ -65,19 +59,22 @@
 static int 
 display_16_bit (const struct fiasco_renderer *this, unsigned char *ximage,
 		const fiasco_image_t *fiasco_image);
+
 static int 
 display_24_bit_bgr (const struct fiasco_renderer *this, unsigned char *ximage,
 		    const fiasco_image_t *fiasco_image);
+
 static int 
 display_24_bit_rgb (const struct fiasco_renderer *this, unsigned char *ximage,
 		    const fiasco_image_t *fiasco_image);
+
 static int 
 display_32_bit (const struct fiasco_renderer *this, unsigned char *ximage,
 		const fiasco_image_t *fiasco_image);
+
 static int
 free_bits_at_bottom (unsigned long a);
-static int
-free_bits_at_top (unsigned long a);
+
 static int
 number_of_bits_set (unsigned long a);
 
@@ -345,21 +342,6 @@ number_of_bits_set (unsigned long a)
 }
 
 static int
-free_bits_at_top (unsigned long a)
-/*
- *  How many 0 bits are there at most significant end of longword.
- *  Low performance, do not call often.
- */
-{
-   if(!a)				/* assume char is 8 bits */
-      return sizeof (unsigned long) * 8;
-   else if (((long) a) < 0l)		/* assume twos complement */
-      return 0;
-   else
-      return 1 + free_bits_at_top ( a << 1);
-}
-
-static int
 free_bits_at_bottom (unsigned long a)
 /*
  *  How many 0 bits are there at least significant end of longword.