summaryrefslogtreecommitdiff
path: root/usr/src/lib/libplot
diff options
context:
space:
mode:
authorstevel@tonic-gate <none@none>2005-06-14 00:00:00 -0700
committerstevel@tonic-gate <none@none>2005-06-14 00:00:00 -0700
commit7c478bd95313f5f23a4c958a745db2134aa03244 (patch)
treec871e58545497667cbb4b0a4f2daf204743e1fe7 /usr/src/lib/libplot
downloadillumos-joyent-7c478bd95313f5f23a4c958a745db2134aa03244.tar.gz
OpenSolaris Launch
Diffstat (limited to 'usr/src/lib/libplot')
-rw-r--r--usr/src/lib/libplot/Makefile60
-rw-r--r--usr/src/lib/libplot/plot.h78
-rw-r--r--usr/src/lib/libplot/plot/Makefile51
-rw-r--r--usr/src/lib/libplot/plot/Makefile.com75
-rw-r--r--usr/src/lib/libplot/plot/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/plot/common/arc.c47
-rw-r--r--usr/src/lib/libplot/plot/common/box.c45
-rw-r--r--usr/src/lib/libplot/plot/common/circle.c44
-rw-r--r--usr/src/lib/libplot/plot/common/close.c46
-rw-r--r--usr/src/lib/libplot/plot/common/con.h31
-rw-r--r--usr/src/lib/libplot/plot/common/cont.c43
-rw-r--r--usr/src/lib/libplot/plot/common/dot.c48
-rw-r--r--usr/src/lib/libplot/plot/common/erase.c40
-rw-r--r--usr/src/lib/libplot/plot/common/label.c44
-rw-r--r--usr/src/lib/libplot/plot/common/line.c45
-rw-r--r--usr/src/lib/libplot/plot/common/linmod.c44
-rw-r--r--usr/src/lib/libplot/plot/common/llib-lplot48
-rw-r--r--usr/src/lib/libplot/plot/common/move.c43
-rw-r--r--usr/src/lib/libplot/plot/common/open.c42
-rw-r--r--usr/src/lib/libplot/plot/common/point.c43
-rw-r--r--usr/src/lib/libplot/plot/common/putsi.c42
-rw-r--r--usr/src/lib/libplot/plot/common/space.c45
-rw-r--r--usr/src/lib/libplot/plot/i386/Makefile38
-rw-r--r--usr/src/lib/libplot/plot/sparc/Makefile38
-rw-r--r--usr/src/lib/libplot/plot/sparcv9/Makefile41
-rw-r--r--usr/src/lib/libplot/plot/spec/Makefile30
-rw-r--r--usr/src/lib/libplot/plot/spec/Makefile.targ36
-rw-r--r--usr/src/lib/libplot/plot/spec/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/plot/spec/i386/Makefile42
-rw-r--r--usr/src/lib/libplot/plot/spec/plot.spec133
-rw-r--r--usr/src/lib/libplot/plot/spec/sparc/Makefile44
-rw-r--r--usr/src/lib/libplot/plot/spec/sparcv9/Makefile43
-rw-r--r--usr/src/lib/libplot/plot/spec/versions43
-rw-r--r--usr/src/lib/libplot/t300/Makefile50
-rw-r--r--usr/src/lib/libplot/t300/Makefile.com75
-rw-r--r--usr/src/lib/libplot/t300/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/t300/common/arc.c189
-rw-r--r--usr/src/lib/libplot/t300/common/box.c45
-rw-r--r--usr/src/lib/libplot/t300/common/circle.c35
-rw-r--r--usr/src/lib/libplot/t300/common/close.c48
-rw-r--r--usr/src/lib/libplot/t300/common/con.h69
-rw-r--r--usr/src/lib/libplot/t300/common/dot.c37
-rw-r--r--usr/src/lib/libplot/t300/common/erase.c42
-rw-r--r--usr/src/lib/libplot/t300/common/label.c44
-rw-r--r--usr/src/lib/libplot/t300/common/line.c94
-rw-r--r--usr/src/lib/libplot/t300/common/linmod.c37
-rw-r--r--usr/src/lib/libplot/t300/common/llib-l30073
-rw-r--r--usr/src/lib/libplot/t300/common/move.c40
-rw-r--r--usr/src/lib/libplot/t300/common/open.c68
-rw-r--r--usr/src/lib/libplot/t300/common/point.c40
-rw-r--r--usr/src/lib/libplot/t300/common/space.c47
-rw-r--r--usr/src/lib/libplot/t300/common/subr.c174
-rw-r--r--usr/src/lib/libplot/t300/i386/Makefile38
-rw-r--r--usr/src/lib/libplot/t300/sparc/Makefile38
-rw-r--r--usr/src/lib/libplot/t300/sparcv9/Makefile41
-rw-r--r--usr/src/lib/libplot/t300/spec/Makefile30
-rw-r--r--usr/src/lib/libplot/t300/spec/Makefile.targ34
-rw-r--r--usr/src/lib/libplot/t300/spec/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/t300/spec/i386/Makefile42
-rw-r--r--usr/src/lib/libplot/t300/spec/sparc/Makefile44
-rw-r--r--usr/src/lib/libplot/t300/spec/sparcv9/Makefile43
-rw-r--r--usr/src/lib/libplot/t300/spec/t300.spec200
-rw-r--r--usr/src/lib/libplot/t300/spec/versions43
-rw-r--r--usr/src/lib/libplot/t300s/Makefile51
-rw-r--r--usr/src/lib/libplot/t300s/Makefile.com75
-rw-r--r--usr/src/lib/libplot/t300s/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/t300s/common/arc.c185
-rw-r--r--usr/src/lib/libplot/t300s/common/box.c45
-rw-r--r--usr/src/lib/libplot/t300s/common/circle.c39
-rw-r--r--usr/src/lib/libplot/t300s/common/close.c47
-rw-r--r--usr/src/lib/libplot/t300s/common/con.h79
-rw-r--r--usr/src/lib/libplot/t300s/common/dot.c38
-rw-r--r--usr/src/lib/libplot/t300s/common/erase.c43
-rw-r--r--usr/src/lib/libplot/t300s/common/label.c46
-rw-r--r--usr/src/lib/libplot/t300s/common/line.c79
-rw-r--r--usr/src/lib/libplot/t300s/common/linmod.c37
-rw-r--r--usr/src/lib/libplot/t300s/common/llib-l300s73
-rw-r--r--usr/src/lib/libplot/t300s/common/move.c40
-rw-r--r--usr/src/lib/libplot/t300s/common/open.c67
-rw-r--r--usr/src/lib/libplot/t300s/common/point.c41
-rw-r--r--usr/src/lib/libplot/t300s/common/space.c47
-rw-r--r--usr/src/lib/libplot/t300s/common/subr.c226
-rw-r--r--usr/src/lib/libplot/t300s/i386/Makefile38
-rw-r--r--usr/src/lib/libplot/t300s/sparc/Makefile38
-rw-r--r--usr/src/lib/libplot/t300s/sparcv9/Makefile41
-rw-r--r--usr/src/lib/libplot/t300s/spec/Makefile30
-rw-r--r--usr/src/lib/libplot/t300s/spec/Makefile.targ35
-rw-r--r--usr/src/lib/libplot/t300s/spec/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/t300s/spec/i386/Makefile42
-rw-r--r--usr/src/lib/libplot/t300s/spec/sparc/Makefile44
-rw-r--r--usr/src/lib/libplot/t300s/spec/sparcv9/Makefile43
-rw-r--r--usr/src/lib/libplot/t300s/spec/t300s.spec208
-rw-r--r--usr/src/lib/libplot/t300s/spec/versions43
-rw-r--r--usr/src/lib/libplot/t4014/Makefile51
-rw-r--r--usr/src/lib/libplot/t4014/Makefile.com75
-rw-r--r--usr/src/lib/libplot/t4014/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/t4014/common/arc.c188
-rw-r--r--usr/src/lib/libplot/t4014/common/box.c45
-rw-r--r--usr/src/lib/libplot/t4014/common/circle.c40
-rw-r--r--usr/src/lib/libplot/t4014/common/close.c49
-rw-r--r--usr/src/lib/libplot/t4014/common/con.h36
-rw-r--r--usr/src/lib/libplot/t4014/common/dot.c37
-rw-r--r--usr/src/lib/libplot/t4014/common/erase.c47
-rw-r--r--usr/src/lib/libplot/t4014/common/label.c72
-rw-r--r--usr/src/lib/libplot/t4014/common/line.c41
-rw-r--r--usr/src/lib/libplot/t4014/common/linemod.c56
-rw-r--r--usr/src/lib/libplot/t4014/common/llib-l401473
-rw-r--r--usr/src/lib/libplot/t4014/common/move.c42
-rw-r--r--usr/src/lib/libplot/t4014/common/open.c42
-rw-r--r--usr/src/lib/libplot/t4014/common/point.c41
-rw-r--r--usr/src/lib/libplot/t4014/common/scale.c56
-rw-r--r--usr/src/lib/libplot/t4014/common/space.c45
-rw-r--r--usr/src/lib/libplot/t4014/common/subr.c97
-rw-r--r--usr/src/lib/libplot/t4014/i386/Makefile38
-rw-r--r--usr/src/lib/libplot/t4014/sparc/Makefile38
-rw-r--r--usr/src/lib/libplot/t4014/sparcv9/Makefile41
-rw-r--r--usr/src/lib/libplot/t4014/spec/Makefile30
-rw-r--r--usr/src/lib/libplot/t4014/spec/Makefile.targ35
-rw-r--r--usr/src/lib/libplot/t4014/spec/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/t4014/spec/i386/Makefile42
-rw-r--r--usr/src/lib/libplot/t4014/spec/sparc/Makefile44
-rw-r--r--usr/src/lib/libplot/t4014/spec/sparcv9/Makefile43
-rw-r--r--usr/src/lib/libplot/t4014/spec/t4014.spec144
-rw-r--r--usr/src/lib/libplot/t4014/spec/versions43
-rw-r--r--usr/src/lib/libplot/t450/Makefile51
-rw-r--r--usr/src/lib/libplot/t450/Makefile.com75
-rw-r--r--usr/src/lib/libplot/t450/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/t450/common/arc.c190
-rw-r--r--usr/src/lib/libplot/t450/common/box.c45
-rw-r--r--usr/src/lib/libplot/t450/common/circle.c40
-rw-r--r--usr/src/lib/libplot/t450/common/close.c48
-rw-r--r--usr/src/lib/libplot/t450/common/con.h77
-rw-r--r--usr/src/lib/libplot/t450/common/dot.c37
-rw-r--r--usr/src/lib/libplot/t450/common/erase.c42
-rw-r--r--usr/src/lib/libplot/t450/common/label.c43
-rw-r--r--usr/src/lib/libplot/t450/common/line.c89
-rw-r--r--usr/src/lib/libplot/t450/common/linmod.c36
-rw-r--r--usr/src/lib/libplot/t450/common/llib-l45073
-rw-r--r--usr/src/lib/libplot/t450/common/move.c39
-rw-r--r--usr/src/lib/libplot/t450/common/open.c73
-rw-r--r--usr/src/lib/libplot/t450/common/point.c40
-rw-r--r--usr/src/lib/libplot/t450/common/space.c44
-rw-r--r--usr/src/lib/libplot/t450/common/subr.c176
-rw-r--r--usr/src/lib/libplot/t450/i386/Makefile38
-rw-r--r--usr/src/lib/libplot/t450/sparc/Makefile38
-rw-r--r--usr/src/lib/libplot/t450/sparcv9/Makefile41
-rw-r--r--usr/src/lib/libplot/t450/spec/Makefile30
-rw-r--r--usr/src/lib/libplot/t450/spec/Makefile.targ35
-rw-r--r--usr/src/lib/libplot/t450/spec/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/t450/spec/i386/Makefile42
-rw-r--r--usr/src/lib/libplot/t450/spec/sparc/Makefile44
-rw-r--r--usr/src/lib/libplot/t450/spec/sparcv9/Makefile43
-rw-r--r--usr/src/lib/libplot/t450/spec/t450.spec200
-rw-r--r--usr/src/lib/libplot/t450/spec/versions43
-rw-r--r--usr/src/lib/libplot/vt0/Makefile54
-rw-r--r--usr/src/lib/libplot/vt0/Makefile.com75
-rw-r--r--usr/src/lib/libplot/vt0/amd64/Makefile41
-rw-r--r--usr/src/lib/libplot/vt0/common/arc.c44
-rw-r--r--usr/src/lib/libplot/vt0/common/box.c45
-rw-r--r--usr/src/lib/libplot/vt0/common/circle.c44
-rw-r--r--usr/src/lib/libplot/vt0/common/close.c47
-rw-r--r--usr/src/lib/libplot/vt0/common/con.h35
-rw-r--r--usr/src/lib/libplot/vt0/common/dot.c44
-rw-r--r--usr/src/lib/libplot/vt0/common/erase.c42
-rw-r--r--usr/src/lib/libplot/vt0/common/frame.c42
-rw-r--r--usr/src/lib/libplot/vt0/common/label.c47
-rw-r--r--usr/src/lib/libplot/vt0/common/line.c55
-rw-r--r--usr/src/lib/libplot/vt0/common/linmod.c38
-rw-r--r--usr/src/lib/libplot/vt0/common/llib-lvt073
-rw-r--r--usr/src/lib/libplot/vt0/common/move.c44
-rw-r--r--usr/src/lib/libplot/vt0/common/open.c49
-rw-r--r--usr/src/lib/libplot/vt0/common/point.c45
-rw-r--r--usr/src/lib/libplot/vt0/common/space.c47
-rw-r--r--usr/src/lib/libplot/vt0/common/subr.c52
-rw-r--r--usr/src/lib/libplot/vt0/i386/Makefile36
-rw-r--r--usr/src/lib/libplot/vt0/sparc/Makefile37
-rw-r--r--usr/src/lib/libplot/vt0/sparcv9/Makefile40
-rw-r--r--usr/src/lib/libplot/vt0/spec/Makefile30
-rw-r--r--usr/src/lib/libplot/vt0/spec/Makefile.targ35
-rw-r--r--usr/src/lib/libplot/vt0/spec/amd64/Makefile42
-rw-r--r--usr/src/lib/libplot/vt0/spec/i386/Makefile42
-rw-r--r--usr/src/lib/libplot/vt0/spec/sparc/Makefile44
-rw-r--r--usr/src/lib/libplot/vt0/spec/sparcv9/Makefile43
-rw-r--r--usr/src/lib/libplot/vt0/spec/versions43
-rw-r--r--usr/src/lib/libplot/vt0/spec/vt0.spec154
185 files changed, 10404 insertions, 0 deletions
diff --git a/usr/src/lib/libplot/Makefile b/usr/src/lib/libplot/Makefile
new file mode 100644
index 0000000000..d99c4eb98a
--- /dev/null
+++ b/usr/src/lib/libplot/Makefile
@@ -0,0 +1,60 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# Copyright (c) 1989 by Sun Microsystems, Inc.
+#
+# lib/libplot/Makefile
+#
+# include global definitions
+include ../../Makefile.master
+
+SUBDIRS= plot t300 t300s t4014 t450 vt0
+
+all:= TARGET= all
+clean:= TARGET= clean
+clobber:= TARGET= clobber
+install:= TARGET= install
+lint:= TARGET= lint
+
+HDRS= plot.h
+ROOTHDRDIR= $(ROOT)/usr/include
+ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%)
+CHECKHDRS= $(HDRS:%.h=%.check)
+
+# install rule for install_h target
+$(ROOTHDRDIR)/%: %
+ $(INS.file)
+
+.KEEP_STATE:
+
+all clean clobber install lint: $(SUBDIRS)
+
+install_h: $(ROOTHDRS)
+
+check: $(CHECKHDRS)
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+
+FRC:
diff --git a/usr/src/lib/libplot/plot.h b/usr/src/lib/libplot/plot.h
new file mode 100644
index 0000000000..39ced49d1c
--- /dev/null
+++ b/usr/src/lib/libplot/plot.h
@@ -0,0 +1,78 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#ifndef _PLOT_H
+#define _PLOT_H
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __STDC__
+
+extern void arc(short, short, short, short, short, short);
+extern void box(short, short, short, short);
+extern void circle(short, short, short);
+extern void closepl(void);
+extern void closevt(void);
+extern void cont(short, short);
+extern void erase(void);
+extern void label(char *);
+extern void line(short, short, short, short);
+extern void linmod(char *);
+extern void move(short, short);
+extern void openpl(void);
+extern void openvt(void);
+extern void point(short, short);
+extern void space(short, short, short, short);
+
+#else
+
+extern void arc();
+extern void box();
+extern void circle();
+extern void closepl();
+extern void closevt();
+extern void cont();
+extern void erase();
+extern void label();
+extern void line();
+extern void linmod();
+extern void move();
+extern void openpl();
+extern void openvt();
+extern void point();
+extern void space();
+
+#endif /* __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PLOT_H */
diff --git a/usr/src/lib/libplot/plot/Makefile b/usr/src/lib/libplot/plot/Makefile
new file mode 100644
index 0000000000..e94f5e4ccb
--- /dev/null
+++ b/usr/src/lib/libplot/plot/Makefile
@@ -0,0 +1,51 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1989-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# Copyright (c) 1989-1998 by Sun Microsystems, Inc.
+#
+# lib/libplot/plot/Makefile
+#
+include ../../Makefile.lib
+
+SUBDIRS= spec .WAIT $(MACH) $(BUILD64) $(MACH64)
+
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+delete := TARGET= delete
+install := TARGET= install
+lint := TARGET= lint
+
+.KEEP_STATE:
+
+all clean clobber delete install lint: $(SUBDIRS)
+
+
+$(MACH) $(MACH64) spec: FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
diff --git a/usr/src/lib/libplot/plot/Makefile.com b/usr/src/lib/libplot/plot/Makefile.com
new file mode 100644
index 0000000000..89695bfb81
--- /dev/null
+++ b/usr/src/lib/libplot/plot/Makefile.com
@@ -0,0 +1,75 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/Makefile.com
+#
+
+LIBRARY= libplot.a
+VERS= .1
+
+OBJECTS= \
+ arc.o box.o circle.o close.o \
+ cont.o dot.o erase.o label.o \
+ line.o linmod.o move.o open.o \
+ point.o putsi.o space.o
+
+# include library definitions
+include ../../../Makefile.lib
+
+MAPFILE= $(MAPDIR)/mapfile
+MAPOPTS= $(MAPFILE:%=-M %)
+SRCS= $(OBJECTS:%.o=../common/%.c)
+
+LIBS = $(DYNLIB) $(LINTLIB)
+
+$(LINTLIB):= SRCS=../common/llib-lplot
+
+LINTSRC= $(LINTLIB:%.ln=%)
+
+CFLAGS += $(CCVERBOSE)
+DYNFLAGS += $(MAPOPTS)
+LDLIBS += -lc
+
+.KEEP_STATE:
+
+lint: lintcheck
+
+$(DYNLIB): $(MAPFILE)
+
+$(MAPFILE):
+ @cd $(MAPDIR); $(MAKE) mapfile
+
+# include library targets
+include ../../../Makefile.targ
+
+pics/%.o: ../common/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+# install rule for lint library target
+$(ROOTLINTDIR)/%: ../common/%
+ $(INS.file)
diff --git a/usr/src/lib/libplot/plot/amd64/Makefile b/usr/src/lib/libplot/plot/amd64/Makefile
new file mode 100644
index 0000000000..7ca1ce38bf
--- /dev/null
+++ b/usr/src/lib/libplot/plot/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+MAPDIR= ../spec/amd64
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LINTFLAGS64 += -erroff=E_ASSIGMENT_CAUSE_LOSS_PREC
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/plot/common/arc.c b/usr/src/lib/libplot/plot/common/arc.c
new file mode 100644
index 0000000000..6ba8406e13
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/arc.c
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+arc(short xi, short yi, short x0, short y0, short x1, short y1)
+{
+ (void) putc('a', stdout);
+ putsi(xi);
+ putsi(yi);
+ putsi(x0);
+ putsi(y0);
+ putsi(x1);
+ putsi(y1);
+}
diff --git a/usr/src/lib/libplot/plot/common/box.c b/usr/src/lib/libplot/plot/common/box.c
new file mode 100644
index 0000000000..949f3fcabf
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/box.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+box(short x0, short y0, short x1, short y1)
+{
+ move(x0, y0);
+ cont(x0, y1);
+ cont(x1, y1);
+ cont(x1, y0);
+ cont(x0, y0);
+ move(x1, y1);
+}
diff --git a/usr/src/lib/libplot/plot/common/circle.c b/usr/src/lib/libplot/plot/common/circle.c
new file mode 100644
index 0000000000..99bd5a23a7
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/circle.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+circle(short x, short y, short r)
+{
+ (void) putc('c', stdout);
+ putsi(x);
+ putsi(y);
+ putsi(r);
+}
diff --git a/usr/src/lib/libplot/plot/common/close.c b/usr/src/lib/libplot/plot/common/close.c
new file mode 100644
index 0000000000..ef81bf9633
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/close.c
@@ -0,0 +1,46 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+
+void
+closevt(void)
+{
+ (void) fflush(stdout);
+}
+
+void
+closepl(void)
+{
+ (void) fflush(stdout);
+}
diff --git a/usr/src/lib/libplot/plot/common/con.h b/usr/src/lib/libplot/plot/common/con.h
new file mode 100644
index 0000000000..d4f1c49b54
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/con.h
@@ -0,0 +1,31 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <termio.h>
+
+extern void putsi(short);
diff --git a/usr/src/lib/libplot/plot/common/cont.c b/usr/src/lib/libplot/plot/common/cont.c
new file mode 100644
index 0000000000..f4e739ea18
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/cont.c
@@ -0,0 +1,43 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+cont(short xi, short yi)
+{
+ (void) putc('n', stdout);
+ putsi(xi);
+ putsi(yi);
+}
diff --git a/usr/src/lib/libplot/plot/common/dot.c b/usr/src/lib/libplot/plot/common/dot.c
new file mode 100644
index 0000000000..d08965561d
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/dot.c
@@ -0,0 +1,48 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+dot(short xi, short yi, short dx, short n, short pat[])
+{
+ short i;
+ (void) putc('d', stdout);
+ putsi(xi);
+ putsi(yi);
+ putsi(dx);
+ putsi(n);
+ for (i = 0; i < n; i++)
+ putsi(pat[i]);
+}
diff --git a/usr/src/lib/libplot/plot/common/erase.c b/usr/src/lib/libplot/plot/common/erase.c
new file mode 100644
index 0000000000..41d051ec3c
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/erase.c
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+
+void
+erase(void)
+{
+ (void) putc('e', stdout);
+}
diff --git a/usr/src/lib/libplot/plot/common/label.c b/usr/src/lib/libplot/plot/common/label.c
new file mode 100644
index 0000000000..2577bf31ac
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/label.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+
+void
+label(char *s)
+{
+ int i;
+ (void) putc('t', stdout);
+ for (i = 0; s[i]; )
+ (void) putc(s[i++], stdout);
+ (void) putc('\n', stdout);
+}
diff --git a/usr/src/lib/libplot/plot/common/line.c b/usr/src/lib/libplot/plot/common/line.c
new file mode 100644
index 0000000000..ec95643c60
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/line.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+line(short x0, short y0, short x1, short y1)
+{
+ (void) putc('l', stdout);
+ putsi(x0);
+ putsi(y0);
+ putsi(x1);
+ putsi(y1);
+}
diff --git a/usr/src/lib/libplot/plot/common/linmod.c b/usr/src/lib/libplot/plot/common/linmod.c
new file mode 100644
index 0000000000..84686cf53b
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/linmod.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+
+void
+linemod(char *s)
+{
+ int i;
+ (void) putc('f', stdout);
+ for (i = 0; s[i]; )
+ (void) putc(s[i++], stdout);
+ (void) putc('\n', stdout);
+}
diff --git a/usr/src/lib/libplot/plot/common/llib-lplot b/usr/src/lib/libplot/plot/common/llib-lplot
new file mode 100644
index 0000000000..ddd0ba71ef
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/llib-lplot
@@ -0,0 +1,48 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <stdio.h>
+
+void arc(short, short, short, short, short, short);
+void box(short, short, short, short);
+void circle(short, short, short);
+void closelp(void);
+void closevt(void);
+void cont(short, short);
+void erase(void);
+void label(char *);
+void line(short, short);
+void linemod(char *);
+void move(short, short);
+void openpt();
+void openvt();
+void point(short, short);
+void space(short, short, short, short);
diff --git a/usr/src/lib/libplot/plot/common/move.c b/usr/src/lib/libplot/plot/common/move.c
new file mode 100644
index 0000000000..9142744155
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/move.c
@@ -0,0 +1,43 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+move(short xi, short yi)
+{
+ (void) putc('m', stdout);
+ putsi(xi);
+ putsi(yi);
+}
diff --git a/usr/src/lib/libplot/plot/common/open.c b/usr/src/lib/libplot/plot/common/open.c
new file mode 100644
index 0000000000..4598bc730e
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/open.c
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+void
+openvt(void)
+{
+}
+
+void
+openpl(void)
+{
+}
diff --git a/usr/src/lib/libplot/plot/common/point.c b/usr/src/lib/libplot/plot/common/point.c
new file mode 100644
index 0000000000..70d1d0284d
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/point.c
@@ -0,0 +1,43 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+point(short xi, short yi)
+{
+ (void) putc('p', stdout);
+ putsi(xi);
+ putsi(yi);
+}
diff --git a/usr/src/lib/libplot/plot/common/putsi.c b/usr/src/lib/libplot/plot/common/putsi.c
new file mode 100644
index 0000000000..a1f5167036
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/putsi.c
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+putsi(short a)
+{
+ (void) putc((char)a, stdout);
+ (void) putc((char)(a>>8), stdout);
+}
diff --git a/usr/src/lib/libplot/plot/common/space.c b/usr/src/lib/libplot/plot/common/space.c
new file mode 100644
index 0000000000..457b60d699
--- /dev/null
+++ b/usr/src/lib/libplot/plot/common/space.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+space(short x0, short y0, short x1, short y1)
+{
+ (void) putc('s', stdout);
+ putsi(x0);
+ putsi(y0);
+ putsi(x1);
+ putsi(y1);
+}
diff --git a/usr/src/lib/libplot/plot/i386/Makefile b/usr/src/lib/libplot/plot/i386/Makefile
new file mode 100644
index 0000000000..7d46601f07
--- /dev/null
+++ b/usr/src/lib/libplot/plot/i386/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/i386/Makefile
+
+MAPDIR= ../spec/i386
+
+include ../Makefile.com
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/plot/sparc/Makefile b/usr/src/lib/libplot/plot/sparc/Makefile
new file mode 100644
index 0000000000..b18ebae1a5
--- /dev/null
+++ b/usr/src/lib/libplot/plot/sparc/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/sparc/Makefile
+
+MAPDIR= ../spec/sparc
+
+include ../Makefile.com
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/plot/sparcv9/Makefile b/usr/src/lib/libplot/plot/sparcv9/Makefile
new file mode 100644
index 0000000000..8c2cffc092
--- /dev/null
+++ b/usr/src/lib/libplot/plot/sparcv9/Makefile
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/sparcv9/Makefile
+
+MAPDIR= ../spec/sparcv9
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/plot/spec/Makefile b/usr/src/lib/libplot/plot/spec/Makefile
new file mode 100644
index 0000000000..fb4e1aa5cd
--- /dev/null
+++ b/usr/src/lib/libplot/plot/spec/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/spec/Makefile
+
+include $(SRC)/lib/Makefile.spec.arch
diff --git a/usr/src/lib/libplot/plot/spec/Makefile.targ b/usr/src/lib/libplot/plot/spec/Makefile.targ
new file mode 100644
index 0000000000..9d527efb4e
--- /dev/null
+++ b/usr/src/lib/libplot/plot/spec/Makefile.targ
@@ -0,0 +1,36 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/spec/Makefile.targ
+
+LIBRARY = libplot.a
+VERS = .1
+
+OBJECTS = plot.o
+
+TRANSCPP =
+SPECCPP =
diff --git a/usr/src/lib/libplot/plot/spec/amd64/Makefile b/usr/src/lib/libplot/plot/spec/amd64/Makefile
new file mode 100644
index 0000000000..5dd1b7240f
--- /dev/null
+++ b/usr/src/lib/libplot/plot/spec/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#amd64_C_PICFLAGS = $(amd64_C_BIGPICFLAGS)
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/plot/spec/i386/Makefile b/usr/src/lib/libplot/plot/spec/i386/Makefile
new file mode 100644
index 0000000000..7f79ddec84
--- /dev/null
+++ b/usr/src/lib/libplot/plot/spec/i386/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/spec/i386/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#i386_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/plot/spec/plot.spec b/usr/src/lib/libplot/plot/spec/plot.spec
new file mode 100644
index 0000000000..9ccf6250e3
--- /dev/null
+++ b/usr/src/lib/libplot/plot/spec/plot.spec
@@ -0,0 +1,133 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/spec/plot.spec
+
+function arc
+include <plot.h>
+declaration void arc(short x0, short y0, short x1, short y1, \
+ short x2, short y2)
+version SUNW_1.1
+end
+
+function box
+include <plot.h>
+declaration void box(short x0, short y0, short x1, short y1)
+version SUNW_1.1
+end
+
+function circle
+include <plot.h>
+declaration void circle(short x, short y, short r)
+version SUNW_1.1
+end
+
+function closepl
+include <plot.h>
+declaration void closepl(void)
+version SUNW_1.1
+end
+
+function closevt
+include <plot.h>
+declaration void closevt(void)
+version SUNW_1.1
+end
+
+function cont
+include <plot.h>
+declaration void cont(short x, short y)
+version SUNW_1.1
+end
+
+function dot
+include <plot.h>
+declaration void dot(short xi, short yi, short dx, short n, short pat[])
+version SUNWprivate_1.1
+end
+
+function erase
+include <plot.h>
+declaration void erase(void)
+version SUNW_1.1
+end
+
+function label
+include <plot.h>
+declaration void label(char *s)
+version SUNW_1.1
+end
+
+function line
+include <plot.h>
+declaration void line(short x0, short y0, short x1, short y1)
+version SUNW_1.1
+end
+
+function linemod
+include <plot.h>
+declaration void linemod(char *s)
+version SUNW_1.1
+end
+
+function move
+include <plot.h>
+declaration void move(short x, short y)
+version SUNW_1.1
+end
+
+function openpl
+include <plot.h>
+declaration void openpl(void)
+version SUNW_1.1
+end
+
+function openvt
+include <plot.h>
+declaration void openvt(void)
+version SUNW_1.1
+end
+
+function point
+include <plot.h>
+declaration void point(short x, short y)
+version SUNW_1.1
+end
+
+function space
+include <plot.h>
+declaration void space(short x0, short y0, short x1, short y1)
+version SUNW_1.1
+end
+
+function putsi
+version SUNWprivate_1.1
+end
+
+function _lib_version
+version SUNWprivate_1.1
+end
+
diff --git a/usr/src/lib/libplot/plot/spec/sparc/Makefile b/usr/src/lib/libplot/plot/spec/sparc/Makefile
new file mode 100644
index 0000000000..d2cc8ab285
--- /dev/null
+++ b/usr/src/lib/libplot/plot/spec/sparc/Makefile
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/spec/sparc/Makefile
+
+.KEEP_STATE:
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#sparc_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/plot/spec/sparcv9/Makefile b/usr/src/lib/libplot/plot/spec/sparcv9/Makefile
new file mode 100644
index 0000000000..9283948d89
--- /dev/null
+++ b/usr/src/lib/libplot/plot/spec/sparcv9/Makefile
@@ -0,0 +1,43 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/spec/sparcv9/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#sparcv9_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/plot/spec/versions b/usr/src/lib/libplot/plot/spec/versions
new file mode 100644
index 0000000000..38a2cfc77a
--- /dev/null
+++ b/usr/src/lib/libplot/plot/spec/versions
@@ -0,0 +1,43 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+sparc {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+sparcv9 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+i386 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+amd64 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
diff --git a/usr/src/lib/libplot/t300/Makefile b/usr/src/lib/libplot/t300/Makefile
new file mode 100644
index 0000000000..52f7d504b3
--- /dev/null
+++ b/usr/src/lib/libplot/t300/Makefile
@@ -0,0 +1,50 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1989,1998-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/Makefile
+#
+
+include ../../Makefile.lib
+
+SUBDIRS= spec .WAIT $(MACH) $(BUILD64) $(MACH64)
+
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+delete := TARGET= delete
+install := TARGET= install
+lint := TARGET= lint
+
+.KEEP_STATE:
+
+all clean clobber delete install lint: $(SUBDIRS)
+
+
+$(MACH) $(MACH64) spec: FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
diff --git a/usr/src/lib/libplot/t300/Makefile.com b/usr/src/lib/libplot/t300/Makefile.com
new file mode 100644
index 0000000000..2d28d341bf
--- /dev/null
+++ b/usr/src/lib/libplot/t300/Makefile.com
@@ -0,0 +1,75 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/Makefile.com
+#
+
+LIBRARY= lib300.a
+VERS= .1
+
+OBJECTS= \
+ arc.o box.o circle.o close.o \
+ dot.o erase.o label.o \
+ line.o linmod.o move.o open.o \
+ point.o space.o subr.o
+
+# include library definitions
+include ../../../Makefile.lib
+
+MAPFILE= $(MAPDIR)/mapfile
+MAPOPTS= $(MAPFILE:%=-M %)
+SRCS= $(OBJECTS:%.o=../common/%.c)
+
+LIBS = $(DYNLIB) $(LINTLIB)
+
+$(LINTLIB):= SRCS=../common/llib-l300
+
+LINTSRC= $(LINTLIB:%.ln=%)
+
+CFLAGS += $(CCVERBOSE)
+DYNFLAGS += $(MAPOPTS)
+LDLIBS += -lc -lm
+
+.KEEP_STATE:
+
+lint: lintcheck
+
+$(DYNLIB): $(MAPFILE)
+
+$(MAPFILE):
+ @cd $(MAPDIR); $(MAKE) mapfile
+
+# include library targets
+include ../../../Makefile.targ
+
+pics/%.o: ../common/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+# install rule for lint library target
+$(ROOTLINTDIR)/%: ../common/%
+ $(INS.file)
diff --git a/usr/src/lib/libplot/t300/amd64/Makefile b/usr/src/lib/libplot/t300/amd64/Makefile
new file mode 100644
index 0000000000..7ca1ce38bf
--- /dev/null
+++ b/usr/src/lib/libplot/t300/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+MAPDIR= ../spec/amd64
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LINTFLAGS64 += -erroff=E_ASSIGMENT_CAUSE_LOSS_PREC
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/t300/common/arc.c b/usr/src/lib/libplot/t300/common/arc.c
new file mode 100644
index 0000000000..4b5eda6b3e
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/arc.c
@@ -0,0 +1,189 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
+/*LINTLIBRARY*/
+
+#include <stdlib.h>
+#include <plot.h>
+#include <math.h>
+#include "con.h"
+
+static int quad_l(short, short, short, short);
+static int del = 20;
+
+static void
+step(int d)
+{
+ del = d;
+}
+
+void
+arc(short x, short y, short x0, short y0, short x1, short y1)
+{
+ double pc;
+ short flg, m, xc, yc, xs, ys, qs, qf, qt, qtctr = 0;
+ short m0, m1;
+ float dx, dy, r;
+ char use;
+ dx = x - x0;
+ dy = y - y0;
+ r = (dx * dx) + (dy * dy);
+ pc = r;
+ pc = sqrt(pc);
+ flg = (short)(pc / 4);
+ if (flg == 0)
+ step(1);
+ else if (flg < del)
+ step(flg);
+ xc = xs = x0;
+ yc = ys = y0;
+ move(xs, ys);
+ if ((x0 == x1) && (y0 == y1))
+ flg = 0;
+ else flg = 1;
+ qs = quad_l(x, y, x0, y0);
+ qf = quad_l(x, y, x1, y1);
+ if ((abs(x - x1)) < (abs(y - y1))) {
+ use = 'x';
+ if ((qs == 2) || (qs == 3))
+ m = -1;
+ else m = 1;
+ } else {
+ use = 'y';
+ if (qs > 2)
+ m = -1;
+ else m = 1;
+ }
+ if (qs == qf) {
+ m0 = (y0 - y) / (x0 - x);
+ m1 = (y1 - y) / (x1 - x);
+ if (m0 >= m1)
+ qt = 4;
+ else qt = 0;
+ } else if ((qt = qf - qs) < 0)
+ qt += 4;
+ /* LINTED */
+ while (1) {
+ switch (use) {
+ case 'x':
+ if ((qs == 2) || (qs == 3))
+ yc -= del;
+ else yc += del;
+ dy = yc - y;
+ pc = r - dy * dy;
+ xc = (short)(m * sqrt(pc) + x);
+ if (((x < xs) && (x >= xc)) ||
+ ((x > xs) && (x <= xc)) ||
+ ((y < ys) && (y >= yc)) ||
+ ((y > ys) && (y <= yc))) {
+ if (++qtctr > qt)
+ return;
+ if (++qs > 4)
+ qs = 1;
+ if ((qs == 2) || (qs == 3))
+ m = -1;
+ else m = 1;
+ flg = 1;
+ }
+ cont(xc, yc);
+ xs = xc;
+ ys = yc;
+ if ((qs == qf) && (flg == 1))
+ switch (qf) {
+ case 3:
+ case 4:
+ if (xs >= x1)
+ return;
+ continue;
+ case 1:
+ case 2:
+ if (xs <= x1)
+ return;
+ }
+ continue;
+ case 'y':
+ if (qs > 2)
+ xc += del;
+ else xc -= del;
+ dx = xc - x;
+ pc = r - dx * dx;
+ yc = (short)(m * sqrt(pc) + y);
+ if (((x < xs) && (x >= xc)) ||
+ ((x > xs) && (x <= xc)) ||
+ ((y < ys) && (y >= yc)) ||
+ ((y > ys) && (y <= yc))) {
+ if (++qtctr > qt)
+ return;
+ if (++qs > 4)
+ qs = 1;
+ if (qs > 2)
+ m = -1;
+ else m = 1;
+ flg = 1;
+ }
+ cont(xc, yc);
+ xs = xc;
+ ys = yc;
+ if ((qs == qf) && (flg == 1))
+ switch (qs) {
+ case 1:
+ case 4:
+ if (ys >= y1)
+ return;
+ continue;
+ case 2:
+ case 3:
+ if (ys <= y1)
+ return;
+ }
+ }
+ }
+}
+
+/*
+ * these is a local function not to be confused with the
+ * system wide quad
+ */
+static int
+quad_l(short x, short y, short xp, short yp)
+{
+ if (x < xp)
+ if (y <= yp)
+ return (1);
+ else return (4);
+ else if (x > xp)
+ if (y < yp)
+ return (2);
+ else return (3);
+ else if (y < yp)
+ return (2);
+ else return (4);
+}
diff --git a/usr/src/lib/libplot/t300/common/box.c b/usr/src/lib/libplot/t300/common/box.c
new file mode 100644
index 0000000000..949f3fcabf
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/box.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+box(short x0, short y0, short x1, short y1)
+{
+ move(x0, y0);
+ cont(x0, y1);
+ cont(x1, y1);
+ cont(x1, y0);
+ cont(x0, y0);
+ move(x1, y1);
+}
diff --git a/usr/src/lib/libplot/t300/common/circle.c b/usr/src/lib/libplot/t300/common/circle.c
new file mode 100644
index 0000000000..b0ec60da16
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/circle.c
@@ -0,0 +1,35 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+circle(short x, short y, short r)
+{
+ arc(x, y, x + r, y, x + r, y);
+}
diff --git a/usr/src/lib/libplot/t300/common/close.c b/usr/src/lib/libplot/t300/common/close.c
new file mode 100644
index 0000000000..7b54157ca2
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/close.c
@@ -0,0 +1,48 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+closepl(void)
+{
+ (void) fflush(stdout);
+ reset();
+}
+
+void
+closevt(void)
+{
+ closepl();
+}
diff --git a/usr/src/lib/libplot/t300/common/con.h b/usr/src/lib/libplot/t300/common/con.h
new file mode 100644
index 0000000000..c7140188fe
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/con.h
@@ -0,0 +1,69 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <termio.h>
+
+/* gsi plotting output routines */
+#define DOWN 012
+#define UP 013
+#define LEFT 010
+#define RIGHT 040
+#define BEL 007
+#define ESC 033
+#define ACK 006
+#define CR 015
+#define FF 014
+#define VERTRESP 48
+#define HORZRESP 60.
+#define VERTRES 8.
+#define HORZRES 6.
+/*
+ * down is line feed, up is reverse line feed,
+ * left is backspace, right is space. 48 points per inch
+ * vertically, 60 horizontally
+ */
+
+extern struct termio ITTY, PTTY;
+extern float botx, boty, obotx, oboty, scalex, scaley;
+extern int xscale, xoffset, yscale;
+extern int OUTF;
+extern void movep(short, short);
+extern void spew(char);
+extern void inplot(void);
+extern void outplot(void);
+extern void reset(void);
+extern float dist2(int, int, int, int);
+extern int xsc(short);
+extern int ysc(short);
+extern short xconv(short);
+extern short yconv(short);
+extern short xnow, ynow;
diff --git a/usr/src/lib/libplot/t300/common/dot.c b/usr/src/lib/libplot/t300/common/dot.c
new file mode 100644
index 0000000000..fbca617050
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/dot.c
@@ -0,0 +1,37 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+void
+dot(void)
+{
+}
diff --git a/usr/src/lib/libplot/t300/common/erase.c b/usr/src/lib/libplot/t300/common/erase.c
new file mode 100644
index 0000000000..9f2043ede9
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/erase.c
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+erase(void)
+{
+ int i;
+ for (i = 0; i < 11 * (VERTRESP / VERTRES); i++)
+ spew(DOWN);
+}
diff --git a/usr/src/lib/libplot/t300/common/label.c b/usr/src/lib/libplot/t300/common/label.c
new file mode 100644
index 0000000000..e113cebbcf
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/label.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+label(char *s)
+{
+ char c;
+ while ((c = *s++) != '\0') {
+ xnow += HORZRES;
+ spew(c);
+ }
+}
diff --git a/usr/src/lib/libplot/t300/common/line.c b/usr/src/lib/libplot/t300/common/line.c
new file mode 100644
index 0000000000..788fdb6ce6
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/line.c
@@ -0,0 +1,94 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdlib.h>
+#include <math.h>
+#include "con.h"
+
+short xnow, ynow;
+
+static void
+iline(short cx0, short cy0, short cx1, short cy1)
+{
+ int maxp, tt;
+ short j;
+ char chx, chy;
+ float xd, yd;
+
+ movep(cx0, cy0);
+ maxp = (int)(sqrt(dist2(cx0, cy0, cx1, cy1)) / 2.);
+ xd = cx1 - cx0;
+ yd = cy1 - cy0;
+ if (xd >= 0)
+ chx = RIGHT;
+ else chx = LEFT;
+ if (yd >= 0)
+ chy = UP;
+ else chy = DOWN;
+ if (maxp == 0) {
+ xd = 0;
+ yd = 0;
+ } else {
+ xd /= maxp;
+ yd /= maxp;
+ }
+ inplot();
+ for (tt = 0; tt <= maxp; tt++) {
+ j = (short)(cx0 + xd * tt - xnow);
+ xnow += j;
+ j = abs(j);
+ while (j-- > 0)
+ spew(chx);
+ j = (short)(cy0 + yd * tt - ynow);
+ ynow += j;
+ j = abs(j);
+ while (j-- > 0)
+ spew(chy);
+ spew('.');
+ }
+ outplot();
+}
+
+void
+line(short x0, short y0, short x1, short y1)
+{
+ iline(xconv(xsc(x0)), yconv(ysc(y0)),
+ xconv(xsc(x1)), yconv(ysc(y1)));
+}
+
+
+void
+cont(short x0, short y0)
+{
+ iline(xnow, ynow, xconv(xsc(x0)), yconv(ysc(y0)));
+}
diff --git a/usr/src/lib/libplot/t300/common/linmod.c b/usr/src/lib/libplot/t300/common/linmod.c
new file mode 100644
index 0000000000..86394deb4e
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/linmod.c
@@ -0,0 +1,37 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+void
+linemod(void)
+{
+}
diff --git a/usr/src/lib/libplot/t300/common/llib-l300 b/usr/src/lib/libplot/t300/common/llib-l300
new file mode 100644
index 0000000000..204d205bf9
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/llib-l300
@@ -0,0 +1,73 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <stdio.h>
+
+/*arc.c*/
+void arc(short, short, short, short, short, short);
+
+/*box.c*/
+void box(short, short, short, short);
+
+/*circle.c*/
+void circle(short, short, short);
+
+/*close.c*/
+void closelp(void);
+void closevt(void);
+
+/*cont.c*/
+void cont(short, short);
+
+/*erase.c*/
+void erase(void);
+
+/*label.c*/
+void label(char *);
+
+/*line.c*/
+void line(short, short);
+
+/*linmod.c*/
+void linemod(char *);
+
+/*move.c*/
+void move(short, short);
+
+/*open.c*/
+void openpt();
+void openvt();
+
+/*point.c*/
+void point(short, short);
+
+/*space.c*/
+void space(short, short, short, short);
diff --git a/usr/src/lib/libplot/t300/common/move.c b/usr/src/lib/libplot/t300/common/move.c
new file mode 100644
index 0000000000..4b7360ba91
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/move.c
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+move(short xi, short yi)
+{
+ movep(xconv(xsc(xi)), yconv(ysc(yi)));
+}
diff --git a/usr/src/lib/libplot/t300/common/open.c b/usr/src/lib/libplot/t300/common/open.c
new file mode 100644
index 0000000000..9e6b427fc8
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/open.c
@@ -0,0 +1,68 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include <signal.h>
+#include <stdio.h>
+#include "con.h"
+
+
+static float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0;
+float botx = 0.0, boty = 0.0, obotx = 0.0, oboty = 0.0;
+float scalex = 1.0, scaley = 1.0;
+int OUTF, xscale, yscale, xoffset;
+struct termio ITTY, PTTY;
+
+void
+openpl(void)
+{
+ xnow = ynow = 0;
+ OUTF = 1;
+ (void) printf("\r");
+ (void) ioctl(OUTF, TCGETA, &ITTY);
+ (void) signal(SIGINT, (void (*)(int))reset);
+ PTTY = ITTY;
+ PTTY.c_oflag &= ~(ONLCR|OCRNL|ONOCR|ONLRET);
+ PTTY.c_cflag |= CSTOPB;
+ (void) ioctl(OUTF, TCSETAW, &PTTY);
+ /* initialize constants */
+ xscale = (int)(4096./(HORZRESP * WIDTH));
+ yscale = (int)(4096 /(VERTRESP * HEIGHT));
+ xoffset = (int)(OFFSET * HORZRESP);
+}
+
+void
+openvt(void)
+{
+ openpl();
+}
diff --git a/usr/src/lib/libplot/t300/common/point.c b/usr/src/lib/libplot/t300/common/point.c
new file mode 100644
index 0000000000..2bc782c8cf
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/point.c
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+point(short xi, short yi) {
+ move(xi, yi);
+ label(".");
+}
diff --git a/usr/src/lib/libplot/t300/common/space.c b/usr/src/lib/libplot/t300/common/space.c
new file mode 100644
index 0000000000..8180575cf5
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/space.c
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+static float deltx;
+static float delty;
+
+void
+space(short x0, short y0, short x1, short y1) {
+ botx = -2047.;
+ boty = -2047.;
+ obotx = x0;
+ oboty = y0;
+ scalex = deltx / (x1-x0);
+ scaley = delty / (y1-y0);
+}
diff --git a/usr/src/lib/libplot/t300/common/subr.c b/usr/src/lib/libplot/t300/common/subr.c
new file mode 100644
index 0000000000..d50c1c6905
--- /dev/null
+++ b/usr/src/lib/libplot/t300/common/subr.c
@@ -0,0 +1,174 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+/*LINTLIBRARY*/
+
+#include <signal.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <plot.h>
+#include "con.h"
+
+short
+xconv(short xp)
+{
+ /*
+ * x position input is -2047 to +2047,
+ * output must be 0 to PAGSIZ*HORZRES
+ */
+ xp += 2048;
+ /* the computation is newx = xp*(PAGSIZ*HORZRES)/4096 */
+ return (short)(xoffset + xp / xscale);
+}
+
+short
+yconv(short yp)
+{
+ /* see description of xconv */
+ yp += 2048;
+ return (short)(yp / yscale);
+}
+
+void
+inplot(void)
+{
+ spew(ACK);
+}
+
+void
+outplot(void)
+{
+ spew(ESC);
+ spew(ACK);
+ (void) fflush(stdout);
+}
+
+void
+spew(char ch)
+{
+ if (ch == UP)
+ (void) putc(ESC, stdout);
+ (void) putc(ch, stdout);
+}
+
+void
+tobotleft(void)
+{
+ move(-2048, -2048);
+}
+
+void
+reset(void)
+{
+ (void) signal(SIGINT, SIG_IGN);
+ spew(BEL);
+ (void) fflush(stdout);
+ (void) ioctl(OUTF, TCSETAW, &ITTY);
+ _exit(0);
+}
+
+float
+dist2(int x1, int y1, int x2, int y2)
+{
+ float t, v;
+ t = x2 - x1;
+ v = y1 - y2;
+ return (t*t+v*v);
+}
+
+void
+swap(int *pa, int *pb)
+{
+ int t;
+ t = *pa;
+ *pa = *pb;
+ *pb = t;
+}
+
+void
+movep(short xg, short yg)
+{
+ short i;
+ char ch;
+ if ((xg == xnow) && (yg == ynow))
+ return;
+ /* if we need to go to left margin, just CR */
+ if (xg < (xnow / 2)) {
+ spew(CR);
+ xnow = 0;
+ }
+ i = (short)((xg - xnow) / HORZRES);
+ if (xnow < xg)
+ ch = RIGHT;
+ else
+ ch = LEFT;
+ xnow += i * HORZRES;
+ i = abs(i);
+ while (i--)
+ spew(ch);
+ i = abs(xg-xnow);
+ inplot();
+ while (i--)
+ spew(ch);
+ outplot();
+ i = (short)((yg - ynow) / VERTRES);
+ if (ynow < yg)
+ ch = UP;
+ else ch = DOWN;
+ ynow += i * VERTRES;
+ i = abs(i);
+ while (i--)
+ spew(ch);
+ i = abs(yg - ynow);
+ inplot();
+ while (i--)
+ spew(ch);
+ outplot();
+ xnow = xg;
+ ynow = yg;
+}
+
+int
+xsc(short xi)
+{
+ short xa;
+ xa = (short)((xi - obotx) * scalex + botx);
+ return (xa);
+}
+
+int
+ysc(short yi)
+{
+ short ya;
+ ya = (short)((yi - oboty) * scaley + boty);
+ return (ya);
+}
diff --git a/usr/src/lib/libplot/t300/i386/Makefile b/usr/src/lib/libplot/t300/i386/Makefile
new file mode 100644
index 0000000000..be78bab600
--- /dev/null
+++ b/usr/src/lib/libplot/t300/i386/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/i386/Makefile
+
+MAPDIR= ../spec/i386
+
+include ../Makefile.com
+
+all: $(LIBS) $(LINTLIB)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/t300/sparc/Makefile b/usr/src/lib/libplot/t300/sparc/Makefile
new file mode 100644
index 0000000000..eb90472fed
--- /dev/null
+++ b/usr/src/lib/libplot/t300/sparc/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/sparc/Makefile
+
+MAPDIR= ../spec/sparc
+
+include ../Makefile.com
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/t300/sparcv9/Makefile b/usr/src/lib/libplot/t300/sparcv9/Makefile
new file mode 100644
index 0000000000..87ca2d9111
--- /dev/null
+++ b/usr/src/lib/libplot/t300/sparcv9/Makefile
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/sparcv9/Makefile
+
+MAPDIR= ../spec/sparcv9
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/t300/spec/Makefile b/usr/src/lib/libplot/t300/spec/Makefile
new file mode 100644
index 0000000000..93fe6012d7
--- /dev/null
+++ b/usr/src/lib/libplot/t300/spec/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/spec/Makefile
+
+include $(SRC)/lib/Makefile.spec.arch
diff --git a/usr/src/lib/libplot/t300/spec/Makefile.targ b/usr/src/lib/libplot/t300/spec/Makefile.targ
new file mode 100644
index 0000000000..0eefa4fcc5
--- /dev/null
+++ b/usr/src/lib/libplot/t300/spec/Makefile.targ
@@ -0,0 +1,34 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/spec/Makefile.targ
+
+LIBRARY = lib300.a
+VERS = .1
+
+OBJECTS = t300.o
+
+SPECCPP =
diff --git a/usr/src/lib/libplot/t300/spec/amd64/Makefile b/usr/src/lib/libplot/t300/spec/amd64/Makefile
new file mode 100644
index 0000000000..2a38c1cba9
--- /dev/null
+++ b/usr/src/lib/libplot/t300/spec/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#amd64_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/t300/spec/i386/Makefile b/usr/src/lib/libplot/t300/spec/i386/Makefile
new file mode 100644
index 0000000000..34140d9a8f
--- /dev/null
+++ b/usr/src/lib/libplot/t300/spec/i386/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/spec/i386/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#i386_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/t300/spec/sparc/Makefile b/usr/src/lib/libplot/t300/spec/sparc/Makefile
new file mode 100644
index 0000000000..98ea9b929d
--- /dev/null
+++ b/usr/src/lib/libplot/t300/spec/sparc/Makefile
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/spec/sparc/Makefile
+
+.KEEP_STATE:
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#sparc_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/t300/spec/sparcv9/Makefile b/usr/src/lib/libplot/t300/spec/sparcv9/Makefile
new file mode 100644
index 0000000000..e703b48efe
--- /dev/null
+++ b/usr/src/lib/libplot/t300/spec/sparcv9/Makefile
@@ -0,0 +1,43 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/spec/sparcv9/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#sparcv9_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/t300/spec/t300.spec b/usr/src/lib/libplot/t300/spec/t300.spec
new file mode 100644
index 0000000000..a76fb11a55
--- /dev/null
+++ b/usr/src/lib/libplot/t300/spec/t300.spec
@@ -0,0 +1,200 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300/spec/t300.spec
+
+function arc extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function box extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function circle extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closepl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closevt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function cont extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function erase extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function label extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function line extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function linemod extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function move extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openpl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openvt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function point extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function space extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function ITTY
+version SUNWprivate_1.1
+end
+
+function PTTY
+version SUNWprivate_1.1
+end
+
+function OUTF
+version SUNWprivate_1.1
+end
+
+function inplot
+version SUNWprivate_1.1
+end
+
+function yconv
+version SUNWprivate_1.1
+end
+
+function xconv
+version SUNWprivate_1.1
+end
+
+function tobotleft
+version SUNWprivate_1.1
+end
+
+function reset
+version SUNWprivate_1.1
+end
+
+function xsc
+version SUNWprivate_1.1
+end
+
+function dist2
+version SUNWprivate_1.1
+end
+
+function obotx
+version SUNWprivate_1.1
+end
+
+function oboty
+version SUNWprivate_1.1
+end
+
+function ysc
+version SUNWprivate_1.1
+end
+
+function swap
+version SUNWprivate_1.1
+end
+
+function scalex
+version SUNWprivate_1.1
+end
+
+function scaley
+version SUNWprivate_1.1
+end
+
+function outplot
+version SUNWprivate_1.1
+end
+
+function botx
+version SUNWprivate_1.1
+end
+
+function boty
+version SUNWprivate_1.1
+end
+
+function movep
+version SUNWprivate_1.1
+end
+
+function spew
+version SUNWprivate_1.1
+end
+
+function yscale
+version SUNWprivate_1.1
+end
+
+function ynow
+version SUNWprivate_1.1
+end
+
+function xnow
+version SUNWprivate_1.1
+end
+
+function xoffset
+version SUNWprivate_1.1
+end
+
+function xscale
+version SUNWprivate_1.1
+end
+
+function dot
+version SUNWprivate_1.1
+end
+
+function _lib_version
+version SUNWprivate_1.1
+end
+
diff --git a/usr/src/lib/libplot/t300/spec/versions b/usr/src/lib/libplot/t300/spec/versions
new file mode 100644
index 0000000000..38a2cfc77a
--- /dev/null
+++ b/usr/src/lib/libplot/t300/spec/versions
@@ -0,0 +1,43 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+sparc {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+sparcv9 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+i386 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+amd64 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
diff --git a/usr/src/lib/libplot/t300s/Makefile b/usr/src/lib/libplot/t300s/Makefile
new file mode 100644
index 0000000000..0e188dc0ef
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/Makefile
@@ -0,0 +1,51 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1989,1998-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/Makefile
+#
+
+include ../../Makefile.lib
+
+SUBDIRS= spec $(MACH) $(BUILD64) $(MACH64)
+
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+delete := TARGET= delete
+install := TARGET= install
+lint := TARGET= lint
+
+.KEEP_STATE:
+
+all clean clobber delete install lint: $(SUBDIRS)
+
+
+$(MACH) $(MACH64) spec: FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
+
diff --git a/usr/src/lib/libplot/t300s/Makefile.com b/usr/src/lib/libplot/t300s/Makefile.com
new file mode 100644
index 0000000000..3918a0eeed
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/Makefile.com
@@ -0,0 +1,75 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/Makefile.com
+#
+
+LIBRARY= lib300s.a
+VERS= .1
+
+OBJECTS= \
+ arc.o box.o circle.o close.o \
+ dot.o erase.o label.o \
+ line.o linmod.o move.o open.o \
+ point.o space.o subr.o
+
+# include library definitions
+include ../../../Makefile.lib
+
+MAPFILE= $(MAPDIR)/mapfile
+MAPOPTS= $(MAPFILE:%=-M %)
+SRCS= $(OBJECTS:%.o=../common/%.c)
+
+LIBS = $(DYNLIB) $(LINTLIB)
+
+$(LINTLIB):= SRCS=../common/llib-l300s
+
+LINTSRC= $(LINTLIB:%.ln=%)
+
+CFLAGS += $(CCVERBOSE)
+DYNFLAGS += $(MAPOPTS)
+LDLIBS += -lc -lm
+
+.KEEP_STATE:
+
+lint: lintcheck
+
+$(DYNLIB): $(MAPFILE)
+
+$(MAPFILE):
+ @cd $(MAPDIR); $(MAKE) mapfile
+
+# include library targets
+include ../../../Makefile.targ
+
+pics/%.o: ../common/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+# install rule for lint library target
+$(ROOTLINTDIR)/%: ../common/%
+ $(INS.file)
diff --git a/usr/src/lib/libplot/t300s/amd64/Makefile b/usr/src/lib/libplot/t300s/amd64/Makefile
new file mode 100644
index 0000000000..5a418230f5
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+MAPDIR= ../spec/amd64
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LINTFLAGS64 += -erroff=E_ASSIGMENT_CAUSE_LOSS_PREC
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/t300s/common/arc.c b/usr/src/lib/libplot/t300s/common/arc.c
new file mode 100644
index 0000000000..b0d368e275
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/arc.c
@@ -0,0 +1,185 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
+/*LINTLIBRARY*/
+
+#include <stdlib.h>
+#include <math.h>
+#include <plot.h>
+#include "con.h"
+
+static int del = 20;
+
+static void
+step(int d)
+{
+ del = d;
+}
+
+/* local definition of quad */
+static int
+quad_l(short x, short y, short xp, short yp)
+{
+ if (x < xp)
+ if (y <= yp)
+ return (1);
+ else return (4);
+ else if (x > xp)
+ if (y < yp)
+ return (2);
+ else return (3);
+ else if (y < yp)
+ return (2);
+ else return (4);
+}
+
+void
+arc(short x, short y, short x0, short y0, short x1, short y1)
+{
+ double pc;
+ int flg, m, xc, yc, xs, ys, qs, qf, qt, qtctr = 0;
+ int m0, m1;
+ float dx, dy, r;
+ char use;
+ dx = x - x0;
+ dy = y - y0;
+ r = dx * dx + dy * dy;
+ pc = r;
+ pc = sqrt(pc);
+ flg = (short)(pc / 4);
+ if (flg == 0)
+ step(1);
+ else if (flg < del)
+ step(flg);
+ xc = xs = x0;
+ yc = ys = y0;
+ move((short)xs, (short)ys);
+ if ((x0 == x1) && (y0 == y1))
+ flg = 0;
+ else flg = 1;
+ qs = quad_l(x, y, x0, y0);
+ qf = quad_l(x, y, x1, y1);
+ if (abs(x - x1) < abs(y - y1)) {
+ use = 'x';
+ if ((qs == 2) || (qs == 3))
+ m = -1;
+ else m = 1;
+ } else {
+ use = 'y';
+ if (qs > 2)
+ m = -1;
+ else m = 1;
+ }
+ if (qs == qf) {
+ m0 = (y0 - y) / (x0 - x);
+ m1 = (y1 - y) / (x1 - x);
+ if (m0 >= m1)
+ qt = 4;
+ else qt = 0;
+ } else if ((qt = qf - qs) < 0)
+ qt += 4;
+ /*LINTED*/
+ while (1) {
+ switch (use) {
+ case 'x':
+ if ((qs == 2) || (qs == 3))
+ yc -= del;
+ else yc += del;
+ dy = yc - y;
+ pc = r - dy * dy;
+ xc = (int)(m * sqrt(pc) + x);
+ if (((x < xs) && (x >= xc)) ||
+ ((x > xs) && (x <= xc)) ||
+ ((y < ys) && (y >= yc)) ||
+ ((y > ys) && (y <= yc))) {
+ if (++qtctr > qt)
+ return;
+ if (++qs > 4)
+ qs = 1;
+ if ((qs == 2) || (qs == 3))
+ m = -1;
+ else m = 1;
+ flg = 1;
+ }
+ cont((short)xc, (short)yc);
+ xs = xc;
+ ys = yc;
+ if ((qs == qf) && (flg == 1))
+ switch (qf) {
+ case 3:
+ case 4:
+ if (xs >= x1)
+ return;
+ continue;
+ case 1:
+ case 2:
+ if (xs <= x1)
+ return;
+ }
+ continue;
+ case 'y':
+ if (qs > 2)
+ xc += del;
+ else xc -= del;
+ dx = xc - x;
+ pc = r - dx * dx;
+ yc = (int)(m * sqrt(pc) + y);
+ if (((x < xs) && (x >= xc)) ||
+ ((x > xs) && (x <= xc)) ||
+ ((y < ys) && (y >= yc)) ||
+ ((y > ys) && (y <= yc))) {
+ if (++qtctr > qt)
+ return;
+ if (++qs > 4)
+ qs = 1;
+ if (qs > 2)
+ m = -1;
+ else m = 1;
+ flg = 1;
+ }
+ cont((short)xc, (short)yc);
+ xs = xc;
+ ys = yc;
+ if ((qs == qf) && (flg == 1))
+ switch (qs) {
+ case 1:
+ case 4:
+ if (ys >= y1)
+ return;
+ continue;
+ case 2:
+ case 3:
+ if (ys <= y1)
+ return;
+ }
+ }
+ }
+}
diff --git a/usr/src/lib/libplot/t300s/common/box.c b/usr/src/lib/libplot/t300s/common/box.c
new file mode 100644
index 0000000000..949f3fcabf
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/box.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+box(short x0, short y0, short x1, short y1)
+{
+ move(x0, y0);
+ cont(x0, y1);
+ cont(x1, y1);
+ cont(x1, y0);
+ cont(x0, y0);
+ move(x1, y1);
+}
diff --git a/usr/src/lib/libplot/t300s/common/circle.c b/usr/src/lib/libplot/t300s/common/circle.c
new file mode 100644
index 0000000000..617a4632de
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/circle.c
@@ -0,0 +1,39 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+circle(short x, short y, short r) {
+ arc(x, y, x + r, y, x + r, y);
+}
diff --git a/usr/src/lib/libplot/t300s/common/close.c b/usr/src/lib/libplot/t300s/common/close.c
new file mode 100644
index 0000000000..c45ec5bd2a
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/close.c
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+closepl(void) {
+ (void) fflush(stdout);
+ reset();
+}
+
+void
+closevt(void) {
+ closepl();
+}
diff --git a/usr/src/lib/libplot/t300s/common/con.h b/usr/src/lib/libplot/t300s/common/con.h
new file mode 100644
index 0000000000..e88d9805b8
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/con.h
@@ -0,0 +1,79 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <termio.h>
+
+/* gsi plotting output routines */
+#define DOUBLE 010
+#define ADDR 0100
+#define COM 060
+#define PENUP 04
+#define MAXX 070
+#define MAXY 07
+#define SPACES 7
+#define DOWN 012
+#define UP 013
+#define LEFT 010
+#define RIGHT 040
+#define BEL 007
+#define ESC 033
+#define ACK 006
+#define INPLOT 'P'
+#define CR 015
+#define FF 014
+#define VERTRESP 48
+#define HORZRESP 60.
+#define VERTRES 8.
+#define HORZRES 6.
+
+/*
+ * down is line feed, up is reverse line feed,
+ * left is backspace, right is space. 48 points per inch
+ * vertically, 60 horizontally
+ */
+
+extern int xnow, ynow;
+extern int OUTF;
+extern int xoffset, xscale, yscale;
+extern struct termio ITTY, PTTY;
+extern float botx, boty, obotx, oboty, scalex, scaley;
+extern void movep(int, int);
+extern void reset(void);
+extern void spew(char);
+extern void inplot(void);
+extern void outplot(void);
+extern float dist2(int, int, int, int);
+extern int xsc(int);
+extern int ysc(int);
+extern int xconv(int);
+extern int yconv(int);
diff --git a/usr/src/lib/libplot/t300s/common/dot.c b/usr/src/lib/libplot/t300s/common/dot.c
new file mode 100644
index 0000000000..35c74d6592
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/dot.c
@@ -0,0 +1,38 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+void
+dot(void)
+{
+}
diff --git a/usr/src/lib/libplot/t300s/common/erase.c b/usr/src/lib/libplot/t300s/common/erase.c
new file mode 100644
index 0000000000..621eb746c7
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/erase.c
@@ -0,0 +1,43 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+erase(void)
+{
+ int i;
+ for (i = 0; i < 11 * (VERTRESP / VERTRES); i++)
+ spew(DOWN);
+}
diff --git a/usr/src/lib/libplot/t300s/common/label.c b/usr/src/lib/libplot/t300s/common/label.c
new file mode 100644
index 0000000000..c93eeb8099
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/label.c
@@ -0,0 +1,46 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+int xnow = 0;
+
+void
+label(char *s)
+{
+ char c;
+ while ((c = *s++) != '\0') {
+ xnow += HORZRES;
+ spew(c);
+ }
+}
diff --git a/usr/src/lib/libplot/t300s/common/line.c b/usr/src/lib/libplot/t300s/common/line.c
new file mode 100644
index 0000000000..4c91e76fb8
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/line.c
@@ -0,0 +1,79 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdlib.h>
+#include <math.h>
+#include "con.h"
+
+int ynow = 0;
+
+static void
+iline(int cx0, int cy0, int cx1, int cy1) {
+ int maxp, tt;
+ char chx, chy, command;
+ float xd, yd;
+ movep(cx0, cy0);
+ maxp = (int)(sqrt(dist2(cx0, cy0, cx1, cy1)) / 2.);
+ xd = cx1 - cx0;
+ yd = cy1 - cy0;
+ command = COM|((xd < 0) << 1)|(yd < 0);
+ if (maxp == 0) {
+ xd = 0;
+ yd = 0;
+ } else {
+ xd /= maxp;
+ yd /= maxp;
+ }
+ inplot();
+ spew(command);
+ for (tt = 0; tt <= maxp; tt++) {
+ chx = (char)(cx0 + xd * tt - xnow);
+ xnow += chx;
+ chx = abs(chx);
+ chy = (char)(cy0 + yd * tt - ynow);
+ ynow += chy;
+ chy = abs(chy);
+ spew(ADDR|chx<<3|chy);
+ }
+ outplot();
+}
+
+void
+line(short x0, short y0, short x1, short y1) {
+ iline(xconv(xsc(x0)), yconv(ysc(y0)), xconv(xsc(x1)), yconv(ysc(y1)));
+}
+
+void
+cont(short x0, short y0) {
+ iline(xnow, ynow, xconv(xsc(x0)), yconv(ysc(y0)));
+}
diff --git a/usr/src/lib/libplot/t300s/common/linmod.c b/usr/src/lib/libplot/t300s/common/linmod.c
new file mode 100644
index 0000000000..86394deb4e
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/linmod.c
@@ -0,0 +1,37 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+void
+linemod(void)
+{
+}
diff --git a/usr/src/lib/libplot/t300s/common/llib-l300s b/usr/src/lib/libplot/t300s/common/llib-l300s
new file mode 100644
index 0000000000..204d205bf9
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/llib-l300s
@@ -0,0 +1,73 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <stdio.h>
+
+/*arc.c*/
+void arc(short, short, short, short, short, short);
+
+/*box.c*/
+void box(short, short, short, short);
+
+/*circle.c*/
+void circle(short, short, short);
+
+/*close.c*/
+void closelp(void);
+void closevt(void);
+
+/*cont.c*/
+void cont(short, short);
+
+/*erase.c*/
+void erase(void);
+
+/*label.c*/
+void label(char *);
+
+/*line.c*/
+void line(short, short);
+
+/*linmod.c*/
+void linemod(char *);
+
+/*move.c*/
+void move(short, short);
+
+/*open.c*/
+void openpt();
+void openvt();
+
+/*point.c*/
+void point(short, short);
+
+/*space.c*/
+void space(short, short, short, short);
diff --git a/usr/src/lib/libplot/t300s/common/move.c b/usr/src/lib/libplot/t300s/common/move.c
new file mode 100644
index 0000000000..4b7360ba91
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/move.c
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+move(short xi, short yi)
+{
+ movep(xconv(xsc(xi)), yconv(ysc(yi)));
+}
diff --git a/usr/src/lib/libplot/t300s/common/open.c b/usr/src/lib/libplot/t300s/common/open.c
new file mode 100644
index 0000000000..cd06d048a9
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/open.c
@@ -0,0 +1,67 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+/*LINTLIBRARY*/
+
+#include <signal.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <termio.h>
+#include "con.h"
+
+static float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0;
+float botx = 0.0, boty = 0.0, obotx = 0.0, oboty = 0.0;
+float scalex = 1.0, scaley = 1.0;
+int OUTF, xscale, yscale, xoffset;
+struct termio ITTY, PTTY;
+
+void
+openpl(void)
+{
+ xnow = ynow = 0;
+ OUTF = 1;
+ (void) printf("\r");
+ (void) ioctl(OUTF, TCGETA, &ITTY);
+ (void) signal(SIGINT, (void (*)(int))reset);
+ PTTY = ITTY;
+ PTTY.c_oflag &= ~(ONLCR|OCRNL|ONOCR|ONLRET);
+ PTTY.c_cflag |= CSTOPB;
+ (void) ioctl(OUTF, TCSETAW, &PTTY);
+ /* initialize constants */
+ xscale = (int)(4096. / (HORZRESP * WIDTH));
+ yscale = (int)(4096 / (VERTRESP * HEIGHT));
+ xoffset = (int)(OFFSET * HORZRESP);
+}
+
+void
+openvt(void) {
+ openpl();
+}
diff --git a/usr/src/lib/libplot/t300s/common/point.c b/usr/src/lib/libplot/t300s/common/point.c
new file mode 100644
index 0000000000..2b536fe2bf
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/point.c
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+point(short xi, short yi)
+{
+ move(xi, yi);
+ label(".");
+}
diff --git a/usr/src/lib/libplot/t300s/common/space.c b/usr/src/lib/libplot/t300s/common/space.c
new file mode 100644
index 0000000000..a49f06bdab
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/space.c
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+float deltx, delty = 0.0;
+
+void
+space(short x0, short y0, short x1, short y1)
+{
+ botx = -2047.;
+ boty = -2047.;
+ obotx = x0;
+ oboty = y0;
+ scalex = deltx / (x1-x0);
+ scaley = delty / (y1-y0);
+}
diff --git a/usr/src/lib/libplot/t300s/common/subr.c b/usr/src/lib/libplot/t300s/common/subr.c
new file mode 100644
index 0000000000..fa7bb487b5
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/common/subr.c
@@ -0,0 +1,226 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+/*LINTLIBRARY*/
+
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <plot.h>
+#include "con.h"
+
+static void
+delay(void)
+{
+ int i;
+ for (i = 0; i < 2; i++) {
+ (void) ioctl(OUTF, TCSBRK, 1);
+ }
+}
+
+int
+xconv(int xp)
+{
+ /*
+ * x position input is -2047 to +2047,
+ * output must be 0 to PAGSIZ*HORZRES
+ */
+ xp += 2048;
+ /* the computation is newx = xp*(PAGSIZ*HORZRES)/4096 */
+ return (int)(xoffset + xp / xscale);
+}
+
+int
+yconv(int yp)
+{
+ /* see description of xconv */
+ yp += 2048;
+ return (int)(yp / yscale);
+}
+
+void
+inplot(void)
+{
+ spew(ESC);
+ spew(INPLOT);
+}
+
+void
+outplot(void)
+{
+ spew(ESC);
+ spew(ACK);
+ spew(ESC);
+ spew(ACK);
+ (void) fflush(stdout);
+}
+
+void
+spew(char ch)
+{
+ (void) putc(ch, stdout);
+}
+
+void
+tobotleft(void)
+{
+ move(-2048, -2048);
+}
+
+void
+reset(void)
+{
+ struct termio ITTY;
+ (void) signal(SIGINT, SIG_IGN);
+ outplot();
+ (void) ioctl(OUTF, TCSETAW, &ITTY);
+ _exit(0);
+}
+
+float
+dist2(int x1, int y1, int x2, int y2)
+{
+ float t, v;
+ t = x2 - x1;
+ v = y1 - y2;
+ return (t * t + v * v);
+}
+
+void
+swap(int *pa, int *pb)
+{
+ int t;
+ t = *pa;
+ *pa = *pb;
+ *pb = t;
+}
+
+#define DOUBLE 010
+#define ADDR 0100
+#define COM 060
+#define MAXX 070
+#define MAXY 07
+#define SPACES 7
+
+void
+movep(int ix, int iy)
+{
+ int dx, dy, remx, remy, pts, i;
+ int xd, yd;
+ char c, addr, command;
+ if ((xnow == ix) && (ynow == iy))
+ return;
+ inplot();
+ dx = ix - xnow;
+ dy = iy - ynow;
+ command = COM|PENUP|((dx < 0) << 1)|(dy < 0);
+ dx = abs(dx);
+ dy = abs(dy);
+ xd = dx / (SPACES*2);
+ yd = dy / (SPACES*2);
+ pts = xd < yd ? xd : yd;
+ if ((i = pts) > 0) {
+ c = command|DOUBLE;
+ addr = ADDR;
+ if (xd > 0)
+ addr |= MAXX;
+ if (yd > 0)
+ addr |= MAXY;
+ spew(c);
+ delay();
+ while (i--) {
+ spew(addr);
+ delay();
+ }
+ }
+ if (xd != yd) {
+ if (xd > pts) {
+ i = xd - pts;
+ addr = ADDR|MAXX;
+ } else {
+ i = yd - pts;
+ addr = ADDR|MAXY;
+ }
+ c = command|DOUBLE;
+ spew(c);
+ delay();
+ while (i--) {
+ spew(addr);
+ delay();
+ }
+ }
+ remx = dx - xd * SPACES * 2;
+ remy = dy - yd * SPACES * 2;
+ addr = ADDR;
+ i = 0;
+ if (remx > 7) {
+ i = 1;
+ addr |= MAXX;
+ remx -= 7;
+ }
+ if (remy > 7) {
+ i = 1;
+ addr |= MAXY;
+ remy -= 7;
+ }
+ while (i--) {
+ spew(command);
+ delay();
+ spew(addr);
+ delay();
+ }
+ if ((remx > 0) || (remy > 0)) {
+ spew(command);
+ delay();
+ spew(ADDR|remx << 3|remy);
+ delay();
+ }
+ xnow = ix;
+ ynow = iy;
+ outplot();
+}
+
+int
+xsc(int xi)
+{
+ int xa;
+ xa = (int)((xi - obotx) * scalex + botx);
+ return (xa);
+}
+
+int
+ysc(int yi)
+{
+ int ya;
+ ya = (int)((yi - oboty) * scaley + boty);
+ return (ya);
+}
diff --git a/usr/src/lib/libplot/t300s/i386/Makefile b/usr/src/lib/libplot/t300s/i386/Makefile
new file mode 100644
index 0000000000..2302b3d6a0
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/i386/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/i386/Makefile
+
+MAPDIR= ../spec/i386
+
+include ../Makefile.com
+
+all: $(LIBS) $(LINTLIB)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/t300s/sparc/Makefile b/usr/src/lib/libplot/t300s/sparc/Makefile
new file mode 100644
index 0000000000..83d618f4fd
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/sparc/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/sparc/Makefile
+
+MAPDIR= ../spec/sparc
+
+include ../Makefile.com
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/t300s/sparcv9/Makefile b/usr/src/lib/libplot/t300s/sparcv9/Makefile
new file mode 100644
index 0000000000..938872cab7
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/sparcv9/Makefile
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/sparcv9/Makefile
+
+MAPDIR= ../spec/sparcv9
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/t300s/spec/Makefile b/usr/src/lib/libplot/t300s/spec/Makefile
new file mode 100644
index 0000000000..58f12a97d6
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/spec/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/spec/Makefile
+
+include $(SRC)/lib/Makefile.spec.arch
diff --git a/usr/src/lib/libplot/t300s/spec/Makefile.targ b/usr/src/lib/libplot/t300s/spec/Makefile.targ
new file mode 100644
index 0000000000..d0b7daf600
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/spec/Makefile.targ
@@ -0,0 +1,35 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/spec/Makefile.targ
+
+LIBRARY = lib300s.a
+VERS = .1
+
+OBJECTS = t300s.o
+
+SPECCPP =
diff --git a/usr/src/lib/libplot/t300s/spec/amd64/Makefile b/usr/src/lib/libplot/t300s/spec/amd64/Makefile
new file mode 100644
index 0000000000..2a38c1cba9
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/spec/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#amd64_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/t300s/spec/i386/Makefile b/usr/src/lib/libplot/t300s/spec/i386/Makefile
new file mode 100644
index 0000000000..147605852e
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/spec/i386/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/spec/i386/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#i386_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/t300s/spec/sparc/Makefile b/usr/src/lib/libplot/t300s/spec/sparc/Makefile
new file mode 100644
index 0000000000..ed24261bad
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/spec/sparc/Makefile
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/spec/sparc/Makefile
+
+.KEEP_STATE:
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#sparc_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/t300s/spec/sparcv9/Makefile b/usr/src/lib/libplot/t300s/spec/sparcv9/Makefile
new file mode 100644
index 0000000000..d922d70b8f
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/spec/sparcv9/Makefile
@@ -0,0 +1,43 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/spec/sparcv9/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#sparcv9_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/t300s/spec/t300s.spec b/usr/src/lib/libplot/t300s/spec/t300s.spec
new file mode 100644
index 0000000000..92aa659d88
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/spec/t300s.spec
@@ -0,0 +1,208 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t300s/spec/t300s.spec
+
+function arc extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function box extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function circle extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closepl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closevt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function cont extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function dot extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function erase extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function label extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function line extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function linemod extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function move extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openpl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openvt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function point extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function space extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function inplot
+version SUNWprivate_1.1
+end
+
+function yconv
+version SUNWprivate_1.1
+end
+
+function xconv
+version SUNWprivate_1.1
+end
+
+function tobotleft
+version SUNWprivate_1.1
+end
+
+function reset
+version SUNWprivate_1.1
+end
+
+function xsc
+version SUNWprivate_1.1
+end
+
+function dist2
+version SUNWprivate_1.1
+end
+
+function obotx
+version SUNWprivate_1.1
+end
+
+function oboty
+version SUNWprivate_1.1
+end
+
+function deltx
+version SUNWprivate_1.1
+end
+
+function delty
+version SUNWprivate_1.1
+end
+
+function ysc
+version SUNWprivate_1.1
+end
+
+function swap
+version SUNWprivate_1.1
+end
+
+function scalex
+version SUNWprivate_1.1
+end
+
+function scaley
+version SUNWprivate_1.1
+end
+
+function outplot
+version SUNWprivate_1.1
+end
+
+function botx
+version SUNWprivate_1.1
+end
+
+function boty
+version SUNWprivate_1.1
+end
+
+function movep
+version SUNWprivate_1.1
+end
+
+function xnow
+version SUNWprivate_1.1
+end
+
+function ynow
+version SUNWprivate_1.1
+end
+
+function spew
+version SUNWprivate_1.1
+end
+
+function ITTY
+version SUNWprivate_1.1
+end
+
+function PTTY
+version SUNWprivate_1.1
+end
+
+function OUTF
+version SUNWprivate_1.1
+end
+
+function xoffset
+version SUNWprivate_1.1
+end
+
+function xscale
+version SUNWprivate_1.1
+end
+
+function yscale
+version SUNWprivate_1.1
+end
+
+function _lib_version
+version SUNWprivate_1.1
+end
+
diff --git a/usr/src/lib/libplot/t300s/spec/versions b/usr/src/lib/libplot/t300s/spec/versions
new file mode 100644
index 0000000000..38a2cfc77a
--- /dev/null
+++ b/usr/src/lib/libplot/t300s/spec/versions
@@ -0,0 +1,43 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+sparc {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+sparcv9 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+i386 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+amd64 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
diff --git a/usr/src/lib/libplot/t4014/Makefile b/usr/src/lib/libplot/t4014/Makefile
new file mode 100644
index 0000000000..b574371379
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/Makefile
@@ -0,0 +1,51 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1989,1992,1998-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t4014/Makefile
+#
+
+include ../../Makefile.lib
+
+SUBDIRS= spec .WAIT $(MACH) $(BUILD64) $(MACH64)
+
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+delete := TARGET= delete
+install := TARGET= install
+lint := TARGET= lint
+
+.KEEP_STATE:
+
+all clean clobber delete install lint: $(SUBDIRS)
+
+
+$(MACH) $(MACH64) spec: FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
+
diff --git a/usr/src/lib/libplot/t4014/Makefile.com b/usr/src/lib/libplot/t4014/Makefile.com
new file mode 100644
index 0000000000..8607861a28
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/Makefile.com
@@ -0,0 +1,75 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t4014/Makefile.com
+#
+
+LIBRARY= lib4014.a
+VERS= .1
+
+OBJECTS= \
+ arc.o box.o circle.o close.o \
+ dot.o erase.o label.o \
+ line.o linemod.o move.o open.o \
+ point.o space.o subr.o
+
+# include library definitions
+include ../../../Makefile.lib
+
+MAPFILE= $(MAPDIR)/mapfile
+MAPOPTS= $(MAPFILE:%=-M %)
+SRCS= $(OBJECTS:%.o=../common/%.c)
+
+CLOBBERFILES += $(MAPFILE)
+
+LIBS = $(DYNLIB) $(LINTLIB)
+
+LINTSRC= $(LINTLIB:%.ln=%)
+
+CFLAGS += $(CCVERBOSE)
+DYNFLAGS += $(MAPOPTS)
+LDLIBS += -lc -lm
+
+.KEEP_STATE:
+
+lint: lintcheck
+
+$(DYNLIB): $(MAPFILE)
+
+$(MAPFILE):
+ @cd $(MAPDIR); $(MAKE) mapfile
+
+# include library targets
+include ../../../Makefile.targ
+
+pics/%.o: ../common/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+# install rule for lint library target
+$(ROOTLINTDIR)/%: ../common/%
+ $(INS.file)
diff --git a/usr/src/lib/libplot/t4014/amd64/Makefile b/usr/src/lib/libplot/t4014/amd64/Makefile
new file mode 100644
index 0000000000..5a418230f5
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+MAPDIR= ../spec/amd64
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LINTFLAGS64 += -erroff=E_ASSIGMENT_CAUSE_LOSS_PREC
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/t4014/common/arc.c b/usr/src/lib/libplot/t4014/common/arc.c
new file mode 100644
index 0000000000..04f475dcf7
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/arc.c
@@ -0,0 +1,188 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
+/*LINTLIBRARY*/
+
+#include <stdlib.h>
+#include <math.h>
+#include <plot.h>
+#include "con.h"
+
+static int del = 20;
+
+static void
+step(int d)
+{
+ del = d;
+}
+
+/*
+ * local definition of quad
+ * legacy code
+ */
+static short
+quad_l(short x, short y, short xp, short yp)
+{
+ if (x < xp)
+ if (y <= yp)
+ return (1);
+ else return (4);
+ else if (x > xp)
+ if (y < yp)
+ return (2);
+ else return (3);
+ else if (y < yp)
+ return (2);
+ else return (4);
+}
+
+void
+arc(short x, short y, short x0, short y0, short x1, short y1)
+{
+ double pc;
+ int flg, m, xc, yc, xs, ys, qs, qf, qt, qtctr = 0;
+ int m0, m1;
+ float dx, dy, r;
+ char use;
+ dx = x - x0;
+ dy = y - y0;
+ r = dx * dx + dy * dy;
+ pc = r;
+ pc = sqrt(pc);
+ flg = (int)(pc / 4);
+ if (flg == 0)
+ step(1);
+ else if (flg < del)
+ step(flg);
+ xc = xs = x0;
+ yc = ys = y0;
+ move((short)xs, (short)ys);
+ if ((x0 == x1) && (y0 == y1))
+ flg = 0;
+ else flg = 1;
+ qs = quad_l(x, y, x0, y0);
+ qf = quad_l(x, y, x1, y1);
+ if (abs(x - x1) < abs(y - y1)) {
+ use = 'x';
+ if ((qs == 2) || (qs == 3))
+ m = -1;
+ else m = 1;
+ } else {
+ use = 'y';
+ if (qs > 2)
+ m = -1;
+ else m = 1;
+ }
+ if (qs == qf) {
+ m0 = (y0 - y) / (x0 - x);
+ m1 = (y1 - y) / (x1 - x);
+ if (m0 >= m1)
+ qt = 4;
+ else qt = 0;
+ } else if ((qt = qf - qs) < 0)
+ qt += 4;
+ /* LINTED */
+ while (1) {
+ switch (use) {
+ case 'x':
+ if ((qs == 2) || (qs == 3))
+ yc -= del;
+ else yc += del;
+ dy = yc - y;
+ pc = r - dy * dy;
+ xc = (int)(m * sqrt(pc) + x);
+ if (((x < xs) && (x >= xc)) ||
+ ((x > xs) && (x <= xc)) ||
+ ((y < ys) && (y >= yc)) ||
+ ((y > ys) && (y <= yc))) {
+ if (++qtctr > qt)
+ return;
+ if (++qs > 4)
+ qs = 1;
+ if ((qs == 2) || (qs == 3))
+ m = -1;
+ else m = 1;
+ flg = 1;
+ }
+ cont((short)xc, (short)yc);
+ xs = xc;
+ ys = yc;
+ if ((qs == qf) && (flg == 1))
+ switch (qf) {
+ case 3:
+ case 4:
+ if (xs >= x1)
+ return;
+ continue;
+ case 1:
+ case 2:
+ if (xs <= x1)
+ return;
+ }
+ continue;
+ case 'y':
+ if (qs > 2)
+ xc += del;
+ else xc -= del;
+ dx = xc - x;
+ pc = r - dx * dx;
+ yc = (int)(m * sqrt(pc) + y);
+ if (((x < xs) && (x >= xc)) ||
+ ((x > xs) && (x <= xc)) ||
+ ((y < ys) && (y >= yc)) ||
+ ((y > ys) && (y <= yc))) {
+ if (++qtctr > qt)
+ return;
+ if (++qs > 4)
+ qs = 1;
+ if (qs > 2)
+ m = -1;
+ else m = 1;
+ flg = 1;
+ }
+ cont((short)xc, (short)yc);
+ xs = xc;
+ ys = yc;
+ if ((qs == qf) && (flg == 1))
+ switch (qs) {
+ case 1:
+ case 4:
+ if (ys >= y1)
+ return;
+ continue;
+ case 2:
+ case 3:
+ if (ys <= y1)
+ return;
+ }
+ }
+ }
+}
diff --git a/usr/src/lib/libplot/t4014/common/box.c b/usr/src/lib/libplot/t4014/common/box.c
new file mode 100644
index 0000000000..949f3fcabf
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/box.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+box(short x0, short y0, short x1, short y1)
+{
+ move(x0, y0);
+ cont(x0, y1);
+ cont(x1, y1);
+ cont(x1, y0);
+ cont(x0, y0);
+ move(x1, y1);
+}
diff --git a/usr/src/lib/libplot/t4014/common/circle.c b/usr/src/lib/libplot/t4014/common/circle.c
new file mode 100644
index 0000000000..ca59779153
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/circle.c
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+circle(short x, short y, short r)
+{
+ arc(x, y, x + r, y, x + r, y);
+}
diff --git a/usr/src/lib/libplot/t4014/common/close.c b/usr/src/lib/libplot/t4014/common/close.c
new file mode 100644
index 0000000000..9337ebfe8c
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/close.c
@@ -0,0 +1,49 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+closevt(void)
+{
+ putch(037);
+ (void) fflush(stdout);
+}
+
+void
+closepl(void)
+{
+ putch(037);
+ (void) fflush(stdout);
+}
diff --git a/usr/src/lib/libplot/t4014/common/con.h b/usr/src/lib/libplot/t4014/common/con.h
new file mode 100644
index 0000000000..7f8f10e920
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/con.h
@@ -0,0 +1,36 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <termio.h>
+
+extern void putch(char);
+extern int ohiy, ohix, oloy, oextra;
+extern float scalex, scaley;
+extern int scaleflag;
+extern float obotx, oboty;
diff --git a/usr/src/lib/libplot/t4014/common/dot.c b/usr/src/lib/libplot/t4014/common/dot.c
new file mode 100644
index 0000000000..fbca617050
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/dot.c
@@ -0,0 +1,37 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+void
+dot(void)
+{
+}
diff --git a/usr/src/lib/libplot/t4014/common/erase.c b/usr/src/lib/libplot/t4014/common/erase.c
new file mode 100644
index 0000000000..f7c8b0d269
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/erase.c
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+void
+erase(void)
+{
+ putch(033);
+ putch(014);
+ ohiy = -1;
+ ohix = -1;
+ oextra = -1;
+ oloy = -1;
+ (void) sleep(2);
+}
diff --git a/usr/src/lib/libplot/t4014/common/label.c b/usr/src/lib/libplot/t4014/common/label.c
new file mode 100644
index 0000000000..7f07edcb0b
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/label.c
@@ -0,0 +1,72 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+#define N 0104
+#define E 0101
+#define NE 0105
+#define S 0110
+#define W 0102
+#define SW 0112
+
+/*
+ * arrange by incremental plotting that an initial
+ * character such as +, X, *, etc will fall
+ * right on the point, and undo it so that further
+ * labels will fall properly in place
+ */
+
+
+void
+label(char *s)
+{
+ char lbl_mv[] = {036, 040, S, S, S, S, S, S, SW, SW,
+ SW, SW, SW, SW, SW, SW, SW, SW, 037, 0};
+
+ char lbl_umv[] = {036, 040, N, N, N, N, N, N, NE, NE,
+ NE, NE, NE, NE, NE, NE, NE, NE, 037, 0};
+
+ int i;
+ char c;
+
+ /* LINTED */
+ for (i = 0; c = lbl_mv[i]; i++)
+ putch(c);
+ /* LINTED */
+ for (i = 0; c = s[i]; i++)
+ putch(c);
+ /* LINTED */
+ for (i = 0; c = lbl_umv[i]; i++)
+ putch(c);
+}
diff --git a/usr/src/lib/libplot/t4014/common/line.c b/usr/src/lib/libplot/t4014/common/line.c
new file mode 100644
index 0000000000..d225f45b7e
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/line.c
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+line(short x0, short y0, short x1, short y1)
+{
+ move(x0, y0);
+ cont(x1, y1);
+}
diff --git a/usr/src/lib/libplot/t4014/common/linemod.c b/usr/src/lib/libplot/t4014/common/linemod.c
new file mode 100644
index 0000000000..aeccc6e765
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/linemod.c
@@ -0,0 +1,56 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+linemod(char *s)
+{
+ char c;
+ putch(033);
+ switch (s[0]) {
+ case 'l':
+ c = 'd';
+ break;
+ case 'd':
+ if (s[3] != 'd')
+ c = 'a';
+ else c = 'b';
+ break;
+ case 's':
+ if (s[5] != '\0')
+ c = 'c';
+ else c = '`';
+ }
+ putch(c);
+}
diff --git a/usr/src/lib/libplot/t4014/common/llib-l4014 b/usr/src/lib/libplot/t4014/common/llib-l4014
new file mode 100644
index 0000000000..204d205bf9
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/llib-l4014
@@ -0,0 +1,73 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <stdio.h>
+
+/*arc.c*/
+void arc(short, short, short, short, short, short);
+
+/*box.c*/
+void box(short, short, short, short);
+
+/*circle.c*/
+void circle(short, short, short);
+
+/*close.c*/
+void closelp(void);
+void closevt(void);
+
+/*cont.c*/
+void cont(short, short);
+
+/*erase.c*/
+void erase(void);
+
+/*label.c*/
+void label(char *);
+
+/*line.c*/
+void line(short, short);
+
+/*linmod.c*/
+void linemod(char *);
+
+/*move.c*/
+void move(short, short);
+
+/*open.c*/
+void openpt();
+void openvt();
+
+/*point.c*/
+void point(short, short);
+
+/*space.c*/
+void space(short, short, short, short);
diff --git a/usr/src/lib/libplot/t4014/common/move.c b/usr/src/lib/libplot/t4014/common/move.c
new file mode 100644
index 0000000000..03edb8b5ba
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/move.c
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+#include "con.h"
+
+void
+move(short xi, short yi)
+{
+ putch(035);
+ cont(xi, yi);
+}
diff --git a/usr/src/lib/libplot/t4014/common/open.c b/usr/src/lib/libplot/t4014/common/open.c
new file mode 100644
index 0000000000..4598bc730e
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/open.c
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+void
+openvt(void)
+{
+}
+
+void
+openpl(void)
+{
+}
diff --git a/usr/src/lib/libplot/t4014/common/point.c b/usr/src/lib/libplot/t4014/common/point.c
new file mode 100644
index 0000000000..1d28ab4edb
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/point.c
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+point(short xi, short yi)
+{
+ move(xi, yi);
+ cont(xi, yi);
+}
diff --git a/usr/src/lib/libplot/t4014/common/scale.c b/usr/src/lib/libplot/t4014/common/scale.c
new file mode 100644
index 0000000000..fd59a6688a
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/scale.c
@@ -0,0 +1,56 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+scale(char i, float x, float y)
+{
+ switch (i) {
+ default:
+ return;
+ case 'c':
+ x *= 2.54;
+ y *= 2.54;
+ /*FALLTHRU*/
+ case 'i':
+ x /= 200;
+ y /= 200;
+ /*FALLTHRU*/
+ case 'u':
+ scalex = 1 / x;
+ scaley = 1 / y;
+ /*FALLTHRU*/
+ }
+ scaleflag = 1;
+}
diff --git a/usr/src/lib/libplot/t4014/common/space.c b/usr/src/lib/libplot/t4014/common/space.c
new file mode 100644
index 0000000000..d419d1628d
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/space.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+space(short x0, short y0, short x1, short y1)
+{
+ obotx = x0;
+ oboty = y0;
+ if (scaleflag)
+ return;
+ scalex = 3120. / (x1 - x0);
+ scaley = 3120. / (y1 - y0);
+}
diff --git a/usr/src/lib/libplot/t4014/common/subr.c b/usr/src/lib/libplot/t4014/common/subr.c
new file mode 100644
index 0000000000..f49c92f02a
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/common/subr.c
@@ -0,0 +1,97 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "con.h"
+
+float obotx = 0.0;
+float oboty = 0.0;
+float botx = 0.0;
+float boty = 0.0;
+float scalex = 1.0;
+float scaley = 1.0;
+int scaleflag = 0;
+int oloy = -1;
+int ohiy = -1;
+int ohix = -1;
+int oextra = -1;
+
+
+void
+putch(char c)
+{
+ (void) putc(c, stdout);
+}
+
+void
+cont(short x, short y)
+{
+ short hix, hiy, lox, loy, extra;
+ short n;
+ x = (short)((x - obotx) * scalex + botx);
+ y = (short)((y - oboty) * scaley + boty);
+ hix = (x>>7) & 037;
+ hiy = (y>>7) & 037;
+ lox = (x>>2) & 037;
+ loy = (y>>2) & 037;
+ extra = x & 03 + (y<<2) & 014;
+ n = (abs(hix - ohix) + abs(hiy - ohiy) + 6) / 12;
+ if (hiy != ohiy) {
+ putch(hiy|040);
+ ohiy = hiy;
+ }
+ if (hix != ohix) {
+ if (extra != oextra) {
+ putch(extra|0140);
+ oextra = extra;
+ }
+ putch(loy|0140);
+ putch(hix|040);
+ ohix = hix;
+ oloy = loy;
+ } else {
+ if (extra != oextra) {
+ putch(extra|0140);
+ putch(loy|0140);
+ oextra = extra;
+ oloy = loy;
+ } else if (loy != oloy) {
+ putch(loy|0140);
+ oloy = loy;
+ }
+ }
+ putch(lox|0100);
+ while (n--)
+ putch(0);
+}
diff --git a/usr/src/lib/libplot/t4014/i386/Makefile b/usr/src/lib/libplot/t4014/i386/Makefile
new file mode 100644
index 0000000000..036dad49c9
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/i386/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/i386/Makefile
+
+MAPDIR= ../spec/i386
+
+include ../Makefile.com
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/t4014/sparc/Makefile b/usr/src/lib/libplot/t4014/sparc/Makefile
new file mode 100644
index 0000000000..d0196b39cc
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/sparc/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/sparc/Makefile
+
+MAPDIR= ../spec/sparc
+
+include ../Makefile.com
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/t4014/sparcv9/Makefile b/usr/src/lib/libplot/t4014/sparcv9/Makefile
new file mode 100644
index 0000000000..99c1745c9b
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/sparcv9/Makefile
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/sparcv9/Makefile
+
+MAPDIR= ../spec/sparcv9
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/t4014/spec/Makefile b/usr/src/lib/libplot/t4014/spec/Makefile
new file mode 100644
index 0000000000..2d90e25b62
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/spec/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t4014/spec/Makefile
+
+include $(SRC)/lib/Makefile.spec.arch
diff --git a/usr/src/lib/libplot/t4014/spec/Makefile.targ b/usr/src/lib/libplot/t4014/spec/Makefile.targ
new file mode 100644
index 0000000000..4113761ecb
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/spec/Makefile.targ
@@ -0,0 +1,35 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t4014/spec/Makefile.targ
+
+LIBRARY = lib4014.a
+VERS = .1
+
+OBJECTS = t4014.o
+
+SPECCPP =
diff --git a/usr/src/lib/libplot/t4014/spec/amd64/Makefile b/usr/src/lib/libplot/t4014/spec/amd64/Makefile
new file mode 100644
index 0000000000..2a38c1cba9
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/spec/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#amd64_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/t4014/spec/i386/Makefile b/usr/src/lib/libplot/t4014/spec/i386/Makefile
new file mode 100644
index 0000000000..78d1350294
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/spec/i386/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t4014/spec/i386/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#i386_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/t4014/spec/sparc/Makefile b/usr/src/lib/libplot/t4014/spec/sparc/Makefile
new file mode 100644
index 0000000000..f53a9b8021
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/spec/sparc/Makefile
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t4014/spec/sparc/Makefile
+
+.KEEP_STATE:
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#sparc_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/t4014/spec/sparcv9/Makefile b/usr/src/lib/libplot/t4014/spec/sparcv9/Makefile
new file mode 100644
index 0000000000..6d7e683133
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/spec/sparcv9/Makefile
@@ -0,0 +1,43 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t4014/spec/sparcv9/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#sparcv9_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/t4014/spec/t4014.spec b/usr/src/lib/libplot/t4014/spec/t4014.spec
new file mode 100644
index 0000000000..ae4b72e555
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/spec/t4014.spec
@@ -0,0 +1,144 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t4014/spec/t4014.spec
+
+function arc extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function box extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function circle extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closepl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closevt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function cont extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function dot extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function erase extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function label extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function line extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function linemod extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function move extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openpl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openvt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function point extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function space extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function obotx
+version SUNWprivate_1.1
+end
+
+function oboty
+version SUNWprivate_1.1
+end
+
+function scalex
+version SUNWprivate_1.1
+end
+
+function scaley
+version SUNWprivate_1.1
+end
+
+function ohix
+version SUNWprivate_1.1
+end
+
+function ohiy
+version SUNWprivate_1.1
+end
+
+function oloy
+version SUNWprivate_1.1
+end
+
+function botx
+version SUNWprivate_1.1
+end
+
+function boty
+version SUNWprivate_1.1
+end
+
+function oextra
+version SUNWprivate_1.1
+end
+
+function scaleflag
+version SUNWprivate_1.1
+end
+
+function putch
+version SUNWprivate_1.1
+end
+
+function _lib_version
+version SUNWprivate_1.1
+end
+
diff --git a/usr/src/lib/libplot/t4014/spec/versions b/usr/src/lib/libplot/t4014/spec/versions
new file mode 100644
index 0000000000..38a2cfc77a
--- /dev/null
+++ b/usr/src/lib/libplot/t4014/spec/versions
@@ -0,0 +1,43 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+sparc {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+sparcv9 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+i386 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+amd64 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
diff --git a/usr/src/lib/libplot/t450/Makefile b/usr/src/lib/libplot/t450/Makefile
new file mode 100644
index 0000000000..5c812d99d9
--- /dev/null
+++ b/usr/src/lib/libplot/t450/Makefile
@@ -0,0 +1,51 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1989,1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/Makefile
+#
+
+include ../../Makefile.lib
+
+SUBDIRS= spec $(MACH) $(BUILD64) $(MACH64)
+
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+delete := TARGET= delete
+install := TARGET= install
+lint := TARGET= lint
+
+.KEEP_STATE:
+
+all clean clobber delete install lint: $(SUBDIRS)
+
+
+$(MACH) $(MACH64) spec: FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
+
diff --git a/usr/src/lib/libplot/t450/Makefile.com b/usr/src/lib/libplot/t450/Makefile.com
new file mode 100644
index 0000000000..590471d6d2
--- /dev/null
+++ b/usr/src/lib/libplot/t450/Makefile.com
@@ -0,0 +1,75 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/Makefile.com
+#
+
+LIBRARY= lib450.a
+VERS= .1
+
+OBJECTS= \
+ arc.o box.o circle.o close.o \
+ dot.o erase.o label.o \
+ line.o linmod.o move.o open.o \
+ point.o space.o subr.o
+
+# include library definitions
+include ../../../Makefile.lib
+
+MAPFILE= $(MAPDIR)/mapfile
+MAPOPTS= $(MAPFILE:%=-M %)
+SRCS= $(OBJECTS:%.o=../common/%.c)
+
+LIBS = $(DYNLIB) $(LINTLIB)
+
+$(LINTLIB):= SRCS=../common/llib-l450
+
+LINTSRC= $(LINTLIB:%.ln=%)
+
+CFLAGS += $(CCVERBOSE)
+DYNFLAGS += $(MAPOPTS)
+LDLIBS += -lc -lm
+
+.KEEP_STATE:
+
+lint: lintcheck
+
+$(DYNLIB): $(MAPFILE)
+
+$(MAPFILE):
+ @cd $(MAPDIR); $(MAKE) mapfile
+
+# include library targets
+include ../../../Makefile.targ
+
+pics/%.o: ../common/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+# install rule for lint library target
+$(ROOTLINTDIR)/%: ../common/%
+ $(INS.file)
diff --git a/usr/src/lib/libplot/t450/amd64/Makefile b/usr/src/lib/libplot/t450/amd64/Makefile
new file mode 100644
index 0000000000..5a418230f5
--- /dev/null
+++ b/usr/src/lib/libplot/t450/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+MAPDIR= ../spec/amd64
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LINTFLAGS64 += -erroff=E_ASSIGMENT_CAUSE_LOSS_PREC
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/t450/common/arc.c b/usr/src/lib/libplot/t450/common/arc.c
new file mode 100644
index 0000000000..347c54b0b2
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/arc.c
@@ -0,0 +1,190 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
+/*LINTLIBRARY*/
+
+#include <stdlib.h>
+#include <math.h>
+#include <plot.h>
+#include "con.h"
+
+static int del = 20;
+
+/*
+ * local definitions for quad
+ * legacy code
+ */
+static short
+quad_l(short x, short y, short xp, short yp)
+{
+ if (x < xp)
+ if (y <= yp)
+ return (1);
+ else return (4);
+ else if (x > xp)
+ if (y < yp)
+ return (2);
+ else return (3);
+ else if (y < yp)
+ return (2);
+ else return (4);
+}
+
+static void
+step(int d)
+{
+ del = d;
+}
+
+void
+arc(short x, short y, short x0, short y0, short x1, short y1)
+{
+ double pc;
+ double sqrt(double);
+ int flg, m, qs, qf, qt, qtctr = 0;
+ int m0, m1;
+ short xs, ys, xc, yc;
+ float dx, dy, r;
+ char use;
+ dx = x - x0;
+ dy = y - y0;
+ r = dx * dx + dy * dy;
+ pc = r;
+ pc = sqrt(pc);
+ flg = (int)(pc / 4);
+ if (flg == 0)
+ step(1);
+ else if (flg < del)
+ step(flg);
+ xc = xs = x0;
+ yc = ys = y0;
+ move(xs, ys);
+ if ((x0 == x1) && (y0 == y1))
+ flg = 0;
+ else flg = 1;
+ qs = quad_l(x, y, x0, y0);
+ qf = quad_l(x, y, x1, y1);
+ if (abs(x - x1) < abs(y - y1)) {
+ use = 'x';
+ if ((qs == 2) || (qs == 3))
+ m = -1;
+ else m = 1;
+ } else {
+ use = 'y';
+ if (qs > 2)
+ m = -1;
+ else m = 1;
+ }
+ if (qs == qf) {
+ m0 = (y0 - y) / (x0 - x);
+ m1 = (y1 - y) / (x1 - x);
+ if (m0 >= m1)
+ qt = 4;
+ else qt = 0;
+ } else if ((qt = qf - qs) < 0)
+ qt += 4;
+ /* LINTED */
+ while (1) {
+ switch (use) {
+ case 'x':
+ if ((qs == 2) || (qs == 3))
+ yc -= del;
+ else yc += del;
+ dy = yc - y;
+ pc = r - dy * dy;
+ xc = (int)(m * sqrt(pc) + x);
+ if (((x < xs) && (x >= xc)) ||
+ ((x > xs) && (x <= xc)) ||
+ ((y < ys) && (y >= yc)) ||
+ ((y > ys) && (y <= yc))) {
+ if (++qtctr > qt)
+ return;
+ if (++qs > 4)
+ qs = 1;
+ if ((qs == 2) || (qs == 3))
+ m = -1;
+ else m = 1;
+ flg = 1;
+ }
+ cont(xc, yc);
+ xs = xc;
+ ys = yc;
+ if ((qs == qf) && (flg == 1))
+ switch (qf) {
+ case 3:
+ case 4:
+ if (xs >= x1)
+ return;
+ continue;
+ case 1:
+ case 2:
+ if (xs <= x1)
+ return;
+ }
+ continue;
+ case 'y':
+ if (qs > 2)
+ xc += del;
+ else xc -= del;
+ dx = xc - x;
+ pc = r - dx * dx;
+ yc = (int)(m * sqrt(pc) + y);
+ if (((x < xs) && (x >= xc)) ||
+ ((x > xs) && (x <= xc)) ||
+ ((y < ys) && (y >= yc)) ||
+ ((y > ys) && (y <= yc))) {
+ if (++qtctr > qt)
+ return;
+ if (++qs > 4)
+ qs = 1;
+ if (qs > 2)
+ m = -1;
+ else m = 1;
+ flg = 1;
+ }
+ cont(xc, yc);
+ xs = xc;
+ ys = yc;
+ if ((qs == qf) && (flg == 1))
+ switch (qs) {
+ case 1:
+ case 4:
+ if (ys >= y1)
+ return;
+ continue;
+ case 2:
+ case 3:
+ if (ys <= y1)
+ return;
+ }
+ }
+ }
+}
diff --git a/usr/src/lib/libplot/t450/common/box.c b/usr/src/lib/libplot/t450/common/box.c
new file mode 100644
index 0000000000..949f3fcabf
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/box.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+box(short x0, short y0, short x1, short y1)
+{
+ move(x0, y0);
+ cont(x0, y1);
+ cont(x1, y1);
+ cont(x1, y0);
+ cont(x0, y0);
+ move(x1, y1);
+}
diff --git a/usr/src/lib/libplot/t450/common/circle.c b/usr/src/lib/libplot/t450/common/circle.c
new file mode 100644
index 0000000000..62c1c845d9
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/circle.c
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+circle(short x, short y, short r)
+{
+ arc(x, y, x + r, y, x + r, y);
+}
diff --git a/usr/src/lib/libplot/t450/common/close.c b/usr/src/lib/libplot/t450/common/close.c
new file mode 100644
index 0000000000..7b54157ca2
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/close.c
@@ -0,0 +1,48 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <stdio.h>
+#include "con.h"
+
+void
+closepl(void)
+{
+ (void) fflush(stdout);
+ reset();
+}
+
+void
+closevt(void)
+{
+ closepl();
+}
diff --git a/usr/src/lib/libplot/t450/common/con.h b/usr/src/lib/libplot/t450/common/con.h
new file mode 100644
index 0000000000..a8fd1871d8
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/con.h
@@ -0,0 +1,77 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+
+#include <termio.h>
+
+/* gsi plotting output routines */
+#define DOWN 012
+#define UP 013
+#define LEFT 010
+#define RIGHT 040
+#define BEL 007
+#define ESC 033
+#define ACK 006
+#define PLOTIN 063
+#define PLOTOUT 064
+#define CR 015
+#define FF 014
+#define VERTRESP 48
+#define HORZRESP 60.
+#define VERTRES 8.
+#define HORZRES 6.
+
+/* vert and horiz spacing */
+#define RS 036
+#define US 037
+#define HT 011
+
+/*
+ * down is line feed, up is reverse line feed,
+ * left is backspace, right is space. 48 points per inch
+ * vertically, 60 horizontally
+*/
+
+extern int xnow, ynow;
+extern struct termio ITTY, PTTY;
+extern int OUTF;
+extern int xscale, xoffset, yscale;
+extern float botx, boty, obotx, oboty, scalex, scaley;
+extern void movep(int, int);
+extern void spew(char);
+extern int xconv(int);
+extern int yconv(int);
+extern void inplot(void);
+extern void outplot(void);
+extern int xsc(int);
+extern int ysc(int);
+extern void reset(void);
+extern float dist2(int, int, int, int);
diff --git a/usr/src/lib/libplot/t450/common/dot.c b/usr/src/lib/libplot/t450/common/dot.c
new file mode 100644
index 0000000000..fbca617050
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/dot.c
@@ -0,0 +1,37 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+void
+dot(void)
+{
+}
diff --git a/usr/src/lib/libplot/t450/common/erase.c b/usr/src/lib/libplot/t450/common/erase.c
new file mode 100644
index 0000000000..9f2043ede9
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/erase.c
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+void
+erase(void)
+{
+ int i;
+ for (i = 0; i < 11 * (VERTRESP / VERTRES); i++)
+ spew(DOWN);
+}
diff --git a/usr/src/lib/libplot/t450/common/label.c b/usr/src/lib/libplot/t450/common/label.c
new file mode 100644
index 0000000000..5182f5f230
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/label.c
@@ -0,0 +1,43 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+
+#include "con.h"
+
+void
+label(char *s)
+{
+ char c;
+ while ((c = *s++) != '\0') {
+ xnow += HORZRES;
+ spew(c);
+ }
+}
diff --git a/usr/src/lib/libplot/t450/common/line.c b/usr/src/lib/libplot/t450/common/line.c
new file mode 100644
index 0000000000..ce84e3aa23
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/line.c
@@ -0,0 +1,89 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+
+#include <stdlib.h>
+#include <math.h>
+#include <plot.h>
+#include "con.h"
+
+static void
+iline(int cx0, int cy0, int cx1, int cy1)
+{
+ int maxp, tt, j;
+ char chx, chy;
+ float xd, yd;
+ movep(cx0, cy0);
+ maxp = (int)(sqrt(dist2(cx0, cy0, cx1, cy1)) / 2.);
+ xd = cx1 - cx0;
+ yd = cy1 - cy0;
+ if (xd >= 0)
+ chx = RIGHT;
+ else chx = LEFT;
+ if (yd >= 0)
+ chy = UP;
+ else chy = DOWN;
+ if (maxp == 0) {
+ xd = 0;
+ yd = 0;
+ } else {
+ xd /= maxp;
+ yd /= maxp;
+ }
+ inplot();
+ for (tt = 0; tt <= maxp; tt++) {
+ j = (int)(cx0 + xd * tt - xnow);
+ xnow += j;
+ j = abs(j);
+ while (j-- > 0)
+ spew(chx);
+ j = (int)(cy0 + yd * tt - ynow);
+ ynow += j;
+ j = abs(j);
+ while (j-- > 0)
+ spew(chy);
+ spew('.');
+ }
+ outplot();
+}
+
+void
+line(short x0, short y0, short x1, short y1)
+{
+ iline(xconv(xsc(x0)), yconv(ysc(y0)),
+ xconv(xsc(x1)), yconv(ysc(y1)));
+}
+
+void
+cont(short x0, short y0)
+{
+ iline(xnow, ynow, xconv(xsc(x0)), yconv(ysc(y0)));
+}
diff --git a/usr/src/lib/libplot/t450/common/linmod.c b/usr/src/lib/libplot/t450/common/linmod.c
new file mode 100644
index 0000000000..f9e7110793
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/linmod.c
@@ -0,0 +1,36 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+
+void
+linemod(void)
+{
+}
diff --git a/usr/src/lib/libplot/t450/common/llib-l450 b/usr/src/lib/libplot/t450/common/llib-l450
new file mode 100644
index 0000000000..204d205bf9
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/llib-l450
@@ -0,0 +1,73 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <stdio.h>
+
+/*arc.c*/
+void arc(short, short, short, short, short, short);
+
+/*box.c*/
+void box(short, short, short, short);
+
+/*circle.c*/
+void circle(short, short, short);
+
+/*close.c*/
+void closelp(void);
+void closevt(void);
+
+/*cont.c*/
+void cont(short, short);
+
+/*erase.c*/
+void erase(void);
+
+/*label.c*/
+void label(char *);
+
+/*line.c*/
+void line(short, short);
+
+/*linmod.c*/
+void linemod(char *);
+
+/*move.c*/
+void move(short, short);
+
+/*open.c*/
+void openpt();
+void openvt();
+
+/*point.c*/
+void point(short, short);
+
+/*space.c*/
+void space(short, short, short, short);
diff --git a/usr/src/lib/libplot/t450/common/move.c b/usr/src/lib/libplot/t450/common/move.c
new file mode 100644
index 0000000000..22e57d44de
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/move.c
@@ -0,0 +1,39 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+
+#include "con.h"
+
+void
+move(short xi, short yi)
+{
+ movep(xconv(xsc(xi)), yconv(ysc(yi)));
+}
diff --git a/usr/src/lib/libplot/t450/common/open.c b/usr/src/lib/libplot/t450/common/open.c
new file mode 100644
index 0000000000..38755759d5
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/open.c
@@ -0,0 +1,73 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+#include <signal.h>
+#include <unistd.h>
+#include <stdio.h>
+#include "con.h"
+
+
+float botx = 0.0, boty = 0.0, obotx = 0.0, oboty = 0.0;
+float scalex = 1.0, scaley = 1.0;
+static float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0;
+int xscale = 0, xoffset = 0, yscale = 0;
+struct termio ITTY, PTTY;
+
+void
+openpl(void)
+{
+ int OUTF = 1;
+ (void) printf("\r");
+ (void) ioctl(OUTF, TCGETA, &ITTY);
+ (void) signal(SIGINT, (void (*)(int))reset);
+ PTTY = ITTY;
+ PTTY.c_oflag &= ~(ONLCR|OCRNL|ONOCR|ONLRET);
+ PTTY.c_cflag |= CSTOPB;
+ (void) ioctl(OUTF, TCSETAW, &PTTY);
+ /* set vert and horiz spacing to 6 and 10 */
+ (void) putchar(ESC); /* set vert spacing to 6 lpi */
+ (void) putchar(RS);
+ (void) putchar(HT);
+ (void) putchar(ESC); /* set horiz spacing to 10 cpi */
+ (void) putchar(US);
+ (void) putchar(CR);
+ /* initialize constants */
+ xscale = (int)(4096./(HORZRESP * WIDTH));
+ yscale = (int)(4096 /(VERTRESP * HEIGHT));
+ xoffset = (int)(OFFSET * HORZRESP);
+}
+
+void
+openvt(void)
+{
+ openpl();
+}
diff --git a/usr/src/lib/libplot/t450/common/point.c b/usr/src/lib/libplot/t450/common/point.c
new file mode 100644
index 0000000000..9ed2f55cb4
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/point.c
@@ -0,0 +1,40 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+
+#include <plot.h>
+
+void
+point(short xi, short yi)
+{
+ move(xi, yi);
+ label(".");
+}
diff --git a/usr/src/lib/libplot/t450/common/space.c b/usr/src/lib/libplot/t450/common/space.c
new file mode 100644
index 0000000000..9817bee612
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/space.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+
+#include "con.h"
+
+void
+space(short x0, short y0, short x1, short y1)
+{
+ botx = -2047.;
+ boty = -2047.;
+ obotx = x0;
+ oboty = y0;
+ scalex = 4096. / (x1 - x0);
+ scaley = 4096. / (y1 - y0);
+}
diff --git a/usr/src/lib/libplot/t450/common/subr.c b/usr/src/lib/libplot/t450/common/subr.c
new file mode 100644
index 0000000000..e96e01c11b
--- /dev/null
+++ b/usr/src/lib/libplot/t450/common/subr.c
@@ -0,0 +1,176 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+/*LINTLIBRARY*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include <unistd.h>
+#include <plot.h>
+#include "con.h"
+
+int xnow, ynow, OUTF;
+
+int
+xconv(int xp)
+{
+ /*
+ * x position input is -2047 to +2047,
+ * output must be 0 to PAGSIZ*HORZRES
+ */
+ xp += 2048;
+ /* the computation is newx = xp*(PAGSIZ*HORZRES)/4096 */
+ return (xoffset + xp / xscale);
+}
+
+int
+yconv(int yp)
+{
+ /* see description of xconv */
+ yp += 2048;
+ return (yp / yscale);
+}
+
+void
+inplot(void)
+{
+ spew(ESC);
+ spew(PLOTIN);
+}
+
+void
+outplot(void)
+{
+ spew(ESC);
+ spew(PLOTOUT);
+ (void) fflush(stdout);
+}
+
+void
+spew(char ch)
+{
+ if (ch == UP) {
+ (void) putc(ESC, stdout);
+ ch = DOWN;
+ }
+ (void) putc(ch, stdout);
+}
+
+void
+tobotleft(void)
+{
+ move(-2048, -2048);
+}
+
+void
+reset(void)
+{
+ (void) signal(SIGINT, SIG_IGN);
+ outplot();
+ (void) ioctl(OUTF, TCSETAW, &ITTY);
+ _exit(0);
+}
+
+float
+dist2(int x1, int y1, int x2, int y2)
+{
+ float t, v;
+ t = x2 - x1;
+ v = y1 - y2;
+ return (t * t + v * v);
+}
+
+void
+swap(int *pa, int *pb)
+{
+ int t;
+ t = *pa;
+ *pa = *pb;
+ *pb = t;
+}
+
+void
+movep(int xg, int yg)
+{
+ int i;
+ char ch;
+ if ((xg == xnow) && (yg == ynow))
+ return;
+ /* if we need to go to left margin, just CR */
+ if (xg < xnow / 2) {
+ spew(CR);
+ xnow = 0;
+ }
+ i = (int)((xg - xnow) / HORZRES);
+ if (xnow < xg)
+ ch = RIGHT;
+ else ch = LEFT;
+ xnow += i * HORZRES;
+ i = abs(i);
+ while (i--)
+ spew(ch);
+ i = abs(xg - xnow);
+ inplot();
+ while (i--)
+ spew(ch);
+ outplot();
+ i = (int)((yg - ynow) / VERTRES);
+ if (ynow < yg)
+ ch = UP;
+ else ch = DOWN;
+ ynow += i * VERTRES;
+ i = abs(i);
+ while (i--)
+ spew(ch);
+ i = abs(yg - ynow);
+ inplot();
+ while (i--)
+ spew(ch);
+ outplot();
+ xnow = xg; ynow = yg;
+}
+
+int
+xsc(int xi)
+{
+ int xa;
+ xa = (int)((xi - obotx) * scalex + botx);
+ return (xa);
+}
+
+int
+ysc(int yi)
+{
+ int ya;
+ ya = (int)((yi - oboty) *scaley +boty);
+ return (ya);
+}
diff --git a/usr/src/lib/libplot/t450/i386/Makefile b/usr/src/lib/libplot/t450/i386/Makefile
new file mode 100644
index 0000000000..1edc4d6ef6
--- /dev/null
+++ b/usr/src/lib/libplot/t450/i386/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/i386/Makefile
+
+MAPDIR= ../spec/i386
+
+include ../Makefile.com
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/t450/sparc/Makefile b/usr/src/lib/libplot/t450/sparc/Makefile
new file mode 100644
index 0000000000..ead6b4b084
--- /dev/null
+++ b/usr/src/lib/libplot/t450/sparc/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/sparc/Makefile
+
+MAPDIR= ../spec/sparc
+
+include ../Makefile.com
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/t450/sparcv9/Makefile b/usr/src/lib/libplot/t450/sparcv9/Makefile
new file mode 100644
index 0000000000..993a795538
--- /dev/null
+++ b/usr/src/lib/libplot/t450/sparcv9/Makefile
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/sparcv9/Makefile
+
+MAPDIR= ../spec/sparcv9
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/t450/spec/Makefile b/usr/src/lib/libplot/t450/spec/Makefile
new file mode 100644
index 0000000000..5bddab677c
--- /dev/null
+++ b/usr/src/lib/libplot/t450/spec/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/spec/Makefile
+
+include $(SRC)/lib/Makefile.spec.arch
diff --git a/usr/src/lib/libplot/t450/spec/Makefile.targ b/usr/src/lib/libplot/t450/spec/Makefile.targ
new file mode 100644
index 0000000000..f06f8fec28
--- /dev/null
+++ b/usr/src/lib/libplot/t450/spec/Makefile.targ
@@ -0,0 +1,35 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/spec/Makefile.targ
+
+LIBRARY = lib450.a
+VERS = .1
+
+OBJECTS = t450.o
+
+SPECCPP =
diff --git a/usr/src/lib/libplot/t450/spec/amd64/Makefile b/usr/src/lib/libplot/t450/spec/amd64/Makefile
new file mode 100644
index 0000000000..2a38c1cba9
--- /dev/null
+++ b/usr/src/lib/libplot/t450/spec/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#amd64_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/t450/spec/i386/Makefile b/usr/src/lib/libplot/t450/spec/i386/Makefile
new file mode 100644
index 0000000000..7f79ddec84
--- /dev/null
+++ b/usr/src/lib/libplot/t450/spec/i386/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/plot/spec/i386/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#i386_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/t450/spec/sparc/Makefile b/usr/src/lib/libplot/t450/spec/sparc/Makefile
new file mode 100644
index 0000000000..a8ff490ca5
--- /dev/null
+++ b/usr/src/lib/libplot/t450/spec/sparc/Makefile
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/spec/sparc/Makefile
+
+.KEEP_STATE:
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#sparc_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/t450/spec/sparcv9/Makefile b/usr/src/lib/libplot/t450/spec/sparcv9/Makefile
new file mode 100644
index 0000000000..b2d1027e46
--- /dev/null
+++ b/usr/src/lib/libplot/t450/spec/sparcv9/Makefile
@@ -0,0 +1,43 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/spec/sparcv9/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#sparcv9_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/t450/spec/t450.spec b/usr/src/lib/libplot/t450/spec/t450.spec
new file mode 100644
index 0000000000..4037bbf5fa
--- /dev/null
+++ b/usr/src/lib/libplot/t450/spec/t450.spec
@@ -0,0 +1,200 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/t450/spec/t450.spec
+
+function arc extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function box extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function circle extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closepl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closevt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function cont extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function erase extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function label extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function line extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function linemod extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function move extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openpl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openvt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function point extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function space extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function inplot
+version SUNWprivate_1.1
+end
+
+function yconv
+version SUNWprivate_1.1
+end
+
+function xconv
+version SUNWprivate_1.1
+end
+
+function tobotleft
+version SUNWprivate_1.1
+end
+
+function reset
+version SUNWprivate_1.1
+end
+
+function xsc
+version SUNWprivate_1.1
+end
+
+function dist2
+version SUNWprivate_1.1
+end
+
+function obotx
+version SUNWprivate_1.1
+end
+
+function oboty
+version SUNWprivate_1.1
+end
+
+function ysc
+version SUNWprivate_1.1
+end
+
+function swap
+version SUNWprivate_1.1
+end
+
+function scalex
+version SUNWprivate_1.1
+end
+
+function scaley
+version SUNWprivate_1.1
+end
+
+function outplot
+version SUNWprivate_1.1
+end
+
+function botx
+version SUNWprivate_1.1
+end
+
+function boty
+version SUNWprivate_1.1
+end
+
+function movep
+version SUNWprivate_1.1
+end
+
+function spew
+version SUNWprivate_1.1
+end
+
+function ITTY
+version SUNWprivate_1.1
+end
+
+function xoffset
+version SUNWprivate_1.1
+end
+
+function PTTY
+version SUNWprivate_1.1
+end
+
+function xscale
+version SUNWprivate_1.1
+end
+
+function yscale
+version SUNWprivate_1.1
+end
+
+function dot
+version SUNWprivate_1.1
+end
+
+function OUTF
+version SUNWprivate_1.1
+end
+
+function xnow
+version SUNWprivate_1.1
+end
+
+function ynow
+version SUNWprivate_1.1
+end
+
+function _lib_version
+version SUNWprivate_1.1
+end
+
diff --git a/usr/src/lib/libplot/t450/spec/versions b/usr/src/lib/libplot/t450/spec/versions
new file mode 100644
index 0000000000..38a2cfc77a
--- /dev/null
+++ b/usr/src/lib/libplot/t450/spec/versions
@@ -0,0 +1,43 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+sparc {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+sparcv9 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+i386 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+amd64 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
diff --git a/usr/src/lib/libplot/vt0/Makefile b/usr/src/lib/libplot/vt0/Makefile
new file mode 100644
index 0000000000..55878b5bf6
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/Makefile
@@ -0,0 +1,54 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1989,1998-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/Makefile
+#
+#LIBRARY= libvt0.a
+
+include ../../Makefile.lib
+
+SUBDIRS= spec .WAIT $(MACH) $(BUILD64) $(MACH64)
+
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+delete := TARGET= delete
+install := TARGET= install
+lint := TARGET= lint
+catalog := TARGET= catalog
+package := TARGET= package
+
+.KEEP_STATE:
+
+all clean clobber delete install lint catalog package: $(SUBDIRS)
+
+
+$(MACH) $(MACH64) spec: FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
+
diff --git a/usr/src/lib/libplot/vt0/Makefile.com b/usr/src/lib/libplot/vt0/Makefile.com
new file mode 100644
index 0000000000..f3cd3fd7f6
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/Makefile.com
@@ -0,0 +1,75 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/Makefile.com
+#
+
+LIBRARY= libvt0.a
+VERS= .1
+
+OBJECTS= \
+ arc.o box.o circle.o close.o \
+ dot.o erase.o label.o frame.o \
+ line.o linmod.o move.o open.o \
+ point.o space.o subr.o
+
+# include library definitions
+include ../../../Makefile.lib
+
+MAPFILE= $(MAPDIR)/mapfile
+MAPOPTS= $(MAPFILE:%=-M %)
+SRCS= $(OBJECTS:%.o=../common/%.c)
+
+LIBS = $(DYNLIB) $(LINTLIB)
+
+$(LINTLIB):= SRCS=../common/llib-lvt0
+
+LINTSRC= $(LINTLIB:%.ln=%)
+
+CFLAGS += $(CCVERBOSE)
+DYNFLAGS += $(MAPOPTS)
+LDLIBS += -lc
+
+.KEEP_STATE:
+
+lint: lintcheck
+
+$(DYNLIB): $(MAPFILE)
+
+$(MAPFILE):
+ @cd $(MAPDIR); $(MAKE) mapfile
+
+# include library targets
+include ../../../Makefile.targ
+
+pics/%.o: ../common/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+# install rule for lint library target
+$(ROOTLINTDIR)/%: ../common/%
+ $(INS.file)
diff --git a/usr/src/lib/libplot/vt0/amd64/Makefile b/usr/src/lib/libplot/vt0/amd64/Makefile
new file mode 100644
index 0000000000..0128e6d41e
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/amd64/Makefile
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+MAPDIR= ../spec/amd64
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LINTFLAGS64 += -erroff=E_ASSIGMENT_CAUSE_LOSS_PREC
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/vt0/common/arc.c b/usr/src/lib/libplot/vt0/common/arc.c
new file mode 100644
index 0000000000..524d0b2f24
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/arc.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+/*ARGSUSED*/
+void
+arc(short xi, short yi, short x0, short y0, short x1, short y1)
+{
+ char c = 6;
+ (void) write(vti, &c, 1);
+ (void) write(vti, &xi, 12);
+}
diff --git a/usr/src/lib/libplot/vt0/common/box.c b/usr/src/lib/libplot/vt0/common/box.c
new file mode 100644
index 0000000000..5c35e97227
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/box.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <plot.h>
+
+void
+box(short x0, short y0, short x1, short y1)
+{
+ move(x0, y0);
+ cont(x0, y1);
+ cont(x1, y1);
+ cont(x1, y0);
+ cont(x0, y0);
+ move(x1, y1);
+}
diff --git a/usr/src/lib/libplot/vt0/common/circle.c b/usr/src/lib/libplot/vt0/common/circle.c
new file mode 100644
index 0000000000..4039bbcc46
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/circle.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+/*ARGSUSED*/
+void
+circle(short x, short y, short r)
+{
+ char c = 5;
+ (void) write(vti, &c, 1);
+ (void) write(vti, &x, 6);
+}
diff --git a/usr/src/lib/libplot/vt0/common/close.c b/usr/src/lib/libplot/vt0/common/close.c
new file mode 100644
index 0000000000..41c530d188
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/close.c
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+void
+closevt(void)
+{
+ (void) close(vti);
+}
+
+void
+closepl(void)
+{
+ (void) close(vti);
+}
diff --git a/usr/src/lib/libplot/vt0/common/con.h b/usr/src/lib/libplot/vt0/common/con.h
new file mode 100644
index 0000000000..efbfb453e4
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/con.h
@@ -0,0 +1,35 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <termio.h>
+
+extern int xsc(int);
+extern int ysc(int);
+extern float boty, botx, oboty, obotx, scalex, scaley;
+extern float deltx, delty;
+extern int xnow, ynow, vti;
diff --git a/usr/src/lib/libplot/vt0/common/dot.c b/usr/src/lib/libplot/vt0/common/dot.c
new file mode 100644
index 0000000000..6bb75640c0
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/dot.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+/*ARGSUSED*/
+void
+dot(short xi, short yi, short dx, short n, int pat[])
+{
+ struct {char pad, c; short xi, yi, dx; } p;
+ p.c = 7;
+ (void) write(vti, &p.c, 7);
+ (void) write(vti, pat, n?n&0377:256);
+}
diff --git a/usr/src/lib/libplot/vt0/common/erase.c b/usr/src/lib/libplot/vt0/common/erase.c
new file mode 100644
index 0000000000..48fee61f59
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/erase.c
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+void
+erase(void)
+{
+ int i;
+ i = 0401;
+ (void) write(vti, &i, 2);
+}
diff --git a/usr/src/lib/libplot/vt0/common/frame.c b/usr/src/lib/libplot/vt0/common/frame.c
new file mode 100644
index 0000000000..b2db02ff0d
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/frame.c
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+void
+frame(int n)
+{
+ n = n&0377 | 02000;
+ (void) write(vti, &n, 2);
+}
diff --git a/usr/src/lib/libplot/vt0/common/label.c b/usr/src/lib/libplot/vt0/common/label.c
new file mode 100644
index 0000000000..fddea9b061
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/label.c
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+void
+label(char *s)
+{
+ int i, o;
+ o = 01401;
+
+ (void) write(vti, &o, 2);
+ for (i = 0; s[i++]; )
+ ;
+ (void) write(vti, s, i);
+}
diff --git a/usr/src/lib/libplot/vt0/common/line.c b/usr/src/lib/libplot/vt0/common/line.c
new file mode 100644
index 0000000000..b43d0c4155
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/line.c
@@ -0,0 +1,55 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include <plot.h>
+#include "con.h"
+
+int xnow, ynow;
+
+void
+line(short x0, short y0, short x1, short y1)
+{
+ struct {char x, c; short x0, y0, x1, y1; } p;
+ p.c = 3;
+ p.x0 = xsc(x0);
+ p.y0 = ysc(y0);
+ p.x1 = xnow = xsc(x1);
+ p.y1 = ynow = ysc(y1);
+ (void) write(vti, &p.c, 9);
+}
+
+void
+cont(short x0, short y0)
+{
+ line(xnow, ynow, xsc(x0), ysc(y0));
+}
diff --git a/usr/src/lib/libplot/vt0/common/linmod.c b/usr/src/lib/libplot/vt0/common/linmod.c
new file mode 100644
index 0000000000..3292295f7c
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/linmod.c
@@ -0,0 +1,38 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+/*ARGSUSED*/
+void
+linemod(char *s)
+{
+}
diff --git a/usr/src/lib/libplot/vt0/common/llib-lvt0 b/usr/src/lib/libplot/vt0/common/llib-lvt0
new file mode 100644
index 0000000000..204d205bf9
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/llib-lvt0
@@ -0,0 +1,73 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * All rights reserved
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <stdio.h>
+
+/*arc.c*/
+void arc(short, short, short, short, short, short);
+
+/*box.c*/
+void box(short, short, short, short);
+
+/*circle.c*/
+void circle(short, short, short);
+
+/*close.c*/
+void closelp(void);
+void closevt(void);
+
+/*cont.c*/
+void cont(short, short);
+
+/*erase.c*/
+void erase(void);
+
+/*label.c*/
+void label(char *);
+
+/*line.c*/
+void line(short, short);
+
+/*linmod.c*/
+void linemod(char *);
+
+/*move.c*/
+void move(short, short);
+
+/*open.c*/
+void openpt();
+void openvt();
+
+/*point.c*/
+void point(short, short);
+
+/*space.c*/
+void space(short, short, short, short);
diff --git a/usr/src/lib/libplot/vt0/common/move.c b/usr/src/lib/libplot/vt0/common/move.c
new file mode 100644
index 0000000000..e4a46898d1
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/move.c
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+void
+move(short xi, short yi)
+{
+ struct {char pad, c; short x, y; } p;
+ p.c = 9;
+ p.x = xnow = xsc(xi);
+ p.y = ynow = ysc(yi);
+ (void) write(vti, &p.c, 5);
+}
diff --git a/usr/src/lib/libplot/vt0/common/open.c b/usr/src/lib/libplot/vt0/common/open.c
new file mode 100644
index 0000000000..89dd243c72
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/open.c
@@ -0,0 +1,49 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
+/*LINTLIBRARY*/
+
+#include <sys/types.h>
+#include <fcntl.h>
+
+int vti = -1;
+
+void
+openvt(void)
+{
+ vti = open("/dev/vt0", 1);
+}
+
+void
+openpl(void)
+{
+ vti = open("/dev/vt0", 1);
+}
diff --git a/usr/src/lib/libplot/vt0/common/point.c b/usr/src/lib/libplot/vt0/common/point.c
new file mode 100644
index 0000000000..6e1bf2b526
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/point.c
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include <unistd.h>
+#include "con.h"
+
+void
+point(short xi, short yi)
+{
+ struct {char pad, c; short x, y; } p;
+ p.c = 2;
+ p.x = xnow = xsc(xi);
+ p.y = ynow = ysc(yi);
+ (void) write(vti, &p.c, 5);
+}
diff --git a/usr/src/lib/libplot/vt0/common/space.c b/usr/src/lib/libplot/vt0/common/space.c
new file mode 100644
index 0000000000..5dbd9ef069
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/space.c
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+/*
+ * Copyright (c) 1997, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+#include "con.h"
+
+float deltx, delty;
+
+void
+space(short x0, short y0, short x1, short y1)
+{
+ botx = -2047.;
+ boty = -2047;
+ obotx = x0;
+ oboty = y0;
+ scalex = deltx / (x1 - x0);
+ scaley = delty / (y1 - y0);
+}
diff --git a/usr/src/lib/libplot/vt0/common/subr.c b/usr/src/lib/libplot/vt0/common/subr.c
new file mode 100644
index 0000000000..263dd9f267
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/common/subr.c
@@ -0,0 +1,52 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+/*LINTLIBRARY*/
+
+float obotx, botx, scalex;
+float oboty, boty, scaley;
+
+int
+xsc(int xi)
+{
+ int xa;
+ xa = (int)((xi - obotx) * scalex + botx);
+ return (xa);
+}
+
+int
+ysc(int yi)
+{
+ int ya;
+ ya = (int)((yi - oboty) * scaley + boty);
+ return (ya);
+}
diff --git a/usr/src/lib/libplot/vt0/i386/Makefile b/usr/src/lib/libplot/vt0/i386/Makefile
new file mode 100644
index 0000000000..703181103d
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/i386/Makefile
@@ -0,0 +1,36 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/i386/Makefile
+MAPDIR= ../spec/i386
+include ../Makefile.com
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/vt0/sparc/Makefile b/usr/src/lib/libplot/vt0/sparc/Makefile
new file mode 100644
index 0000000000..9eeb6f9703
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/sparc/Makefile
@@ -0,0 +1,37 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/sparc/Makefile
+
+MAPDIR= ../spec/sparc
+include ../Makefile.com
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libplot/vt0/sparcv9/Makefile b/usr/src/lib/libplot/vt0/sparcv9/Makefile
new file mode 100644
index 0000000000..de1f0aedc2
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/sparcv9/Makefile
@@ -0,0 +1,40 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/sparcv9/Makefile
+
+MAPDIR= ../spec/sparcv9
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+all: $(LIBS)
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libplot/vt0/spec/Makefile b/usr/src/lib/libplot/vt0/spec/Makefile
new file mode 100644
index 0000000000..a45ac5db53
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/spec/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/spec/Makefile
+
+include $(SRC)/lib/Makefile.spec.arch
diff --git a/usr/src/lib/libplot/vt0/spec/Makefile.targ b/usr/src/lib/libplot/vt0/spec/Makefile.targ
new file mode 100644
index 0000000000..d9694ec076
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/spec/Makefile.targ
@@ -0,0 +1,35 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/spec/Makefile.targ
+
+LIBRARY = libvt0.a
+VERS = .1
+
+OBJECTS = vt0.o
+
+SPECCPP =
diff --git a/usr/src/lib/libplot/vt0/spec/amd64/Makefile b/usr/src/lib/libplot/vt0/spec/amd64/Makefile
new file mode 100644
index 0000000000..2a38c1cba9
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/spec/amd64/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#amd64_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/vt0/spec/i386/Makefile b/usr/src/lib/libplot/vt0/spec/i386/Makefile
new file mode 100644
index 0000000000..79f9865fd2
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/spec/i386/Makefile
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/spec/i386/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#i386_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/vt0/spec/sparc/Makefile b/usr/src/lib/libplot/vt0/spec/sparc/Makefile
new file mode 100644
index 0000000000..6c39d2ba11
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/spec/sparc/Makefile
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/spec/sparc/Makefile
+
+.KEEP_STATE:
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+
+# Uncomment the following if the linker complains
+#sparc_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB)
diff --git a/usr/src/lib/libplot/vt0/spec/sparcv9/Makefile b/usr/src/lib/libplot/vt0/spec/sparcv9/Makefile
new file mode 100644
index 0000000000..4eb6eca6bf
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/spec/sparcv9/Makefile
@@ -0,0 +1,43 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 1997-1999 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/spec/sparcv9/Makefile
+
+include ../Makefile.targ
+
+# Add arch specific objects here
+OBJECTS +=
+
+include $(SRC)/lib/Makefile.lib
+include $(SRC)/lib/Makefile.lib.64
+
+# Uncomment the following if the linker complains
+#sparcv9_C_PICFLAGS = -K PIC
+
+include $(SRC)/lib/Makefile.spec
+
+install: $(ROOTABILIB64)
diff --git a/usr/src/lib/libplot/vt0/spec/versions b/usr/src/lib/libplot/vt0/spec/versions
new file mode 100644
index 0000000000..38a2cfc77a
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/spec/versions
@@ -0,0 +1,43 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+sparc {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+sparcv9 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+i386 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
+amd64 {
+ SUNW_1.1;
+ SUNWprivate_1.1;
+}
diff --git a/usr/src/lib/libplot/vt0/spec/vt0.spec b/usr/src/lib/libplot/vt0/spec/vt0.spec
new file mode 100644
index 0000000000..7ad2e273cf
--- /dev/null
+++ b/usr/src/lib/libplot/vt0/spec/vt0.spec
@@ -0,0 +1,154 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libplot/vt0/spec/vt0.spec
+
+function arc extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function box extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function circle extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closepl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function closevt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function cont extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function dot extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function erase extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function frame
+include <plot.h>
+declaration void frame(int n)
+version SUNW_1.1
+end
+
+function label extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function line extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function linemod extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function move extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openpl extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function openvt extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function point extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function space extends libplot/plot/spec/plot.spec
+version SUNW_1.1
+end
+
+function xsc
+version SUNWprivate_1.1
+end
+
+function ysc
+version SUNWprivate_1.1
+end
+
+function obotx
+version SUNWprivate_1.1
+end
+
+function oboty
+version SUNWprivate_1.1
+end
+
+function scalex
+version SUNWprivate_1.1
+end
+
+function scaley
+version SUNWprivate_1.1
+end
+
+function vti
+version SUNWprivate_1.1
+end
+
+function xnow
+version SUNWprivate_1.1
+end
+
+function ynow
+version SUNWprivate_1.1
+end
+
+function botx
+version SUNWprivate_1.1
+end
+
+function boty
+version SUNWprivate_1.1
+end
+
+function deltx
+version SUNWprivate_1.1
+end
+
+function delty
+version SUNWprivate_1.1
+end
+
+function _lib_version
+version SUNWprivate_1.1
+end
+