xref: /original-bsd/lib/libplot/aed/line.c (revision 430a2be8)
16e3de87bSbostic /*-
2*430a2be8Sbostic  * Copyright (c) 1983, 1993
3*430a2be8Sbostic  *	The Regents of the University of California.  All rights reserved.
46e3de87bSbostic  *
56e3de87bSbostic  * %sccs.include.proprietary.c%
66e3de87bSbostic  */
76e3de87bSbostic 
89d29bee9Sralph #ifndef lint
9*430a2be8Sbostic static char sccsid[] = "@(#)line.c	8.1 (Berkeley) 06/04/93";
106e3de87bSbostic #endif /* not lint */
119d29bee9Sralph 
129d29bee9Sralph #include "aed.h"
139d29bee9Sralph 
149d29bee9Sralph /*---------------------------------------------------------
159d29bee9Sralph  *	Line draws a line between two points.
169d29bee9Sralph  *
179d29bee9Sralph  *	Results:	None.
189d29bee9Sralph  *
199d29bee9Sralph  *	Side Effects:
209d29bee9Sralph  *	A line is drawn on the screen between (x1, y1) and (x2, y2).
219d29bee9Sralph  *---------------------------------------------------------
229d29bee9Sralph  */
line(x1,y1,x2,y2)239d29bee9Sralph line(x1, y1, x2, y2)
249d29bee9Sralph int x1, y1, x2, y2;
259d29bee9Sralph {
269d29bee9Sralph     setcolor("01");
279d29bee9Sralph     putc('Q', stdout);
289d29bee9Sralph     outxy20(x1, y1);
299d29bee9Sralph     putc('A', stdout);
309d29bee9Sralph     outxy20(x2, y2);
319d29bee9Sralph     (void) fflush(stdout);
329d29bee9Sralph     curx = x2;
339d29bee9Sralph     cury = y2;
349d29bee9Sralph }
35