1 /*- 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 * 7 * @(#)dumb.h 8.2 (Berkeley) 01/07/94 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 <stdlib.h> 19 #include <math.h> 20 21 #define scale(x,y) y = LINES-1-(LINES*y/rangeY +minY); x = COLS*x/rangeX + minX 22 23 extern int minX, rangeX; /* min and range of x */ 24 extern int minY, rangeY; /* min and range of y */ 25 extern int currentx, currenty; 26 extern int COLS, LINES; 27 28 /* A very large screen! (probably should use malloc) */ 29 #define MAXCOLS 132 30 #define MAXLINES 90 31 32 extern char screenmat[MAXCOLS][MAXLINES]; 33