diff --git a/ChangeLog b/ChangeLog index 55b8829a99..19f0c9b563 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Sat Apr 11 15:03:43 PDT 1998 Manish Singh + + * app/gdisplay.c: reverted cosmetic fix below, broke zoomed + updates + + * configure.in: changes to xdelta and jpeg checks + + * updated bmp plugin + + * portability patch for polar + + * minor bugfix to vpropagate + + * fix for memory problem in xwd + Sat Apr 11 00:03:33 PDT 1998 Manish Singh * Made 0.99.25 release @@ -205,7 +220,7 @@ Thu Apr 2 15:34:22 MEST 1998 Sven Neumann * updated iwarp to the version on the registry and reapplied (hopefully) all portability-patches that were applied in between -Wed Apr 1 11:10:15 EST 1998 Matthew Wilson * app/brightness_contrast.c * app/by_color_select.c diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c index 784bbac63b..a303d2ac1a 100644 --- a/app/core/gimpprojection.c +++ b/app/core/gimpprojection.c @@ -631,11 +631,10 @@ gdisplay_add_update_area (GDisplay *gdisp, GArea * ga; ga = (GArea *) g_malloc (sizeof (GArea)); - - ga->x1 = x /* BOUNDS (x, 0, gdisp->gimage->width) */; - ga->y1 = y /* BOUNDS (y, 0, gdisp->gimage->height) */; - ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->gimage->width) */; - ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->gimage->height) */; + ga->x1 = BOUNDS (x, 0, gdisp->gimage->width); + ga->y1 = BOUNDS (y, 0, gdisp->gimage->height); + ga->x2 = BOUNDS (x + w, 0, gdisp->gimage->width); + ga->y2 = BOUNDS (y + h, 0, gdisp->gimage->height); gdisp->update_areas = gdisplay_process_area_list (gdisp->update_areas, ga); } @@ -652,10 +651,10 @@ gdisplay_add_display_area (GDisplay *gdisp, ga = (GArea *) g_malloc (sizeof (GArea)); - ga->x1 = x /* BOUNDS (x, 0, gdisp->disp_width) */; - ga->y1 = y /* BOUNDS (y, 0, gdisp->disp_height) */; - ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->disp_width) */; - ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->disp_height) */; + ga->x1 = BOUNDS (x, 0, gdisp->disp_width); + ga->y1 = BOUNDS (y, 0, gdisp->disp_height); + ga->x2 = BOUNDS (x + w, 0, gdisp->disp_width); + ga->y2 = BOUNDS (y + h, 0, gdisp->disp_height); gdisp->display_areas = gdisplay_process_area_list (gdisp->display_areas, ga); } @@ -669,31 +668,27 @@ gdisplay_paint_area (GDisplay *gdisp, int h) { int x1, y1, x2, y2; - int xb, yb, wb, hb; /* Bounds check */ x1 = BOUNDS (x, 0, gdisp->gimage->width); y1 = BOUNDS (y, 0, gdisp->gimage->height); x2 = BOUNDS (x + w, 0, gdisp->gimage->width); y2 = BOUNDS (y + h, 0, gdisp->gimage->height); - xb = x1; - yb = y1; - wb = (x2 - x1); - hb = (y2 - y1); + x = x1; + y = y1; + w = (x2 - x1); + h = (y2 - y1); /* calculate the extents of the update as limited by what's visible */ gdisplay_untransform_coords (gdisp, 0, 0, &x1, &y1, FALSE, FALSE); gdisplay_untransform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE, FALSE); - gimage_invalidate (gdisp->gimage, xb, yb, wb, hb, x1, y1, x2, y2); + gimage_invalidate (gdisp->gimage, x, y, w, h, x1, y1, x2, y2); /* display the area */ - gdisplay_transform_coords (gdisp, xb, yb, &x1, &y1, FALSE); - gdisplay_transform_coords (gdisp, xb + wb, yb + hb, &x2, &y2, FALSE); - - /* expose needs to be done on the unbounded area */ - - gdisplay_expose_area (gdisp, x, y, w, h); + gdisplay_transform_coords (gdisp, x, y, &x1, &y1, FALSE); + gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, FALSE); + gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); } diff --git a/app/display/gimpdisplay.c b/app/display/gimpdisplay.c index 784bbac63b..a303d2ac1a 100644 --- a/app/display/gimpdisplay.c +++ b/app/display/gimpdisplay.c @@ -631,11 +631,10 @@ gdisplay_add_update_area (GDisplay *gdisp, GArea * ga; ga = (GArea *) g_malloc (sizeof (GArea)); - - ga->x1 = x /* BOUNDS (x, 0, gdisp->gimage->width) */; - ga->y1 = y /* BOUNDS (y, 0, gdisp->gimage->height) */; - ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->gimage->width) */; - ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->gimage->height) */; + ga->x1 = BOUNDS (x, 0, gdisp->gimage->width); + ga->y1 = BOUNDS (y, 0, gdisp->gimage->height); + ga->x2 = BOUNDS (x + w, 0, gdisp->gimage->width); + ga->y2 = BOUNDS (y + h, 0, gdisp->gimage->height); gdisp->update_areas = gdisplay_process_area_list (gdisp->update_areas, ga); } @@ -652,10 +651,10 @@ gdisplay_add_display_area (GDisplay *gdisp, ga = (GArea *) g_malloc (sizeof (GArea)); - ga->x1 = x /* BOUNDS (x, 0, gdisp->disp_width) */; - ga->y1 = y /* BOUNDS (y, 0, gdisp->disp_height) */; - ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->disp_width) */; - ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->disp_height) */; + ga->x1 = BOUNDS (x, 0, gdisp->disp_width); + ga->y1 = BOUNDS (y, 0, gdisp->disp_height); + ga->x2 = BOUNDS (x + w, 0, gdisp->disp_width); + ga->y2 = BOUNDS (y + h, 0, gdisp->disp_height); gdisp->display_areas = gdisplay_process_area_list (gdisp->display_areas, ga); } @@ -669,31 +668,27 @@ gdisplay_paint_area (GDisplay *gdisp, int h) { int x1, y1, x2, y2; - int xb, yb, wb, hb; /* Bounds check */ x1 = BOUNDS (x, 0, gdisp->gimage->width); y1 = BOUNDS (y, 0, gdisp->gimage->height); x2 = BOUNDS (x + w, 0, gdisp->gimage->width); y2 = BOUNDS (y + h, 0, gdisp->gimage->height); - xb = x1; - yb = y1; - wb = (x2 - x1); - hb = (y2 - y1); + x = x1; + y = y1; + w = (x2 - x1); + h = (y2 - y1); /* calculate the extents of the update as limited by what's visible */ gdisplay_untransform_coords (gdisp, 0, 0, &x1, &y1, FALSE, FALSE); gdisplay_untransform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE, FALSE); - gimage_invalidate (gdisp->gimage, xb, yb, wb, hb, x1, y1, x2, y2); + gimage_invalidate (gdisp->gimage, x, y, w, h, x1, y1, x2, y2); /* display the area */ - gdisplay_transform_coords (gdisp, xb, yb, &x1, &y1, FALSE); - gdisplay_transform_coords (gdisp, xb + wb, yb + hb, &x2, &y2, FALSE); - - /* expose needs to be done on the unbounded area */ - - gdisplay_expose_area (gdisp, x, y, w, h); + gdisplay_transform_coords (gdisp, x, y, &x1, &y1, FALSE); + gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, FALSE); + gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); } diff --git a/app/gdisplay.c b/app/gdisplay.c index 784bbac63b..a303d2ac1a 100644 --- a/app/gdisplay.c +++ b/app/gdisplay.c @@ -631,11 +631,10 @@ gdisplay_add_update_area (GDisplay *gdisp, GArea * ga; ga = (GArea *) g_malloc (sizeof (GArea)); - - ga->x1 = x /* BOUNDS (x, 0, gdisp->gimage->width) */; - ga->y1 = y /* BOUNDS (y, 0, gdisp->gimage->height) */; - ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->gimage->width) */; - ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->gimage->height) */; + ga->x1 = BOUNDS (x, 0, gdisp->gimage->width); + ga->y1 = BOUNDS (y, 0, gdisp->gimage->height); + ga->x2 = BOUNDS (x + w, 0, gdisp->gimage->width); + ga->y2 = BOUNDS (y + h, 0, gdisp->gimage->height); gdisp->update_areas = gdisplay_process_area_list (gdisp->update_areas, ga); } @@ -652,10 +651,10 @@ gdisplay_add_display_area (GDisplay *gdisp, ga = (GArea *) g_malloc (sizeof (GArea)); - ga->x1 = x /* BOUNDS (x, 0, gdisp->disp_width) */; - ga->y1 = y /* BOUNDS (y, 0, gdisp->disp_height) */; - ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->disp_width) */; - ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->disp_height) */; + ga->x1 = BOUNDS (x, 0, gdisp->disp_width); + ga->y1 = BOUNDS (y, 0, gdisp->disp_height); + ga->x2 = BOUNDS (x + w, 0, gdisp->disp_width); + ga->y2 = BOUNDS (y + h, 0, gdisp->disp_height); gdisp->display_areas = gdisplay_process_area_list (gdisp->display_areas, ga); } @@ -669,31 +668,27 @@ gdisplay_paint_area (GDisplay *gdisp, int h) { int x1, y1, x2, y2; - int xb, yb, wb, hb; /* Bounds check */ x1 = BOUNDS (x, 0, gdisp->gimage->width); y1 = BOUNDS (y, 0, gdisp->gimage->height); x2 = BOUNDS (x + w, 0, gdisp->gimage->width); y2 = BOUNDS (y + h, 0, gdisp->gimage->height); - xb = x1; - yb = y1; - wb = (x2 - x1); - hb = (y2 - y1); + x = x1; + y = y1; + w = (x2 - x1); + h = (y2 - y1); /* calculate the extents of the update as limited by what's visible */ gdisplay_untransform_coords (gdisp, 0, 0, &x1, &y1, FALSE, FALSE); gdisplay_untransform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE, FALSE); - gimage_invalidate (gdisp->gimage, xb, yb, wb, hb, x1, y1, x2, y2); + gimage_invalidate (gdisp->gimage, x, y, w, h, x1, y1, x2, y2); /* display the area */ - gdisplay_transform_coords (gdisp, xb, yb, &x1, &y1, FALSE); - gdisplay_transform_coords (gdisp, xb + wb, yb + hb, &x2, &y2, FALSE); - - /* expose needs to be done on the unbounded area */ - - gdisplay_expose_area (gdisp, x, y, w, h); + gdisplay_transform_coords (gdisp, x, y, &x1, &y1, FALSE); + gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, FALSE); + gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1)); } diff --git a/configure.in b/configure.in index 05a4025377..15e494c371 100644 --- a/configure.in +++ b/configure.in @@ -135,7 +135,8 @@ dnl Test for libjpeg if test "$jpeg_ok" = yes; then AC_MSG_CHECKING([for jpeg.h]) AC_TRY_COMPILE( -[#undef PACKAGE +[#include +#undef PACKAGE #undef VERSION #include ], jpeg_ok=yes, @@ -185,9 +186,11 @@ dnl Test for libmpeg dnl Test for libxdelta if test -z "$LIBXDELTA_LIB"; then AC_CHECK_LIB(xdelta, xd_checkin, - xdelta_ok=yes, - xdelta_ok=no - AC_MSG_WARN(*** XD plug-in will not be built (XDELTA library not found) ***), -lglib -lgdbm) + xdelta_ok=yes ; LIBXDELTA_LIB='-lxdelta -lglib -lgdbm', + AC_CHECK_LIB(xdelta, xd_checkout, + xdelta_ok=yes ; LIBXDELTA_LIB='-lxdelta -lglib -lgdbm -lz', + xdelta_ok=no + AC_MSG_WARN(*** XD plug-in will not be built (XDELTA library not found) ***), -lglib -lgdbm -lz), -lglib -lgdbm) if test "$xdelta_ok" = yes; then AC_MSG_CHECKING([for xdelta.h]) AC_TRY_CPP( @@ -197,7 +200,7 @@ dnl Test for libxdelta xdelta_ok=no) AC_MSG_RESULT($xdelta_ok) if test "$xdelta_ok" = yes; then - XD='xd'; LIBXDELTA_LIB='-lxdelta -lglib -lgdbm' + XD='xd' else AC_MSG_WARN(*** XD plug-in will not be built (XDELTA header file not found) ***) fi diff --git a/plug-ins/bmp/bmp.c b/plug-ins/bmp/bmp.c index 4698d5194a..5296cec62f 100644 --- a/plug-ins/bmp/bmp.c +++ b/plug-ins/bmp/bmp.c @@ -1,5 +1,5 @@ /* bmp.c */ -/* Version 0.42 */ +/* Version 0.43 */ /* This is a File input and output filter for */ /* Gimp. It loads and saves images in windows(TM) */ /* bitmap format. */ @@ -14,6 +14,8 @@ /* 16.03.1998 Endian-independent!! */ /* 21.03.1998 Little Bug-fix */ /* 06.04.1998 Bugfix in Padding */ +/* 11.04.1998 Arch. cleanup (-Wall) */ +/* Parses gtkrc */ /* * The GIMP -- an image manipulation program @@ -64,6 +66,7 @@ GPlugInInfo PLUG_IN_INFO = NULL, /* quit_proc */ query, /* query_proc */ run, /* run_proc */ + }; MAIN () diff --git a/plug-ins/bmp/bmp.h b/plug-ins/bmp/bmp.h index c428e385dc..881d79918b 100644 --- a/plug-ins/bmp/bmp.h +++ b/plug-ins/bmp/bmp.h @@ -7,9 +7,9 @@ #define BitSet(byte, bit) (((byte) & (bit)) == (bit)) -#define ReadOK(file,buffer,len) (fread(buffer, len, 1, file) != 0) +#define ReadOK(file,buffer,len) (fread(buffer, len, 1, file) != 0) #define Write(file,buffer,len) fwrite(buffer, len, 1, file) -#define WriteOK(file,buffer,len) (Write(file,buffer,len) != 0) +#define WriteOK(file,buffer,len) (Write(buffer, len, file) != 0) extern gint32 ToL(guchar *); extern void FromL(gint32, guchar *); @@ -57,3 +57,4 @@ struct unsigned short bcPlanes; /* 16 */ unsigned short bcBitCnt; /* 18 */ }Bitmap_OS2_Head; + diff --git a/plug-ins/bmp/bmpwrite.c b/plug-ins/bmp/bmpwrite.c index 3974b3d3c7..407078a9bd 100644 --- a/plug-ins/bmp/bmpwrite.c +++ b/plug-ins/bmp/bmpwrite.c @@ -330,7 +330,7 @@ void WriteImage(f, src, width, height, encoded, channels, bpp, spzeile, MapSize) { buf[1]=buf[1] | (buf[1] << 4); } - Write(f,buf,2); /* Count -- Color */ + Write(f,buf,2); /* Count -- Color */ laenge+=2; } else /* unpacked */ @@ -408,6 +408,7 @@ save_dialog () argv[0] = g_strdup ("bmp"); gtk_init (&argc, &argv); + gtk_rc_parse (gimp_gtkrc()); dlg = gtk_dialog_new (); diff --git a/plug-ins/common/polar.c b/plug-ins/common/polar.c index cb4a4cc226..9466fc80fb 100644 --- a/plug-ins/common/polar.c +++ b/plug-ins/common/polar.c @@ -1032,7 +1032,7 @@ dialog_update_preview(void) double left, right, bottom, top; double dx, dy; double px, py; - double cx, cy; + double cx = 0.0, cy = 0.0; int ix, iy; int x, y; double scale_x, scale_y; diff --git a/plug-ins/common/vpropagate.c b/plug-ins/common/vpropagate.c index 3690d5e297..1b61325edf 100644 --- a/plug-ins/common/vpropagate.c +++ b/plug-ins/common/vpropagate.c @@ -1,7 +1,7 @@ /* vpropagate.c -- This is a plug-in for the GIMP (1.0's API) * Author: Shuji Narazaki - * Time-stamp: <1997/10/24 20:09:07 narazaki@InetQ.or.jp> - * Version: 0.89 + * Time-stamp: <1998/04/11 19:46:08 narazaki@InetQ.or.jp> + * Version: 0.89a * * Copyright (C) 1996-1997 Shuji Narazaki * @@ -252,7 +252,7 @@ query () "Shuji Narazaki", "1996-1997", MENU_POSITION, - "RGB*", + "RGB*,GRAY*", PROC_PLUG_IN, nargs, nreturn_vals, args, return_vals); diff --git a/plug-ins/common/xwd.c b/plug-ins/common/xwd.c index bad12fd84b..2aa4d0a8b7 100644 --- a/plug-ins/common/xwd.c +++ b/plug-ins/common/xwd.c @@ -42,8 +42,9 @@ * Set gimp b/w-colormap if no xwdcolormap present * V 1.91, PK, 05-Apr-97: Return all arguments, even in case of an error * V 1.92, PK, 12-Oct-97: No progress bars for non-interactive mode + * V 1.93, PK, 11-Apr-98: Fix problem with overwriting memory */ -static char ident[] = "@(#) GIMP XWD file-plugin v1.92 12-Oct-97"; +static char ident[] = "@(#) GIMP XWD file-plugin v1.93 11-Apr-98"; #include #include @@ -1275,7 +1276,7 @@ load_xwd_f2_d16_b16 (char *filename, data = g_malloc (tile_height * width * 3); /* Get memory for mapping 16 bit XWD-pixel to GIMP-RGB */ - maxval = 0xffff * 3; + maxval = 0x10000 * 3; ColorMap = (unsigned char *)g_malloc (maxval); if (ColorMap == NULL) { diff --git a/plug-ins/polar/polar.c b/plug-ins/polar/polar.c index cb4a4cc226..9466fc80fb 100644 --- a/plug-ins/polar/polar.c +++ b/plug-ins/polar/polar.c @@ -1032,7 +1032,7 @@ dialog_update_preview(void) double left, right, bottom, top; double dx, dy; double px, py; - double cx, cy; + double cx = 0.0, cy = 0.0; int ix, iy; int x, y; double scale_x, scale_y; diff --git a/plug-ins/vpropagate/vpropagate.c b/plug-ins/vpropagate/vpropagate.c index 3690d5e297..1b61325edf 100644 --- a/plug-ins/vpropagate/vpropagate.c +++ b/plug-ins/vpropagate/vpropagate.c @@ -1,7 +1,7 @@ /* vpropagate.c -- This is a plug-in for the GIMP (1.0's API) * Author: Shuji Narazaki - * Time-stamp: <1997/10/24 20:09:07 narazaki@InetQ.or.jp> - * Version: 0.89 + * Time-stamp: <1998/04/11 19:46:08 narazaki@InetQ.or.jp> + * Version: 0.89a * * Copyright (C) 1996-1997 Shuji Narazaki * @@ -252,7 +252,7 @@ query () "Shuji Narazaki", "1996-1997", MENU_POSITION, - "RGB*", + "RGB*,GRAY*", PROC_PLUG_IN, nargs, nreturn_vals, args, return_vals); diff --git a/plug-ins/xwd/xwd.c b/plug-ins/xwd/xwd.c index bad12fd84b..2aa4d0a8b7 100644 --- a/plug-ins/xwd/xwd.c +++ b/plug-ins/xwd/xwd.c @@ -42,8 +42,9 @@ * Set gimp b/w-colormap if no xwdcolormap present * V 1.91, PK, 05-Apr-97: Return all arguments, even in case of an error * V 1.92, PK, 12-Oct-97: No progress bars for non-interactive mode + * V 1.93, PK, 11-Apr-98: Fix problem with overwriting memory */ -static char ident[] = "@(#) GIMP XWD file-plugin v1.92 12-Oct-97"; +static char ident[] = "@(#) GIMP XWD file-plugin v1.93 11-Apr-98"; #include #include @@ -1275,7 +1276,7 @@ load_xwd_f2_d16_b16 (char *filename, data = g_malloc (tile_height * width * 3); /* Get memory for mapping 16 bit XWD-pixel to GIMP-RGB */ - maxval = 0xffff * 3; + maxval = 0x10000 * 3; ColorMap = (unsigned char *)g_malloc (maxval); if (ColorMap == NULL) {