From 79a042ab38edcc6d19cf67b70f9f2e3f9d0e1d35 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Sat, 27 Nov 2004 23:19:03 +0000 Subject: [PATCH] make proper casts in big endian cases. Sat Nov 27 15:18:14 2004 Manish Singh * contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c (rgb565amsb, rgb555msb): make proper casts in big endian cases. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c | 8 ++++++++ 5 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index e87b10d190..bc1b7ede6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Nov 27 15:18:14 2004 Manish Singh + + * contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c + (rgb565amsb, rgb555msb): make proper casts in big endian cases. + 2004-11-26 Matthias Clasen * gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e87b10d190..bc1b7ede6a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Sat Nov 27 15:18:14 2004 Manish Singh + + * contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c + (rgb565amsb, rgb555msb): make proper casts in big endian cases. + 2004-11-26 Matthias Clasen * gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e87b10d190..bc1b7ede6a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Sat Nov 27 15:18:14 2004 Manish Singh + + * contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c + (rgb565amsb, rgb555msb): make proper casts in big endian cases. + 2004-11-26 Matthias Clasen * gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e87b10d190..bc1b7ede6a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Sat Nov 27 15:18:14 2004 Manish Singh + + * contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c + (rgb565amsb, rgb555msb): make proper casts in big endian cases. + 2004-11-26 Matthias Clasen * gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c index 2c8de405a2..da9dae2f80 100644 --- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c +++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c @@ -547,7 +547,11 @@ rgb565amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma bpl = image->bytes_per_line; for (yy = 0; yy < height; yy++) { +#ifdef LITTLE s = srow; +#else + s = (guint16 *) srow; +#endif o = (guint32 *) orow; for (xx = 0; xx < width; xx ++) { register guint32 data; @@ -670,7 +674,11 @@ rgb555msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap bpl = image->bytes_per_line; for (yy = 0; yy < height; yy++) { +#ifdef LITTLE s = srow; +#else + s = (guint32 *) srow; +#endif o = (guint16 *) orow; for (xx = 1; xx < width; xx += 2) { register guint32 data;