diff options
author | Hans Breuer <hans@breuer.org> | 2001-07-20 17:34:08 +0000 |
---|---|---|
committer | Hans Breuer <hans@src.gnome.org> | 2001-07-20 17:34:08 +0000 |
commit | 9d1e828d08de78793e1f1ef68535b4d62b13e691 (patch) | |
tree | b6e4573abbd77aa3061f5787a5b983a5b21fbe3b /gdk-pixbuf | |
parent | c0fcc8c6acd5a1a85e80fcd4be9851f2e2faf760 (diff) | |
download | gdk-pixbuf-9d1e828d08de78793e1f1ef68535b4d62b13e691.tar.gz |
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
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/ChangeLog | 11 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixdata.c | 18 | ||||
-rw-r--r-- | gdk-pixbuf/gdk_pixbuf.def | 19 | ||||
-rw-r--r-- | gdk-pixbuf/makefile.msc | 17 |
4 files changed, 53 insertions, 12 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 16e788ac1..7de4cb61a 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,14 @@ +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. diff --git a/gdk-pixbuf/gdk-pixdata.c b/gdk-pixbuf/gdk-pixdata.c index 152a2de10..77040bdc0 100644 --- a/gdk-pixbuf/gdk-pixdata.c +++ b/gdk-pixbuf/gdk-pixdata.c @@ -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); diff --git a/gdk-pixbuf/gdk_pixbuf.def b/gdk-pixbuf/gdk_pixbuf.def index a654c474d..7d2495b2c 100644 --- a/gdk-pixbuf/gdk_pixbuf.def +++ b/gdk-pixbuf/gdk_pixbuf.def @@ -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 + diff --git a/gdk-pixbuf/makefile.msc b/gdk-pixbuf/makefile.msc index 2685e45f2..ca11da023 100644 --- a/gdk-pixbuf/makefile.msc +++ b/gdk-pixbuf/makefile.msc @@ -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 |