summaryrefslogtreecommitdiff
path: root/transform.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-12 18:53:19 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-12 18:53:19 -0200
commit11e13bdf2bdc6cdc7f7d27427016eaf8c9ad48c3 (patch)
tree36961b4b43bcb098d72a983e655971f019118791 /transform.c
parent8509d5cc01607e19590571b4e0d941b0e5900052 (diff)
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects make distcheck and all gcc 4.3 and sparse warnings.
Diffstat (limited to 'transform.c')
-rw-r--r--transform.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/transform.c b/transform.c
index 2b662d2..8b900fb 100644
--- a/transform.c
+++ b/transform.c
@@ -47,7 +47,7 @@ TranslatePoints(TPoint *points, int n_points,
xpoints = (XPoint *) malloc ((unsigned)n_points * sizeof (*xpoints));
if (!xpoints)
- return 0;
+ return NULL;
for (i = 0; i < n_points; i++) {
xpoints[i].x = Xx(points[i].x + xoff, points[i].y + yoff, t);
xpoints[i].y = Xy(points[i].x + xoff, points[i].y + yoff, t);
@@ -60,15 +60,8 @@ TranslatePoints(TPoint *points, int n_points,
}
void
-TFillPolygon (dpy, d, gc, t, points, n_points, shape, mode)
-register Display *dpy;
-Drawable d;
-GC gc;
-Transform *t;
-TPoint *points;
-int n_points;
-int shape;
-int mode;
+TFillPolygon (register Display *dpy, Drawable d, GC gc, Transform *t,
+ TPoint *points, int n_points, int shape, int mode)
{
XPoint *xpoints;
@@ -81,13 +74,9 @@ int mode;
}
void
-TDrawArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
- register Display *dpy;
- Drawable d;
- GC gc;
- Transform *t;
- double x, y, width, height;
- int angle1, angle2;
+TDrawArc (register Display *dpy, Drawable d, GC gc, Transform *t,
+ double x, double y, double width, double height,
+ int angle1, int angle2)
{
int xx, xy, xw, xh;
@@ -107,13 +96,9 @@ TDrawArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
}
void
-TFillArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
- register Display *dpy;
- Drawable d;
- GC gc;
- Transform *t;
- double x, y, width, height;
- int angle1, angle2;
+TFillArc (register Display *dpy, Drawable d, GC gc, Transform *t,
+ double x, double y, double width, double height,
+ int angle1, int angle2)
{
int xx, xy, xw, xh;
@@ -133,10 +118,8 @@ TFillArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
}
void
-SetTransform (t, xx1, xx2, xy1, xy2, tx1, tx2, ty1, ty2)
-Transform *t;
-int xx1, xx2, xy1, xy2;
-double tx1, tx2, ty1, ty2;
+SetTransform (Transform *t, int xx1, int xx2, int xy1, int xy2,
+ double tx1, double tx2, double ty1, double ty2)
{
t->mx = ((double) xx2 - xx1) / (tx2 - tx1);
t->bx = ((double) xx1) - t->mx * tx1;