1*22626Sdist /* 2*22626Sdist * Copyright (c) 1980 Regents of the University of California. 3*22626Sdist * All rights reserved. The Berkeley software License Agreement 4*22626Sdist * specifies the terms and conditions for redistribution. 5*22626Sdist */ 6*22626Sdist 717623Sjak #ifndef lint 8*22626Sdist static char sccsid[] = "@(#)subr.c 5.1 (Berkeley) 06/07/85"; 9*22626Sdist #endif not lint 1017623Sjak 1117623Sjak #include <stdio.h> 1217623Sjak float obotx = 0.; 1317623Sjak float oboty = 0.; 1417623Sjak float botx = 0.; 1517623Sjak float boty = 0.; 1617623Sjak float scalex = 1.; 1717623Sjak float scaley = 1.; 1817623Sjak int scaleflag; 1917623Sjak 2017623Sjak int oloy = -1; 2117623Sjak int ohiy = -1; 2217623Sjak int ohix = -1; 2317623Sjak cont(x,y){ 2417623Sjak int hix,hiy,lox,loy; 2517623Sjak int n; 2617623Sjak x = (x-obotx)*scalex + botx; 2717623Sjak y = (y-oboty)*scaley + boty; 2817623Sjak hix=(x>>5) & 037; 2917623Sjak hiy=(y>>5) & 037; 3017623Sjak lox = x & 037; 3117623Sjak loy = y & 037; 3217623Sjak n = (abs(hix-ohix) + abs(hiy-ohiy) + 6) / 12; 3317623Sjak if(hiy != ohiy){ 3417623Sjak putch(hiy|040); 3517623Sjak ohiy=hiy; 3617623Sjak } 3717623Sjak if(hix != ohix){ 3817623Sjak putch(loy|0140); 3917623Sjak putch(hix|040); 4017623Sjak ohix=hix; 4117623Sjak oloy=loy; 4217623Sjak } 4317623Sjak else if(loy != oloy){ 4417623Sjak putch(loy|0140); 4517623Sjak oloy=loy; 4617623Sjak } 4717623Sjak putch(lox|0100); 4817623Sjak while(n--) 4917623Sjak putch(0); 5017623Sjak } 5117623Sjak 5217623Sjak putch(c){ 5317623Sjak putc(c,stdout); 5417623Sjak } 55