1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
Author: Andreas Beckmann <anbe@debian.org>
Description: fix building with -Werror=implicit-int
--- a/libXg/arith.c
+++ b/libXg/arith.c
@@ -107,17 +107,20 @@ rshift(Rectangle r, int a)
return r;
}
+int
eqpt(Point p, Point q)
{
return p.x==q.x && p.y==q.y;
}
+int
eqrect(Rectangle r, Rectangle s)
{
return r.min.x==s.min.x && r.max.x==s.max.x &&
r.min.y==s.min.y && r.max.y==s.max.y;
}
+int
rectXrect(Rectangle r, Rectangle s)
{
return r.min.x<s.max.x && s.min.x<r.max.x &&
@@ -134,6 +137,7 @@ rectinrect(Rectangle r, Rectangle s)
return r.max.x<=s.max.x && r.max.y<=s.max.y;
}
+int
ptinrect(Point p, Rectangle r)
{
return p.x>=r.min.x && p.x<r.max.x &&
--- a/libXg/clipline.c
+++ b/libXg/clipline.c
@@ -133,6 +133,7 @@ gsetline(Point *pp0, Point *pp1, Linedes
*/
static
+int
code(Point *p, Rectangle *r)
{
return( (p->x<r->min.x? 1 : p->x>=r->max.x? 2 : 0) |
--- a/libXg/gcs.c
+++ b/libXg/gcs.c
@@ -160,7 +160,7 @@ GC
_getgc(Bitmap *b, unsigned long gcvm, XGCValues *pgcv)
{
static GC gc0, gcn;
- static clipset = 0;
+ static int clipset = 0;
GC g;
XRectangle xr;
--- a/libXg/rectclip.c
+++ b/libXg/rectclip.c
@@ -2,6 +2,7 @@
#include <libc.h>
#include <libg.h>
+int
rectclip(Rectangle *rp, Rectangle b) /* first by reference, second by value */
{
Rectangle *bp = &b;
|