1*48505Sbostic /*- 2*48505Sbostic * Copyright (c) 1980 The Regents of the University of California. 3*48505Sbostic * All rights reserved. 419970Sdist * 5*48505Sbostic * %sccs.include.proprietary.c% 619970Sdist * 7*48505Sbostic * @(#)dumb.h 5.2 (Berkeley) 04/22/91 8*48505Sbostic */ 9*48505Sbostic 10*48505Sbostic /* 1115433Sralph * This accepts plot file formats and produces the appropriate plots 1215433Sralph * for dumb terminals. It can also be used for printing terminals and 1315433Sralph * lineprinter listings, although there is no way to specify number of 1415433Sralph * lines and columns different from your terminal. This would be easy 1515433Sralph * to change, and is left as an exercise for the reader. 1615433Sralph */ 1715433Sralph 1815433Sralph #include <math.h> 1915433Sralph 2015433Sralph #define scale(x,y) y = LINES-1-(LINES*y/rangeY +minY); x = COLS*x/rangeX + minX 2115433Sralph 2215433Sralph extern int minX, rangeX; /* min and range of x */ 2315433Sralph extern int minY, rangeY; /* min and range of y */ 2415433Sralph extern int currentx, currenty; 2515433Sralph extern int COLS, LINES; 2615433Sralph 2715433Sralph /* A very large screen! (probably should use malloc) */ 2815433Sralph #define MAXCOLS 132 2915433Sralph #define MAXLINES 90 3015433Sralph 3115433Sralph extern char screenmat[MAXCOLS][MAXLINES]; 32