aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/pic/arcgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/pic/arcgen.c')
-rw-r--r--src/cmd/pic/arcgen.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/cmd/pic/arcgen.c b/src/cmd/pic/arcgen.c
index d1b64224..bec41e47 100644
--- a/src/cmd/pic/arcgen.c
+++ b/src/cmd/pic/arcgen.c
@@ -11,17 +11,19 @@ obj *arcgen(int type) /* handles circular and (eventually) elliptical arcs */
static double prevw = HT10;
static double prevh = HT5;
static double prevrad = HT2;
- static int dtox[2][4] ={ 1, -1, -1, 1, 1, 1, -1, -1 };
- static int dtoy[2][4] ={ 1, 1, -1, -1, -1, 1, 1, -1 };
- static int dctrx[2][4] ={ 0, -1, 0, 1, 0, 1, 0, -1 };
- static int dctry[2][4] ={ 1, 0, -1, 0, -1, 0, 1, 0 };
- static int nexthv[2][4] ={ U_DIR, L_DIR, D_DIR, R_DIR, D_DIR, R_DIR, U_DIR, L_DIR };
+ static int dtox[2][4] ={ { 1, -1, -1, 1}, {1, 1, -1, -1} };
+ static int dtoy[2][4] ={ {1, 1, -1, -1}, {-1, 1, 1, -1} };
+ static int dctrx[2][4] ={ {0, -1, 0, 1}, {0, 1, 0, -1} };
+ static int dctry[2][4] ={ {1, 0, -1, 0}, {-1, 0, 1, 0} };
+ static int nexthv[2][4] ={ {U_DIR, L_DIR, D_DIR, R_DIR}, {D_DIR, R_DIR, U_DIR, L_DIR} };
double dx2, dy2, ht, phi, r, d;
int i, head, to, at, cw, invis, ddtype, battr;
obj *p, *ppos;
double fromx, fromy, tox, toy, fillval = 0;
Attr *ap;
+ tox=toy=0.0; /* Botch? (gcc) */
+
prevrad = getfval("arcrad");
prevh = getfval("arrowht");
prevw = getfval("arrowwid");
@@ -210,6 +212,7 @@ void arc_extreme(double x0, double y0, double x1, double y1, double xc, double y
extreme(xmax, ymax);
}
+int
quadrant(double x, double y)
{
if ( x>=0.0 && y> 0.0) return(1);