summaryrefslogtreecommitdiff
path: root/usr/src/ucbcmd/plot/libplot/t450
diff options
context:
space:
mode:
authorceastha <none@none>2005-08-18 15:40:59 -0700
committerceastha <none@none>2005-08-18 15:40:59 -0700
commitb7d62af5b42f0da2eb668e8d33d24d2f4fdd98a8 (patch)
tree365a354cfe8236488955cf206e4f43644ca03ea0 /usr/src/ucbcmd/plot/libplot/t450
parentd6555420322a42c16b93414c29a62f8e841abc7b (diff)
downloadillumos-gate-b7d62af5b42f0da2eb668e8d33d24d2f4fdd98a8.tar.gz
6268906 ucbcmd/plot and gcc don't get along
6271073 gcc and cmd/fmt don't get along 6271996 gcc and cmd/mail don't get along 6272084 gcc and cmd/pax don't get along 6273914 gcc and cmd/tar don't get along --HG-- rename : usr/src/cmd/fmt/head.c => deleted_files/usr/src/cmd/fmt/head.c rename : usr/src/cmd/mail/maid.c => deleted_files/usr/src/cmd/mail/maid.c
Diffstat (limited to 'usr/src/ucbcmd/plot/libplot/t450')
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/arc.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/box.c16
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/circle.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/close.c23
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/dot.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/erase.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/label.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/line.c28
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/linmod.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/move.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/open.c48
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/point.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/space.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/t450/subr.c60
14 files changed, 189 insertions, 142 deletions
diff --git a/usr/src/ucbcmd/plot/libplot/t450/arc.c b/usr/src/ucbcmd/plot/libplot/t450/arc.c
index 8be09951b5..408fd8f923 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/arc.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/arc.c
@@ -19,16 +19,17 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
-
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-arc(){
+void
+arc(void)
+{
}
diff --git a/usr/src/ucbcmd/plot/libplot/t450/box.c b/usr/src/ucbcmd/plot/libplot/t450/box.c
index 190476f237..e6ec1533c2 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/box.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/box.c
@@ -19,18 +19,18 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
-
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-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/t450/circle.c b/usr/src/ucbcmd/plot/libplot/t450/circle.c
index d29326de64..f6a0a988fd 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/circle.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/circle.c
@@ -19,16 +19,17 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
-
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-circle(){
+void
+circle(void)
+{
}
diff --git a/usr/src/ucbcmd/plot/libplot/t450/close.c b/usr/src/ucbcmd/plot/libplot/t450/close.c
index ef9737b830..b67558c87c 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/close.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/close.c
@@ -19,22 +19,29 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
+#include <stdio.h>
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
+void closepl(void);
-#include <stdio.h>
-closevt(){
+void
+closevt(void)
+{
closepl();
}
-closepl(){
+
+void
+closepl(void)
+{
fflush(stdout);
reset();
}
diff --git a/usr/src/ucbcmd/plot/libplot/t450/dot.c b/usr/src/ucbcmd/plot/libplot/t450/dot.c
index 06dde59777..a3ecc9bd43 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/dot.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/dot.c
@@ -19,16 +19,17 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
-
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-dot(){
+void
+dot(void)
+{
}
diff --git a/usr/src/ucbcmd/plot/libplot/t450/erase.c b/usr/src/ucbcmd/plot/libplot/t450/erase.c
index 969a1d5f63..961ec87d08 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/erase.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/erase.c
@@ -19,19 +19,21 @@
*
* CDDL HEADER END
*/
+/*
+ * 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) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
+#pragma ident "%Z%%M% %I% %E% SMI"
#include "con.h"
-erase(){
+
+void
+erase(void)
+{
int i;
for(i=0; i<11*(VERTRESP/VERTRES); i++)
spew(DOWN);
diff --git a/usr/src/ucbcmd/plot/libplot/t450/label.c b/usr/src/ucbcmd/plot/libplot/t450/label.c
index 0cc08977cc..abef1ac459 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/label.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/label.c
@@ -19,20 +19,20 @@
*
* CDDL HEADER END
*/
+/*
+ * 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) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
+#pragma ident "%Z%%M% %I% %E% SMI"
#include "con.h"
-label(s)
-char *s;
+
+void
+label(char *s)
{
int i,c;
while((c = *s++) != '\0'){
diff --git a/usr/src/ucbcmd/plot/libplot/t450/line.c b/usr/src/ucbcmd/plot/libplot/t450/line.c
index 226fee3148..3aa35fd288 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/line.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/line.c
@@ -19,27 +19,37 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
+#include "con.h"
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
+void iline(int, int, int, int);
-#include "con.h"
-line(x0,y0,x1,y1){
+void
+line(int x0, int y0, int x1, int y1)
+{
iline(xconv(xsc(x0)),yconv(ysc(y0)),xconv(xsc(x1)),yconv(ysc(y1)));
return;
}
-cont(x0,y0){
+
+void
+cont(int x0, int y0)
+{
iline(xnow,ynow,xconv(xsc(x0)),yconv(ysc(y0)));
return;
}
-iline(cx0,cy0,cx1,cy1){
+
+void
+iline(int cx0, int cy0, int cx1, int cy1)
+{
int maxp,tt,j,np;
char chx,chy;
float xd,yd;
diff --git a/usr/src/ucbcmd/plot/libplot/t450/linmod.c b/usr/src/ucbcmd/plot/libplot/t450/linmod.c
index b1731bdbe9..897c62ea19 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/linmod.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/linmod.c
@@ -19,16 +19,17 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
-
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-linemod(){
+void
+linemod(void)
+{
}
diff --git a/usr/src/ucbcmd/plot/libplot/t450/move.c b/usr/src/ucbcmd/plot/libplot/t450/move.c
index a0b158bf8d..74983e7ba4 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/move.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/move.c
@@ -19,18 +19,19 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
-
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-move(xi,yi){
+void
+move(int xi, int yi)
+{
movep(xconv(xsc(xi)),yconv(ysc(yi)));
return;
}
diff --git a/usr/src/ucbcmd/plot/libplot/t450/open.c b/usr/src/ucbcmd/plot/libplot/t450/open.c
index 6171d87d47..1e9654329e 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/open.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/open.c
@@ -19,34 +19,33 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
-
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-#
#include <sgtty.h>
+
/* gsi plotting output routines */
-# define DOWN 012
-# define UP 013
-# define LEFT 010
-# define RIGHT 040
-# define BEL 007
-# define ACK 006
+#define DOWN 012
+#define UP 013
+#define LEFT 010
+#define RIGHT 040
+#define BEL 007
+#define ACK 006
#define PLOTIN 063
#define PLOTOUT 064
-# define CR 015
-# define FF 014
-# define VERTRESP 48
-# define HORZRESP 60.
-# define HORZRES 6.
-# define VERTRES 8.
+#define CR 015
+#define FF 014
+#define VERTRESP 48
+#define HORZRESP 60.
+#define HORZRES 6.
+#define VERTRES 8.
/* down is line feed, up is reverse oyne feed,
left is bwckspace, right is space. 48 points per inch
vertically, 60 horizontally */
@@ -59,7 +58,8 @@ int xscale, xoffset, yscale;
float botx = 0., boty = 0., obotx = 0., oboty = 0.;
float scalex = 1., scaley = 1.;
-openpl ()
+void
+openpl(void)
{
int reset();
xnow = ynow = 0;
@@ -77,6 +77,8 @@ openpl ()
return;
}
-openvt(){
-openpl();
+void
+openvt(void)
+{
+ openpl();
}
diff --git a/usr/src/ucbcmd/plot/libplot/t450/point.c b/usr/src/ucbcmd/plot/libplot/t450/point.c
index 7389adde38..eea1f16f3c 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/point.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/point.c
@@ -19,18 +19,19 @@
*
* CDDL HEADER END
*/
+/*
+ * 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 */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
-
-/*
- * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-point(xi,yi){
+void
+point(int xi, int yi)
+{
move(xi,yi);
label(".");
return;
diff --git a/usr/src/ucbcmd/plot/libplot/t450/space.c b/usr/src/ucbcmd/plot/libplot/t450/space.c
index 70f60955d4..6f0c5a2606 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/space.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/space.c
@@ -19,19 +19,21 @@
*
* CDDL HEADER END
*/
+/*
+ * 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) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
+#pragma ident "%Z%%M% %I% %E% SMI"
# include "con.h"
-space(x0,y0,x1,y1){
+
+void
+space(int x0, int y0, int x1, int y1)
+{
botx = -2047.;
boty = -2047.;
obotx = x0;
diff --git a/usr/src/ucbcmd/plot/libplot/t450/subr.c b/usr/src/ucbcmd/plot/libplot/t450/subr.c
index 05fb7841a7..3f491c6705 100644
--- a/usr/src/ucbcmd/plot/libplot/t450/subr.c
+++ b/usr/src/ucbcmd/plot/libplot/t450/subr.c
@@ -19,25 +19,29 @@
*
* CDDL HEADER END
*/
+/*
+ * 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) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
+#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include "con.h"
-abval(q)
+
+void spew(int);
+
+int
+abval(int q)
{
return (q>=0 ? q : -q);
}
-xconv (xp)
+int
+xconv(int xp)
{
/* x position input is -2047 to +2047, output must be 0 to PAGSIZ*HORZRES */
xp += 2048;
@@ -45,27 +49,31 @@ xconv (xp)
return (xoffset + xp /xscale);
}
-yconv (yp)
+int
+yconv(int yp)
{
/* see description of xconv */
yp += 2048;
return (yp / yscale);
}
-inplot()
+void
+inplot(void)
{
spew (ESC);
spew(PLOTIN);
}
-outplot()
+void
+outplot(void)
{
spew(ESC);
spew(PLOTOUT);
fflush(stdout);
}
-spew(ch)
+void
+spew(int ch)
{
if(ch == UP){
putc(ESC,stdout);
@@ -74,11 +82,14 @@ spew(ch)
putc(ch, stdout);
}
-tobotleft ()
+void
+tobotleft(void)
{
move(-2048,-2048);
}
-reset()
+
+void
+reset(void)
{
signal(2,1);
outplot();
@@ -87,7 +98,7 @@ reset()
}
float
-dist2 (x1, y1, x2, y2)
+dist2(int x1, int y1, int x2, int y2)
{
float t,v;
t = x2-x1;
@@ -95,15 +106,17 @@ dist2 (x1, y1, x2, y2)
return (t*t+v*v);
}
-swap (pa, pb)
-int *pa, *pb;
+void
+swap(int *pa, int *pb)
{
int t;
t = *pa;
*pa = *pb;
*pb = t;
}
-movep (xg,yg)
+
+void
+movep(int xg, int yg)
{
int i,ch;
if((xg == xnow) && (yg == ynow))return;
@@ -136,12 +149,17 @@ movep (xg,yg)
xnow = xg; ynow = yg;
}
-xsc(xi){
+int
+xsc(int xi)
+{
int xa;
xa = (xi - obotx) * scalex + botx;
return(xa);
}
-ysc(yi){
+
+int
+ysc(int yi)
+{
int ya;
ya = (yi - oboty) *scaley +boty;
return(ya);