xref: /original-bsd/lib/libplot/dumb/dumb.h (revision 57124d5e)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  *
6  *	@(#)dumb.h	5.1 (Berkeley) 05/07/85
7  *
8  *
9  * This accepts plot file formats and produces the appropriate plots
10  * for dumb terminals.  It can also be used for printing terminals and
11  * lineprinter listings, although there is no way to specify number of
12  * lines and columns different from your terminal.  This would be easy
13  * to change, and is left as an exercise for the reader.
14  */
15 
16 #include <math.h>
17 
18 #define scale(x,y) y = LINES-1-(LINES*y/rangeY +minY); x = COLS*x/rangeX + minX
19 
20 extern int minX, rangeX;	/* min and range of x */
21 extern int minY, rangeY;	/* min and range of y */
22 extern int currentx, currenty;
23 extern int COLS, LINES;
24 
25 /* A very large screen! (probably should use malloc) */
26 #define MAXCOLS		132
27 #define MAXLINES	90
28 
29 extern char screenmat[MAXCOLS][MAXLINES];
30