xref: /csrg-svn/lib/libplot/dumb/dumb.h (revision 65570)
148505Sbostic /*-
261350Sbostic  * Copyright (c) 1980, 1993
361350Sbostic  *	The Regents of the University of California.  All rights reserved.
419970Sdist  *
548505Sbostic  * %sccs.include.proprietary.c%
619970Sdist  *
7*65570Sbostic  *	@(#)dumb.h	8.2 (Berkeley) 01/07/94
848505Sbostic  */
948505Sbostic 
1048505Sbostic /*
1115433Sralph  * This accepts plot file formats and produces the appropriate plots
1215433Sralph  * for dumb terminals.  It can also be used for printing terminals and
1315433Sralph  * lineprinter listings, although there is no way to specify number of
1415433Sralph  * lines and columns different from your terminal.  This would be easy
1515433Sralph  * to change, and is left as an exercise for the reader.
1615433Sralph  */
1715433Sralph 
18*65570Sbostic #include <stdlib.h>
1915433Sralph #include <math.h>
2015433Sralph 
2115433Sralph #define scale(x,y) y = LINES-1-(LINES*y/rangeY +minY); x = COLS*x/rangeX + minX
2215433Sralph 
2315433Sralph extern int minX, rangeX;	/* min and range of x */
2415433Sralph extern int minY, rangeY;	/* min and range of y */
2515433Sralph extern int currentx, currenty;
2615433Sralph extern int COLS, LINES;
2715433Sralph 
2815433Sralph /* A very large screen! (probably should use malloc) */
2915433Sralph #define MAXCOLS		132
3015433Sralph #define MAXLINES	90
3115433Sralph 
3215433Sralph extern char screenmat[MAXCOLS][MAXLINES];
33