From 5f1cf8e6fb130fd48d6f016d13baf5408b3181f8 Mon Sep 17 00:00:00 2001 From: wkj Date: Sun, 16 May 2004 07:56:41 +0000 Subject: Checkpoint: pull in mpm; merge pic from Taj's version of the world --- src/cmd/pic/arcgen.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/cmd/pic/arcgen.c') 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); -- cgit v1.2.3