xref: /original-bsd/lib/libplot/dumb/dumb.h (revision 9eb33320)
1 /*	dumb.h	4.1	83/11/10	*/
2 /*
3  * This accepts plot file formats and produces the appropriate plots
4  * for dumb terminals.  It can also be used for printing terminals and
5  * lineprinter listings, although there is no way to specify number of
6  * lines and columns different from your terminal.  This would be easy
7  * to change, and is left as an exercise for the reader.
8  */
9 
10 #include <math.h>
11 
12 #define scale(x,y) y = LINES-1-(LINES*y/rangeY +minY); x = COLS*x/rangeX + minX
13 
14 extern int minX, rangeX;	/* min and range of x */
15 extern int minY, rangeY;	/* min and range of y */
16 extern int currentx, currenty;
17 extern int COLS, LINES;
18 
19 /* A very large screen! (probably should use malloc) */
20 #define MAXCOLS		132
21 #define MAXLINES	90
22 
23 extern char screenmat[MAXCOLS][MAXLINES];
24