Cast uints to ints in geometry calculations. This should prevent FP

Mon Feb  1 14:54:28 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklabel.c (gtk_label_expose): Cast uints
	  to ints in geometry calculations. This should
	  prevent FP exceptions on FreeBSD when quantities
	  become negative. [ Actually, this is probably
	  a workaround with a gcc bug with handling of
	  bitfields, according to Ben Jackson <ben@ben.com> ]
This commit is contained in:
Owen Taylor 1999-02-01 21:05:32 +00:00 committed by Owen Taylor
parent 2e2d959bff
commit a512f0b841
8 changed files with 72 additions and 7 deletions

View File

@ -1,3 +1,12 @@
Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_expose): Cast uints
to ints in geometry calculations. This should
prevent FP exceptions on FreeBSD when quantities
become negative. [ Actually, this is probably
a workaround with a gcc bug with handling of
bitfields, according to Ben Jackson <ben@ben.com> ]
Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org>
* examples/Makefile: update to new examples

View File

@ -1,3 +1,12 @@
Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_expose): Cast uints
to ints in geometry calculations. This should
prevent FP exceptions on FreeBSD when quantities
become negative. [ Actually, this is probably
a workaround with a gcc bug with handling of
bitfields, according to Ben Jackson <ben@ben.com> ]
Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org>
* examples/Makefile: update to new examples

View File

@ -1,3 +1,12 @@
Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_expose): Cast uints
to ints in geometry calculations. This should
prevent FP exceptions on FreeBSD when quantities
become negative. [ Actually, this is probably
a workaround with a gcc bug with handling of
bitfields, according to Ben Jackson <ben@ben.com> ]
Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org>
* examples/Makefile: update to new examples

View File

@ -1,3 +1,12 @@
Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_expose): Cast uints
to ints in geometry calculations. This should
prevent FP exceptions on FreeBSD when quantities
become negative. [ Actually, this is probably
a workaround with a gcc bug with handling of
bitfields, according to Ben Jackson <ben@ben.com> ]
Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org>
* examples/Makefile: update to new examples

View File

@ -1,3 +1,12 @@
Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_expose): Cast uints
to ints in geometry calculations. This should
prevent FP exceptions on FreeBSD when quantities
become negative. [ Actually, this is probably
a workaround with a gcc bug with handling of
bitfields, according to Ben Jackson <ben@ben.com> ]
Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org>
* examples/Makefile: update to new examples

View File

@ -1,3 +1,12 @@
Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_expose): Cast uints
to ints in geometry calculations. This should
prevent FP exceptions on FreeBSD when quantities
become negative. [ Actually, this is probably
a workaround with a gcc bug with handling of
bitfields, according to Ben Jackson <ben@ben.com> ]
Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org>
* examples/Makefile: update to new examples

View File

@ -1,3 +1,12 @@
Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_expose): Cast uints
to ints in geometry calculations. This should
prevent FP exceptions on FreeBSD when quantities
become negative. [ Actually, this is probably
a workaround with a gcc bug with handling of
bitfields, according to Ben Jackson <ben@ben.com> ]
Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org>
* examples/Makefile: update to new examples

View File

@ -927,14 +927,16 @@ gtk_label_expose (GtkWidget *widget,
gdk_gc_set_clip_rectangle (widget->style->white_gc, &event->area);
gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], &event->area);
x = floor (widget->allocation.x + misc->xpad +
((widget->allocation.width - label->max_width - 2 * misc->xpad)
* misc->xalign) + 0.5);
x = floor (widget->allocation.x + (gint)misc->xpad
+ (((gint)widget->allocation.width -
(gint)label->max_width - 2 * (gint)misc->xpad)
* misc->xalign) + 0.5);
y = floor (widget->allocation.y
+ (widget->allocation.height
- widget->requisition.height) * misc->yalign
+ misc->ypad + 0.5);
y = floor (widget->allocation.y + (gint)misc->ypad
+ (((gint)widget->allocation.height
- (gint)widget->requisition.height)
* misc->yalign) + 0.5);
for (word = label->words; word; word = word->next)
{
gchar save = word->beginning[word->length];