1 /*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
7 #ifndef lint
8 static char sccsid[] = "@(#)line.c 5.1 (Berkeley) 04/30/85";
9 #endif not lint
10
11 /*
12 * line: draw a line from point 1 to point 2.
13 */
14
15 #include "2648.h"
16
line(x1,y1,x2,y2)17 line(x1, y1, x2, y2)
18 int x1, y1, x2, y2;
19 {
20 #ifdef TRACE
21 if (trace)
22 fprintf(trace, "line((%d, %d), (%d, %d)),", x1, y1, x2, y2);
23 #endif
24 if (x1==_penx && y1==_peny) {
25 /*
26 * Get around a bug in the HP terminal where one point
27 * lines don't get drawn more than once.
28 */
29 move(x1, y1+1);
30 sync();
31 }
32 move(x1, y1);
33 draw(x2, y2);
34 }
35