check arguments to sqrt() (from jerry@opal)
[unix-history] / usr / src / lib / libplot / hp2648 / linemod.c
CommitLineData
dca25f5a
DF
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
1180d472 7#ifndef lint
dca25f5a
DF
8static char sccsid[] = "@(#)linemod.c 5.1 (Berkeley) %G%";
9#endif not lint
1180d472
RC
10
11#include "hp2648.h"
12
13linemod( line )
14char *line;
15{
16 putchar('Z');
17 handshake();
18 putchar(ESC);
19 putchar(GRAPHIC);
20 putchar(MODE);
21 if ( *(line) == 's' ) {
22 if ( *(++line) == 'o' ) {
23 /*
24 * solid mode 1
25 */
26 putchar( '1' );
27 putchar( 'b' );
28 goto done;
29 }
30 else if ( *(line) == 'h' ) {
31 /*
32 * shortdashed mode 4
33 */
34 putchar( '6' );
35 putchar( 'b' );
36 goto done;
37 }
38 }
39 else if ( *(line) == 'd' ) {
40 if ( *(++line) == 'o' && *(++line) == 't' ) {
41 if ( *(++line) == 't' ) {
42 /*
43 * dotted mode 2
44 */
45 putchar( '7' );
46 putchar( 'b' );
47 goto done;
48 }
49 else if ( *(line) == 'd' ) {
50 /*
51 * dotdashed mode 3
52 */
53 putchar( '8' );
54 putchar( 'b' );
55 goto done;
56 }
57 }
58 }
59 else if ( *(line) == 'l' ) {
60 /*
61 * longdashed mode 5
62 */
63 putchar( '5' );
64 putchar( 'b' );
65 goto done;
66 }
67 putchar( '1' ); /* default to solid */
68 putchar( 'b' ); /* default to solid */
69done:
70 putchar( 'Z' );
71 handshake();
72 putchar(ESC);
73 putchar(GRAPHIC);
74 putchar(PLOT);
75 putchar(BINARY);
76 buffcount = 4;
77 return;
78}