summaryrefslogtreecommitdiff
path: root/do_tris.c
diff options
context:
space:
mode:
Diffstat (limited to 'do_tris.c')
-rw-r--r--do_tris.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/do_tris.c b/do_tris.c
index 0a8d511..6605fd1 100644
--- a/do_tris.c
+++ b/do_tris.c
@@ -1,3 +1,6 @@
+
+
+
/*****************************************************************************
Copyright 1988, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
@@ -58,7 +61,7 @@ Distance(XPoint p1, XPoint p2)
int
InitTriangles(XParms xp, Parms p, int64_t reps)
{
- int i, j, numPoints;
+ int numPoints;
int rows;
int x, y;
int size, iradius;
@@ -95,8 +98,8 @@ InitTriangles(XParms xp, Parms p, int64_t reps)
rows = 0;
aarea = 0.0;
- for (i = 0; i != p->objects; i++) {
- for (j = 0; j != NUM_POINTS; j++) {
+ for (int i = 0; i != p->objects; i++) {
+ for (int j = 0; j != NUM_POINTS; j++) {
phi2 = phi + ((double) j) * delta;
curPoint->x = (int) ((double)x + (radius * cos(phi2)) + 0.5);
curPoint->y = (int) ((double)y + (radius * sin(phi2)) + 0.5);
@@ -134,12 +137,9 @@ InitTriangles(XParms xp, Parms p, int64_t reps)
void
DoTriangles(XParms xp, Parms p, int64_t reps)
{
- int i, j;
- XPoint *curPoint;
-
- for (i = 0; i != reps; i++) {
- curPoint = points;
- for (j = 0; j != p->objects; j++) {
+ for (int i = 0; i != reps; i++) {
+ XPoint *curPoint = points;
+ for (int j = 0; j != p->objects; j++) {
XFillPolygon(xp->d, xp->w, pgc, curPoint, NUM_POINTS, Convex,
CoordModeOrigin);
curPoint += NUM_POINTS;
@@ -209,10 +209,7 @@ XPolyTriangle(register Display *dpy,
void
DoTriangles(XParms xp, Parms p, int64_t reps)
{
- int i, j;
- XPoint *curPoint;
-
- for (i = 0; i != reps; i++) {
+ for (int i = 0; i != reps; i++) {
XPolyTriangle (xp->d, xp->w, pgc, points, p->objects, Convex,
CoordModeOrigin);
if (pgc == xp->bggc)