ftp://ftp.linux.ncsu.edu/mirror/ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os...
[xscreensaver] / hacks / barcode.c
index f6b19eb8cabd993feb7674120e40a9b6441f5147..b15784814e7f82e0a7b13e8feab823562ec04adc 100644 (file)
@@ -67,7 +67,7 @@ typedef struct
     int width;
     int height;
     int widthBytes;
-    unsigned char *buf;
+    char *buf;
 }
 Bitmap;
 
@@ -594,7 +594,7 @@ static unsigned char font5x8Buf[] =
    0x0f, 0x0f, 0x0f, 0x00
 };
 
-static Bitmap font5x8 = { 8, 1024, 1, font5x8Buf };
+static Bitmap font5x8 = { 8, 1024, 1, (char *) font5x8Buf };
 
 /* draw the given 5x8 character at the given coordinates */
 void bitmapDrawChar5x8 (Bitmap *b, int x, int y, char c)
@@ -1529,6 +1529,8 @@ static void setup (void)
     theImage = XCreateImage(display, visual, 1, XYBitmap, 0, theBitmap->buf,
                            theBitmap->width, theBitmap->height, 8,
                            theBitmap->widthBytes);
+    theImage->bitmap_bit_order = LSBFirst;
+    theImage->byte_order       = LSBFirst;
 }