summaryrefslogtreecommitdiff
path: root/usr/src/ucbcmd/plot/libplot/hp2648
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/ucbcmd/plot/libplot/hp2648')
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/arc.c22
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/box.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/circle.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/close.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/cont.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/dot.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/erase.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/label.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/line.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/linemod.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/move.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/open.c17
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/point.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/space.c18
-rw-r--r--usr/src/ucbcmd/plot/libplot/hp2648/subr.c26
15 files changed, 127 insertions, 151 deletions
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/arc.c b/usr/src/ucbcmd/plot/libplot/hp2648/arc.c
index 6380a8ae49..dccf2956b9 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/arc.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/arc.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-arc(xcent,ycent,xbeg,ybeg,xend,yend)
-int xcent,ycent,xbeg,ybeg,xend,yend;
+void
+arc(int xcent, int ycent, int xbeg, int ybeg, int xend, int yend)
{
double costheta,sintheta,x,y,xn,r;
double x1,y1,x2,y2;
@@ -50,8 +48,8 @@ int xcent,ycent,xbeg,ybeg,xend,yend;
} while( crosspflag == 0 || crossp >0);
}
-cross_product(x1,y1,x2,y2,x3,y3)
-double x1,x2,x3,y1,y2,y3;
+int
+cross_product(double x1, double y1, double x2, double y2, double x3, double y3)
{
double z,a,b;
a = (y3-y2)*(x2-x1);
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/box.c b/usr/src/ucbcmd/plot/libplot/hp2648/box.c
index ce721eefec..57b9a92f88 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/box.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/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/hp2648/circle.c b/usr/src/ucbcmd/plot/libplot/hp2648/circle.c
index 692e3302fc..6a56f8f262 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/circle.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/circle.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-circle (xc,yc,r)
-int xc,yc,r;
+void
+circle(int xc, int yc, int r)
{
double costheta,sintheta,x,y,xn;
int xi,yi;
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/close.c b/usr/src/ucbcmd/plot/libplot/hp2648/close.c
index f364793348..fb66e77017 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/close.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/close.c
@@ -1,24 +1,23 @@
+/*
+ * 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 "hp2648.h"
-closepl()
+void
+closepl(void)
{
putchar('Z');
fflush(stdout);
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/cont.c b/usr/src/ucbcmd/plot/libplot/hp2648/cont.c
index 84ca2d0000..a86471858a 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/cont.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/cont.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-cont(xi,yi)
-int xi,yi;
+void
+cont(int xi, int yi)
{
char xb1,xb2,yb1,yb2;
itoa(xsc(xi),&xb1,&xb2);
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/dot.c b/usr/src/ucbcmd/plot/libplot/hp2648/dot.c
index a9cf01dd0a..47521f8e66 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/dot.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/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/hp2648/erase.c b/usr/src/ucbcmd/plot/libplot/hp2648/erase.c
index 15aeb53aad..d8b071934b 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/erase.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/erase.c
@@ -1,24 +1,23 @@
+/*
+ * 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 "hp2648.h"
-erase()
+void
+erase(void)
{
buffready(8);
putchar(ESC);
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/label.c b/usr/src/ucbcmd/plot/libplot/hp2648/label.c
index fec2cbd916..e09d7adcf2 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/label.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/label.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-label(s)
-char *s;
+void
+label(char *s)
{
handshake();
putchar(ESC);
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/line.c b/usr/src/ucbcmd/plot/libplot/hp2648/line.c
index c9ae574e8f..8c3594d5dc 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/line.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/line.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-line(x0,y0,x1,y1)
-int x0,y0,x1,y1;
+void
+line(int x0, int y0, int x1, int y1)
{
if(xsc(x0)==currentx && ysc(y0)==currenty)
cont(x1,y1);
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/linemod.c b/usr/src/ucbcmd/plot/libplot/hp2648/linemod.c
index 8ab4fcd1d9..34a445cc08 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/linemod.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/linemod.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-linemod( line )
-char *line;
+void
+linemod(char *line)
{
putchar('Z');
handshake();
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/move.c b/usr/src/ucbcmd/plot/libplot/hp2648/move.c
index 25864e3f00..77b6704150 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/move.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/move.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-move(xi,yi)
-int xi,yi;
+void
+move(int xi, int yi)
{
char xb1,xb2,yb1,yb2;
itoa(xsc(xi),&xb1,&xb2);
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/open.c b/usr/src/ucbcmd/plot/libplot/hp2648/open.c
index 51aa8a8c92..16c1b2f9a2 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/open.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/open.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"
#include <sgtty.h>
#include "hp2648.h"
@@ -30,7 +28,8 @@ float scalex;
float scaley;
struct sgttyb sarg;
-openpl()
+void
+openpl(void)
{
if ( isatty(fileno( stdout )) ) {
shakehands = TRUE;
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/point.c b/usr/src/ucbcmd/plot/libplot/hp2648/point.c
index 7cca9c5de5..86fd85bbe1 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/point.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/point.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-point(xi,yi)
-int xi,yi;
+void
+point(int xi, int yi)
{
if(xsc(xi)!=currentx || ysc(yi)!=currenty)
move(xi,yi);
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/space.c b/usr/src/ucbcmd/plot/libplot/hp2648/space.c
index 9524781d6a..85b143fd8a 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/space.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/space.c
@@ -1,25 +1,23 @@
+/*
+ * 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 "hp2648.h"
-space(x0,y0,x1,y1)
-int x0,y0,x1,y1;
+void
+space(int x0, int y0, int x1, int y1)
{
lowx = x0;
lowy = y0;
diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/subr.c b/usr/src/ucbcmd/plot/libplot/hp2648/subr.c
index 3fecfb3922..49dd34a28e 100644
--- a/usr/src/ucbcmd/plot/libplot/hp2648/subr.c
+++ b/usr/src/ucbcmd/plot/libplot/hp2648/subr.c
@@ -1,25 +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 <sgtty.h>
#include "hp2648.h"
-handshake()
+void
+handshake(void)
{
int i;
char ch;
@@ -42,8 +41,8 @@ handshake()
}
}
-buffready(n)
-int n;
+void
+buffready(int n)
{
buffcount = buffcount + n;
if(buffcount >= 80){
@@ -56,9 +55,8 @@ int n;
}
}
-itoa(num,byte1,byte2)
-int num;
-char *byte1,*byte2;
+void
+itoa(int num, char *byte1, char *byte2)
{
*byte1 = (num & 037) | 040;
*byte2 = ((num>>5) & 037) | 040;