1 #ifndef lint 2 static char sccsid[] = "@(#)subr.c 1.2 (Berkeley) 03/27/85"; 3 #endif 4 5 #include <stdio.h> 6 float obotx = 0.; 7 float oboty = 0.; 8 float botx = 0.; 9 float boty = 0.; 10 float scalex = 1.; 11 float scaley = 1.; 12 int scaleflag; 13 14 int oloy = -1; 15 int ohiy = -1; 16 int ohix = -1; 17 cont(x,y){ 18 int hix,hiy,lox,loy; 19 int n; 20 x = (x-obotx)*scalex + botx; 21 y = (y-oboty)*scaley + boty; 22 hix=(x>>5) & 037; 23 hiy=(y>>5) & 037; 24 lox = x & 037; 25 loy = y & 037; 26 n = (abs(hix-ohix) + abs(hiy-ohiy) + 6) / 12; 27 if(hiy != ohiy){ 28 putch(hiy|040); 29 ohiy=hiy; 30 } 31 if(hix != ohix){ 32 putch(loy|0140); 33 putch(hix|040); 34 ohix=hix; 35 oloy=loy; 36 } 37 else if(loy != oloy){ 38 putch(loy|0140); 39 oloy=loy; 40 } 41 putch(lox|0100); 42 while(n--) 43 putch(0); 44 } 45 46 putch(c){ 47 putc(c,stdout); 48 } 49