diff options
Diffstat (limited to 'usr/src/ucbcmd/plot/libplot')
214 files changed, 0 insertions, 8591 deletions
diff --git a/usr/src/ucbcmd/plot/libplot/Makefile b/usr/src/ucbcmd/plot/libplot/Makefile deleted file mode 100644 index 4e81560182..0000000000 --- a/usr/src/ucbcmd/plot/libplot/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# 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. -# -# include global definitions -include ../../../Makefile.master - -SUBDIRS= aed bitgraph dumb gigi hp2648 hp7221 imagen plot \ - t300 t300s t4013 t4014 t450 - -all:= TARGET= all -clean:= TARGET= clean -clobber:= TARGET= clobber -install:= TARGET= install -lint:= TARGET= lint - -.KEEP_STATE: -all clean clobber lint: $(SUBDIRS) - -install: - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - - -FRC: - diff --git a/usr/src/ucbcmd/plot/libplot/aed/Makefile b/usr/src/ucbcmd/plot/libplot/aed/Makefile deleted file mode 100644 index 42e1f4b9e1..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libaed.a - -OBJECTS = arc.o box.o circle.o close.o cont.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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - -# TXTS allows the AT&T makefile to be bootstrapped into the NSE. - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/aed/aed.h b/usr/src/ucbcmd/plot/libplot/aed/aed.h deleted file mode 100644 index ef121b70e4..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/aed.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _AED_H -#define _AED_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Displays plot files on an AED512 graphics terminal. - */ - -#include <stdio.h> -#include <sgtty.h> - -extern char dbuf[BUFSIZ]; /* Used to buffer display characters */ -extern struct sgttyb sgttyb; /* Used to save terminal control bits */ -extern int curx, cury; /* Current screen position */ -extern int xbot, ybot; /* Coordinates of screen lower-left corner */ -extern int scale; /* The number of pixels per 2**12 units - * of world coordinates. - */ - -/* The following variables describe the screen. */ - -#define GRXMAX 511 /* Maximum x-coordinate of screen */ -#define GRYMAX 482 /* Maximum y-coordinate of screen */ - -#endif /* _AED_H */ diff --git a/usr/src/ucbcmd/plot/libplot/aed/arc.c b/usr/src/ucbcmd/plot/libplot/aed/arc.c deleted file mode 100644 index 72192c14f0..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/arc.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -arc(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/box.c b/usr/src/ucbcmd/plot/libplot/aed/box.c deleted file mode 100644 index b68c2a40fc..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/circle.c b/usr/src/ucbcmd/plot/libplot/aed/circle.c deleted file mode 100644 index 6ccbb0fc7a..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/circle.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * Circle draws a circle. - * - * Results: None. - * - * Side Effects: - * A circle of radius r is drawn at (x,y). - *--------------------------------------------------------- - */ -void -circle(int x, int y, int r) -{ - char buf[3]; - setcolor("01"); - putc('Q', stdout); - outxy20(x, y); - putc('O', stdout); - chex((r*scale)>>12, buf, 2); - fputs(buf, stdout); - (void) fflush(stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/close.c b/usr/src/ucbcmd/plot/libplot/aed/close.c deleted file mode 100644 index 41ad3cf211..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/close.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * Closepl does whatever is necessary to reset the characteristics - * of the AED512 after the program is finished. - * - * Results: None. - * - * Side Effects: - * The graphics display modes are reset. - *--------------------------------------------------------- - */ -void -closepl(void) -{ - fputs("Q00204\6", stdout); - (void) fflush(stdout); - (void) stty(fileno(stdout), &sgttyb); -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/cont.c b/usr/src/ucbcmd/plot/libplot/aed/cont.c deleted file mode 100644 index ec1303b568..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/cont.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * Cont plots a line between (curx, cury) and (x, y). - * - * Results: None. - * Side Effects: As above. - *--------------------------------------------------------- - */ -void -cont(int x, int y) -{ - line(curx, cury, x, y); -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/dot.c b/usr/src/ucbcmd/plot/libplot/aed/dot.c deleted file mode 100644 index b2f772d891..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/erase.c b/usr/src/ucbcmd/plot/libplot/aed/erase.c deleted file mode 100644 index 46387560c4..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/erase.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * This routine erases the screen. - * - * Results: None. - * Side Effects: The screen is cleared. - *--------------------------------------------------------- - */ -void -erase(void) -{ - setcolor("FF"); - putc('\14', stdout); - putc('\33', stdout); - putc('Q', stdout); - outxy20(curx, cury); - (void) fflush(stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/label.c b/usr/src/ucbcmd/plot/libplot/aed/label.c deleted file mode 100644 index 227a316ac7..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/label.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * This routine places a label starting at the current - * position. - * - * Results: None. - * - * Side Effects: - * The string indicated by s starting at (curx, cury). - * The current position is updated accordingly. - *--------------------------------------------------------- - */ -void -label(char *s) -{ - setcolor("02"); - putc('Q', stdout); - outxy20(curx + (4096/scale), cury + (4096/scale)); - putc('\6', stdout); - fputs(s, stdout); - putc('\33', stdout); - (void) fflush(stdout); - curx += ((6*4096*strlen(s)) + 4000)/scale; -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/line.c b/usr/src/ucbcmd/plot/libplot/aed/line.c deleted file mode 100644 index e5e8259631..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/line.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * Line draws a line between two points. - * - * Results: None. - * - * Side Effects: - * A line is drawn on the screen between (x1, y1) and (x2, y2). - *--------------------------------------------------------- - */ -void -line(int x1, int y1, int x2, int y2) -{ - setcolor("01"); - putc('Q', stdout); - outxy20(x1, y1); - putc('A', stdout); - outxy20(x2, y2); - (void) fflush(stdout); - curx = x2; - cury = y2; -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/linemod.c b/usr/src/ucbcmd/plot/libplot/aed/linemod.c deleted file mode 100644 index 18b169c9f6..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/linemod.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * Linemod sets the current line drawing style. - * - * Results: None. - * - * Side Effects: - * The AED line style is set based on string s which - * must be one of "dotted", "solid", "longdashed", "shortdashed", - * or "dotdashed". If s isn't recognized, then "solid" is used. - *--------------------------------------------------------- - */ -void -linemod(char *s) -{ - if (strcmp(s, "dotted") == 0) - fputs("1AAFF", stdout); - else if (strcmp(s, "longdashed") == 0) - fputs("1F055", stdout); - else if (strcmp(s, "shortdashed") == 0) - fputs("1F0FF", stdout); - else if (strcmp(s, "dotdashed") == 0) - fputs("1E4FF", stdout); - else fputs("1FFFF", stdout); - (void) fflush(stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/move.c b/usr/src/ucbcmd/plot/libplot/aed/move.c deleted file mode 100644 index 0f0c7caad8..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/move.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * This routine moves the current point to (x,y). - * - * Results: None. - * Side Effects: As above. - *--------------------------------------------------------- - */ -void -move(int x, int y) -{ - curx = x; - cury = y; -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/open.c b/usr/src/ucbcmd/plot/libplot/aed/open.c deleted file mode 100644 index 1a19feda04..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/open.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Displays plot files on a AED512 graphics terminal. - */ - -#include "aed.h" - -char dbuf[BUFSIZ]; /* Used to buffer display characters */ -struct sgttyb sgttyb; /* Used to save terminal control bits */ -int curx, cury; /* Current screen position */ -int xbot, ybot; /* Coordinates of screen lower-left corner */ -int scale; /* The number of pixels per 2**12 units - * of world coordinates. - */ - -/* - * The following is the color map, containing reg, green, and blue - * values for color locations 0 and 1. - */ - -static int colors[] = {200, 200, 200, 0, 0, 125, 125, 0, 0, 125, 0, 0}; - -/*--------------------------------------------------------- - * Openpl initializes the graphics display and clears its screen. - * - * Results: None. - * - * Side Effects: - * The display is re-initialized and the file is remembered for - * use in all subsequent calls to this module. The display's - * color map is reset. The display is put into raw mode, but - * the previous mode bits are saved. - * - * Errors: None. - *--------------------------------------------------------- - */ -void -openpl(void) -{ - int flags, *p, i; - char dum[4]; - - /* First, grab up the display modes, then reset them to put it - * into cooked mode. Also, lock the terminal. - */ - - (void) gtty(fileno(stdout), &sgttyb); - flags = sgttyb.sg_flags; - sgttyb.sg_flags = (sgttyb.sg_flags & ~(RAW)) | EVENP | ODDP; - (void) stty(fileno(stdout), &sgttyb); - sgttyb.sg_flags = flags; - - /* Save the file pointer around for later use, then output an - * initialization string to the display. The initialization - * string resets the terminal, sets formats, clears the display, - * initializes the read and write masks, and sets the color map. - */ - - setbuf(stdout, dbuf); - fputs("\33\33G1HHHN[00LFFCFFMFFFFFFFF", stdout); - fputs("K0004", stdout); - p = colors; - for (i=0; i<12; i++) - { - chex(*p++, dum, 2); - fputs(dum, stdout); - } - fputs("^15060AL", stdout); - scale = 1<<12; - curx = cury = xbot = ybot = 0; - (void) fflush(stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/point.c b/usr/src/ucbcmd/plot/libplot/aed/point.c deleted file mode 100644 index d45da4617d..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/point.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * This routine plots a single point. - * - * Results: None. - * - * Side Effects: - * A single point is displayed on the screen. - * The point is made the current point. - *--------------------------------------------------------- - */ -void -point(int x, int y) -{ - setcolor("01"); - putc('Q', stdout); - outxy20(x, y); - fputs("O01", stdout); - (void) fflush(stdout); - curx = x; - cury = y; -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/space.c b/usr/src/ucbcmd/plot/libplot/aed/space.c deleted file mode 100644 index 7c9fdd8e16..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/space.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/*--------------------------------------------------------- - * Space sets up the world-to-screen transformation so - * that the rectangular area described by (x0, y0) and - * (x1, y1) will all be on-screen. - * - * Results: None. - * - * Side Effects: - * Our own variables scale, xbot, and ybot are changed. - *--------------------------------------------------------- - */ -void -space(int x0, int y0, int x1, int y1) -{ - int xscale, yscale, xsize, ysize; - xscale = (GRXMAX<<12)/(x1-x0); - yscale = (GRYMAX<<12)/(y1-y0); - if (xscale > yscale) scale = yscale; - else scale = xscale; - scale = (scale*9)/10 - 1; - if (scale<1) scale = 1; - xsize = (2048*GRXMAX)/scale + 1; - xbot = (x1+x0)/2 - xsize; - ysize = (2048*GRYMAX)/scale + 1; - ybot = (y1+y0)/2 - ysize; -} diff --git a/usr/src/ucbcmd/plot/libplot/aed/subr.c b/usr/src/ucbcmd/plot/libplot/aed/subr.c deleted file mode 100644 index e771ae6ffc..0000000000 --- a/usr/src/ucbcmd/plot/libplot/aed/subr.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "aed.h" - -/* - * The following table is used to convert numbers to hex. We cannot use - * standard C library conversion because it generates lower case letters - * which are bad news to the AED512. - */ - -static char hex[] = "0123456789ABCDEF"; - -/*--------------------------------------------------------- - * This is a local routine that converts an integer to a string - * of hexadecimal characters. - * - * Results: None. - * - * Side Effects: - * The string contains the value of the low-order nchars 4-bit chunks - * of val, as represented in hexadecimal. String is zero-filled. - * - * Parameters - * val - Integer value to be converted. - * string - Pointer to area for converted result. - * nchars - Number of characters to be converted. - *--------------------------------------------------------- - */ -void -chex(int val, char *string, int nchars) -{ - string = &(string[nchars]); - *string = '\0'; - for (; nchars>0 ; nchars--) - { - *(--string) = hex[val & 017]; - val >>= 4; - } -} - -/*--------------------------------------------------------- - * This local routine outputs an x-y coordinate pair in the standard - * format required by the AED display. - * - * Results: None. - * - * Side Effects: - * Characters are output to the AED512 in the standard way required - * for values indicated by "xy20" in the user manual. - * - * Errors: None. - * - * Parameters: - * x, y - The coordinates to be output. Note: these - * are world coordinates, not screen ones. We - * scale in this routine. - *--------------------------------------------------------- - */ -void -outxy20(int x, int y) -{ - char s1[4], s2[4], s3[4]; - x = ((x - xbot) * scale)>>12; - y = ((y - ybot) * scale)>>12; - chex(((y>>8)&03) | ((x>>6)&014), s1, 1); - chex(x&0377, s2, 2); - chex(y&0377, s3, 2); - fprintf(stdout, "%s%s%s", s1, s2, s3); -} - -/*--------------------------------------------------------- - * This routine sets the display's current color. - * - * Results: None. - * - * Side Effects: - * The current color in the display is set to pcolor, if it - * isn't that already. - * - * Parameter: - * pcolor - Pointer to a string giving the desired color - * in hexadecimal - *--------------------------------------------------------- - */ -void -setcolor(char *pcolor) -{ - static char curcolor[] = "xx"; - if ((pcolor[0] != curcolor[0]) || (pcolor[1] != curcolor[1])) - { - curcolor[0] = pcolor[0]; - curcolor[1] = pcolor[1]; - putc('L', stdout); - fputs(curcolor, stdout); - } -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/Makefile b/usr/src/ucbcmd/plot/libplot/bitgraph/Makefile deleted file mode 100644 index 0da2659fe9..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libplotbg.a - -OBJECTS = arc.o box.o circle.o close.o cont.o dot.o erase.o label.o \ - line.o linemod.o move.o open.o point.o space.o - -# include library definitions -include ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - -# TXTS allows the AT&T makefile to be bootstrapped into the NSE. - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/arc.c b/usr/src/ucbcmd/plot/libplot/bitgraph/arc.c deleted file mode 100644 index 0a6ca1c5b0..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/arc.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "bg.h" - -/* should include test for equality? */ -#define side(x,y) (a*(x)+b*(y)+c > 0.0 ? 1 : -1) - -/* The beginning and ending points must be distinct. */ -void -arc(int xc, int yc, int xbeg, int ybeg, int xend, int yend) -{ - double r, radius, costheta, sintheta; - double a, b, c, x, y, tempX; - int right_side; - - int screen_xc = scaleX(xc); - int screen_yc = scaleY(yc); - - /* It is more convienient to beg and end relative to center. */ - int screen_xbeg = scaleX(xbeg) - screen_xc; - int screen_ybeg = scaleY(ybeg) - screen_yc; - - int screen_xend = scaleX(xend) - screen_xc; - int screen_yend = scaleY(yend) - screen_yc; - - /* probably should check that arc is truely circular */ - r = sqrt( (double) (screen_xbeg*screen_xbeg + screen_ybeg*screen_ybeg) ); - - /* - This method is reasonably efficient, clean, and clever. - The easy part is generating the next point on the arc. This is - done by rotating the points by the angle theta. Theta is chosen - so that no rotation will cause more than one pixel of a move. - This corresponds to a triangle having x side of r and y side of 1. - The rotation is done (way) below inside the loop. - - Note: all calculations are done in screen coordinates. - */ - if (r <= 1.0) { - /* radius is mapped to length < 1*/ - point(xc,yc); - return; - } - - radius = sqrt(r*r + 1.0); - sintheta = 1.0/radius; - costheta = r/radius; - - /* - The hard part of drawing an arc is figuring out when to stop. - This method works by drawing the line from the beginning point - to the ending point. This splits the plane in half, with the - arc that we wish to draw on one side of the line. If we evaluate - side(x,y) = a*x + b*y + c, then all of the points on one side of the - line will result in side being positive, and all the points on the - other side of the line will result in side being negative. - - We want to draw the arc in a counter-clockwise direction, so we - must find out what the sign of "side" is for a point which is to the - "right" of a line drawn from "beg" to "end". A point which must lie - on the right is [xbeg + (yend-ybeg), ybeg - (xend-xbeg)]. (This - point is perpendicular to the line at "beg"). - - Thus, we compute side of the above point, and then compare the - sign of side for each new point with the sign of the above point. - When they are different, we terminate the loop. - */ - - a = (double) (screen_yend - screen_ybeg); - b = (double) (screen_xend - screen_xbeg); - c = (double) (screen_yend*screen_xbeg - screen_xend*screen_ybeg); - right_side = side(screen_xbeg + (screen_yend-screen_ybeg), - screen_ybeg - (screen_xend-screen_xbeg) ); - - x = screen_xbeg; - y = screen_ybeg; - move(xbeg, ybeg); - do { - currentx = screen_xc + (int) (x + 0.5); - currenty = screen_yc + (int) (y + 0.5); - putchar( ESC ); - printf(":%d;%dd", currentx, currenty); - tempX = x; - x = x*costheta - y*sintheta; - y = tempX*sintheta + y*costheta; - } while( side(x,y) == right_side ); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/bg.h b/usr/src/ucbcmd/plot/libplot/bitgraph/bg.h deleted file mode 100644 index 1cfbe5ce23..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/bg.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -/* - * Displays plot files on a bbn bitgraph terminal. - */ - -#include <stdio.h> -#include <math.h> - -#define ESC 033 -#define PI 3.141592659 - -/* The graphics address range is 0..XMAX, 0..YMAX. */ -#define XMAX 768 -#define YMAX 1024 -#define scaleX(xi) ((int) ((xi - lowx)*scale +0.5)) -#define scaleY(yi) ((int) ((yi - lowy)*scale +0.5)) - -extern int currentx; -extern int currenty; -extern double lowx; -extern double lowy; -extern double scale; diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/box.c b/usr/src/ucbcmd/plot/libplot/bitgraph/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/circle.c b/usr/src/ucbcmd/plot/libplot/bitgraph/circle.c deleted file mode 100644 index 9afb4cd11c..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/circle.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -circle (int xc, int yc, int r) -{ - arc(xc,yc, xc+r,yc, xc-r,yc); - arc(xc,yc, xc-r,yc, xc+r,yc); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/close.c b/usr/src/ucbcmd/plot/libplot/bitgraph/close.c deleted file mode 100644 index 7cb0e9bc79..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/close.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <signal.h> -#include "bg.h" - -void -closepl(void) -{ - /* recieve interupts */ - signal(SIGINT, SIG_IGN); - - /* exit graphics mode */ - putchar( ESC ); - printf("[H"); - exit(0); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/cont.c b/usr/src/ucbcmd/plot/libplot/bitgraph/cont.c deleted file mode 100644 index cdac4c4132..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/cont.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "bg.h" - -void -cont(int xi, int yi) -{ - currentx = scaleX(xi); - currenty = scaleY(yi); - putchar( ESC ); - printf(":%d;%dd", currentx, currenty); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/dot.c b/usr/src/ucbcmd/plot/libplot/bitgraph/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/erase.c b/usr/src/ucbcmd/plot/libplot/bitgraph/erase.c deleted file mode 100644 index b098807156..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/erase.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "bg.h" - -void -erase(void) -{ - putchar( ESC ); - printf("[H"); - putchar( ESC ); - printf("[J"); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/label.c b/usr/src/ucbcmd/plot/libplot/bitgraph/label.c deleted file mode 100644 index 84ed8dcae2..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/label.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -label(char *s) -{ - printf("%s", s); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/line.c b/usr/src/ucbcmd/plot/libplot/bitgraph/line.c deleted file mode 100644 index 30e1b92073..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/line.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "bg.h" - -void -line(int x0, int y0, int x1, int y1) -{ - if(scaleX(x0)==currentx && scaleY(y0)==currenty) - cont(x1,y1); - else if(scaleX(x1)==currentx && scaleY(y1)==currenty) - cont(x0,y0); - else{ - move(x0,y0); - cont(x1,y1); - } -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/linemod.c b/usr/src/ucbcmd/plot/libplot/bitgraph/linemod.c deleted file mode 100644 index ee4f67b863..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/linemod.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -linemod(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/move.c b/usr/src/ucbcmd/plot/libplot/bitgraph/move.c deleted file mode 100644 index 1d16e788f0..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/move.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "bg.h" - -void -move(int xi, int yi) -{ - currentx = scaleX(xi); - currenty = scaleY(yi); - putchar( ESC ); - printf(":%d;%dm", currentx, currenty); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/open.c b/usr/src/ucbcmd/plot/libplot/bitgraph/open.c deleted file mode 100644 index a096c7ca4f..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/open.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Displays plot files on a BBN bitgraph terminal. - */ - -#include <signal.h> -#include "bg.h" - -int currentx = 0; -int currenty = 0; -double lowx = 0.0; -double lowy = 0.0; -double scale = 1.0; - -void -openpl(void) -{ - void closepl(); - - /* catch interupts */ - signal(SIGINT, closepl); - currentx = 0; - currenty = 0; - - space(0, 0, XMAX, YMAX); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/point.c b/usr/src/ucbcmd/plot/libplot/bitgraph/point.c deleted file mode 100644 index 6eb6240959..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/point.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -point(int xi, int yi) -{ - move(xi, yi); - label("."); -} diff --git a/usr/src/ucbcmd/plot/libplot/bitgraph/space.c b/usr/src/ucbcmd/plot/libplot/bitgraph/space.c deleted file mode 100644 index 16e993e587..0000000000 --- a/usr/src/ucbcmd/plot/libplot/bitgraph/space.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "bg.h" - -void -space(int x0, int y0, int x1, int y1) -{ - double scalex, scaley; - lowx = x0; - lowy = y0; - scalex = XMAX/(double)(x1-lowx); - scaley = YMAX/(double)(y1-lowy); - scale = scalex < scaley ? scalex : scaley; -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/Makefile b/usr/src/ucbcmd/plot/libplot/dumb/Makefile deleted file mode 100644 index ca99ef4be1..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libdumb.a - -OBJECTS = arc.o box.o circle.o close.o cont.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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/dumb/arc.c b/usr/src/ucbcmd/plot/libplot/dumb/arc.c deleted file mode 100644 index d5727f5b2c..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/arc.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -void -arc(int xc, int yc, int xbeg, int ybeg, int xend, int yend) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/box.c b/usr/src/ucbcmd/plot/libplot/dumb/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/circle.c b/usr/src/ucbcmd/plot/libplot/dumb/circle.c deleted file mode 100644 index 1baa52d770..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/circle.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -circle(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/close.c b/usr/src/ucbcmd/plot/libplot/dumb/close.c deleted file mode 100644 index 14ef59e64f..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/close.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <signal.h> -#include "dumb.h" - -void -closepl(void) -{ - int i, j; - - for(j=0; j<LINES; j++){ - for(i=0; i<COLS; i++){ - printf("%c", screenmat[i][j]); - } - printf("\n"); - } - signal(SIGINT, SIG_IGN); - exit(0); -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/cont.c b/usr/src/ucbcmd/plot/libplot/dumb/cont.c deleted file mode 100644 index 014f337aad..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/cont.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -void -cont(int x, int y) -{ - int x1, y1; - x1 = x; - y1 = y; - scale(x1, y1); - dda_line('*', currentx, currenty, x, y); -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/dot.c b/usr/src/ucbcmd/plot/libplot/dumb/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/dumb.h b/usr/src/ucbcmd/plot/libplot/dumb/dumb.h deleted file mode 100644 index acf77ba64d..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/dumb.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -/* - * This accepts plot file formats and produces the appropriate plots - * for dumb terminals. It can also be used for printing terminals and - * lineprinter listings, although there is no way to specify number of - * lines and columns different from your terminal. This would be easy - * to change, and is left as an exercise for the reader. - */ - -#include <math.h> - -#define scale(x,y) y = LINES-1-(LINES*y/rangeY +minY); x = COLS*x/rangeX + minX - -extern int minX, rangeX; /* min and range of x */ -extern int minY, rangeY; /* min and range of y */ -extern int currentx, currenty; -extern int COLS, LINES; - -/* A very large screen! (probably should use malloc) */ -#define MAXCOLS 132 -#define MAXLINES 90 - -extern char screenmat[MAXCOLS][MAXLINES]; diff --git a/usr/src/ucbcmd/plot/libplot/dumb/erase.c b/usr/src/ucbcmd/plot/libplot/dumb/erase.c deleted file mode 100644 index 5aec3c4706..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/erase.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -void -erase(void) -{ - int i, j; - - for(i=0;i<COLS;i++) - for(j=0;j<LINES;j++) - screenmat[i][j] = ' '; -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/label.c b/usr/src/ucbcmd/plot/libplot/dumb/label.c deleted file mode 100644 index f11c569269..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/label.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -void -label(char *string) -{ - while(*string != '\0' && currentx < COLS){ - screenmat[currentx][currenty] = *string++; - currentx++; - } - if(currentx == COLS) - currentx = currentx-1; - -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/line.c b/usr/src/ucbcmd/plot/libplot/dumb/line.c deleted file mode 100644 index 07bdcb5752..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/line.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -void -line(int x0, int y0, int x1, int y1) -{ - int x,y; - - scale(x0, y0); - x = x1; - y = y1; - scale(x, y); - currentx = x0; - currenty = y0; - screenmat[currentx][currenty] = '*'; - dda_line('*', x0, y0, x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/linemod.c b/usr/src/ucbcmd/plot/libplot/dumb/linemod.c deleted file mode 100644 index 675c429e0a..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/linemod.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -linemod(char *s) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/move.c b/usr/src/ucbcmd/plot/libplot/dumb/move.c deleted file mode 100644 index 61ec8177e6..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/move.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -void -move(int x, int y) -{ - scale(x, y); - currentx = x; - currenty = y; -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/open.c b/usr/src/ucbcmd/plot/libplot/dumb/open.c deleted file mode 100644 index 50b2ef0b02..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/open.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This accepts plot file formats and produces the appropriate plots - * for dumb terminals. It can also be used for printing terminals and - * lineprinter listings, although there is no way to specify number of - * lines and columns different from your terminal. This would be easy - * to change, and is left as an exercise for the reader. - */ - -#include <signal.h> -#include "dumb.h" - -int minX, rangeX; /* min and range of x */ -int minY, rangeY; /* min and range of y */ -int currentx,currenty; -int COLS,LINES; - -/* A very large screen! (probably should use malloc) */ -char screenmat[MAXCOLS][MAXLINES]; - -void -openpl(void) -{ - void closepl(); - int i, j; - char *term, *getenv(); - char bp[1024]; - - term = getenv("TERM"); - tgetent(bp, term); - - COLS = tgetnum("co"); - if (COLS > MAXCOLS) - COLS = MAXCOLS; - if (COLS < 0) - COLS = 48; /* lower bound on # of cols? */ - COLS--; /* prevent auto wrap */ - - LINES = tgetnum("li"); - if (LINES > MAXLINES) - LINES = MAXLINES; - if (LINES < 0) - LINES = 20; /* lower bound on # of lines? */ - - for(i=0; i<COLS; i++) - for(j=0; j<LINES; j++) - screenmat[i][j] = ' '; - - signal(SIGINT, closepl); - currentx = currenty = 0; -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/point.c b/usr/src/ucbcmd/plot/libplot/dumb/point.c deleted file mode 100644 index fb6dbdb6a4..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/point.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -void -point(int x, int y) -{ - scale(x, y); - currentx = x; - currenty = y; - screenmat[currentx][currenty] = '*'; -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/space.c b/usr/src/ucbcmd/plot/libplot/dumb/space.c deleted file mode 100644 index c766243499..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/space.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -void -space(int x0, int y0, int x1, int y1) -{ - minX = x0; - rangeX = x1 -x0; - minY = y0; - rangeY = y1 - y0; -} diff --git a/usr/src/ucbcmd/plot/libplot/dumb/subr.c b/usr/src/ucbcmd/plot/libplot/dumb/subr.c deleted file mode 100644 index 5ee8bf841e..0000000000 --- a/usr/src/ucbcmd/plot/libplot/dumb/subr.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "dumb.h" - -/* - * Does not plot first point -- assumed that it is already plotted - * - * Parameters - * ch - * x0, y0 - already transformed to screen coords - * x1, y1 - untransformed - */ -void -dda_line(char ch, int x0, int y0, int x1, int y1) -{ - int length, i; - double deltaX, deltaY; - double x, y; - double floor(); - int abs(); - - scale(x1, y1); - - length = abs(x1 - x0); - if (abs(y1 -y0) > length) - length = abs(y1 - y0); - - if (length == 0) - return; - - deltaX = (double) (x1 - x0)/(double) length; - deltaY = (double) (y1 - y0)/(double) length; - - x = (double) x0 + 0.5; - y = (double) y0 + 0.5; - - for (i=0; i < length; ++i) { - x += deltaX; - y += deltaY; - x0 = floor(x); - y0 = floor(y); - currentx = x0; - currenty = y0; - screenmat[currentx][currenty] = ch; - } -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/Makefile b/usr/src/ucbcmd/plot/libplot/gigi/Makefile deleted file mode 100644 index e423dee541..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libgigi.a - -OBJECTS = arc.o box.o circle.o close.o cont.o dot.o erase.o label.o \ - line.o linemod.o move.o open.o point.o space.o - -# include library definitions -include ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/gigi/arc.c b/usr/src/ucbcmd/plot/libplot/gigi/arc.c deleted file mode 100644 index 2e3e9d0ad5..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/arc.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -/* - * gigi requires knowing the anlge of arc. To do this, the triangle formula - * c^2 = a^2 + b^2 - 2*a*b*cos(angle) - * is used where "a" and "b" are the radius of the circle and "c" is the - * distance between the beginning point and the end point. - * - * This gives us "angle" or angle - 180. To find out which, draw a line from - * beg to center. This splits the plane in half. All points on one side of the - * plane will have the same sign when plugged into the equation for the line. - * Pick a point on the "right side" of the line (see program below). If "end" - * has the same sign as this point does, then they are both on the same side - * of the line and so angle is < 180. Otherwise, angle > 180. - */ - -#define side(x,y) (a*(x)+b*(y)+c > 0.0 ? 1 : -1) - -void -arc(int xcent, int ycent, int xbeg, int ybeg, int xend, int yend) -{ - double radius2, c2; - double a,b,c; - int angle; - - /* Probably should check that this is really a circular arc. */ - radius2 = (xcent-xbeg)*(xcent-xbeg) + (ycent-ybeg)*(ycent-ybeg); - c2 = (xend-xbeg)*(xend-xbeg) + (yend-ybeg)*(yend-ybeg); - angle = (int) ( 180.0/PI * acos(1.0 - c2/(2.0*radius2)) + 0.5 ); - - a = (double) (ycent - ybeg); - b = (double) (xcent - xbeg); - c = (double) (ycent*xbeg - xcent*ybeg); - if (side(xbeg + (ycent-ybeg), ybeg - (xcent-xbeg)) != side(xend,yend)) - angle += 180; - - move(xcent, ycent); - printf("C(A%d c)[%d,%d]", angle, xbeg, ybeg); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/box.c b/usr/src/ucbcmd/plot/libplot/gigi/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/circle.c b/usr/src/ucbcmd/plot/libplot/gigi/circle.c deleted file mode 100644 index dbcb78f547..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/circle.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -circle(int xc, int yc, int r) -{ - if(r < 1){ - point(xc, yc); - return; - } - move(xc, yc); - printf("C[%d]", r); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/close.c b/usr/src/ucbcmd/plot/libplot/gigi/close.c deleted file mode 100644 index 3a4269669e..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/close.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <signal.h> -#include "gigi.h" - -void -closepl(void) -{ - /* recieve interupts */ - signal(SIGINT, SIG_IGN); - - /* exit graphics mode */ - putchar( ESC ); - putchar('\\'); - - exit(0); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/cont.c b/usr/src/ucbcmd/plot/libplot/gigi/cont.c deleted file mode 100644 index 9db4464c2d..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/cont.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -cont(int xi, int yi) -{ - currentx = xsc(xi); - currenty = ysc(yi); - printf("V[%d,%d]",currentx, currenty); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/dot.c b/usr/src/ucbcmd/plot/libplot/gigi/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/erase.c b/usr/src/ucbcmd/plot/libplot/gigi/erase.c deleted file mode 100644 index 8bb79f5d24..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/erase.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -erase(void) -{ - printf("S(E)"); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/gigi.h b/usr/src/ucbcmd/plot/libplot/gigi/gigi.h deleted file mode 100644 index d23c6065b7..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/gigi.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -/* - * Displays plot files on a gigi "graphics" terminal. - */ - -#include <stdio.h> -#include <math.h> - -#define ESC 033 -#define PI 3.141592659 - -/* - * The graphics address range is 0..XMAX, YMAX..0 where (0, YMAX) is the - * lower left corner. - */ -#define XMAX 767 -#define YMAX 479 -#define xsc(xi) ((int) ((xi -lowx)*scalex +0.5)) -#define ysc(yi) ((int) (YMAX - (yi - lowy)*scaley +0.5)) - -extern int currentx; -extern int currenty; -extern double lowx; -extern double lowy; -extern double scalex; -extern double scaley; diff --git a/usr/src/ucbcmd/plot/libplot/gigi/label.c b/usr/src/ucbcmd/plot/libplot/gigi/label.c deleted file mode 100644 index cd1d86cd35..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/label.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -label(char *s) -{ - printf("T(S0 H2 D0 I0) \""); - for(;*s!='\0';s++) { - putchar(*s); - if (*s == '"') putchar('"'); - } - putchar('"'); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/line.c b/usr/src/ucbcmd/plot/libplot/gigi/line.c deleted file mode 100644 index 8a8dbd3158..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/line.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -line(int x0, int y0, int x1, int y1) -{ - if(xsc(x0)==currentx && ysc(y0)==currenty) - cont(x1,y1); - else if(xsc(x1)==currentx && ysc(y1)==currenty) - cont(x0,y0); - else{ - move(x0,y0); - cont(x1,y1); - } -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/linemod.c b/usr/src/ucbcmd/plot/libplot/gigi/linemod.c deleted file mode 100644 index dc9e7b7987..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/linemod.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -linemod(char *line) -{ - /* - * Note that the bit patterns could be compacted using the - * repeat field conventions. They aren't for clarity. - * Examples of almost identical packed patterns are in the - * comments. - * If linemod is changed really often, a ~15% savings - * could be achieved. - */ - if ( *(line) == 's' ) { - if ( *(++line) == 'o' ) { - /* - * solid mode 1 - */ - printf( "W(P1)" ); - return; - } - else if ( *(line) == 'h' ) { - /* - * shortdashed mode 4 - * printf( "W(P000111)" ); - */ - printf( "W(P00011100)" ); - return; - } - } - else if ( *(line) == 'd' ) { - if ( *(++line) == 'o' && *(++line) == 't' ) { - if ( *(++line) == 't' ) { - /* - * dotted mode 2 - * printf( "W(P00001)" ); - */ - printf( "W(P10000000)" ); - return; - } - else if ( *(line) == 'd' ) { - /* - * dotdashed mode 3 - * printf( "W(P0110010)" ); - */ - printf( "W(P10001100)" ); - return; - } - } - } - else if ( *(line) == 'l' ) { - /* - * longdashed mode 5 - * printf( "W(P11100)" ); - */ - printf( "W(P11111100)" ); - return; - } - printf( "W(P1)" ); /* default to solid */ - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/move.c b/usr/src/ucbcmd/plot/libplot/gigi/move.c deleted file mode 100644 index c041491950..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/move.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -move(int xi, int yi) -{ - currentx = xsc(xi); - currenty = ysc(yi); - printf("P[%d,%d]",currentx, currenty); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/open.c b/usr/src/ucbcmd/plot/libplot/gigi/open.c deleted file mode 100644 index 8ad78739de..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/open.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Displays plot files on a gigi "graphics" terminal. - */ - -#include <signal.h> -#include "gigi.h" - -int currentx = 0; -int currenty = 0; -double lowx = 0.0; -double lowy = 0.0; -double scalex = 1.0; -double scaley = 1.0; - -void -openpl(void) -{ - void closepl(); - - /* catch interupts */ - signal(SIGINT, closepl); - currentx = 0; - currenty = 0; - /* enter grapics mode */ - putchar(ESC); putchar('P'); putchar('p'); - - /* set some parameters */ - printf("S(I0 T0 [0,0])"); - - space(0, 0, XMAX, YMAX); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/point.c b/usr/src/ucbcmd/plot/libplot/gigi/point.c deleted file mode 100644 index cc42e1f932..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/point.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -point(int xi, int yi) -{ - if(xsc(xi)!=currentx || ysc(yi)!=currenty) - move(xi,yi); - printf("V[]"); -} diff --git a/usr/src/ucbcmd/plot/libplot/gigi/space.c b/usr/src/ucbcmd/plot/libplot/gigi/space.c deleted file mode 100644 index d2c6e10a3a..0000000000 --- a/usr/src/ucbcmd/plot/libplot/gigi/space.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "gigi.h" - -void -space(int x0, int y0, int x1, int y1) -{ - lowx = x0; - lowy = y0; - scalex = XMAX/(x1-lowx); - scaley = YMAX/(y1-lowy); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/Makefile b/usr/src/ucbcmd/plot/libplot/hp2648/Makefile deleted file mode 100644 index 44f64ec2a8..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libhp2648.a - -OBJECTS = arc.o box.o circle.o close.o cont.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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ -#include ../../../Makefile.ucbtarg - diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/arc.c b/usr/src/ucbcmd/plot/libplot/hp2648/arc.c deleted file mode 100644 index dccf2956b9..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/arc.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -arc(int xcent, int ycent, int xbeg, int ybeg, int xend, int yend) -{ - double costheta,sintheta,x,y,xn,r; - double x1,y1,x2,y2; - int xi,yi,crosspflag,crossp; - - r = (xcent-xbeg)*(xcent-xbeg)+(ycent-ybeg)*(ycent-ybeg); - r = pow(r,0.5); - if(r<1){ - point(xcent,ycent); - return; - } - sintheta = 1.0/r; - costheta = pow(1-sintheta*sintheta,0.5); - xi = x = xbeg-xcent; - yi = y = ybeg-ycent; - x1 = xcent; - y1 = ycent; - x2 = xend; - y2 = yend; - crosspflag = 0; - do { - crossp = cross_product(x1,y1,x2,y2,x,y); - if(crossp >0 && crosspflag == 0) crosspflag = 1; - point(xcent+xi,ycent+yi); - xn = x; - xi = x = x*costheta + y*sintheta; - yi = y = y*costheta - xn*sintheta; - } while( crosspflag == 0 || crossp >0); -} - -int -cross_product(double x1, double y1, double x2, double y2, double x3, double y3) -{ - double z,a,b; - a = (y3-y2)*(x2-x1); - b = (x3-x2)*(y2-y1); - z = a-b; - if(z<0) return(-1); - if(z>0) return(1); - return(0); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/box.c b/usr/src/ucbcmd/plot/libplot/hp2648/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/circle.c b/usr/src/ucbcmd/plot/libplot/hp2648/circle.c deleted file mode 100644 index 6a56f8f262..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/circle.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -circle(int xc, int yc, int r) -{ - double costheta,sintheta,x,y,xn; - int xi,yi; - - if(r<1){ - point(xc,yc); - return; - } - sintheta = 1.0/r; - costheta = pow(1-sintheta*sintheta,0.5); - xi = x = r; - yi = y = 0; - do { - point(xc+xi,yc+yi); - xn = x; - xi = x = x*costheta + y*sintheta; - yi = y = y*costheta - xn*sintheta; - } while( ! (yi==0 && xi >= r-1)); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/close.c b/usr/src/ucbcmd/plot/libplot/hp2648/close.c deleted file mode 100644 index fb66e77017..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/close.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -closepl(void) -{ - putchar('Z'); - fflush(stdout); - if ( shakehands == TRUE ) { - stty(fildes, &sarg); - close(fildes); - } -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/cont.c b/usr/src/ucbcmd/plot/libplot/hp2648/cont.c deleted file mode 100644 index a86471858a..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/cont.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -cont(int xi, int yi) -{ - char xb1,xb2,yb1,yb2; - itoa(xsc(xi),&xb1,&xb2); - itoa(ysc(yi),&yb1,&yb2); - buffready(4); - putchar(xb2); - putchar(xb1); - putchar(yb2); - putchar(yb1); - currentx = xsc(xi); - currenty = ysc(yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/dot.c b/usr/src/ucbcmd/plot/libplot/hp2648/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/erase.c b/usr/src/ucbcmd/plot/libplot/hp2648/erase.c deleted file mode 100644 index d8b071934b..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/erase.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -erase(void) -{ - buffready(8); - putchar(ESC); - putchar(GRAPHIC); - putchar(DISPLAY); - putchar('a'); - putchar(ESC); - putchar(GRAPHIC); - putchar(PLOT); - putchar(BINARY); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/hp2648.h b/usr/src/ucbcmd/plot/libplot/hp2648/hp2648.h deleted file mode 100644 index 70278d20c5..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/hp2648.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -/* - * Displays plot files on an hp2648a graphics terminals. I have heard - * that all hp plotting devices use the same control sequences, so this - * might work for all hp devices capable of plotting. - */ - -#include <stdio.h> - -#define TERMINAL "/dev/tty" - -#define ENQ 05 -#define ACK 06 -#define ESC 033 -#define GRAPHIC '*' -#define MODE 'm' -#define PLOT 'p' -#define DISPLAY 'd' -#define PENUP 'a' -#define BINARY 'i' -#define ASCII 'f' -#define CR '\n' - -#define TRUE 1 -#define FALSE 0 - -#define xsc(xi) ((int) (xi - lowx) * scalex + 0.5) -#define ysc(yi) ((int) (yi - lowy) * scaley + 0.5) - -extern int shakehands; -extern int currentx; -extern int currenty; -extern int buffcount; -extern int fildes; -extern float lowx; -extern float lowy; -extern float scalex; -extern float scaley; -extern struct sgttyb sarg; diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/label.c b/usr/src/ucbcmd/plot/libplot/hp2648/label.c deleted file mode 100644 index e09d7adcf2..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/label.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -label(char *s) -{ - handshake(); - putchar(ESC); - putchar(GRAPHIC); - putchar('l'); - for(;*s!='\0';s++) - putchar(*s); - putchar(ESC); - putchar(GRAPHIC); - putchar('d'); - putchar('T'); - handshake(); - putchar(ESC); - putchar(GRAPHIC); - putchar(PLOT); - putchar(BINARY); - buffcount = 4; -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/line.c b/usr/src/ucbcmd/plot/libplot/hp2648/line.c deleted file mode 100644 index 8c3594d5dc..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/line.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -line(int x0, int y0, int x1, int y1) -{ - if(xsc(x0)==currentx && ysc(y0)==currenty) - cont(x1,y1); - else if(xsc(x1)==currentx && ysc(y1)==currenty) - cont(x0,y0); - else{ - move(x0,y0); - cont(x1,y1); - } -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/linemod.c b/usr/src/ucbcmd/plot/libplot/hp2648/linemod.c deleted file mode 100644 index 34a445cc08..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/linemod.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -linemod(char *line) -{ - putchar('Z'); - handshake(); - putchar(ESC); - putchar(GRAPHIC); - putchar(MODE); - if ( *(line) == 's' ) { - if ( *(++line) == 'o' ) { - /* - * solid mode 1 - */ - putchar( '1' ); - putchar( 'b' ); - goto done; - } - else if ( *(line) == 'h' ) { - /* - * shortdashed mode 4 - */ - putchar( '6' ); - putchar( 'b' ); - goto done; - } - } - else if ( *(line) == 'd' ) { - if ( *(++line) == 'o' && *(++line) == 't' ) { - if ( *(++line) == 't' ) { - /* - * dotted mode 2 - */ - putchar( '7' ); - putchar( 'b' ); - goto done; - } - else if ( *(line) == 'd' ) { - /* - * dotdashed mode 3 - */ - putchar( '8' ); - putchar( 'b' ); - goto done; - } - } - } - else if ( *(line) == 'l' ) { - /* - * longdashed mode 5 - */ - putchar( '5' ); - putchar( 'b' ); - goto done; - } - putchar( '1' ); /* default to solid */ - putchar( 'b' ); /* default to solid */ -done: - putchar( 'Z' ); - handshake(); - putchar(ESC); - putchar(GRAPHIC); - putchar(PLOT); - putchar(BINARY); - buffcount = 4; - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/move.c b/usr/src/ucbcmd/plot/libplot/hp2648/move.c deleted file mode 100644 index 77b6704150..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/move.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -move(int xi, int yi) -{ - char xb1,xb2,yb1,yb2; - itoa(xsc(xi),&xb1,&xb2); - itoa(ysc(yi),&yb1,&yb2); - buffready(5); - putchar(PENUP); - putchar(xb2); - putchar(xb1); - putchar(yb2); - putchar(yb1); - currentx = xsc(xi); - currenty = ysc(yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/open.c b/usr/src/ucbcmd/plot/libplot/hp2648/open.c deleted file mode 100644 index 16c1b2f9a2..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/open.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sgtty.h> -#include "hp2648.h" - -int shakehands; -int currentx; -int currenty; -int buffcount; -int fildes; -float lowx; -float lowy; -float scalex; -float scaley; -struct sgttyb sarg; - -void -openpl(void) -{ - if ( isatty(fileno( stdout )) ) { - shakehands = TRUE; - fildes = open(TERMINAL, 0); - gtty(fildes, &sarg); - sarg.sg_flags = sarg.sg_flags | RAW; - stty(fildes, &sarg); - sarg.sg_flags = sarg.sg_flags & ~RAW; - } - else { - shakehands = FALSE; - } - buffcount = 0; - currentx = 0; - currenty = 0; - buffready(8); - putchar(ESC); - putchar(GRAPHIC); - putchar(DISPLAY); - putchar('c'); - putchar(ESC); - putchar(GRAPHIC); - putchar(PLOT); - putchar(BINARY); - space(0,0,720,360); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/point.c b/usr/src/ucbcmd/plot/libplot/hp2648/point.c deleted file mode 100644 index 86fd85bbe1..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/point.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -point(int xi, int yi) -{ - if(xsc(xi)!=currentx || ysc(yi)!=currenty) - move(xi,yi); - buffready(1); - putchar('d'); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/space.c b/usr/src/ucbcmd/plot/libplot/hp2648/space.c deleted file mode 100644 index 85b143fd8a..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/space.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp2648.h" - -void -space(int x0, int y0, int x1, int y1) -{ - lowx = x0; - lowy = y0; - scalex = 720.0/(x1-lowx); - scaley = 360.0/(y1-lowy); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp2648/subr.c b/usr/src/ucbcmd/plot/libplot/hp2648/subr.c deleted file mode 100644 index 49dd34a28e..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp2648/subr.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sgtty.h> -#include "hp2648.h" - -void -handshake(void) -{ - int i; - char ch; - - if( shakehands != TRUE ) - return; - ch = ' '; - putchar(ENQ); - fflush(stdout); - while(1){ - i = read(fildes, &ch, 1); - if(i < 0) - continue; - if(ch == ACK) - break; - putchar('Z'); - fflush(stdout); - stty(fildes, &sarg); - exit(0); - } -} - -void -buffready(int n) -{ - buffcount = buffcount + n; - if(buffcount >= 80){ - handshake(); - putchar(ESC); - putchar(GRAPHIC); - putchar(PLOT); - putchar(BINARY); - buffcount = n+4; - } -} - -void -itoa(int num, char *byte1, char *byte2) -{ - *byte1 = (num & 037) | 040; - *byte2 = ((num>>5) & 037) | 040; -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/Makefile b/usr/src/ucbcmd/plot/libplot/hp7221/Makefile deleted file mode 100644 index 87a031bc8b..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libhp7221.a - -OBJECTS = arc.o box.o circle.o close.o cont.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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/arc.c b/usr/src/ucbcmd/plot/libplot/hp7221/arc.c deleted file mode 100644 index eca4bbce1f..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/arc.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -/* - * 7221 requires knowing the anlge of arc. To do this, the triangle formula - * c^2 = a^2 + b^2 - 2*a*b*cos(angle) - * is used where "a" and "b" are the radius of the circle and "c" is the - * distance between the beginning point and the end point. - * - * This gives us "angle" or angle - 180. To find out which, draw a line from - * beg to center. This splits the plane in half. All points on one side of the - * plane will have the same sign when plugged into the equation for the line. - * Pick a point on the "right side" of the line (see program below). If "end" - * has the same sign as this point does, then they are both on the same side - * of the line and so angle is < 180. Otherwise, angle > 180. - */ - -#define side(x,y) (a*(x)+b*(y)+c > 0.0 ? 1 : -1) - -void -arc(int xcent, int ycent, int xbeg, int ybeg, int xend, int yend) -{ - double radius2, c2; - double a,b,c; - int angle; - - /* Probably should check that this is really a circular arc. */ - radius2 = (xcent-xbeg)*(xcent-xbeg) + (ycent-ybeg)*(ycent-ybeg); - c2 = (xend-xbeg)*(xend-xbeg) + (yend-ybeg)*(yend-ybeg); - angle = (int) ( 180.0/PI * acos(1.0 - c2/(2.0*radius2)) + 0.5 ); - - a = (double) (ycent - ybeg); - b = (double) (xcent - xbeg); - c = (double) (ycent*xbeg - xcent*ybeg); - if (side(xbeg + (ycent-ybeg), ybeg - (xcent-xbeg)) != side(xend,yend)) - angle += 180; - - move(xcent, ycent); - /* Not quite implemented... - printf("C(A%d c)[%d,%d]", angle, xbeg, ybeg); - */ -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/box.c b/usr/src/ucbcmd/plot/libplot/hp7221/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/circle.c b/usr/src/ucbcmd/plot/libplot/hp7221/circle.c deleted file mode 100644 index 723e3ba807..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/circle.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -circle(int xc, int yc, int r) -{ - if( r < 1 ) { - point( xc, yc ); - return; - } - move( xc, yc ); - putchar( 't' ); - putMBN( scaleX(r) ); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/close.c b/usr/src/ucbcmd/plot/libplot/hp7221/close.c deleted file mode 100644 index 8706e39590..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/close.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <signal.h> -#include "hp7221.h" - -void -closepl(void) -{ - /* receive interupts */ - signal(SIGINT, SIG_IGN); - printf( "v@}" ); /* Put pen away. */ - fflush( stdout ); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/cont.c b/usr/src/ucbcmd/plot/libplot/hp7221/cont.c deleted file mode 100644 index 7ac65beb43..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/cont.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -cont(int xi, int yi) -{ - currentx = scaleX(xi); - currenty = scaleY(yi); - putchar( 'q' ); - putMBP( currentx, currenty ); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/dot.c b/usr/src/ucbcmd/plot/libplot/hp7221/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/erase.c b/usr/src/ucbcmd/plot/libplot/hp7221/erase.c deleted file mode 100644 index bd3cd83a09..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/erase.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -erase(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/hp7221.h b/usr/src/ucbcmd/plot/libplot/hp7221/hp7221.h deleted file mode 100644 index ca4274dd5f..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/hp7221.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -/* - * Displays plot files on an HP7221 plotter. - * Cloned from bgplot.c and gigiplot.c by Jim Kleckner - * Thu Jun 30 13:35:04 PDT 1983 - * Requires a handshaking program such as hp7221cat to get - * the plotter open and ready. - */ - -#include <stdio.h> -#include <math.h> - -#define ESC 033 -#define PI 3.141592659 -#define ENDOFSTRING 03 - -/* The graphics address range is 0..XMAX, 0..YMAX. */ -#define XMAX 1800 -#define YMAX 1800 - -#define scaleX(xi) ((int) ((xi - lowx)*scale +0.5)) -#define scaleY(yi) ((int) ((yi - lowy)*scale +0.5)) - -extern int currentx; -extern int currenty; -extern double lowx; -extern double lowy; -extern double scale; diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/label.c b/usr/src/ucbcmd/plot/libplot/hp7221/label.c deleted file mode 100644 index 487f620c2f..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/label.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -label(char *s) -{ - printf("~'%s", s); - putchar( ENDOFSTRING ); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/line.c b/usr/src/ucbcmd/plot/libplot/hp7221/line.c deleted file mode 100644 index 6251f0a110..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/line.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -line(int x0, int y0, int x1, int y1) -{ - if(scaleX(x0)==currentx && scaleY(y0)==currenty) - cont(x1,y1); - else if(scaleX(x1)==currentx && scaleY(y1)==currenty) - cont(x0,y0); - else{ - move(x0,y0); - cont(x1,y1); - } -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/linemod.c b/usr/src/ucbcmd/plot/libplot/hp7221/linemod.c deleted file mode 100644 index 04504fade8..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/linemod.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -linemod(char *line) -{ - /* - * Note that the bit patterns could be compacted using the - * repeat field conventions. They aren't for clarity. - * Examples of almost identical packed patterns are in the - * comments. - * If linemod is changed really often, a ~15% savings - * could be achieved. - */ - if ( *(line) == 's' ) { - if ( *(++line) == 'o' ) { - /* - * solid mode 1 - */ - printf( "vA" ); - return; - } - else if ( *(line) == 'h' ) { - /* - * shortdashed mode 4 - */ - printf( "vD" ); - return; - } - } - else if ( *(line) == 'd' ) { - if ( *(++line) == 'o' && *(++line) == 't' ) { - if ( *(++line) == 't' ) { - /* - * dotted mode 2 - * printf( "W(P00001)" ); - */ - printf( "vB" ); - return; - } - else if ( *(line) == 'd' ) { - /* - * dotdashed mode 3 - * printf( "W(P0110010)" ); - */ - printf( "vC" ); - return; - } - } - } - else if ( *(line) == 'l' ) { - /* - * longdashed mode 5 - * printf( "W(P11100)" ); - */ - printf( "vE" ); - return; - } - printf( "vA" ); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/move.c b/usr/src/ucbcmd/plot/libplot/hp7221/move.c deleted file mode 100644 index e683009d77..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/move.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -move(int xi, int yi) -{ - currentx = scaleX(xi); - currenty = scaleY(yi); - putchar( 'p' ); - putMBP( currentx, currenty ); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/open.c b/usr/src/ucbcmd/plot/libplot/hp7221/open.c deleted file mode 100644 index 4a15edec0d..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/open.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Displays plot files on an HP7221 plotter. - * Cloned from bgplot.c and gigiplot.c by Jim Kleckner - * Thu Jun 30 13:35:04 PDT 1983 - * Requires a handshaking program such as hp7221cat to get - * the plotter open and ready. - */ - -#include <signal.h> -#include "hp7221.h" - -int currentx = 0; -int currenty = 0; -double lowx = 0.0; -double lowy = 0.0; -double scale = 1.0; - -void -openpl(void) -{ - void closepl(); - - /* catch interupts */ - signal(SIGINT, closepl); - currentx = 0; - currenty = 0; - printf( "~VR~W" ); - putMBP( 800, 2000 ); - putMBP( 7600, 9600 ); - printf( "~S" ); - putMBP( XMAX, YMAX ); - printf( "vA~*z" ); - - space(0,0,XMAX,YMAX); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/point.c b/usr/src/ucbcmd/plot/libplot/hp7221/point.c deleted file mode 100644 index 3d02b6bb36..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/point.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -point(int xi, int yi) -{ - if(scaleX(xi)!=currentx || scaleY(yi)!=currenty) - move(xi,yi); - cont(xi, yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/space.c b/usr/src/ucbcmd/plot/libplot/hp7221/space.c deleted file mode 100644 index 0b7b0364b3..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/space.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -space(int x0, int y0, int x1, int y1) -{ - double scalex, scaley; - lowx = x0; - lowy = y0; - scalex = XMAX/(double)(x1-lowx); - scaley = YMAX/(double)(y1-lowy); - scale = scalex < scaley ? scalex : scaley; -} diff --git a/usr/src/ucbcmd/plot/libplot/hp7221/subr.c b/usr/src/ucbcmd/plot/libplot/hp7221/subr.c deleted file mode 100644 index ee71a44c7c..0000000000 --- a/usr/src/ucbcmd/plot/libplot/hp7221/subr.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "hp7221.h" - -void -putMBP(int x, int y) -{ - int chr; - - chr = ( x >> 10 ) & 017; - chr|= 0140; - putchar( chr ); - chr = ( x >> 4 ) & 077; - if ( chr < 32 ) { - chr += 64; - } - putchar( chr ); - chr = ( y >> 12 ) & 03; - chr|= ( x << 2 ) & 071; - if ( chr < 32 ) { - chr += 64; - } - putchar( chr ); - chr = ( y >> 6 ) & 077; - if ( chr < 32 ) { - chr += 64; - } - putchar( chr ); - chr = ( y ) & 077; - if ( chr < 32 ) { - chr += 64; - } - putchar( chr ); - return; -} - -void -putMBN(int i) -{ - int chr; - - chr = ( i>>12 ) & 07; - chr|= 0140; - putchar( chr ); - chr = ( i>>6 ) & 077; - if ( chr < 32 ) { - chr += 64; - } - putchar( chr ); - chr = i & 077; - if ( chr < 32 ) { - chr += 64; - } - putchar( chr ); - return; -} - -void -putSBN(int i) -{ - i &= 077; - if ( i < 32 ) { - i += 64; - } - putchar( i ); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/Makefile b/usr/src/ucbcmd/plot/libplot/imagen/Makefile deleted file mode 100644 index a82b75d914..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# 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" -# - -DEFRES = 240 - -LIBRARY= ../libimagen.a - -OBJECTS = arc.o box.o charset.o circle.o close.o cont.o dot.o erase.o label.o \ - line.o linemod.o move.o open.o point.o scale.o space.o - -# include library definitions -include ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -CPPFLAGS += -DDEFRES=$(DEFRES) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/imagen/arc.c b/usr/src/ucbcmd/plot/libplot/imagen/arc.c deleted file mode 100644 index 25bb2aebd2..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/arc.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -int del = 20; - -void -step(int d) -{ - del = d; -} - -void -arc(int x, int y, int x0, int y0, int x1, int y1) -{ - double pc; - double sqrt(); - int flg,m,xc,yc,xs,ys,qs,qf; - float dx,dy,r; - char use; - dx = x-x0; - dy = y-y0; - r = dx*dx+dy*dy; - pc = r; - pc = sqrt(pc); - flg = 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(x,y,x0,y0); - qf = quad(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; - } - while(1){ - switch(use){ - case 'x': - if(qs == 2 || qs == 3)yc -= del; - else yc += del; - dy = yc-y; - pc = r-dy*dy; - xc = m*sqrt(pc)+x; - if((x < xs && x >= xc) || ( x > xs && x <= xc) || - (y < ys && y >= yc) || ( y > ys && y <= yc) ) - { - 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 = m*sqrt(pc)+y; - if((x < xs && x >= xc) || ( x > xs && x <= xc ) || - (y < ys && y >= yc) || (y > ys && y <= yc) ) - { - 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; - } - } - } -} - -int -quad(int x,int y,int xp,int 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); -} - -int -abs(int a) -{ - if(a < 0)return(-a); - return(a); -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/box.c b/usr/src/ucbcmd/plot/libplot/imagen/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/charset.c b/usr/src/ucbcmd/plot/libplot/imagen/charset.c deleted file mode 100644 index 6e373812ae..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/charset.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "imp.h" - -char *imP_charset = "cour07"; -int imPcsize = 12; diff --git a/usr/src/ucbcmd/plot/libplot/imagen/circle.c b/usr/src/ucbcmd/plot/libplot/imagen/circle.c deleted file mode 100644 index 12666d94da..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/circle.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -circle(int x, int y, int r) -{ - arc(x,y,x+r,y,x+r,y); -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/close.c b/usr/src/ucbcmd/plot/libplot/imagen/close.c deleted file mode 100644 index 4c8be4c16a..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/close.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "imp.h" -#include "imPcodes.h" - -void -closepl(void) -{ - putch(imP_ENDPAGE); - fflush(stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/cont.c b/usr/src/ucbcmd/plot/libplot/imagen/cont.c deleted file mode 100644 index d4d86c2e14..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/cont.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> -#include "imp.h" - -void -cont(int x, int y) -{ - line(imPx, imPy, x, y); - -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/dot.c b/usr/src/ucbcmd/plot/libplot/imagen/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/erase.c b/usr/src/ucbcmd/plot/libplot/imagen/erase.c deleted file mode 100644 index a5e57b43b0..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/erase.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "imPcodes.h" -#include "imp.h" - -void -erase(void) -{ - int i; - putch(imP_ENDPAGE); - imPx = imPy = 0; - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/imPcodes.h b/usr/src/ucbcmd/plot/libplot/imagen/imPcodes.h deleted file mode 100644 index ad67875602..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/imPcodes.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -/* - * Copyright (c) 1985 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#define imP_SP 128 -#define imP_SP1 129 -#define imP_OLD_MMOVE 130 -#define imP_MPLUS 131 -#define imP_MMINUS 132 -#define imP_MMOVE 133 -#define imP_SMOVE 134 - -#define imP_SET_ABS_H 135 -#define imP_SET_REL_H 136 -#define imP_SET_ABS_V 137 -#define imP_SET_REL_V 138 - -#define imP_SRULE 192 -#define imP_BRULE 193 - -#define imP_SET_HPOS 195 -#define imP_SET_VPOS 196 -#define imP_CRLF 197 -#define imP_SGLY 198 -#define imP_BGLY 199 -#define imP_DELG 200 -#define imP_DELC 201 -#define imP_DELF 202 - -#define imP_SET_HV_SYSTEM 205 -#define imP_SET_ADV_DIRS 206 -#define imP_SET_FAMILY 207 -#define imP_SET_IL 208 -#define imP_SET_BOL 209 -#define imP_SET_SP 210 -#define imP_PUSH 211 -#define imP_POP 212 -#define imP_PAGE 213 -#define imP_SET_PUSH_MASK 214 -#define imP_ENDPAGE 219 - -#define imP_CREATE_FAMILY_TABLE 221 -#define imP_CREATE_MAP 222 - -#define imP_CREATE_PATH 230 -#define imP_SET_TEXTURE 231 -#define imP_SET_PEN 232 -#define imP_FILL_PATH 233 -#define imP_DRAW_PATH 234 -#define imP_BITMAP 235 -#define imP_SET_MAGN 236 - -#define imP_EOF 255 - diff --git a/usr/src/ucbcmd/plot/libplot/imagen/imp.h b/usr/src/ucbcmd/plot/libplot/imagen/imp.h deleted file mode 100644 index af8a814dba..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/imp.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -/* - * Copyright (c) 1985 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include <stdio.h> -extern float obotx; -extern float boty; -extern float botx; -extern float oboty; -extern float scalex; -extern float scaley; -int imPx, imPy; -extern int imPcsize; -extern char *imP_charset; diff --git a/usr/src/ucbcmd/plot/libplot/imagen/label.c b/usr/src/ucbcmd/plot/libplot/imagen/label.c deleted file mode 100644 index 373f60c3b4..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/label.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "imPcodes.h" -#include "imp.h" - -extern int imPcsize; - -void -label(char *s) -{ - int i,c; - putch(imP_SET_ABS_H); - putwd((int)((imPx-obotx)*scalex+botx)-imPcsize/2); - putch(imP_SET_ABS_V); - putwd((int)((imPy-oboty)*scaley+boty-(imPcsize/1.6))); - for(i=0; c=s[i]; i++) - { - imPx += imPcsize/scalex; - putch((c == ' ')?imP_SP:c); - } -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/line.c b/usr/src/ucbcmd/plot/libplot/imagen/line.c deleted file mode 100644 index f6d6081298..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/line.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "imp.h" -#include "imPcodes.h" - -float obotx = 0.; -float oboty = 0.; -float botx = 2.; -float boty = 2.; -float scalex = 1.; -float scaley = 1.; - -void putch(int); -void putwd(int); - -void -line(int x0, int y0, int x1, int y1) -{ - putch(imP_CREATE_PATH); - putwd(2); /* two coordinates follow */ - putwd((int)((x0-obotx)*scalex+botx)); - putwd((int)((y0-oboty)*scaley+boty)); - putwd((int)((x1-obotx)*scalex+botx)); - putwd((int)((y1-oboty)*scaley+boty)); - putch(imP_DRAW_PATH); - putch(15); /* "black" lines */ - imPx = x1; - imPy = y1; -} - -void -putch(int c) -{ - putc(c, stdout); -} - -void -putwd(int w) -{ - putch(w>>8); - putch(w); -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/linemod.c b/usr/src/ucbcmd/plot/libplot/imagen/linemod.c deleted file mode 100644 index 7071d42fca..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/linemod.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "imp.h" - -/* - * Hack to set font. - */ -void -linemod(char *s) -{ - char *tit; - char *nam; - int siz = 0; - nam = s; - for(tit = "charset="; *tit; ) - if (*tit++ != *nam++) - return; - s = nam; - while(*nam) - switch(*nam++) { - case ',': - case '\n': - *--nam = 0; - } - siz = atoi(++nam); - if (siz == 0) { - while (*--nam >= '0' && *nam <= '9') - ; - siz = (atoi(++nam)*4)/3; - } - if (siz == 0) - siz = imPcsize; - setfont(s, siz); -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/move.c b/usr/src/ucbcmd/plot/libplot/imagen/move.c deleted file mode 100644 index 14f6208efe..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/move.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "imp.h" - -void -move(int xi, int yi) -{ - imPx = xi; - imPy = yi; -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/open.c b/usr/src/ucbcmd/plot/libplot/imagen/open.c deleted file mode 100644 index 4a944d1f12..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/open.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "imPcodes.h" -#include "imp.h" - -void setfont(char *, int); - -void -openpl(void) -{ - - putch(imP_SET_HV_SYSTEM); - putch((3<<3)|5); - putch(imP_SET_FAMILY); - putch(2); - setfont(imP_charset,imPcsize); - putch(imP_SET_IL); - putwd(imPcsize+3); - putch(imP_SET_SP); - putwd(imPcsize); - putch(imP_SET_PEN); - putch(2); - putch(imP_SET_ABS_H); - putwd(0); - putch(imP_SET_ABS_V); - putwd(0); -} - -void -setfont(char *c, int sz) -{ - imPcsize = sz; - putch(imP_CREATE_FAMILY_TABLE); - putch(2); - putch(1); - putch(0); - fprintf(stdout, c); - putch(0); -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/point.c b/usr/src/ucbcmd/plot/libplot/imagen/point.c deleted file mode 100644 index 93f7313603..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/point.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -point(int xi, int yi) -{ - line(xi,yi,xi,yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/scale.c b/usr/src/ucbcmd/plot/libplot/imagen/scale.c deleted file mode 100644 index c7f7011427..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/scale.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -extern float scalex; -extern float scaley; -extern int scaleflag; - -void -scale(char i, float x, float y) -{ - switch(i) { - default: - return; - case 'c': - x *= 2.54; - y *= 2.54; - case 'i': - x /= 200; - y /= 200; - case 'u': - scalex = 1/x; - scaley = 1/y; - } - scaleflag = 1; -} diff --git a/usr/src/ucbcmd/plot/libplot/imagen/space.c b/usr/src/ucbcmd/plot/libplot/imagen/space.c deleted file mode 100644 index a82d988c35..0000000000 --- a/usr/src/ucbcmd/plot/libplot/imagen/space.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -extern float botx; -extern float boty; -extern float obotx; -extern float oboty; -extern float scalex; -extern float scaley; - -int PlotRes = DEFRES; -int scaleflag; - -void -space(int x0, int y0, int x1, int y1) -{ - botx = 2.; - boty = 2.; - obotx = x0; - oboty = y0; - if(scaleflag) - return; - scalex = (8.0 * PlotRes)/(x1-x0); - scaley = (8.0 * PlotRes)/(y1-y0); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/Makefile b/usr/src/ucbcmd/plot/libplot/plot/Makefile deleted file mode 100644 index 50ee27fc43..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libplot.a - -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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/plot/arc.c b/usr/src/ucbcmd/plot/libplot/plot/arc.c deleted file mode 100644 index 0dc832f491..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/arc.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -arc(int xi, int yi, int x0, int y0, int x1, int y1) -{ - putc('a',stdout); - putsi(xi); - putsi(yi); - putsi(x0); - putsi(y0); - putsi(x1); - putsi(y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/box.c b/usr/src/ucbcmd/plot/libplot/plot/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/circle.c b/usr/src/ucbcmd/plot/libplot/plot/circle.c deleted file mode 100644 index 577c0d8a53..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/circle.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -circle(int x, int y, int r) -{ - putc('c',stdout); - putsi(x); - putsi(y); - putsi(r); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/close.c b/usr/src/ucbcmd/plot/libplot/plot/close.c deleted file mode 100644 index 1ad5004c25..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/close.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -closevt(void) -{ - fflush(stdout); -} - -void -closepl(void) -{ - fflush(stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/cont.c b/usr/src/ucbcmd/plot/libplot/plot/cont.c deleted file mode 100644 index 02a8b46c1d..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/cont.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -cont(int xi, int yi) -{ - putc('n',stdout); - putsi(xi); - putsi(yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/dot.c b/usr/src/ucbcmd/plot/libplot/plot/dot.c deleted file mode 100644 index 5199bf1355..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/dot.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -dot(int xi, int yi, int dx, int n, int pat[]) -{ - int i; - 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/ucbcmd/plot/libplot/plot/erase.c b/usr/src/ucbcmd/plot/libplot/plot/erase.c deleted file mode 100644 index 7c7b3fff56..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/erase.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -erase(void) -{ - putc('e',stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/label.c b/usr/src/ucbcmd/plot/libplot/plot/label.c deleted file mode 100644 index c7e5909057..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/label.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -label(char *s) -{ - int i; - putc('t',stdout); - for(i=0;s[i];)putc(s[i++],stdout); - putc('\n',stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/line.c b/usr/src/ucbcmd/plot/libplot/plot/line.c deleted file mode 100644 index 5d0f1d4c9b..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/line.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -line(int x0, int y0, int x1, int y1) -{ - putc('l',stdout); - putsi(x0); - putsi(y0); - putsi(x1); - putsi(y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/linmod.c b/usr/src/ucbcmd/plot/libplot/plot/linmod.c deleted file mode 100644 index 5dc22da8af..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/linmod.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -linemod(char *s) -{ - int i; - putc('f',stdout); - for(i=0;s[i];)putc(s[i++],stdout); - putc('\n',stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/move.c b/usr/src/ucbcmd/plot/libplot/plot/move.c deleted file mode 100644 index 4b124fead7..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/move.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -move(int xi,int yi) -{ - putc('m',stdout); - putsi(xi); - putsi(yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/open.c b/usr/src/ucbcmd/plot/libplot/plot/open.c deleted file mode 100644 index c06291892b..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/open.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -openvt(void) -{ -} - -void -openpl(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/point.c b/usr/src/ucbcmd/plot/libplot/plot/point.c deleted file mode 100644 index 05cb1b9f9c..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/point.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -point(int xi, int yi) -{ - putc('p',stdout); - putsi(xi); - putsi(yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/putsi.c b/usr/src/ucbcmd/plot/libplot/plot/putsi.c deleted file mode 100644 index 611ede8679..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/putsi.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -putsi(int a) -{ - putc((char)a,stdout); - putc((char)(a>>8),stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/plot/space.c b/usr/src/ucbcmd/plot/libplot/plot/space.c deleted file mode 100644 index 331b314871..0000000000 --- a/usr/src/ucbcmd/plot/libplot/plot/space.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -space(int x0, int y0, int x1, int y1) -{ - putc('s',stdout); - putsi(x0); - putsi(y0); - putsi(x1); - putsi(y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/Makefile b/usr/src/ucbcmd/plot/libplot/t300/Makefile deleted file mode 100644 index 47acf8ffe0..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libt300.a - -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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/t300/arc.c b/usr/src/ucbcmd/plot/libplot/t300/arc.c deleted file mode 100644 index ec22670932..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/arc.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -arc(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/box.c b/usr/src/ucbcmd/plot/libplot/t300/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/circle.c b/usr/src/ucbcmd/plot/libplot/t300/circle.c deleted file mode 100644 index 1baa52d770..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/circle.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -circle(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/close.c b/usr/src/ucbcmd/plot/libplot/t300/close.c deleted file mode 100644 index b4933198f8..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/close.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void closepl(void); - -void -closevt(void) -{ - closepl(); -} - -void -closepl(void) -{ - fflush(stdout); - reset(); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/con.h b/usr/src/ucbcmd/plot/libplot/t300/con.h deleted file mode 100644 index 0476248c6f..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/con.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -#include <sgtty.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 int xnow, ynow; -extern int OUTF; -extern struct sgttyb ITTY, PTTY; -extern float HEIGHT, WIDTH, OFFSET; -extern int xscale, xoffset, yscale; -extern float botx, boty, obotx, oboty, scalex,scaley; - diff --git a/usr/src/ucbcmd/plot/libplot/t300/dot.c b/usr/src/ucbcmd/plot/libplot/t300/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/erase.c b/usr/src/ucbcmd/plot/libplot/t300/erase.c deleted file mode 100644 index 7844a26b5b..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/erase.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void -erase(void) -{ - int i; - for(i=0; i<11*(VERTRESP/VERTRES); i++) - spew(DOWN); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/label.c b/usr/src/ucbcmd/plot/libplot/t300/label.c deleted file mode 100644 index 93ac6c3d54..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/label.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void -label(char *s) -{ - int i,c; - while((c = *s++) != '\0'){ - xnow += 6; - spew(c); - } - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/line.c b/usr/src/ucbcmd/plot/libplot/t300/line.c deleted file mode 100644 index 12ad44b695..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/line.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void iline(int, int, int, int); - -void -line(int x0, int y0, int x1, int y1) -{ - iline(xconv(xsc(x0)),yconv(ysc(y0)),xconv(xsc(x1)),yconv(ysc(y1))); - return; -} - -void -cont(int x0, int y0) -{ - iline(xnow,ynow,xconv(xsc(x0)),yconv(ysc(y0))); - return; -} - -void -iline(int cx0, int cy0, int cx1, int cy1) -{ - int maxp,tt,j,np; - char chx,chy; - float xd,yd; - float dist2(),sqrt(); - movep(cx0,cy0); - maxp = 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= cx0+xd*tt-xnow; - xnow += j; - j = abval(j); - while(j-- > 0)spew(chx); - j = cy0+yd*tt-ynow; - ynow += j; - j = abval(j); - while(j-- > 0)spew(chy); - spew ('.'); - } - outplot(); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/linmod.c b/usr/src/ucbcmd/plot/libplot/t300/linmod.c deleted file mode 100644 index ee4f67b863..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/linmod.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -linemod(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/move.c b/usr/src/ucbcmd/plot/libplot/t300/move.c deleted file mode 100644 index 498e46d57c..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/move.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -move(int xi, int yi) -{ - movep(xconv(xsc(xi)),yconv(ysc(yi))); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/open.c b/usr/src/ucbcmd/plot/libplot/t300/open.c deleted file mode 100644 index f1ef292981..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/open.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sgtty.h> - -/* gsi plotting output routines */ -# define DOWN 012 -# define UP 013 -# define LEFT 010 -# define RIGHT 040 -# define BEL 007 -# define ACK 006 -# define CR 015 -# define FF 014 -# define VERTRESP 48 -# define HORZRESP 60. -# define HORZRES 6. -# define VERTRES 8. -/* down is line feed, up is reverse oyne feed, - left is bwckspace, right is space. 48 points per inch - vertically, 60 horizontally */ - -int xnow, ynow; -int OUTF; -struct sgttyb ITTY, PTTY; -float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0; -int xscale, xoffset, yscale; -float botx = 0., boty = 0., obotx = 0., oboty = 0.; -float scalex = 1., scaley = 1.; - -void -openpl(void) -{ - int reset(); - xnow = ynow = 0; - OUTF = 1; - printf("\r"); - gtty(OUTF, &ITTY); - signal (2, reset); - PTTY = ITTY; - PTTY.sg_flags &= ~CRMOD; /* don't map lf */ - /* initialize constants */ - xscale = 4096./(HORZRESP * WIDTH); - yscale = 4096 /(VERTRESP * HEIGHT); - xoffset = OFFSET * HORZRESP; - return; -} - -void -openvt(void) -{ - openpl(); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/point.c b/usr/src/ucbcmd/plot/libplot/t300/point.c deleted file mode 100644 index 29bf980347..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/point.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -point(int xi, int yi) -{ - move(xi,yi); - label("."); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/space.c b/usr/src/ucbcmd/plot/libplot/t300/space.c deleted file mode 100644 index b6febb8d17..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/space.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -# include "con.h" - -float deltx = 4095.; -float delty = 4095.; - -void -space(int x0, int y0, int x1, int y1) -{ - botx = -2047.; - boty = -2047.; - obotx = x0; - oboty = y0; - scalex = deltx/(x1-x0); - scaley = delty/(y1-y0); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300/subr.c b/usr/src/ucbcmd/plot/libplot/t300/subr.c deleted file mode 100644 index ab66e11146..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300/subr.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> -#include "con.h" - -void spew(int); - -int -abval(int q) -{ - return (q>=0 ? q : -q); -} - -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) -{ - stty(OUTF, &PTTY); - spew (ACK); -} - -void -outplot(void) -{ - spew(ESC); - spew(ACK); - fflush(stdout); - stty(OUTF, &ITTY); -} - -void -spew(int ch) -{ - if(ch == UP)putc(ESC,stdout); - putc(ch, stdout); -} - -void -tobotleft(void) -{ - move(-2048,-2048); -} - -void -reset(void) -{ - outplot(); - 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,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 = (xg-xnow)/HORZRES; - if(xnow < xg)ch = RIGHT; - else ch = LEFT; - xnow += i*HORZRES; - i = abval(i); - while(i--)spew(ch); - i = abval(xg-xnow); - inplot(); - while(i--) spew(ch); - outplot(); - i=(yg-ynow)/VERTRES; - if(ynow < yg)ch = UP; - else ch = DOWN; - ynow += i*VERTRES; - i = abval(i); - while(i--)spew(ch); - i=abval(yg-ynow); - inplot(); - while(i--)spew(ch); - outplot(); - xnow = xg; ynow = yg; -} - -int -xsc(int xi) -{ - int xa; - xa = (xi - obotx) * scalex + botx; - return(xa); -} - -int -ysc(int yi) -{ - int ya; - ya = (yi - oboty) *scaley +boty; - return(ya); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/Makefile b/usr/src/ucbcmd/plot/libplot/t300s/Makefile deleted file mode 100644 index d7eaf02d04..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libt300s.a - -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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/t300s/arc.c b/usr/src/ucbcmd/plot/libplot/t300s/arc.c deleted file mode 100644 index ec22670932..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/arc.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -arc(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/box.c b/usr/src/ucbcmd/plot/libplot/t300s/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/circle.c b/usr/src/ucbcmd/plot/libplot/t300s/circle.c deleted file mode 100644 index 1baa52d770..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/circle.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -circle(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/close.c b/usr/src/ucbcmd/plot/libplot/t300s/close.c deleted file mode 100644 index b4933198f8..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/close.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void closepl(void); - -void -closevt(void) -{ - closepl(); -} - -void -closepl(void) -{ - fflush(stdout); - reset(); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/con.h b/usr/src/ucbcmd/plot/libplot/t300s/con.h deleted file mode 100644 index 75ed00c49e..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/con.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -# -#include <sgtty.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 struct sgttyb ITTY, PTTY; -extern float HEIGHT, WIDTH, OFFSET; -extern int xscale, xoffset, yscale; -extern float botx, boty, obotx, oboty, scalex,scaley; - diff --git a/usr/src/ucbcmd/plot/libplot/t300s/dot.c b/usr/src/ucbcmd/plot/libplot/t300s/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/erase.c b/usr/src/ucbcmd/plot/libplot/t300s/erase.c deleted file mode 100644 index 7844a26b5b..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/erase.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void -erase(void) -{ - int i; - for(i=0; i<11*(VERTRESP/VERTRES); i++) - spew(DOWN); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/label.c b/usr/src/ucbcmd/plot/libplot/t300s/label.c deleted file mode 100644 index 60904ad1a2..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/label.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void -label(char *s) -{ - int i,c; - while((c = *s++) != '\0'){ - xnow += HORZRES; - spew(c); - } - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/line.c b/usr/src/ucbcmd/plot/libplot/t300s/line.c deleted file mode 100644 index 308b696878..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/line.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void iline(int, int, int, int); - -void -line(int x0, int y0, int x1, int y1) -{ - iline(xconv(xsc(x0)),yconv(ysc(y0)),xconv(xsc(x1)),yconv(ysc(y1))); - return; -} - -void -cont(int x0, int y0) -{ - iline(xnow,ynow,xconv(xsc(x0)),yconv(ysc(y0))); - return; -} - -void -iline(int cx0, int cy0, int cx1, int cy1) -{ - int maxp,tt,j,np; - char chx,chy,command; - float xd,yd; - float dist2(),sqrt(); - movep(cx0,cy0); - maxp = 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= cx0+xd*tt-xnow; - xnow += chx; - chx = abval(chx); - chy = cy0+yd*tt-ynow; - ynow += chy; - chy = abval(chy); - spew(ADDR|chx<<3|chy); - } - outplot(); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/linmod.c b/usr/src/ucbcmd/plot/libplot/t300s/linmod.c deleted file mode 100644 index ee4f67b863..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/linmod.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -linemod(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/move.c b/usr/src/ucbcmd/plot/libplot/t300s/move.c deleted file mode 100644 index 498e46d57c..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/move.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -move(int xi, int yi) -{ - movep(xconv(xsc(xi)),yconv(ysc(yi))); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/open.c b/usr/src/ucbcmd/plot/libplot/t300s/open.c deleted file mode 100644 index f1ef292981..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/open.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sgtty.h> - -/* gsi plotting output routines */ -# define DOWN 012 -# define UP 013 -# define LEFT 010 -# define RIGHT 040 -# define BEL 007 -# define ACK 006 -# define CR 015 -# define FF 014 -# define VERTRESP 48 -# define HORZRESP 60. -# define HORZRES 6. -# define VERTRES 8. -/* down is line feed, up is reverse oyne feed, - left is bwckspace, right is space. 48 points per inch - vertically, 60 horizontally */ - -int xnow, ynow; -int OUTF; -struct sgttyb ITTY, PTTY; -float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0; -int xscale, xoffset, yscale; -float botx = 0., boty = 0., obotx = 0., oboty = 0.; -float scalex = 1., scaley = 1.; - -void -openpl(void) -{ - int reset(); - xnow = ynow = 0; - OUTF = 1; - printf("\r"); - gtty(OUTF, &ITTY); - signal (2, reset); - PTTY = ITTY; - PTTY.sg_flags &= ~CRMOD; /* don't map lf */ - /* initialize constants */ - xscale = 4096./(HORZRESP * WIDTH); - yscale = 4096 /(VERTRESP * HEIGHT); - xoffset = OFFSET * HORZRESP; - return; -} - -void -openvt(void) -{ - openpl(); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/point.c b/usr/src/ucbcmd/plot/libplot/t300s/point.c deleted file mode 100644 index f3d3752cd0..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/point.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void -point(int xi, int yi) -{ - move(xi,yi); - label("."); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/space.c b/usr/src/ucbcmd/plot/libplot/t300s/space.c deleted file mode 100644 index 586b41aef3..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/space.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -float deltx = 4095.; -float delty = 4095.; - -void -space(int x0, int y0, int x1, int y1) -{ - botx = -2047.; - boty = -2047.; - obotx = x0; - oboty = y0; - scalex = deltx/(x1-x0); - scaley = delty/(y1-y0); -} diff --git a/usr/src/ucbcmd/plot/libplot/t300s/subr.c b/usr/src/ucbcmd/plot/libplot/t300s/subr.c deleted file mode 100644 index bb191c4043..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t300s/subr.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> -#include "con.h" - -#define DOUBLE 010 -#define ADDR 0100 -#define COM 060 -#define MAXX 070 -#define MAXY 07 -#define SPACES 7 - -extern int xnow, ynow; - -void spew(int); - -int -abval(int q) -{ - return (q>=0 ? q : -q); -} - -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) -{ - stty(OUTF, &PTTY); - spew(ESC); - spew (INPLOT); -} - -void -outplot(void) -{ - spew(ESC); - spew(ACK); - spew(ESC); - spew(ACK); - fflush(stdout); - stty (OUTF, &ITTY); -} - -void -spew(int ch) -{ - putc(ch, stdout); -} - -void -tobotleft(void) -{ - move(-2048,-2048); -} - -void -reset(void) -{ - outplot(); - 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 ix, int iy) -{ - int dx,dy,remx,remy,pts,i; - int xd,yd; - int addr,command; - char c; - if(xnow == ix && ynow == iy)return; - inplot(); - dx = ix-xnow; - dy = iy-ynow; - command = COM|PENUP|((dx<0)<<1)|(dy<0); - dx = abval(dx); - dy = abval(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); - while(i--){ - spew(addr); - } - } - if(xd!=yd){ - if(xd>pts){ - i=xd-pts; - addr=ADDR|MAXX; - } - else{ - i=yd-pts; - addr=ADDR|MAXY; - } - c=command|DOUBLE; - spew(c); - while(i--){ - spew(addr); - } - } - 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); - spew(addr); - } - if(remx>0||remy>0){ - spew(command); - spew(ADDR|remx<<3|remy); - } - xnow=ix; - ynow=iy; - outplot(); - return; -} - -int -xsc(int xi) -{ - int xa; - xa = (xi - obotx) * scalex + botx; - return(xa); -} - -int -ysc(int yi) -{ - int ya; - ya = (yi - oboty) *scaley +boty; - return(ya); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/Makefile b/usr/src/ucbcmd/plot/libplot/t4013/Makefile deleted file mode 100644 index 8d49aed2c4..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libt4013.a - -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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/t4013/arc.c b/usr/src/ucbcmd/plot/libplot/t4013/arc.c deleted file mode 100644 index 1a87b980d9..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/arc.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -int del = 20; - -void -step(int d) -{ - del = d; -} - -void -arc(int x, int y, int x0, int y0, int x1, int y1) -{ - double pc; - double sqrt(); - int flg,m,xc,yc,xs,ys,qs,qf; - float dx,dy,r; - char use; - dx = x-x0; - dy = y-y0; - r = dx*dx+dy*dy; - pc = r; - pc = pc > 0 ? sqrt(pc) : 0; - flg = 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(x,y,x0,y0); - qf = quad(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; - } - while(1){ - switch(use){ - case 'x': - if(qs == 2 || qs == 3)yc -= del; - else yc += del; - dy = yc-y; - pc = r-dy*dy; - xc = m*(pc > 0 ? sqrt(pc) : 0)+x; - if((x < xs && x >= xc) || ( x > xs && x <= xc) || - (y < ys && y >= yc) || ( y > ys && y <= yc) ) - { - 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 = m*(pc > 0 ? sqrt(pc) : 0)+y; - if((x < xs && x >= xc) || ( x > xs && x <= xc ) || - (y < ys && y >= yc) || (y > ys && y <= yc) ) - { - 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; - } - } - } -} - -int -quad(int x,int y,int xp,int 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/ucbcmd/plot/libplot/t4013/box.c b/usr/src/ucbcmd/plot/libplot/t4013/box.c deleted file mode 100644 index 57b9a92f88..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/box.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/circle.c b/usr/src/ucbcmd/plot/libplot/t4013/circle.c deleted file mode 100644 index 12666d94da..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/circle.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -circle(int x, int y, int r) -{ - arc(x,y,x+r,y,x+r,y); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/close.c b/usr/src/ucbcmd/plot/libplot/t4013/close.c deleted file mode 100644 index 1d9111892d..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/close.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -closevt(void) -{ - putch(037); - fflush(stdout); -} - -void -closepl(void) -{ - putch(037); - fflush(stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/dot.c b/usr/src/ucbcmd/plot/libplot/t4013/dot.c deleted file mode 100644 index 47521f8e66..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/dot.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/erase.c b/usr/src/ucbcmd/plot/libplot/t4013/erase.c deleted file mode 100644 index 4939b86ec4..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/erase.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -extern int ohiy; -extern int ohix; -extern int oloy; - -void -erase(void) -{ - int i; - putch(033); - putch(014); - ohiy= -1; - ohix = -1; - oloy = -1; - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/label.c b/usr/src/ucbcmd/plot/libplot/t4013/label.c deleted file mode 100644 index f53011803b..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/label.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -label(char *s) -{ - int i, c; - putch(037); /* alpha mode */ - for(i=0; c=s[i]; i++) - putch(c); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/line.c b/usr/src/ucbcmd/plot/libplot/t4013/line.c deleted file mode 100644 index 6f349be478..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/line.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -line(int x0, int y0, int x1, int y1) -{ - move(x0,y0); - cont(x1,y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/linemod.c b/usr/src/ucbcmd/plot/libplot/t4013/linemod.c deleted file mode 100644 index dba9ee4758..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/linemod.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -linemod(char *s) -{ - /* ignored on 4013 */ -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/move.c b/usr/src/ucbcmd/plot/libplot/t4013/move.c deleted file mode 100644 index 0d7da25f83..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/move.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -move(int xi, int yi) -{ - putch(035); - cont(xi,yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/open.c b/usr/src/ucbcmd/plot/libplot/t4013/open.c deleted file mode 100644 index b573a91adf..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/open.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -openvt(void) -{ -} - -void -openpl(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/point.c b/usr/src/ucbcmd/plot/libplot/t4013/point.c deleted file mode 100644 index 0cdd3c032f..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/point.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -point(int xi, int yi) -{ - move(xi,yi); - cont(xi,yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/space.c b/usr/src/ucbcmd/plot/libplot/t4013/space.c deleted file mode 100644 index 1c4d3fcf9f..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/space.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -extern float botx; -extern float boty; -extern float obotx; -extern float oboty; -extern float scalex; -extern float scaley; -extern int scaleflag; - -void -space(int x0, int y0, int x1, int y1) -{ - botx = 0.; - boty = 0.; - obotx = x0; - oboty = y0; - if(scaleflag) - return; - scalex = 780./(x1-x0); - scaley = 780./(y1-y0); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4013/subr.c b/usr/src/ucbcmd/plot/libplot/t4013/subr.c deleted file mode 100644 index 97f16737f8..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4013/subr.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -float obotx = 0.; -float oboty = 0.; -float botx = 0.; -float boty = 0.; -float scalex = 1.; -float scaley = 1.; -int scaleflag; - -int oloy = -1; -int ohiy = -1; -int ohix = -1; - -void putch(int); - -void -cont(int x, int y) -{ - int hix,hiy,lox,loy; - int n; - x = (x-obotx)*scalex + botx; - y = (y-oboty)*scaley + boty; - hix=(x>>5) & 037; - hiy=(y>>5) & 037; - lox = x & 037; - loy = y & 037; - n = (abs(hix-ohix) + abs(hiy-ohiy) + 6) / 12; - if(hiy != ohiy){ - putch(hiy|040); - ohiy=hiy; - } - if(hix != ohix){ - putch(loy|0140); - putch(hix|040); - ohix=hix; - oloy=loy; - } - else if(loy != oloy){ - putch(loy|0140); - oloy=loy; - } - putch(lox|0100); - while(n--) - putch(0); -} - -void -putch(int c) -{ - putc(c,stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/Makefile b/usr/src/ucbcmd/plot/libplot/t4014/Makefile deleted file mode 100644 index ad24feb0b4..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libt4014.a - -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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/t4014/arc.c b/usr/src/ucbcmd/plot/libplot/t4014/arc.c deleted file mode 100644 index 2f7dd26d47..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/arc.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -int del = 20; - -void -step(int d) -{ - del = d; -} - -void -arc(int x, int y, int x0, int y0, int x1, int y1) -{ - double pc; - double sqrt(); - int flg,m,xc,yc,xs,ys,qs,qf; - float dx,dy,r; - char use; - dx = x-x0; - dy = y-y0; - r = dx*dx+dy*dy; - pc = r; - pc = sqrt(pc); - flg = 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(x,y,x0,y0); - qf = quad(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; - } - while(1){ - switch(use){ - case 'x': - if(qs == 2 || qs == 3)yc -= del; - else yc += del; - dy = yc-y; - pc = r-dy*dy; - xc = m*sqrt(pc)+x; - if((x < xs && x >= xc) || ( x > xs && x <= xc) || - (y < ys && y >= yc) || ( y > ys && y <= yc) ) - { - 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 = m*sqrt(pc)+y; - if((x < xs && x >= xc) || ( x > xs && x <= xc ) || - (y < ys && y >= yc) || (y > ys && y <= yc) ) - { - 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; - } - } - } -} - -int -quad(int x, int y, int xp, int 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); -} - -int -abs(int a) -{ - if(a < 0)return(-a); - return(a); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/box.c b/usr/src/ucbcmd/plot/libplot/t4014/box.c deleted file mode 100644 index e6ec1533c2..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/box.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/circle.c b/usr/src/ucbcmd/plot/libplot/t4014/circle.c deleted file mode 100644 index fb4c286bce..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/circle.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -circle(int x, int y, int r) -{ - arc(x,y,x+r,y,x+r,y); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/close.c b/usr/src/ucbcmd/plot/libplot/t4014/close.c deleted file mode 100644 index 0b32917310..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/close.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void -closevt(void) -{ - putch(037); - fflush(stdout); -} - -void -closepl(void) -{ - putch(037); - fflush(stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/dot.c b/usr/src/ucbcmd/plot/libplot/t4014/dot.c deleted file mode 100644 index a3ecc9bd43..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/dot.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/erase.c b/usr/src/ucbcmd/plot/libplot/t4014/erase.c deleted file mode 100644 index 1a540833cd..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/erase.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -extern int ohiy; -extern int ohix; -extern int oloy; -extern int oextra; - -void -erase(void) -{ - int i; - putch(033); - putch(014); - ohiy= -1; - ohix = -1; - oextra = -1; - oloy = -1; - sleep(2); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/label.c b/usr/src/ucbcmd/plot/libplot/t4014/label.c deleted file mode 100644 index baf1efc8ea..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/label.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#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 - */ -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 -}; - -void -label(char *s) -{ - int i, c; - for(i=0; c=lbl_mv[i]; i++) - putch(c); - for(i=0; c=s[i]; i++) - putch(c); - for(i=0; c=lbl_umv[i]; i++) - putch(c); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/line.c b/usr/src/ucbcmd/plot/libplot/t4014/line.c deleted file mode 100644 index 3690e9943d..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/line.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -line(int x0, int y0, int x1, int y1) -{ - move(x0,y0); - cont(x1,y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/linemod.c b/usr/src/ucbcmd/plot/libplot/t4014/linemod.c deleted file mode 100644 index 04ce1f8bed..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/linemod.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -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/ucbcmd/plot/libplot/t4014/move.c b/usr/src/ucbcmd/plot/libplot/t4014/move.c deleted file mode 100644 index 39766abf2e..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/move.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -move(int xi, int yi) -{ - putch(035); - cont(xi,yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/open.c b/usr/src/ucbcmd/plot/libplot/t4014/open.c deleted file mode 100644 index bf989e7644..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/open.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -openvt(void) -{ -} - -void -openpl(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/point.c b/usr/src/ucbcmd/plot/libplot/t4014/point.c deleted file mode 100644 index a2bffdfbeb..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/point.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -point(int xi, int yi) -{ - move(xi,yi); - cont(xi,yi); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/space.c b/usr/src/ucbcmd/plot/libplot/t4014/space.c deleted file mode 100644 index 732920fb5b..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/space.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -extern float botx; -extern float boty; -extern float obotx; -extern float oboty; -extern float scalex; -extern float scaley; -extern int scaleflag; - -void -space(int x0, int y0, int x1, int y1) -{ - botx = 0.; - boty = 0.; - obotx = x0; - oboty = y0; - if(scaleflag) - return; - scalex = 3120./(x1-x0); - scaley = 3120./(y1-y0); -} diff --git a/usr/src/ucbcmd/plot/libplot/t4014/subr.c b/usr/src/ucbcmd/plot/libplot/t4014/subr.c deleted file mode 100644 index 0965934b57..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t4014/subr.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -float obotx = 0.; -float oboty = 0.; -float botx = 0.; -float boty = 0.; -float scalex = 1.; -float scaley = 1.; -int scaleflag; - -int oloy = -1; -int ohiy = -1; -int ohix = -1; -int oextra = -1; - -void putch(int); - -void -cont(int x, int y) -{ - int hix,hiy,lox,loy,extra; - int n; - x = (x-obotx)*scalex + botx; - y = (y-oboty)*scaley + boty; - hix=(x>>7) & 037; - hiy=(y>>7) & 037; - lox = (x>>2)&037; - loy=(y>>2)&037; - extra=(x & 03) | ((y & 03) << 2); - 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); -} - -void -putch(int c) -{ - putc(c,stdout); -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/Makefile b/usr/src/ucbcmd/plot/libplot/t450/Makefile deleted file mode 100644 index 070b869669..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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" -# - -LIBRARY= ../libt450.a - -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 ../../../../lib/Makefile.lib - -C99MODE= $(C99_DISABLE) - -# Specifically request the construction of a static library. -# This library is not installed in the proto area. -LIBS = $(LIBRARY) - -BUILD.AR = $(AR) $(ARFLAGS) $@ `$(LORDER) $(AROBJS) | $(TSORT)` - - -CLOBBERFILES= $(LIBRARY) - -.KEEP_STATE: - -all: $(LIBS) - -include ../../../../lib/Makefile.targ - diff --git a/usr/src/ucbcmd/plot/libplot/t450/arc.c b/usr/src/ucbcmd/plot/libplot/t450/arc.c deleted file mode 100644 index 408fd8f923..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/arc.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -arc(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/box.c b/usr/src/ucbcmd/plot/libplot/t450/box.c deleted file mode 100644 index e6ec1533c2..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/box.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -box(int x0, int y0, int x1, int y1) -{ - move(x0, y0); - cont(x0, y1); - cont(x1, y1); - cont(x1, y0); - cont(x0, y0); - move(x1, y1); -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/circle.c b/usr/src/ucbcmd/plot/libplot/t450/circle.c deleted file mode 100644 index f6a0a988fd..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/circle.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -circle(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/close.c b/usr/src/ucbcmd/plot/libplot/t450/close.c deleted file mode 100644 index b67558c87c..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/close.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> - -void closepl(void); - -void -closevt(void) -{ - closepl(); -} - -void -closepl(void) -{ - fflush(stdout); - reset(); -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/con.h b/usr/src/ucbcmd/plot/libplot/t450/con.h deleted file mode 100644 index 72506e3942..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/con.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.1 */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - -#include <sgtty.h> -/* gsi plotting output routines */ -# define DOWN 012 -# define UP 013 -# define LEFT 010 -# define RIGHT 040 -# define BEL 007 -# define 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. -/* 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 struct sgttyb ITTY, PTTY; -extern float HEIGHT, WIDTH, OFFSET; -extern int xscale, xoffset, yscale; -extern float botx, boty, obotx, oboty, scalex,scaley; - diff --git a/usr/src/ucbcmd/plot/libplot/t450/dot.c b/usr/src/ucbcmd/plot/libplot/t450/dot.c deleted file mode 100644 index a3ecc9bd43..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/dot.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -dot(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/erase.c b/usr/src/ucbcmd/plot/libplot/t450/erase.c deleted file mode 100644 index 961ec87d08..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/erase.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void -erase(void) -{ - int i; - for(i=0; i<11*(VERTRESP/VERTRES); i++) - spew(DOWN); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/label.c b/usr/src/ucbcmd/plot/libplot/t450/label.c deleted file mode 100644 index abef1ac459..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/label.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void -label(char *s) -{ - int i,c; - while((c = *s++) != '\0'){ - xnow += 6; - spew(c); - } - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/line.c b/usr/src/ucbcmd/plot/libplot/t450/line.c deleted file mode 100644 index 3aa35fd288..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/line.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "con.h" - -void iline(int, int, int, int); - -void -line(int x0, int y0, int x1, int y1) -{ - iline(xconv(xsc(x0)),yconv(ysc(y0)),xconv(xsc(x1)),yconv(ysc(y1))); - return; -} - -void -cont(int x0, int y0) -{ - iline(xnow,ynow,xconv(xsc(x0)),yconv(ysc(y0))); - return; -} - -void -iline(int cx0, int cy0, int cx1, int cy1) -{ - int maxp,tt,j,np; - char chx,chy; - float xd,yd; - float dist2(),sqrt(); - movep(cx0,cy0); - maxp = 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= cx0+xd*tt-xnow; - xnow += j; - j = abval(j); - while(j-- > 0)spew(chx); - j = cy0+yd*tt-ynow; - ynow += j; - j = abval(j); - while(j-- > 0)spew(chy); - spew ('.'); - } - outplot(); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/linmod.c b/usr/src/ucbcmd/plot/libplot/t450/linmod.c deleted file mode 100644 index 897c62ea19..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/linmod.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -linemod(void) -{ -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/move.c b/usr/src/ucbcmd/plot/libplot/t450/move.c deleted file mode 100644 index 74983e7ba4..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/move.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -move(int xi, int yi) -{ - movep(xconv(xsc(xi)),yconv(ysc(yi))); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/open.c b/usr/src/ucbcmd/plot/libplot/t450/open.c deleted file mode 100644 index 1e9654329e..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/open.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sgtty.h> - -/* gsi plotting output routines */ -#define DOWN 012 -#define UP 013 -#define LEFT 010 -#define RIGHT 040 -#define BEL 007 -#define ACK 006 -#define PLOTIN 063 -#define PLOTOUT 064 -#define CR 015 -#define FF 014 -#define VERTRESP 48 -#define HORZRESP 60. -#define HORZRES 6. -#define VERTRES 8. -/* down is line feed, up is reverse oyne feed, - left is bwckspace, right is space. 48 points per inch - vertically, 60 horizontally */ - -int xnow, ynow; -int OUTF; -struct sgttyb ITTY, PTTY; -float HEIGHT = 6.0, WIDTH = 6.0, OFFSET = 0.0; -int xscale, xoffset, yscale; -float botx = 0., boty = 0., obotx = 0., oboty = 0.; -float scalex = 1., scaley = 1.; - -void -openpl(void) -{ - int reset(); - xnow = ynow = 0; - OUTF = 1; - printf("\r"); - gtty(OUTF, &ITTY); - signal (2, reset); - PTTY = ITTY; - PTTY.sg_flags &= ~CRMOD; /* don't map lf */ - stty(OUTF,&PTTY); - /* initialize constants */ - xscale = 4096./(HORZRESP * WIDTH); - yscale = 4096 /(VERTRESP * HEIGHT); - xoffset = OFFSET * HORZRESP; - return; -} - -void -openvt(void) -{ - openpl(); -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/point.c b/usr/src/ucbcmd/plot/libplot/t450/point.c deleted file mode 100644 index eea1f16f3c..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/point.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -void -point(int xi, int yi) -{ - move(xi,yi); - label("."); - return; -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/space.c b/usr/src/ucbcmd/plot/libplot/t450/space.c deleted file mode 100644 index 6f0c5a2606..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/space.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -# include "con.h" - -void -space(int x0, int y0, int x1, int y1) -{ - botx = -2047.; - boty = -2047.; - obotx = x0; - oboty = y0; - scalex = 4096./(x1-x0); - scaley = 4096./(y1-y0); -} diff --git a/usr/src/ucbcmd/plot/libplot/t450/subr.c b/usr/src/ucbcmd/plot/libplot/t450/subr.c deleted file mode 100644 index 3f491c6705..0000000000 --- a/usr/src/ucbcmd/plot/libplot/t450/subr.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> -#include "con.h" - -void spew(int); - -int -abval(int q) -{ - return (q>=0 ? q : -q); -} - -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); - fflush(stdout); -} - -void -spew(int ch) -{ - if(ch == UP){ - putc(ESC,stdout); - ch = DOWN; - } - putc(ch, stdout); -} - -void -tobotleft(void) -{ - move(-2048,-2048); -} - -void -reset(void) -{ - signal(2,1); - outplot(); - stty(OUTF,&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,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 = (xg-xnow)/HORZRES; - if(xnow < xg)ch = RIGHT; - else ch = LEFT; - xnow += i*HORZRES; - i = abval(i); - while(i--)spew(ch); - i = abval(xg-xnow); - inplot(); - while(i--) spew(ch); - outplot(); - i=(yg-ynow)/VERTRES; - if(ynow < yg)ch = UP; - else ch = DOWN; - ynow += i*VERTRES; - i = abval(i); - while(i--)spew(ch); - i=abval(yg-ynow); - inplot(); - while(i--)spew(ch); - outplot(); - xnow = xg; ynow = yg; -} - -int -xsc(int xi) -{ - int xa; - xa = (xi - obotx) * scalex + botx; - return(xa); -} - -int -ysc(int yi) -{ - int ya; - ya = (yi - oboty) *scaley +boty; - return(ya); -} |
