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