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