Add copyright
[unix-history] / usr / src / lib / libplot / dumb / dumb.h
CommitLineData
8caab3ba 1/*
dca25f5a
DF
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) %G%
7 *
8 *
8caab3ba
RC
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
20extern int minX, rangeX; /* min and range of x */
21extern int minY, rangeY; /* min and range of y */
22extern int currentx, currenty;
23extern int COLS, LINES;
24
25/* A very large screen! (probably should use malloc) */
26#define MAXCOLS 132
27#define MAXLINES 90
28
29extern char screenmat[MAXCOLS][MAXLINES];