Commit fe876df0 authored by Manish Singh's avatar Manish Singh

Misc fixes for DEC OSF1

-Yosh
parent 6b508113
Sun Jan 25 13:28:28 PST 1998 Manish Singh <yosh@gimp.org>
* libgimp/gimppixelrgn.c
* plug-ins/iwarp/iwarp.c
* plug-ins/sparkle/sparkle.c: Misc portability fixes for
DEC OSF1 (gimp-joke-980109-0)
Sun Jan 25 02:24:03 PST 1998 Manish Singh <yosh@gimp.org> Sun Jan 25 02:24:03 PST 1998 Manish Singh <yosh@gimp.org>
* libgimp/*: Placed libgimp under the LGPL * libgimp/*: Placed libgimp under the LGPL
......
...@@ -157,7 +157,7 @@ gimp_pixel_rgn_get_row (GPixelRgn *pr, ...@@ -157,7 +157,7 @@ gimp_pixel_rgn_get_row (GPixelRgn *pr,
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y); tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
gimp_tile_ref (tile); gimp_tile_ref (tile);
tile_data = tile->data + tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)); tile_data = tile->data + (int)tile->bpp * (int)(tile->ewidth * (int)(y % TILE_HEIGHT) + (x % TILE_WIDTH));
boundary = x + (tile->ewidth - (x % TILE_WIDTH)); boundary = x + (tile->ewidth - (x % TILE_WIDTH));
bpp = tile->bpp; bpp = tile->bpp;
......
...@@ -1355,21 +1355,23 @@ iwarp_motion_callback(GtkWidget *widget, ...@@ -1355,21 +1355,23 @@ iwarp_motion_callback(GtkWidget *widget,
int x,y; int x,y;
mb = (GdkEventButton*) event; mb = (GdkEventButton*) event;
x = mb->x;
y = mb->y;
switch (event->type) { switch (event->type) {
case GDK_BUTTON_PRESS: case GDK_BUTTON_PRESS:
lastx = x; lastx = mb->x;
lasty = y; lasty = mb->y;
break; break;
case GDK_BUTTON_RELEASE: case GDK_BUTTON_RELEASE:
if (mb->state & GDK_BUTTON1_MASK) { if (mb->state & GDK_BUTTON1_MASK) {
x = mb->x;
y = mb->y;
if (iwarp_vals.do_move) iwarp_move(x,y,lastx,lasty); if (iwarp_vals.do_move) iwarp_move(x,y,lastx,lasty);
else iwarp_deform(x, y,0.0,0.0); else iwarp_deform(x, y,0.0,0.0);
} }
break; break;
case GDK_MOTION_NOTIFY : case GDK_MOTION_NOTIFY :
if (mb->state & GDK_BUTTON1_MASK) { if (mb->state & GDK_BUTTON1_MASK) {
x = mb->x;
y = mb->y;
if (iwarp_vals.do_move) iwarp_move(x,y,lastx,lasty); if (iwarp_vals.do_move) iwarp_move(x,y,lastx,lasty);
else iwarp_deform(x, y,0.0,0.0); else iwarp_deform(x, y,0.0,0.0);
lastx = x; lastx = x;
......
...@@ -637,7 +637,7 @@ fspike (GPixelRgn *dest_rgn, ...@@ -637,7 +637,7 @@ fspike (GPixelRgn *dest_rgn,
gimp_pixel_rgn_get_pixel (dest_rgn, pixel, x, y); gimp_pixel_rgn_get_pixel (dest_rgn, pixel, x, y);
for (b = 0; b < bytes; b++) for (b = 0; b < bytes; b++)
val[b] = (gdouble) pixel[b] / 255.0; val[b] = (gdouble) (gint)pixel[b] / 255.0;
/* increase saturation to full for color image */ /* increase saturation to full for color image */
if (! gray) if (! gray)
......
...@@ -1355,21 +1355,23 @@ iwarp_motion_callback(GtkWidget *widget, ...@@ -1355,21 +1355,23 @@ iwarp_motion_callback(GtkWidget *widget,
int x,y; int x,y;
mb = (GdkEventButton*) event; mb = (GdkEventButton*) event;
x = mb->x;
y = mb->y;
switch (event->type) { switch (event->type) {
case GDK_BUTTON_PRESS: case GDK_BUTTON_PRESS:
lastx = x; lastx = mb->x;
lasty = y; lasty = mb->y;
break; break;
case GDK_BUTTON_RELEASE: case GDK_BUTTON_RELEASE:
if (mb->state & GDK_BUTTON1_MASK) { if (mb->state & GDK_BUTTON1_MASK) {
x = mb->x;
y = mb->y;
if (iwarp_vals.do_move) iwarp_move(x,y,lastx,lasty); if (iwarp_vals.do_move) iwarp_move(x,y,lastx,lasty);
else iwarp_deform(x, y,0.0,0.0); else iwarp_deform(x, y,0.0,0.0);
} }
break; break;
case GDK_MOTION_NOTIFY : case GDK_MOTION_NOTIFY :
if (mb->state & GDK_BUTTON1_MASK) { if (mb->state & GDK_BUTTON1_MASK) {
x = mb->x;
y = mb->y;
if (iwarp_vals.do_move) iwarp_move(x,y,lastx,lasty); if (iwarp_vals.do_move) iwarp_move(x,y,lastx,lasty);
else iwarp_deform(x, y,0.0,0.0); else iwarp_deform(x, y,0.0,0.0);
lastx = x; lastx = x;
......
...@@ -637,7 +637,7 @@ fspike (GPixelRgn *dest_rgn, ...@@ -637,7 +637,7 @@ fspike (GPixelRgn *dest_rgn,
gimp_pixel_rgn_get_pixel (dest_rgn, pixel, x, y); gimp_pixel_rgn_get_pixel (dest_rgn, pixel, x, y);
for (b = 0; b < bytes; b++) for (b = 0; b < bytes; b++)
val[b] = (gdouble) pixel[b] / 255.0; val[b] = (gdouble) (gint)pixel[b] / 255.0;
/* increase saturation to full for color image */ /* increase saturation to full for color image */
if (! gray) if (! gray)
......
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