148505Sbostic /*- 2*61350Sbostic * Copyright (c) 1980, 1993 3*61350Sbostic * The Regents of the University of California. All rights reserved. 419970Sdist * 548505Sbostic * %sccs.include.proprietary.c% 619970Sdist * 7*61350Sbostic * @(#)dumb.h 8.1 (Berkeley) 06/04/93 848505Sbostic */ 948505Sbostic 1048505Sbostic /* 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