date and time created 83/11/10 14:44:31 by ralph
[unix-history] / usr / src / lib / libplot / dumb / dumb.h
CommitLineData
8caab3ba
RC
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
14extern int minX, rangeX; /* min and range of x */
15extern int minY, rangeY; /* min and range of y */
16extern int currentx, currenty;
17extern int COLS, LINES;
18
19/* A very large screen! (probably should use malloc) */
20#define MAXCOLS 132
21#define MAXLINES 90
22
23extern char screenmat[MAXCOLS][MAXLINES];