Commit 9d1e828d authored by Hans Breuer's avatar Hans Breuer Committed by Hans Breuer

don't 'g_tohl (*istream++)', but move pointer increment out of the macro,

2001-07-20  Hans Breuer  <hans@breuer.org>

	* gdk-pixdata.c : don't 'g_tohl (*istream++)', but move
	pointer increment out of the macro, because  at least one
	compiler (msvc 5.0) gets confused otherwise (applies the
	wrong increment).

	* gdk_pixbuf.def : updated exports

	* makefile.msc : reflect gdk-pixbuf-csource changes
parent c0fcc8c6
2001-07-20 Hans Breuer <hans@breuer.org>
* gdk-pixdata.c : don't 'g_tohl (*istream++)', but move
pointer increment out of the macro, because at least one
compiler (msvc 5.0) gets confused otherwise (applies the
wrong increment).
* gdk_pixbuf.def : updated exports
* makefile.msc : reflect gdk-pixbuf-csource changes
2001-07-17 Darin Adler <darin@bentspoon.com>
* gdk-pixbuf-csource.c: Add missing <stdlib.h> include.
......
......@@ -192,14 +192,20 @@ gdk_pixdata_deserialize (GdkPixdata *pixdata,
/* deserialize header */
istream = (guint32*) stream;
pixdata->magic = g_ntohl (*istream++);
pixdata->length = g_ntohl (*istream++);
/*
* the deserialization of GdkPixdata will fail (at least on win32 with msvc 5.0)
* with 'g_ntohl(*istream++)' because the guint32 istream pointer is only
* incremented by 1 byte, if it is done within the g_ntohl() macro.
* Probably working around just another compiler bug ... --HB
*/
pixdata->magic = g_ntohl (*istream); istream++;
pixdata->length = g_ntohl (*istream); istream++;
if (pixdata->magic != GDK_PIXBUF_MAGIC_NUMBER || pixdata->length < GDK_PIXDATA_HEADER_LENGTH)
return_header_corrupt (error);
pixdata->pixdata_type = g_ntohl (*istream++);
pixdata->rowstride = g_ntohl (*istream++);
pixdata->width = g_ntohl (*istream++);
pixdata->height = g_ntohl (*istream++);
pixdata->pixdata_type = g_ntohl (*istream); istream++;
pixdata->rowstride = g_ntohl (*istream); istream++;
pixdata->width = g_ntohl (*istream); istream++;
pixdata->height = g_ntohl (*istream); istream++;
if (pixdata->width < 1 || pixdata->height < 1 ||
pixdata->rowstride < pixdata->width)
return_header_corrupt (error);
......
......@@ -12,6 +12,8 @@ EXPORTS
gdk_pixbuf_animation_iter_advance
gdk_pixbuf_animation_iter_get_delay_time
gdk_pixbuf_animation_iter_get_pixbuf
gdk_pixbuf_animation_iter_get_type
gdk_pixbuf_animation_iter_on_currently_loading_frame
gdk_pixbuf_animation_new_from_file
gdk_pixbuf_animation_ref
gdk_pixbuf_animation_unref
......@@ -21,6 +23,8 @@ EXPORTS
gdk_pixbuf_copy
gdk_pixbuf_copy_area
gdk_pixbuf_error_quark
gdk_pixbuf_fill
gdk_pixbuf_from_pixdata
gdk_pixbuf_get_bits_per_sample
gdk_pixbuf_get_colorspace
gdk_pixbuf_get_has_alpha
......@@ -30,16 +34,29 @@ EXPORTS
gdk_pixbuf_get_rowstride
gdk_pixbuf_get_type
gdk_pixbuf_get_width
gdk_pixbuf_loader_close
gdk_pixbuf_loader_get_animation
gdk_pixbuf_loader_get_pixbuf
gdk_pixbuf_loader_get_type
gdk_pixbuf_loader_new
gdk_pixbuf_loader_new_with_type
gdk_pixbuf_loader_write
gdk_pixbuf_new
gdk_pixbuf_new_from_data
gdk_pixbuf_new_from_file
gdk_pixbuf_new_from_inline
gdk_pixbuf_new_from_stream
gdk_pixbuf_new_from_xpm_data
gdk_pixbuf_new_subpixbuf
gdk_pixbuf_ref
; gdk_pixbuf_rotate
gdk_pixbuf_saturate_and_pixelate
gdk_pixbuf_save
gdk_pixbuf_savev
gdk_pixbuf_scale
gdk_pixbuf_scale_simple
gdk_pixbuf_unref
gdk_pixdata_deserialize
gdk_pixdata_from_pixbuf
gdk_pixdata_serialize
gdk_pixdata_to_csource
......@@ -18,8 +18,9 @@ PKG_CFLAGS = -I. -I.. $(GLIB_CFLAGS) \
PKG_LINK = $(GLIB_LIBS) \
$(JPEG_LIBS) $(PNG_LIBS) $(TIFF_LIBS) $(INTL_LIBS) \
pixops\pixops.lib
# $(TIFF_LIBS) \
$(JPEG_LIBS) $(PNG_LIBS) $(INTL_LIBS) \
pixops\pixops.lib \
OBJECTS = \
gdk-pixbuf-animation.obj \
......@@ -29,14 +30,16 @@ OBJECTS = \
gdk-pixbuf-scale.obj \
gdk-pixbuf-util.obj \
gdk-pixbuf.obj \
gdk-pixdata.obj \
io-bmp.obj \
io-wbmp.obj \
io-gif.obj \
io-gif-animation.obj \
io-ico.obj \
io-png.obj \
io-pnm.obj \
io-ras.obj \
io-tiff.obj \
# io-tiff.obj \
io-xpm.obj \
io-jpeg.obj \
......@@ -49,7 +52,7 @@ gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.list
## common stuff
# cl -? describes the options
CC = cl -G5 -GF $(OPTIMIZE) -W3 -nologo
CC = cl -G5 -GF $(OPTIMIZE) $(CRUNTIME) -W3 -nologo
# No general LDFLAGS needed
LDFLAGS = /link $(LINKDEBUG)
......@@ -63,7 +66,8 @@ all : \
gdk-pixbuf-marshal.c \
gdk-pixbuf-marshal.h \
$(PACKAGE)-$(PKG_VER).dll \
make-inline-pixbuf.exe \
# make-inline-pixbuf.exe \
gdk-pixbuf-csource.exe \
test-gdk-pixbuf.exe
$(PACKAGE).lib : $(OBJECTS)
......@@ -75,6 +79,9 @@ $(PACKAGE)-$(PKG_VER).dll : $(OBJECTS) $(PACKAGE).def
make-inline-pixbuf.exe : make-inline-pixbuf.c
$(CC) $(PKG_CFLAGS) -Femake-inline-pixbuf.exe make-inline-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
gdk-pixbuf-csource.exe : gdk-pixbuf-csource.c
$(CC) $(PKG_CFLAGS) -Fegdk-pixbuf-csource.exe gdk-pixbuf-csource.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
test-gdk-pixbuf.exe : test-gdk-pixbuf.c
$(CC) $(PKG_CFLAGS) -Fetest-gdk-pixbuf.exe test-gdk-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment