xref: /original-bsd/lib/libplot/vt0/line.c (revision 7bf6eeb5)
105b0c443Sbostic /*-
2*7bf6eeb5Sbostic  * Copyright (c) 1983, 1993
3*7bf6eeb5Sbostic  *	The Regents of the University of California.  All rights reserved.
405b0c443Sbostic  *
505b0c443Sbostic  * %sccs.include.proprietary.c%
605b0c443Sbostic  */
705b0c443Sbostic 
8fc0e05c6Ssam #ifndef lint
9*7bf6eeb5Sbostic static char sccsid[] = "@(#)line.c	8.1 (Berkeley) 06/04/93";
1005b0c443Sbostic #endif /* not lint */
11fc0e05c6Ssam 
12fc0e05c6Ssam extern vti;
13fc0e05c6Ssam extern xnow,ynow;
line(x0,y0,x1,y1)14fc0e05c6Ssam line(x0,y0,x1,y1){
15fc0e05c6Ssam 	struct{char x,c; int x0,y0,x1,y1;} p;
16fc0e05c6Ssam 	p.c = 3;
17fc0e05c6Ssam 	p.x0 = xsc(x0);
18fc0e05c6Ssam 	p.y0 = ysc(y0);
19fc0e05c6Ssam 	p.x1 = xnow = xsc(x1);
20fc0e05c6Ssam 	p.y1 = ynow = ysc(y1);
21fc0e05c6Ssam 	write(vti,&p.c,9);
22fc0e05c6Ssam }
cont(x0,y0)23fc0e05c6Ssam cont(x0,y0){
24fc0e05c6Ssam 	line(xnow,ynow,xsc(x0),ysc(y0));
25fc0e05c6Ssam 	return;
26fc0e05c6Ssam }
27