diff options
Diffstat (limited to 'src/cmd/pic/misc.c')
-rw-r--r-- | src/cmd/pic/misc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/cmd/pic/misc.c b/src/cmd/pic/misc.c index 0a33c672..1ada1c1c 100644 --- a/src/cmd/pic/misc.c +++ b/src/cmd/pic/misc.c @@ -9,6 +9,7 @@ int whatpos(obj *p, int corner, double *px, double *py); void makeattr(int type, int sub, YYSTYPE val); YYSTYPE getblk(obj *, char *); +int setdir(int n) /* set direction (hvmode) from LEFT, RIGHT, etc. */ { switch (n) { @@ -20,6 +21,7 @@ setdir(int n) /* set direction (hvmode) from LEFT, RIGHT, etc. */ return(hvmode); } +int curdir(void) /* convert current dir (hvmode) to RIGHT, LEFT, etc. */ { switch (hvmode) { @@ -32,7 +34,8 @@ curdir(void) /* convert current dir (hvmode) to RIGHT, LEFT, etc. */ return 0; } -double getcomp(obj *p, int t) /* return component of a position */ +double +getcomp(obj *p, int t) /* return component of a position */ { switch (t) { case DOTX: @@ -207,7 +210,9 @@ int whatpos(obj *p, int corner, double *px, double *py) /* what is the position { double x, y, x1, y1; - dprintf("whatpos %o %d %d\n", p, p->o_type, corner); + x1 = y1 = 0.0; /* Botch? (gcc) */ + + dprintf("whatpos %p %d %d\n", p, p->o_type, corner); x = p->o_x; y = p->o_y; if (p->o_type != PLACE && p->o_type != MOVE) { @@ -320,7 +325,7 @@ obj *getlast(int n, int t) /* find n-th previous occurrence of type t */ dprintf("got a last of x,y= %g,%g\n", p->o_x, p->o_y); return(p); } - ERROR "there is no %dth last", n FATAL; + ERROR "there is no %dth last", n WARNING; return(NULL); } @@ -343,7 +348,7 @@ obj *getfirst(int n, int t) /* find n-th occurrence of type t */ dprintf("got a first of x,y= %g,%g\n", p->o_x, p->o_y); return(p); } - ERROR "there is no %dth ", n FATAL; + ERROR "there is no %dth ", n WARNING; return(NULL); } |