diff options
Diffstat (limited to 'usr/src/ucbcmd/plot/libplot/imagen')
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/arc.c | 34 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/box.c | 17 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/charset.c | 15 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/circle.c | 18 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/close.c | 18 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/cont.c | 18 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/dot.c | 18 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/erase.c | 19 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/label.c | 24 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/line.c | 30 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/linemod.c | 22 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/move.c | 19 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/open.c | 24 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/point.c | 18 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/scale.c | 20 | ||||
-rw-r--r-- | usr/src/ucbcmd/plot/libplot/imagen/space.c | 20 |
16 files changed, 176 insertions, 158 deletions
diff --git a/usr/src/ucbcmd/plot/libplot/imagen/arc.c b/usr/src/ucbcmd/plot/libplot/imagen/arc.c index 35e2d3f440..25bb2aebd2 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/arc.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/arc.c @@ -1,26 +1,30 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" int del = 20; -step(d){ + +void +step(int d) +{ del = d; } -arc(x,y,x0,y0,x1,y1){ + +void +arc(int x, int y, int x0, int y0, int x1, int y1) +{ double pc; double sqrt(); int flg,m,xc,yc,xs,ys,qs,qf; @@ -111,7 +115,10 @@ arc(x,y,x0,y0,x1,y1){ } } } -quad(x,y,xp,yp){ + +int +quad(int x,int y,int xp,int yp) +{ if(x < xp) if(y <= yp)return(1); else return(4); @@ -121,7 +128,10 @@ quad(x,y,xp,yp){ else if(y < yp)return(2); else return(4); } -abs(a){ + +int +abs(int a) +{ if(a < 0)return(-a); return(a); } diff --git a/usr/src/ucbcmd/plot/libplot/imagen/box.c b/usr/src/ucbcmd/plot/libplot/imagen/box.c index ce721eefec..57b9a92f88 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/box.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/box.c @@ -1,22 +1,21 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" -box(x0, y0, x1, y1) +void +box(int x0, int y0, int x1, int y1) { move(x0, y0); cont(x0, y1); diff --git a/usr/src/ucbcmd/plot/libplot/imagen/charset.c b/usr/src/ucbcmd/plot/libplot/imagen/charset.c index 5beefed61a..6e373812ae 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/charset.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/charset.c @@ -1,21 +1,20 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include "imp.h" + char *imP_charset = "cour07"; int imPcsize = 12; diff --git a/usr/src/ucbcmd/plot/libplot/imagen/circle.c b/usr/src/ucbcmd/plot/libplot/imagen/circle.c index 45bbe8bdf5..12666d94da 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/circle.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/circle.c @@ -1,21 +1,21 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" -circle(x,y,r){ +void +circle(int x, int y, int r) +{ arc(x,y,x+r,y,x+r,y); } diff --git a/usr/src/ucbcmd/plot/libplot/imagen/close.c b/usr/src/ucbcmd/plot/libplot/imagen/close.c index d5c38e003b..4c8be4c16a 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/close.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/close.c @@ -1,25 +1,25 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include "imp.h" #include "imPcodes.h" -closepl(){ +void +closepl(void) +{ putch(imP_ENDPAGE); fflush(stdout); } diff --git a/usr/src/ucbcmd/plot/libplot/imagen/cont.c b/usr/src/ucbcmd/plot/libplot/imagen/cont.c index f1d0c783d1..d4d86c2e14 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/cont.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/cont.c @@ -1,25 +1,25 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include <stdio.h> #include "imp.h" -cont(x,y){ +void +cont(int x, int y) +{ line(imPx, imPy, x, y); } diff --git a/usr/src/ucbcmd/plot/libplot/imagen/dot.c b/usr/src/ucbcmd/plot/libplot/imagen/dot.c index a9cf01dd0a..47521f8e66 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/dot.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/dot.c @@ -1,20 +1,20 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" -dot(){ +void +dot(void) +{ } diff --git a/usr/src/ucbcmd/plot/libplot/imagen/erase.c b/usr/src/ucbcmd/plot/libplot/imagen/erase.c index 7e6403fe48..a5e57b43b0 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/erase.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/erase.c @@ -1,24 +1,25 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include "imPcodes.h" #include "imp.h" -erase(){ + +void +erase(void) +{ int i; putch(imP_ENDPAGE); imPx = imPy = 0; diff --git a/usr/src/ucbcmd/plot/libplot/imagen/label.c b/usr/src/ucbcmd/plot/libplot/imagen/label.c index a25b4711ae..373f60c3b4 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/label.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/label.c @@ -1,28 +1,28 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include "imPcodes.h" #include "imp.h" -extern imPcsize; -label(s) -char *s; + +extern int imPcsize; + +void +label(char *s) { - register i,c; + int i,c; putch(imP_SET_ABS_H); putwd((int)((imPx-obotx)*scalex+botx)-imPcsize/2); putch(imP_SET_ABS_V); diff --git a/usr/src/ucbcmd/plot/libplot/imagen/line.c b/usr/src/ucbcmd/plot/libplot/imagen/line.c index 0a90fa6a57..f6d6081298 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/line.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/line.c @@ -1,30 +1,34 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include "imp.h" #include "imPcodes.h" + float obotx = 0.; float oboty = 0.; float botx = 2.; float boty = 2.; float scalex = 1.; float scaley = 1.; -line(x0,y0,x1,y1) + +void putch(int); +void putwd(int); + +void +line(int x0, int y0, int x1, int y1) { putch(imP_CREATE_PATH); putwd(2); /* two coordinates follow */ @@ -37,11 +41,15 @@ line(x0,y0,x1,y1) imPx = x1; imPy = y1; } -putch(c) + +void +putch(int c) { putc(c, stdout); } -putwd(w) + +void +putwd(int w) { putch(w>>8); putch(w); diff --git a/usr/src/ucbcmd/plot/libplot/imagen/linemod.c b/usr/src/ucbcmd/plot/libplot/imagen/linemod.c index 9ba7b31ef9..7071d42fca 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/linemod.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/linemod.c @@ -1,31 +1,29 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include "imp.h" /* * Hack to set font. */ -linemod(s) -char *s; +void +linemod(char *s) { - register char *tit; - register char *nam; + char *tit; + char *nam; int siz = 0; nam = s; for(tit = "charset="; *tit; ) diff --git a/usr/src/ucbcmd/plot/libplot/imagen/move.c b/usr/src/ucbcmd/plot/libplot/imagen/move.c index ea954ebd18..14f6208efe 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/move.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/move.c @@ -1,23 +1,24 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include "imp.h" -move(xi,yi){ + +void +move(int xi, int yi) +{ imPx = xi; imPy = yi; } diff --git a/usr/src/ucbcmd/plot/libplot/imagen/open.c b/usr/src/ucbcmd/plot/libplot/imagen/open.c index 4f51b9636c..4a944d1f12 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/open.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/open.c @@ -1,25 +1,27 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" #include "imPcodes.h" #include "imp.h" -openpl(){ +void setfont(char *, int); + +void +openpl(void) +{ putch(imP_SET_HV_SYSTEM); putch((3<<3)|5); @@ -37,7 +39,9 @@ openpl(){ putch(imP_SET_ABS_V); putwd(0); } -setfont(c, sz) char *c; int sz; + +void +setfont(char *c, int sz) { imPcsize = sz; putch(imP_CREATE_FAMILY_TABLE); diff --git a/usr/src/ucbcmd/plot/libplot/imagen/point.c b/usr/src/ucbcmd/plot/libplot/imagen/point.c index 21e7bde131..93f7313603 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/point.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/point.c @@ -1,21 +1,21 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" -point(xi,yi){ +void +point(int xi, int yi) +{ line(xi,yi,xi,yi); } diff --git a/usr/src/ucbcmd/plot/libplot/imagen/scale.c b/usr/src/ucbcmd/plot/libplot/imagen/scale.c index 5311f551fe..c7f7011427 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/scale.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/scale.c @@ -1,27 +1,25 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" extern float scalex; extern float scaley; extern int scaleflag; -scale(i,x,y) -char i; -float x,y; + +void +scale(char i, float x, float y) { switch(i) { default: diff --git a/usr/src/ucbcmd/plot/libplot/imagen/space.c b/usr/src/ucbcmd/plot/libplot/imagen/space.c index cf600c906a..a82d988c35 100644 --- a/usr/src/ucbcmd/plot/libplot/imagen/space.c +++ b/usr/src/ucbcmd/plot/libplot/imagen/space.c @@ -1,20 +1,18 @@ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" extern float botx; extern float boty; @@ -24,9 +22,11 @@ extern float scalex; extern float scaley; int PlotRes = DEFRES; - int scaleflag; -space(x0,y0,x1,y1){ + +void +space(int x0, int y0, int x1, int y1) +{ botx = 2.; boty = 2.; obotx = x0; |