summaryrefslogtreecommitdiff
path: root/do_lines.c
diff options
context:
space:
mode:
Diffstat (limited to 'do_lines.c')
-rw-r--r--do_lines.c64
1 files changed, 23 insertions, 41 deletions
diff --git a/do_lines.c b/do_lines.c
index a12c759..95dd810 100644
--- a/do_lines.c
+++ b/do_lines.c
@@ -21,16 +21,15 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************************/
+/* $XFree86: xc/programs/x11perf/do_lines.c,v 1.5 2001/01/17 23:45:11 dawes Exp $ */
#include "x11perf.h"
static XPoint *points;
static GC pgc;
-static void GenerateLines(xp, p, ddashed)
- XParms xp;
- Parms p;
- Bool ddashed;
+static void
+GenerateLines(XParms xp, Parms p, Bool ddashed)
{
int size;
int half; /* Half of width if wide line */
@@ -39,7 +38,7 @@ static void GenerateLines(xp, p, ddashed)
int x, y; /* Next point */
int xdir, ydir; /* Which direction x, y are going */
int bigxdir;
- int x1, y1; /* offsets to compute next point from current */
+ int x1 = 0, y1 = 0; /* offsets to compute next point from current */
int phase; /* how far into 0..4*(size_1) we are */
float phasef; /* how far we are in real numbers */
float phaseinc; /* how much to increment phasef at each segment */
@@ -164,20 +163,15 @@ static void GenerateLines(xp, p, ddashed)
}
}
-int InitLines(xp, p, reps)
- XParms xp;
- Parms p;
- int reps;
+int
+InitLines(XParms xp, Parms p, int reps)
{
GenerateLines(xp, p, False);
return reps;
}
-static int GenerateWideLines(xp, p, reps, ddashed)
- XParms xp;
- Parms p;
- int reps;
- Bool ddashed;
+static int
+GenerateWideLines(XParms xp, Parms p, int reps, Bool ddashed)
{
int size;
@@ -200,18 +194,14 @@ static int GenerateWideLines(xp, p, reps, ddashed)
return reps;
}
-int InitWideLines(xp, p, reps)
- XParms xp;
- Parms p;
- int reps;
+int
+InitWideLines(XParms xp, Parms p, int reps)
{
return GenerateWideLines(xp, p, reps, False);
}
-int InitDashedLines(xp, p, reps)
- XParms xp;
- Parms p;
- int reps;
+int
+InitDashedLines(XParms xp, Parms p, int reps)
{
char dashes[2];
@@ -226,10 +216,8 @@ int InitDashedLines(xp, p, reps)
return reps;
}
-int InitWideDashedLines(xp, p, reps)
- XParms xp;
- Parms p;
- int reps;
+int
+InitWideDashedLines(XParms xp, Parms p, int reps)
{
int size;
XGCValues gcv;
@@ -249,10 +237,8 @@ int InitWideDashedLines(xp, p, reps)
return reps;
}
-int InitDoubleDashedLines(xp, p, reps)
- XParms xp;
- Parms p;
- int reps;
+int
+InitDoubleDashedLines(XParms xp, Parms p, int reps)
{
char dashes[2];
@@ -267,10 +253,8 @@ int InitDoubleDashedLines(xp, p, reps)
return reps;
}
-int InitWideDoubleDashedLines(xp, p, reps)
- XParms xp;
- Parms p;
- int reps;
+int
+InitWideDoubleDashedLines(XParms xp, Parms p, int reps)
{
int size;
XGCValues gcv;
@@ -290,10 +274,8 @@ int InitWideDoubleDashedLines(xp, p, reps)
return reps;
}
-void DoLines(xp, p, reps)
- XParms xp;
- Parms p;
- int reps;
+void
+DoLines(XParms xp, Parms p, int reps)
{
int i;
@@ -308,12 +290,12 @@ void DoLines(xp, p, reps)
pgc = xp->fggc;
else
pgc = xp->bggc;
+ CheckAbort ();
}
}
-void EndLines(xp, p)
- XParms xp;
- Parms p;
+void
+EndLines(XParms xp, Parms p)
{
free(points);
}