diff options
author | Garrett D'Amore <Garrett.Damore@Sun.COM> | 2009-11-04 21:40:43 -0800 |
---|---|---|
committer | Garrett D'Amore <Garrett.Damore@Sun.COM> | 2009-11-04 21:40:43 -0800 |
commit | 46e5ca4c180bbc8cb48be79bc045e873add461ac (patch) | |
tree | 4562fb4ad9bc55f21ea5356016b5952a1a409c50 /usr/src/ucbcmd | |
parent | 485bbbf5450c6645352388d798251c1a89ef4c9c (diff) | |
download | illumos-joyent-46e5ca4c180bbc8cb48be79bc045e873add461ac.tar.gz |
PSARC 2009/540 EOF of plotting components
6896169 remove UCB plotting commands
Diffstat (limited to 'usr/src/ucbcmd')
228 files changed, 0 insertions, 10812 deletions
diff --git a/usr/src/ucbcmd/Makefile b/usr/src/ucbcmd/Makefile index 408f5f42fd..2ae67f62a4 100644 --- a/usr/src/ucbcmd/Makefile +++ b/usr/src/ucbcmd/Makefile @@ -46,7 +46,6 @@ COMMON_SUBDIRS= \ ln \ ls \ mkstr \ - plot \ printenv \ rusage \ sed \ diff --git a/usr/src/ucbcmd/plot/Makefile b/usr/src/ucbcmd/plot/Makefile deleted file mode 100644 index 4392704b9a..0000000000 --- a/usr/src/ucbcmd/plot/Makefile +++ /dev/null @@ -1,222 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -PROG= tek t4013 t300 t300s t450 aedplot bgplot dumbplot gigiplot \ - hpplot hp7221plot implot atoplot plottoa vplot crtplot plot - -SUBDIRS= libplot - -DRVOBJ= driver.o -VPLOTOBJ= vplot.o chrtab.o -CRTOBJ= crtplot.o crtdriver.o -ATOOBJ= atoplot.o -TOAOBJ= plottoa.o - -OBJS= $(DRVOBJ) $(VPLOTOBJ) $(CRTOBJ) $(ATOOBJ) $(TOAOBJ) - -DRVSRC= $(DRVOBJ:%.o=%.c) -VPLOTSRC= $(VPLOTOBJ:%.o=%.c) -CRTSRC= $(CRTOBJ:%.o=%.c) -ATOSRC= $(ATOOBJ:%.o=%.c) -TOASRC= $(TOAOBJ:%.o=%.c) - -SRCS= $(DRVSRC) $(VPLOTSRC) $(CRTSRC) $(ATOSRC) $(TOASRC) - -include ../Makefile.ucbcmd - -FILEMODE= 755 - -INC1 = $(SRC)/ucbhead - -LDFLAGS += -L$(ROOT)/usr/ucblib -R /usr/ucblib - -LIBPLOT = ./libplot - -LIBS.DEF = -lucb -LIBS.PLOT = -LDLIBS += $(LIBS.PLOT) $(LIBS.DEF) - -CPPFLAGS = -I$(INC1) $(CPPFLAGS.master) - -clean:= TARGET= clean -clobber:= TARGET= clobber - -.KEEP_STATE: - -all: $(PROG) debug - -tek:= LDFLAGS += -L$(LIBPLOT) -tek:= LIBS.PLOT = -lm -lt4014 -tek: $(DRVOBJ) $(LIBPLOT)/libt4014.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -t4013:= LDFLAGS += -L$(LIBPLOT) -t4013:= LIBS.PLOT = -lm -lt4013 -t4013: $(DRVOBJ) $(LIBPLOT)/libt4013.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -t300:= LDFLAGS += -L$(LIBPLOT) -t300:= LIBS.PLOT = -lm -lt300 -t300: $(DRVOBJ) $(LIBPLOT)/libt300.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -t300s:= LDFLAGS += -L$(LIBPLOT) -t300s:= LIBS.PLOT = -lm -lt300s -t300s: $(DRVOBJ) $(LIBPLOT)/libt300s.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -t450:= LDFLAGS += -L$(LIBPLOT) -t450:= LIBS.PLOT = -lm -lt450 -t450: $(DRVOBJ) $(LIBPLOT)/libt450.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -vplot: $(VPLOTOBJ) - $(LINK.c) $(VPLOTOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -crtplot:= LDFLAGS += -L$(LIBPLOT) -crtplot:= LIBS.DEF = -lcurses -ltermcap -lm -lucb -crtplot: $(CRTOBJ) - $(LINK.c) $(CRTOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -aedplot:= LDFLAGS += -L$(LIBPLOT) -aedplot:= LIBS.PLOT = -laed -aedplot: $(DRVOBJ) $(LIBPLOT)/libaed.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -bgplot:= LDFLAGS += -L$(LIBPLOT) -bgplot:= LIBS.PLOT = -lm -lplotbg -bgplot: $(DRVOBJ) $(LIBPLOT)/libplotbg.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -dumbplot:= LDFLAGS += -L$(LIBPLOT) -dumbplot:= LIBS.DEF = -ltermcap -lm -lucb -dumbplot:= LIBS.PLOT = -lm -ldumb -dumbplot: $(DRVOBJ) $(LIBPLOT)/libdumb.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -gigiplot:= LDFLAGS += -L$(LIBPLOT) -gigiplot:= LIBS.PLOT = -lm -lgigi -gigiplot: $(DRVOBJ) $(LIBPLOT)/libgigi.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -hpplot:= LDFLAGS += -L$(LIBPLOT) -hpplot:= LIBS.PLOT = -lm -lhp2648 -hpplot: $(DRVOBJ) $(LIBPLOT)/libhp2648.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -hp7221plot:= LDFLAGS += -L$(LIBPLOT) -hp7221plot:= LIBS.PLOT = -lm -lhp7221 -hp7221plot: $(DRVOBJ) $(LIBPLOT)/libhp7221.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -implot:= LDFLAGS += -L$(LIBPLOT) -implot:= LIBS.PLOT = -lm -limagen -implot: $(DRVOBJ) $(LIBPLOT)/libimagen.a - $(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -atoplot:= LDFLAGS += -L$(LIBPLOT) -atoplot:= LIBS.PLOT = -lplot -atoplot: $(ATOOBJ) $(LIBPLOT)/libplot.a - $(LINK.c) $(ATOOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -plottoa: $(TOAOBJ) - $(LINK.c) $(TOAOBJ) -o $@ $(LDLIBS) - $(POST_PROCESS) - -$(LIBPLOT)/libt300.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) t300 - -$(LIBPLOT)/libt300s.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) t300s - -$(LIBPLOT)/libt450.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) t450 - -$(LIBPLOT)/libt4014.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) t4014 - -$(LIBPLOT)/libaed.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) aed - -$(LIBPLOT)/libplotbg.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) bitgraph - -$(LIBPLOT)/libdumb.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) dumb - -$(LIBPLOT)/libgigi.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) gigi - -$(LIBPLOT)/libhp2648.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) hp2648 - -$(LIBPLOT)/libhp7221.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) hp7221 - -$(LIBPLOT)/libimagen.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) imagen - -$(LIBPLOT)/libplot.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) plot - -$(LIBPLOT)/libt4013.a: FRC - cd $(LIBPLOT); pwd; $(MAKE) t4013 - -install: all $(ROOTPROG) - -clean: $(SUBDIRS) clean_all - -clobber: $(SUBDIRS) clobber_all - -clean_all: - $(RM) $(OBJS) - -clobber_all: - $(RM) $(PROG) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET) - -lint: lint_PROG - -include ../Makefile.ucbtarg - -FRC: - diff --git a/usr/src/ucbcmd/plot/THIRDPARTYLICENSE b/usr/src/ucbcmd/plot/THIRDPARTYLICENSE deleted file mode 100644 index 4dedd9d2a7..0000000000 --- a/usr/src/ucbcmd/plot/THIRDPARTYLICENSE +++ /dev/null @@ -1,32 +0,0 @@ -Copyright (c) 1980 Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgement: - This product includes software developed by the University - of California, Berkeley and its contributors. - 4. Neither the name of the University nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/usr/src/ucbcmd/plot/THIRDPARTYLICENSE.descrip b/usr/src/ucbcmd/plot/THIRDPARTYLICENSE.descrip deleted file mode 100644 index 6f0c975184..0000000000 --- a/usr/src/ucbcmd/plot/THIRDPARTYLICENSE.descrip +++ /dev/null @@ -1 +0,0 @@ -PORTIONS OF PLOT(1B) COMMAND diff --git a/usr/src/ucbcmd/plot/atoplot.c b/usr/src/ucbcmd/plot/atoplot.c deleted file mode 100644 index a527e0e122..0000000000 --- a/usr/src/ucbcmd/plot/atoplot.c +++ /dev/null @@ -1,192 +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 deltx; -float delty; - -static void fplt(FILE *); -static int getsi(FILE *); -static void getstr(char *, FILE *); -static char *mapLineType(char *); - -int -main(int argc, char **argv) -{ - int std=1; - FILE *fin; - - while(argc-- > 1) { - if(*argv[1] == '-') - switch(argv[1][1]) { - case 'l': - deltx = atoi(&argv[1][2]) - 1; - break; - case 'w': - delty = atoi(&argv[1][2]) - 1; - break; - } - - else { - std = 0; - if ((fin = fopen(argv[1], "r")) == NULL) { - fprintf(stderr, "can't open %s\n", argv[1]); - exit(1); - } - fplt(fin); - fclose(fin); - } - argv++; - } - if (std) - fplt( stdin ); - return (0); -} - - -static void -fplt(FILE *fin) -{ - int c; - char s[256]; - int xi,yi,x0,y0,x1,y1,r,dx,n,i; - int pat[256]; - - openpl(); - while((c=getc(fin)) != EOF){ - switch(c){ - case 'm': - xi = getsi(fin); - yi = getsi(fin); - move(xi,yi); - break; - case 'l': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - line(x0,y0,x1,y1); - break; - case 't': - getstr(s,fin); - label(s); - break; - case 'e': - erase(); - break; - case 'p': - xi = getsi(fin); - yi = getsi(fin); - point(xi,yi); - break; - case 'n': - xi = getsi(fin); - yi = getsi(fin); - cont(xi,yi); - break; - case 's': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - space(x0,y0,x1,y1); - break; - case 'a': - xi = getsi(fin); - yi = getsi(fin); - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - arc(xi,yi,x0,y0,x1,y1); - break; - case 'c': - xi = getsi(fin); - yi = getsi(fin); - r = getsi(fin); - circle(xi,yi,r); - break; - case 'f': - getstr(s,fin); - linemod( mapLineType(s) ); - break; - case 'd': - xi = getsi(fin); - yi = getsi(fin); - dx = getsi(fin); - n = getsi(fin); - for(i=0; i<n; i++)pat[i] = getsi(fin); - dot(xi,yi,dx,n,pat); - break; - } - /* scan to newline */ - while( (c = getc( fin )) != '\n' ) { - if ( c == EOF ) { - break; - } - } - } - closepl(); -} - -/* get an integer stored in 2 ascii bytes. */ -static int -getsi(FILE *fin) -{ - int i; - - if ( fscanf(fin, " %d", & i) != 1 ) { - return(EOF); - } - return( i ); -} - -static void -getstr(char *s, FILE *fin) -{ - for( ; *s = getc(fin); s++) - if(*s == '\n') - break; - *s = '\0'; -} - -char *lineMap[] = { - "solid", /* line type 0 */ - "solid", /* line type 1 */ - "dotted", /* line type 2 */ - "dotdashed", /* line type 3 */ - "shortdashed", /* line type 4 */ - "longdashed", /* line type 5 */ - "dotlongdash", /* line type 6 */ - "dotshortdash", /* line type 7 */ - "dotdotdash", /* line type 8 */ -} ; - -static char * -mapLineType(char *cp) -{ - int i; - - if ( sscanf(cp, "%d", &i) == 1 ) { - if ( i < 0 || i > sizeof(lineMap)/sizeof(char *) ) { - i = 1; - } - return( lineMap[i] ); - } - else { - return( cp ); - } -} diff --git a/usr/src/ucbcmd/plot/chrtab.c b/usr/src/ucbcmd/plot/chrtab.c deleted file mode 100644 index 9ae1e40e48..0000000000 --- a/usr/src/ucbcmd/plot/chrtab.c +++ /dev/null @@ -1,117 +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) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - - -char chrtab[][16] = { -0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000, /*, sp, */ -0010,0010,0010,0010,0010,0010,0010,0010,0000,0000,0010,0000,0000,0000,0000,0000, /*, !, */ -0024,0024,0024,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000, /*, ", */ -0000,0000,0000,0044,0044,0176,0044,0044,0176,0044,0044,0000,0000,0000,0000,0000, /*, #, */ -0000,0010,0010,0010,0076,0101,0100,0076,0001,0101,0076,0010,0010,0000,0000,0000, /*, $, */ -0000,0000,0000,0141,0142,0004,0010,0010,0020,0043,0103,0000,0000,0000,0000,0000, /*, %, */ -0000,0000,0070,0104,0110,0060,0060,0111,0106,0106,0071,0000,0000,0000,0000,0000, /*, &, */ -0004,0010,0020,0040,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000, /*, ', */ -0000,0004,0010,0020,0040,0040,0040,0040,0040,0040,0020,0010,0004,0000,0000,0000, /*, (, */ -0000,0040,0020,0010,0004,0004,0004,0004,0004,0004,0010,0020,0040,0000,0000,0000, /*, ), */ -0000,0000,0000,0010,0111,0052,0034,0177,0034,0052,0111,0010,0000,0000,0000,0000, /*, *, */ -0000,0000,0000,0000,0010,0010,0010,0177,0010,0010,0010,0000,0000,0000,0000,0000, /*, +, */ -0000,0000,0000,0000,0000,0000,0000,0000,0000,0030,0030,0010,0020,0000,0000,0000, /*, ,, */ -0000,0000,0000,0000,0000,0000,0000,0176,0000,0000,0000,0000,0000,0000,0000,0000, /*, -, */ -0000,0000,0000,0000,0000,0000,0000,0000,0000,0030,0030,0000,0000,0000,0000,0000, /*, ., */ -0000,0000,0001,0002,0004,0010,0010,0010,0020,0040,0100,0000,0000,0000,0000,0000, /*, /, */ -0000,0030,0044,0102,0102,0102,0102,0102,0102,0044,0030,0000,0000,0000,0000,0000, /*, 0, */ -0000,0010,0030,0010,0010,0010,0010,0010,0010,0010,0034,0000,0000,0000,0000,0000, /*, 1, */ -0000,0070,0104,0004,0004,0010,0020,0040,0100,0100,0174,0000,0000,0000,0000,0000, /*, 2, */ -0000,0176,0004,0004,0010,0014,0002,0002,0002,0104,0070,0000,0000,0000,0000,0000, /*, 3, */ -0000,0004,0014,0024,0044,0104,0176,0004,0004,0004,0004,0000,0000,0000,0000,0000, /*, 4, */ -0000,0174,0100,0100,0130,0144,0002,0002,0102,0044,0030,0000,0000,0000,0000,0000, /*, 5, */ -0000,0074,0102,0100,0130,0144,0102,0102,0102,0044,0030,0000,0000,0000,0000,0000, /*, 6, */ -0000,0176,0004,0004,0010,0010,0020,0020,0040,0040,0040,0000,0000,0000,0000,0000, /*, 7, */ -0000,0034,0042,0101,0042,0076,0101,0101,0101,0101,0076,0000,0000,0000,0000,0000, /*, 8, */ -0000,0034,0042,0101,0101,0101,0043,0036,0004,0010,0020,0040,0000,0000,0000,0000, /*, 9, */ -0000,0000,0000,0000,0000,0000,0030,0030,0000,0030,0030,0000,0000,0000,0000,0000, /*, :, */ -0000,0000,0000,0000,0000,0000,0030,0030,0000,0030,0030,0020,0040,0000,0000,0000, /*, ;, */ -0002,0004,0010,0020,0040,0100,0040,0020,0010,0004,0002,0000,0000,0000,0000,0000, /*, <, */ -0000,0000,0000,0000,0177,0000,0177,0000,0000,0000,0000,0000,0000,0000,0000,0000, /*, =, */ -0100,0040,0020,0010,0004,0002,0004,0010,0020,0040,0100,0000,0000,0000,0000,0000, /*, >, */ -0000,0030,0044,0102,0001,0002,0004,0010,0010,0000,0010,0000,0000,0000,0000,0000, /*, ?, */ -0000,0074,0102,0101,0115,0123,0121,0121,0121,0111,0046,0000,0000,0000,0000,0000, /*, @, */ -0000,0010,0024,0042,0101,0101,0177,0101,0101,0101,0101,0000,0000,0000,0000,0000, /*, A, */ -0000,0176,0101,0101,0101,0176,0101,0101,0101,0101,0176,0000,0000,0000,0000,0000, /*, B, */ -0000,0076,0101,0100,0100,0100,0100,0100,0100,0101,0076,0000,0000,0000,0000,0000, /*, C, */ -0000,0176,0101,0101,0101,0101,0101,0101,0101,0101,0176,0000,0000,0000,0000,0000, /*, D, */ -0000,0176,0100,0100,0100,0170,0100,0100,0100,0100,0177,0000,0000,0000,0000,0000, /*, E, */ -0000,0177,0100,0100,0100,0174,0100,0100,0100,0100,0100,0000,0000,0000,0000,0000, /*, F, */ -0000,0076,0101,0100,0100,0117,0101,0101,0101,0101,0076,0000,0000,0000,0000,0000, /*, G, */ -0000,0101,0101,0101,0101,0176,0101,0101,0101,0101,0101,0000,0000,0000,0000,0000, /*, H, */ -0000,0034,0010,0010,0010,0010,0010,0010,0010,0010,0034,0000,0000,0000,0000,0000, /*, I, */ -0000,0016,0004,0004,0004,0004,0004,0004,0104,0104,0070,0000,0000,0000,0000,0000, /*, J, */ -0000,0101,0102,0104,0110,0120,0160,0110,0104,0102,0101,0000,0000,0000,0000,0000, /*, K, */ -0000,0100,0100,0100,0100,0100,0100,0100,0100,0100,0177,0000,0000,0000,0000,0000, /*, L, */ -0000,0101,0143,0125,0111,0101,0101,0101,0101,0101,0101,0000,0000,0000,0000,0000, /*, M, */ -0000,0101,0141,0121,0111,0105,0103,0101,0101,0101,0101,0000,0000,0000,0000,0000, /*, N, */ -0000,0076,0101,0101,0101,0101,0101,0101,0101,0101,0076,0000,0000,0000,0000,0000, /*, O, */ -0000,0176,0101,0101,0101,0176,0100,0100,0100,0100,0100,0000,0000,0000,0000,0000, /*, P, */ -0000,0076,0101,0101,0101,0101,0101,0101,0131,0105,0076,0002,0001,0000,0000,0000, /*, Q, */ -0000,0176,0101,0101,0101,0176,0104,0102,0101,0101,0101,0000,0000,0000,0000,0000, /*, R, */ -0000,0076,0101,0100,0100,0076,0001,0001,0001,0101,0076,0000,0000,0000,0000,0000, /*, S, */ -0000,0177,0010,0010,0010,0010,0010,0010,0010,0010,0010,0000,0000,0000,0000,0000, /*, T, */ -0000,0101,0101,0101,0101,0101,0101,0101,0101,0101,0076,0000,0000,0000,0000,0000, /*, U, */ -0000,0101,0101,0101,0101,0101,0101,0101,0042,0024,0010,0000,0000,0000,0000,0000, /*, V, */ -0000,0101,0101,0101,0101,0111,0111,0125,0143,0101,0101,0000,0000,0000,0000,0000, /*, W, */ -0000,0101,0101,0042,0024,0010,0024,0042,0101,0101,0101,0000,0000,0000,0000,0000, /*, X, */ -0000,0101,0042,0024,0010,0010,0010,0010,0010,0010,0010,0000,0000,0000,0000,0000, /*, Y, */ -0000,0177,0001,0002,0004,0010,0020,0040,0100,0100,0177,0000,0000,0000,0000,0000, /*, Z, */ -0000,0034,0020,0020,0020,0020,0020,0020,0020,0020,0020,0034,0000,0000,0000,0000, /*, [, */ -0000,0000,0100,0040,0020,0010,0010,0010,0004,0002,0001,0000,0000,0000,0000,0000, /*, , \, */ -0000,0070,0010,0010,0010,0010,0010,0010,0010,0010,0010,0070,0000,0000,0000,0000, /*, ], */ -0010,0024,0042,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000, /*, ^, */ -0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,(char)0377,0000,0000, /*, _, */ -0040,0020,0010,0004,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000, /*, `, */ -0000,0000,0000,0000,0000,0074,0002,0076,0102,0102,0076,0000,0000,0000,0000,0000, /*, a, */ -0000,0100,0100,0100,0100,0174,0102,0102,0102,0102,0174,0000,0000,0000,0000,0000, /*, b, */ -0000,0000,0000,0000,0000,0074,0102,0100,0100,0102,0074,0000,0000,0000,0000,0000, /*, c, */ -0002,0002,0002,0002,0002,0076,0102,0102,0102,0102,0076,0000,0000,0000,0000,0000, /*, d, */ -0000,0000,0000,0000,0000,0074,0102,0174,0100,0102,0074,0000,0000,0000,0000,0000, /*, e, */ -0000,0016,0020,0020,0020,0176,0020,0020,0020,0020,0020,0000,0000,0000,0000,0000, /*, f, */ -0000,0000,0000,0000,0000,0076,0102,0102,0102,0102,0076,0002,0002,0102,0076,0000, /*, g, */ -0000,0100,0100,0100,0100,0174,0102,0102,0102,0102,0102,0000,0000,0000,0000,0000, /*, h, */ -0000,0000,0000,0010,0000,0030,0010,0010,0010,0010,0034,0000,0000,0000,0000,0000, /*, i, */ -0000,0000,0000,0010,0000,0030,0010,0010,0010,0010,0010,0010,0010,0050,0020,0000, /*, j, */ -0000,0100,0100,0100,0100,0106,0110,0120,0160,0110,0106,0000,0000,0000,0000,0000, /*, k, */ -0000,0030,0010,0010,0010,0010,0010,0010,0010,0010,0034,0000,0000,0000,0000,0000, /*, l, */ -0000,0000,0000,0000,0000,0166,0111,0111,0111,0111,0111,0000,0000,0000,0000,0000, /*, m, */ -0000,0000,0000,0000,0100,0174,0102,0102,0102,0102,0102,0000,0000,0000,0000,0000, /*, n, */ -0000,0000,0000,0000,0000,0074,0102,0102,0102,0102,0074,0000,0000,0000,0000,0000, /*, o, */ -0000,0000,0000,0000,0000,0174,0102,0102,0102,0102,0174,0100,0100,0100,0100,0000, /*, p, */ -0000,0000,0000,0000,0000,0076,0102,0102,0102,0102,0076,0002,0002,0002,0002,0000, /*, q, */ -0000,0000,0000,0000,0000,0134,0142,0100,0100,0100,0100,0000,0000,0000,0000,0000, /*, r, */ -0000,0000,0000,0000,0000,0076,0100,0074,0002,0102,0074,0000,0000,0000,0000,0000, /*, s, */ -0000,0020,0020,0020,0020,0176,0020,0020,0020,0020,0014,0000,0000,0000,0000,0000, /*, t, */ -0000,0000,0000,0000,0000,0102,0102,0102,0102,0102,0075,0000,0000,0000,0000,0000, /*, u, */ -0000,0000,0000,0000,0000,0101,0101,0101,0042,0024,0010,0000,0000,0000,0000,0000, /*, v, */ -0000,0000,0000,0000,0000,0111,0111,0111,0111,0111,0066,0000,0000,0000,0000,0000, /*, w, */ -0000,0000,0000,0000,0000,0102,0044,0030,0030,0044,0102,0000,0000,0000,0000,0000, /*, x, */ -0000,0000,0000,0000,0000,0102,0102,0102,0042,0024,0010,0020,0040,0100,0000,0000, /*, y, */ -0000,0000,0000,0000,0000,0176,0004,0010,0020,0040,0176,0000,0000,0000,0000,0000, /*, z, */ -0000,0014,0020,0020,0020,0020,0040,0020,0020,0020,0020,0014,0000,0000,0000,0000, /*, {, */ -0000,0010,0010,0010,0010,0000,0000,0010,0010,0010,0010,0000,0000,0000,0000,0000, /*, |, */ -0000,0030,0010,0010,0010,0010,0004,0010,0010,0010,0010,0030,0000,0000,0000,0000, /*, }, */ -0020,0052,0004,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000, /*, ~, */ -0000,0176,0176,0176,0176,0176,0176,0176,0176,0176,0176,0000,0000,0000,0000,0000, /*, del, */ -}; diff --git a/usr/src/ucbcmd/plot/crtdriver.c b/usr/src/ucbcmd/plot/crtdriver.c deleted file mode 100644 index f6d2e21a82..0000000000 --- a/usr/src/ucbcmd/plot/crtdriver.c +++ /dev/null @@ -1,164 +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 driver is used with crtplot.c. -It is essentially the same driver as the one in /usr/src/cmd/plot. -Unfortunately, the curses library has some of the same names as does -as the functions that the driver calls. These have been changed. - -Also, one of the commands has been removed since they don't make sense -for crt's. -*/ - - -#include <stdio.h> - -float deltx; -float delty; - -static void fplt(FILE *); -static int getsi(FILE *); -static void getstr(char *, FILE *); - -int -main(int argc, char **argv) -{ - int std=1; - FILE *fin; - - while(argc-- > 1) { - if(*argv[1] == '-') - switch(argv[1][1]) { - case 'l': - deltx = atoi(&argv[1][2]) - 1; - break; - case 'w': - delty = atoi(&argv[1][2]) - 1; - break; - } - - else { - std = 0; - if ((fin = fopen(argv[1], "r")) == NULL) { - printw("can't open %s\n", argv[1]); - exit(1); - } - fplt(fin); - } - argv++; - } - if (std) - fplt( stdin ); - - return (0); -} - -static void -fplt(FILE *fin) -{ - int c; - char s[256]; - int xi,yi,x0,y0,x1,y1,r/*,dx,n,i*/; - /*int pat[256];*/ - - openpl(); - while((c=getc(fin)) != EOF){ - switch(c){ - case 'm': - xi = getsi(fin); - yi = getsi(fin); - plot_move(xi,yi); - break; - case 'l': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - line(x0,y0,x1,y1); - break; - case 't': - getstr(s,fin); - label(s); - break; - case 'e': - plot_erase(); - break; - case 'p': - xi = getsi(fin); - yi = getsi(fin); - point(xi,yi); - break; - case 'n': - xi = getsi(fin); - yi = getsi(fin); - cont(xi,yi); - break; - case 's': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - space(x0,y0,x1,y1); - break; - case 'a': - xi = getsi(fin); - yi = getsi(fin); - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - arc(xi,yi,x0,y0,x1,y1); - break; - case 'c': - xi = getsi(fin); - yi = getsi(fin); - r = getsi(fin); - circle(xi,yi,r); - break; - case 'f': - getstr(s,fin); - linemod(s); - break; - default: - fprintf(stderr, "Unknown command %c (%o)\n", c, c); - break; - } - } - closepl(); -} - -/* get an integer stored in 2 ascii bytes. */ -static int -getsi(FILE *fin) -{ - short a, b; - if((b = getc(fin)) == EOF) - return(EOF); - if((a = getc(fin)) == EOF) - return(EOF); - a = a<<8; - return(a|b); -} - -static void -getstr(char *s, FILE *fin) -{ - for( ; *s = getc(fin); s++) - if(*s == '\n') - break; - *s = '\0'; -} diff --git a/usr/src/ucbcmd/plot/crtplot.c b/usr/src/ucbcmd/plot/crtplot.c deleted file mode 100644 index 7f317eb6e2..0000000000 --- a/usr/src/ucbcmd/plot/crtplot.c +++ /dev/null @@ -1,306 +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 plotting routine interprets plot commands and outputs them onto -intelligent terminals (ie, terminals with clear screen and cursor -addressability. It uses the curses library. It should be compiled -as follows: - cc crtdriver.c crtplot.c -lcurses -ltermcap -lm -Note: This requires as slightly modified driver from the standard driver -because some function names conflicted with the curses library. -(That's what you get when you have a flat name space!) -*/ - -#include <curses.h> -#include <math.h> -#include <signal.h> - -/* These map from plot routine coordinates to screen coordinates. */ -#define scaleX(x) (int) ((x-lowX)*rangeX + 0.5) -#define scaleY(y) (int) (LINES-0.5 - ((y-lowY)*rangeY)) - -#define plot_movech(y, x, ch) { plot_move(x, y); plot_addch(ch); } - -static double lowX, rangeX; /* min and range of x */ -static double lowY, rangeY; /* min and range of y */ -static int lastX, lastY; /* last point plotted */ - -void arc(int, int, int, int, int, int); -void dda_line(char, int, int, int, int); -char *getenv(); - -/* This routine just moves the cursor. */ -void -screen_move(int y, int x) -{ - /* must check for automatic wrap at last col */ - if (!AM || (y < LINES -1) || (x < COLS -1)) { - mvcur(lastY, lastX, y, x); - lastY = y; - lastX = x; - } -} - - -/* This routine assumes the cursor is positioned correctly. */ -void -plot_addch(char ch) -{ - putchar(ch); - if (++lastX >= COLS) { - if (AM) { - lastX = 0; - lastY++; - } else { - lastX = COLS - 1; - } - } -} - - - - -/* See the curses manual for what is been done and why. */ -void -openpl(void) -{ - char *sp; - void closepl(); - - gettmode(); - if (sp=getenv("TERM")) - setterm(sp); - signal(SIGINT, closepl); -} - - - - -void -closepl(void) -{ - signal(SIGINT, SIG_IGN); - /* Leave cursor at top of screen. */ - mvcur(LINES-1, COLS-1, 0, 0); - endwin(); - exit(0); -} - - - -void -plot_move(int x, int y) -{ - screen_move(scaleY(y), scaleX(x)); -} - - - -void -line(int x0, int y0, int x1, int y1) -{ - plot_movech(y0, x0, '*'); - dda_line('*', scaleX(x0), scaleY(y0), scaleX(x1), scaleY(y1)); -} - -void -label(char *str) -{ - int i, length; - int strlen(); - - if ( (length=strlen(str)) > (COLS-lastX) ) - length = COLS - lastX; - for (i=0; i<length; ++i) - plot_addch(str[i]); -} - -void -plot_erase(void) -{ - int _putchar(); - /* - Some of these functions probably belong in openpl(). However, if the - input is being typed in, putting them in openpl would not work - since "noecho", etc would prevent (sort of) input. Notice that - the driver calls openpl before doing anything. This is actually - wrong, but it is what whoever originally wrote the driver decided - to do. (openpl() in libplot does nothing -- that is the main problem!) - */ - _puts(TI); - _puts(VS); - - noecho(); - nonl(); - tputs(CL, LINES, _putchar); - mvcur(0, COLS-1, LINES-1, 0); - lastX = 0; - lastY = LINES-1; -} - - -void -point(int x, int y) -{ - plot_movech(y, x, '*'); -} - - -void -cont(int x, int y) -{ - dda_line('*', lastX-1, lastY, scaleX(x), scaleY(y)); -} - - -void -space(int x0, int y0, int x1, int y1) -{ - lowX = (double) x0; - lowY = (double) y0; - rangeX = COLS/(double) (x1 - x0); - rangeY = LINES/(double) (y1 - y0); -} - - -void -linemod(char *string) -{ -} - - -/* - * See Neuman & Sproul for explanation and rationale. - * Does not plot first point -- assumed that it is already plotted - * - * x0, y0, x1, and y1 are already transformed to screen coords - */ -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(); - - 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; - screen_move((int) floor(y), (int) floor(x)); - plot_addch(ch); - } -} - - -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); -} - - -/* should include test for equality? */ -#define side(x,y) (a*(x)+b*(y)+c > 0.0 ? 1 : -1) - -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; - - xbeg -= xc; ybeg -= yc; - xend -= xc; yend -= yc; - - /* probably should check that arc is truely circular */ - /* Note: r is in screen coordinates. */ - r = sqrt( rangeX*rangeX*xbeg*xbeg + rangeY*rangeY*ybeg*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. - */ - 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) (yend - ybeg); - b = (double) (xend - xbeg); - c = (double) (yend*xbeg - xend*ybeg); - right_side = side(xbeg + (yend-ybeg), - ybeg - (xend-xbeg) ); - - x = xbeg; - y = ybeg; - plot_move(xbeg+xc, ybeg+yc); - do { - dda_line('*',lastX-1, lastY, scaleX(xc + x), scaleY(yc + y )); - /* - screen_move( scaleY(yc + y), scaleX(xc + x) ); - plot_addch('*'); - */ - 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/debug.c b/usr/src/ucbcmd/plot/debug.c deleted file mode 100644 index 324f7ac6b0..0000000000 --- a/usr/src/ucbcmd/plot/debug.c +++ /dev/null @@ -1,152 +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 deltx; -float delty; - -static void fplt(FILE *); -static int getsi(FILE *); -static void getstr(char *, FILE *); - -int -main(int argc, char **argv) -{ - int std=1; - FILE *fin; - - while(argc-- > 1) { - if(*argv[1] == '-') - switch(argv[1][1]) { - case 'l': - deltx = atoi(&argv[1][2]) - 1; - break; - case 'w': - delty = atoi(&argv[1][2]) - 1; - break; - } - - else { - std = 0; - if ((fin = fopen(argv[1], "r")) == NULL) { - fprintf(stderr, "can't open %s\n", argv[1]); - exit(1); - } - fplt(fin); - } - argv++; - } - if (std) - fplt( stdin ); - return (0); -} - - -static void -fplt(FILE *fin) -{ - int c; - char s[256]; - int xi,yi,x0,y0,x1,y1,r/*,dx,n,i*/; - - printf("openpl\n"); - while((c=getc(fin)) != EOF){ - switch(c){ - case 'm': - xi = getsi(fin); - yi = getsi(fin); - printf("move %d %d\n", xi, yi); - break; - case 'l': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - printf("line %d %d %d %d\n", x0, y0, x1, y1); - break; - case 't': - getstr(s,fin); - printf("label %s\n", s); - break; - case 'e': - printf("erase\n"); - break; - case 'p': - xi = getsi(fin); - yi = getsi(fin); - printf("point %d %d\n", xi, yi); - break; - case 'n': - xi = getsi(fin); - yi = getsi(fin); - printf("continue %d %d\n", xi, yi); - break; - case 's': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - printf("space %d %d %d %d\n", x0, y0, x1, y1); - break; - case 'a': - xi = getsi(fin); - yi = getsi(fin); - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - printf("arc\n"); - break; - case 'c': - xi = getsi(fin); - yi = getsi(fin); - r = getsi(fin); - printf("circle\n"); - break; - case 'f': - getstr(s,fin); - printf("linemod %s\n", s); - break; - default: - fprintf(stderr, "Unknown command %c (%o)\n", c, c); - break; - } - } - printf("closepl\n"); -} - -/* get an integer stored in 2 ascii bytes. */ -static int -getsi(FILE *fin) -{ - short a, b; - if((b = getc(fin)) == EOF) - return(EOF); - if((a = getc(fin)) == EOF) - return(EOF); - a = a<<8; - return(a|b); -} - -static void -getstr(char *s, FILE *fin) -{ - for( ; *s = getc(fin); s++) - if(*s == '\n') - break; - *s = '\0'; -} diff --git a/usr/src/ucbcmd/plot/driver.c b/usr/src/ucbcmd/plot/driver.c deleted file mode 100644 index b1254277d8..0000000000 --- a/usr/src/ucbcmd/plot/driver.c +++ /dev/null @@ -1,167 +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 deltx; -float delty; -int PlotRes; - -static void fplt(FILE *); -static int getsi(FILE *); -static void getstr(char *, FILE *); - -int -main(int argc, char *argv[]) -{ - int std = 1; - char *progname; - FILE *fin; - - progname = argv[0]; - for (argc--, argv++; argc > 0; argc--, argv++) { - if (argv[0][0] == '-') { - switch (argv[0][1]) { - case 'l': - deltx = atoi(&argv[0][2]) - 1; - break; - case 'w': - delty = atoi(&argv[0][2]) - 1; - break; - case 'r': - PlotRes = atoi(&argv[0][2]); - break; - } - continue; - } - std = 0; - fin = fopen(argv[0], "r"); - if (fin == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, - argv[0]); - exit(1); - } - fplt(fin); - fclose(fin); - } - if (std) - fplt(stdin); - return (0); -} - -static void -fplt(FILE *fin) -{ - int c; - char s[256]; - int xi,yi,x0,y0,x1,y1,r,dx,n,i; - int pat[256]; - - openpl(); - while((c = getc(fin)) != EOF) { - switch(c) { - case 'm': - xi = getsi(fin); - yi = getsi(fin); - move(xi,yi); - break; - case 'l': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - line(x0,y0,x1,y1); - break; - case 't': - getstr(s,fin); - label(s); - break; - case 'e': - erase(); - break; - case 'p': - xi = getsi(fin); - yi = getsi(fin); - point(xi,yi); - break; - case 'n': - xi = getsi(fin); - yi = getsi(fin); - cont(xi,yi); - break; - case 's': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - space(x0,y0,x1,y1); - break; - case 'a': - xi = getsi(fin); - yi = getsi(fin); - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - arc(xi,yi,x0,y0,x1,y1); - break; - case 'c': - xi = getsi(fin); - yi = getsi(fin); - r = getsi(fin); - circle(xi,yi,r); - break; - case 'f': - getstr(s,fin); - linemod(s); - break; - case 'd': - xi = getsi(fin); - yi = getsi(fin); - dx = getsi(fin); - n = getsi(fin); - for(i=0; i<n; i++) - pat[i] = getsi(fin); - dot(xi,yi,dx,n,pat); - break; - } - } - closepl(); -} - -/* get an integer stored in 2 ascii bytes. */ -static int -getsi(FILE *fin) -{ - short a, b; - - if((b = getc(fin)) == EOF) - return(EOF); - if((a = getc(fin)) == EOF) - return(EOF); - a = a<<8; - return(a|b); -} - -static void -getstr(char *s, FILE *fin) -{ - - for( ; *s = getc(fin); s++) - if(*s == '\n') - break; - *s = '\0'; -} 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); -} diff --git a/usr/src/ucbcmd/plot/plot.sh b/usr/src/ucbcmd/plot/plot.sh deleted file mode 100644 index 4600eaa838..0000000000 --- a/usr/src/ucbcmd/plot/plot.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/sh - -# Copyright 1988 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. - -# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T -# All Rights Reserved - -# University Copyright- Copyright (c) 1982, 1986, 1988 -# The Regents of the University of California -# All Rights Reserved -# -# University Acknowledgment- Portions of this document are derived from -# software developed by the University of California, Berkeley, and its -# contributors. - -#ident "%Z%%M% %I% %E% SMI" - - -PATH=/bin:/usr/bin:/usr/ucb -case $1 in --T*) t=$1 - shift ;; -*) t=-T$TERM -esac -case $t in --T450) exec t450 $*;; --T300) exec t300 $*;; --T300S|-T300s) exec t300s $*;; --Tver) exec lpr -Pversatec -g $*;; --Tvar) exec lpr -Pvarian -g $*;; --Ttek|-T4014|-T) exec tek $* ;; --T4013) exec t4013 $* ;; --Tbitgraph|-Tbg) exec bgplot $*;; --Tgigi|-Tvt125) exec gigiplot $*;; --Taed) exec aedplot $*;; --Thp7221|-Thp7|-Th7) exec hp7221plot $*;; --Thp|-T2648|-T2648a|-Thp2648|-Thp2648a|h8) - exec hpplot $*;; --Tip|-Timagen) exec implot $*;; --Tdumb|un|unknown) exec dumbplot $*;; -*) exec crtplot $*;; -esac diff --git a/usr/src/ucbcmd/plot/plottoa.c b/usr/src/ucbcmd/plot/plottoa.c deleted file mode 100644 index d66db8ca12..0000000000 --- a/usr/src/ucbcmd/plot/plottoa.c +++ /dev/null @@ -1,255 +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" - -/* - * Convert the standard plot input into a readable form for debugging. - */ - -#include <stdio.h> - -float deltx; -float delty; - -static void arc(int, int, int, int, int, int); -static void circle(int, int, int); -static void closepl(void); -static void cont(int, int); -static void dot(int, int, int, int, char *); -static void erase(void); -static void fplt(FILE *); -static int getsi(FILE *); -static void getstr(char *, FILE *); -static void label(char *); -static void line(int, int, int, int); -static void linemod(char *); -static void move(int, int); -static void openpl(void); -static void point(int, int); -static void space(int, int, int, int); - -int -main(int argc, char **argv) -{ - int std=1; - FILE *fin; - - while(argc-- > 1) { - if(*argv[1] == '-') - switch(argv[1][1]) { - case 'l': - deltx = atoi(&argv[1][2]) - 1; - break; - case 'w': - delty = atoi(&argv[1][2]) - 1; - break; - } - else { - std = 0; - if ((fin = fopen(argv[1], "r")) == NULL) { - fprintf(stderr, "can't open %s\n", argv[1]); - exit(1); - } - fplt(fin); - fclose(fin); - } - argv++; - } - if (std) - fplt( stdin ); - return (0); -} - - -static void -fplt(FILE *fin) -{ - int c; - char s[256]; - int xi,yi,x0,y0,x1,y1,r,dx,n,i; - int pat[256]; - - openpl(); - while((c = getc(fin)) != EOF){ - switch(c){ - case 'm': - xi = getsi(fin); - yi = getsi(fin); - move(xi,yi); - break; - case 'l': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - line(x0,y0,x1,y1); - break; - case 't': - getstr(s,fin); - label(s); - break; - case 'e': - erase(); - break; - case 'p': - xi = getsi(fin); - yi = getsi(fin); - point(xi,yi); - break; - case 'n': - xi = getsi(fin); - yi = getsi(fin); - cont(xi,yi); - break; - case 's': - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - space(x0,y0,x1,y1); - break; - case 'a': - xi = getsi(fin); - yi = getsi(fin); - x0 = getsi(fin); - y0 = getsi(fin); - x1 = getsi(fin); - y1 = getsi(fin); - arc(xi,yi,x0,y0,x1,y1); - break; - case 'c': - xi = getsi(fin); - yi = getsi(fin); - r = getsi(fin); - circle(xi,yi,r); - break; - case 'f': - getstr(s,fin); - linemod(s); - break; - case 'd': - xi = getsi(fin); - yi = getsi(fin); - dx = getsi(fin); - n = getsi(fin); - for(i=0; i<n; i++)pat[i] = getsi(fin); - dot(xi, yi, dx, n, (char *)pat); - break; - } - } - closepl(); -} - -/* get an integer stored in 2 ascii bytes. */ -static int -getsi(FILE *fin) -{ - short a, b; - if((b = getc(fin)) == EOF) - return(EOF); - if((a = getc(fin)) == EOF) - return(EOF); - a = a<<8; - return(a|b); -} - -static void -getstr(char *s, FILE *fin) -{ - for( ; *s = getc(fin); s++) - if(*s == '\n') - break; - *s = '\0'; -} - -/* Print out the arguments to plot routines. */ - -static void -space(int x0, int y0, int x1, int y1) -{ - printf( "s %d %d %d %d\n", x0, y0, x1, y1 ); -} - -static void -openpl(void) -{ -} - -static void -closepl(void) -{ -} - -static void -erase(void) -{ - printf( "e\n" ); -} - -static void -move(int xi, int yi) -{ - printf( "m %d %d\n", xi, yi ); -} - -static void -cont(int xi, int yi) -{ - printf( "n %d %d\n", xi, yi ); -} - -static void -line(int x0, int y0, int x1, int y1) -{ - printf( "l %d %d %d %d\n", x0, y0, x1, y1 ); -} - -static void -point(int xi, int yi) -{ - printf( "p %d %d\n", xi, yi ); -} - -static void -label(char *s) -{ - printf( "t%s\n\n", s ); -} - - -static void -arc(int xcent, int ycent, int xbeg, int ybeg, int xend, int yend) -{ - printf( "a %d %d %d %d %d %d\n", xcent, ycent, xbeg, ybeg, xend, yend ); -} - -static void -circle(int xc, int yc, int r) -{ - printf( "c %d %d %d\n", xc, yc, r ); -} - -static void -linemod(char *line) -{ - printf( "f%s\n\n", line ); -} - -/* don't know what this should do */ -static void -dot(int xi, int yi, int dx, int n, char *pat) -{ - printf("d %d %d %d %d %s\n\n", xi, yi, dx, n, pat); -} diff --git a/usr/src/ucbcmd/plot/vfont.h b/usr/src/ucbcmd/plot/vfont.h deleted file mode 100644 index e259380f98..0000000000 --- a/usr/src/ucbcmd/plot/vfont.h +++ /dev/null @@ -1,48 +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) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -/* - * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. - * All Rights Reserved. - */ - - -/* - * The structures header and dispatch define the format of a font file. - * - * A font file contains one struct 'header', an array of NUM_DISPATCH struct - * 'dispatch'es, then an array of bytes containing bit maps. - * - * See vfont(5) for more details. - */ - -#ifndef _vfont_h -#define _vfont_h - -struct header { - short magic; /* Magic number VFONT_MAGIC */ - unsigned short size; /* Total # bytes of bitmaps */ - short maxx; /* Maximum horizontal glyph size */ - short maxy; /* Maximum vertical glyph size */ - short xtend; /* (unused?) */ -}; -#define VFONT_MAGIC 0436 - -struct dispatch { - unsigned short addr; /* &(glyph) - &(start of bitmaps) */ - short nbytes; /* # bytes of glyphs (0 if no glyph) */ - char up, down, left, right; /* Widths from baseline point */ - short width; /* Logical width, used by troff */ -}; -#define NUM_DISPATCH 256 - -#endif /*!_vfont_h*/ diff --git a/usr/src/ucbcmd/plot/vplot.c b/usr/src/ucbcmd/plot/vplot.c deleted file mode 100644 index d7902f1b32..0000000000 --- a/usr/src/ucbcmd/plot/vplot.c +++ /dev/null @@ -1,521 +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" - -/* - * Reads standard graphics input and produces a plot on the - * Varian or Versatec - */ -#include <stdio.h> -#include <sys/types.h> -#include <signal.h> -#include "vfont.h" - -#define LPR "/usr/ucb/lpr" - -#define mapx(x) ((DevRange*((x)-botx)/del)+centx) -#define mapy(y) ((DevRange*(del-(y)+boty)/del)-centy) -#define SOLID -1 -#define DOTTED 014 -#define SHORTDASHED 034 -#define DOTDASHED 054 -#define LONGDASHED 074 - -int linmod = SOLID; -int done1; -extern char chrtab[][16]; -char *obuf; -int bufsize; -int lastx; -int lasty; -int radius, startx, starty, endx, endy; -double topx; -double topy; -double botx; -double boty; -int centx = 0; -int centy = 0; -double delx; -double dely; -double del; - -int warned = 0; /* Indicates whether the warning message about - * unimplemented routines has been printed */ - -FILE *infile; -FILE *pfp; /* output file */ -char picture[] = "/usr/tmp/rastAXXXXXX"; -int run = 13; /* index of 'a' in picture[] */ -int DevRange = 1536; /* output array size (square) in pixels */ -int DevRange8 = 1536/8; /* output array size in bytes */ -int BytesPerLine = 264; /* Bytes per raster line (physical) */ -int lparg = 7; /* index into lpargs */ - -#ifdef sun -char *lpargs[50] = { "lpr", "-Pversatec", "-v", "-s", "-r", "-J", "vplot" }; -#else -char *lpargs[50] = { "lpr", "-Pvarian", "-v", "-s", "-r", "-J", "vplot" }; -#endif - -/* variables for used to print from font file */ -void cleanup(); -int fontSet = 0; /* Has the font file been read */ -struct header header; -struct dispatch dispatch[256]; -char *bits; -char *fontFile = "/usr/lib/vfont/R.6"; - -static void circle(int, int, int); -static int getinteger(FILE *); -static int getpict(void); -static void InitFont(void); -static void line(int, int, int, int); -static void plotch(char); -static void point(int, int); - -int -main(int argc, char **argv) -{ - char *cp1, *arg; - int i; - int again; - - infile = stdin; - while (argc > 1 && argv[1][0] == '-') { - argc--; - arg = *++argv; - switch (*++arg) { - case 'W': - DevRange = 2048; - DevRange8 = 2048/8; - BytesPerLine = 880; -#ifdef sun - lpargs[1] = "-PWversatec"; -#else - lpargs[1] = "-Pversatec"; -#endif - break; - case 'V': - DevRange = 1536; - DevRange8 = 1536/8; - BytesPerLine = 264; -#ifdef sun - lpargs[1] = "-Pversatec"; -#else - lpargs[1] = "-Pvarian"; -#endif - break; - case 'b': - if (argc-- > 1) - lpargs[lparg-1] = *++argv; - break; - default: - fprintf(stderr, "vplot: %s option unknown\n", *argv); - break; - } - } - if (argc > 1) { - if ((infile = fopen(*++argv, "r")) == NULL) { - perror(*argv); - cleanup(); - } - } - - /* init constants for scaling */ - topx = topy = DevRange; - botx = boty = 0; - delx = dely = del = DevRange; - centx = (DevRange - mapx(topx))/2; - centy = mapy(topy)/2; - signal(SIGTERM, cleanup); - if (signal(SIGINT, SIG_IGN) != SIG_IGN) - signal(SIGINT, cleanup); - mktemp(picture); - if ((obuf = (char *) malloc(bufsize = DevRange * DevRange8)) == NULL) { - fprintf(stderr, "vplot: ran out of memory\n"); - cleanup(); - } - do { - if ((pfp = fopen(picture, "w")) == NULL) { - fprintf(stderr, "vplot: can't create %s\n", picture); - cleanup(); - } - i = strlen(picture) + 1; - if ((arg = (char *) malloc(i)) == NULL) { - fprintf(stderr, "ran out of memory\n"); - cleanup(); - } - strcpy(arg, picture); - lpargs[lparg++] = arg; - picture[run]++; - arg = &obuf[bufsize]; - for (cp1 = obuf; cp1 < arg; ) - *cp1++ = 0; - - again = getpict(); - - for (cp1 = obuf; cp1 < arg; cp1 += DevRange8) { - fwrite(cp1, sizeof(char), DevRange8, pfp); - fseek(pfp, (long) BytesPerLine - DevRange8, 1); - } - fclose(pfp); - } while (again); - lpargs[lparg] = 0; - execv(LPR, lpargs); - fprintf(stderr, "can't exec %s\n", LPR); - cleanup(); - - /* NOTREACHED */ - return (0); -} - -static int -getpict(void) -{ - int x1, y1; - - for (;;) switch (x1 = getc(infile)) { - - case '\n': - continue; - - case 's': - botx = getinteger(infile); - boty = getinteger(infile); - topx = getinteger(infile); - topy = getinteger(infile); - delx = topx-botx; - dely = topy-boty; - if (dely/delx > 1536./2048.) - del = dely; - else - del = delx; - centx = 0; - centx = (DevRange - mapx(topx))/2; - centy = 0; - centy = mapy(topy) / 2; - continue; - - case 'b': - x1 = getc(infile); - continue; - - case 'l': - done1 |= 01; - x1 = mapx(getinteger(infile)); - y1 = mapy(getinteger(infile)); - lastx = mapx(getinteger(infile)); - lasty = mapy(getinteger(infile)); - line(x1, y1, lastx, lasty); - continue; - - case 'c': - x1 = mapx(getinteger(infile)); - y1 = mapy(getinteger(infile)); - radius = mapx(getinteger(infile)); - if (!warned) { - fprintf(stderr,"Circles are Implemented\n"); - warned++; - } - circle(x1, y1, radius); - continue; - - case 'a': - x1 = mapx(getinteger(infile)); - y1 = mapy(getinteger(infile)); - startx = mapx(getinteger(infile)); - starty = mapy(getinteger(infile)); - endx = mapx(getinteger(infile)); - endy = mapy(getinteger(infile)); - if (!warned) { - fprintf(stderr,"Circles and Arcs are unimplemented\n"); - warned++; - } - continue; - - case 'm': - lastx = mapx(getinteger(infile)); - lasty = mapy(getinteger(infile)); - continue; - - case 't': - lastx = lastx - 6; - lasty = lasty + 6; - done1 |= 01; - while ((x1 = getc(infile)) != '\n') - plotch(x1); - continue; - - case 'e': - if (done1) - return(1); - continue; - - case 'p': - done1 |= 01; - lastx = mapx(getinteger(infile)); - lasty = mapy(getinteger(infile)); - point(lastx, lasty); - point(lastx+1, lasty); - point(lastx, lasty+1); - point(lastx+1, lasty+1); - continue; - - case 'n': - done1 |= 01; - x1 = mapx(getinteger(infile)); - y1 = mapy(getinteger(infile)); - line(lastx, lasty, x1, y1); - lastx = x1; - lasty = y1; - continue; - - case 'f': - getinteger(infile); - getc(infile); - switch (getc(infile)) { - case 't': - linmod = DOTTED; - break; - default: - case 'i': - linmod = SOLID; - break; - case 'g': - linmod = LONGDASHED; - break; - case 'r': - linmod = SHORTDASHED; - break; - case 'd': - linmod = DOTDASHED; - break; - } - while ((x1 = getc(infile)) != '\n') - if (x1 == EOF) - return(0); - continue; - - case 'd': - getinteger(infile); - getinteger(infile); - getinteger(infile); - x1 = getinteger(infile); - while (--x1 >= 0) - getinteger(infile); - continue; - - case 0: /* ignore null characters */ - continue; - - case 255: - case EOF: - return(0); - - default: - fprintf(stderr, "Input format error %c(%o)\n",x1,x1); - cleanup(); - } -} - -static void -plotch(char ch) -{ - int i,j,k; - char *ptr,c; - int nbytes; - - if (!fontSet) - InitFont(); /* Read font if not already read */ - - ptr = bits + dispatch[ch].addr; - - for (i = dispatch[ch].up; i > -dispatch[ch].down; --i) { - nbytes = (dispatch[ch].right + dispatch[ch].left + 7)/8; - for (j = 0; j < nbytes; j++) { - c = *ptr++; - for (k = 7; k >= 0; k--) - if ((c >> k) & 1) - point(lastx+7-k+j*8-dispatch[ch].left, lasty-i); - } - } - if (ch != ' ') - lastx += dispatch[ch].width; - else - lastx += dispatch['a'].width; -} - -static void -InitFont(void) -{ - char *s; - int fonts; - int i; - - fontSet = 1; - /* Get the font file */ - s = fontFile; - if ((fonts = open(s, 0)) == -1) { - perror(s); - fprintf(stderr, "Can't get font file"); - cleanup(); - } - /* Get the header and check magic number */ - if (read(fonts, &header, sizeof(header)) != sizeof(header)) { - perror(s); - fprintf(stderr, "Bad read in font file"); - cleanup(); - } - if (header.magic != 0436) { - fprintf(stderr,"Bad magic numer in font file"); - cleanup(); - } - /* Get dispatches */ - if (read(fonts, dispatch, sizeof(dispatch)) != sizeof(dispatch)) { - perror(s); - fprintf(stderr, "Bad read in font file"); - cleanup(); - } - /* Allocate space for bit map and read in bits */ - bits = (char *) malloc(header.size); - if (read(fonts, bits, header.size) != header.size) { - perror(s); - fprintf(stderr,"Can't read bit map in font file"); - cleanup(); - } - /* Close font file */ - if (close(fonts) != 0) { - perror(s); - fprintf(stderr,"Can't close font file"); - cleanup(); - } -} - -static void -line(int x0, int y0, int x1, int y1) -{ - int dx, dy; - int xinc, yinc; - int res1; - int res2; - int slope; - - xinc = 1; - yinc = 1; - if ((dx = x1-x0) < 0) { - xinc = -1; - dx = -dx; - } - if ((dy = y1-y0) < 0) { - yinc = -1; - dy = -dy; - } - slope = xinc*yinc; - res1 = 0; - res2 = 0; - if (dx >= dy) while (x0 != x1) { - if ((x0+slope*y0) & linmod) - point(x0, y0); - if (res1 > res2) { - res2 += dx - res1; - res1 = 0; - y0 += yinc; - } - res1 += dy; - x0 += xinc; - } else while (y0 != y1) { - if ((x0+slope*y0) & linmod) - point(x0, y0); - if (res1 > res2) { - res2 += dy - res1; - res1 = 0; - x0 += xinc; - } - res1 += dx; - y0 += yinc; - } - if ((x1+slope*y1) & linmod) - point(x1, y1); -} - -#define labs(a) (a >= 0 ? a : -a) - -static void -circle(int x, int y, int c) -{ - int dx, dy; - long ep; - int de; - - dx = 0; - ep = 0; - for (dy=c; dy>=dx; dy--) { - for (;;) { - point(x+dx, y+dy); - point(x-dx, y+dy); - point(x+dx, y-dy); - point(x-dx, y-dy); - point(x+dy, y+dx); - point(x-dy, y+dx); - point(x+dy, y-dx); - point(x-dy, y-dx); - ep += 2*dx + 1; - de = -2*dy + 1; - dx++; - if (labs(ep) >= labs(ep+de)) { - ep += de; - break; - } - } - } -} - -/* - * Points should be in the range 0 <= x (or y) <= DevRange. - * The origin is the top left-hand corner with increasing x towards the - * right and increasing y going down. - */ -static void -point(int x, int y) -{ - unsigned byte; - - byte = y * DevRange8 + (x >> 3); - if (byte < bufsize) - obuf[byte] |= 1 << (7 - (x & 07)); -} - -void -cleanup() -{ - while (picture[run] != 'a') { - unlink(picture); - picture[run]--; - } - exit(1); -} - -static int -getinteger(FILE *f) -{ - int low, high, result; - - low = getc(f); - high = getc(f); - result = ((high << 8) | low); - if (high > 127) - result |= ~0xffff; - return(result); -} |