# 2.11BSD#431 - /usr/src/usr.lib/libplot/hp2648/open.c

##### Functions

    openpl            X

##### Variables

    buffcount         X
    currentx          X
    currenty          X
    fildes            X
    lowx              X
    lowy              X
    sarg              X
    scalex            X
    scaley            X
    shakehands        X

       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[] = "@(#)open.c	5.1 (Berkeley) 5/7/85";
       9: #endif not lint
      10:
      11: #include <sgtty.h>
      12: #include "hp2648.h"
      13:
      14: int shakehands;
      15: int currentx;
      16: int currenty;
      17: int buffcount;
      18: int fildes;
      19: float lowx;
      20: float lowy;
      21: float scalex;
      22: float scaley;
      23: struct sgttyb sarg;
      24:
      25: openpl()
      26: {
      27:     if ( isatty(fileno( stdout )) ) {
      28:         shakehands = TRUE;
      29:         fildes = open(TERMINAL, 0);
      30:         gtty(fildes, &sarg);
      31:         sarg.sg_flags = sarg.sg_flags | RAW;
      32:         stty(fildes, &sarg);
      33:         sarg.sg_flags = sarg.sg_flags & ~RAW;
      34:     }
      35:     else {
      36:         shakehands = FALSE;
      37:     }
      38:     buffcount = 0;
      39:     currentx = 0;
      40:     currenty = 0;
      41:     buffready(8);
      42:     putchar(ESC);
      43:     putchar(GRAPHIC);
      44:     putchar(DISPLAY);
      45:     putchar('c');
      46:     putchar(ESC);
      47:     putchar(GRAPHIC);
      48:     putchar(PLOT);
      49:     putchar(BINARY);
      50:     space(0,0,720,360);
      51: }

#### Defined functions

openpl defined in line 25; never used

#### Defined variables

buffcount defined in line 17; used 8 times

- in line 38
- in /usr/src/usr.lib/libplot/hp2648/label.c line 31
- in /usr/src/usr.lib/libplot/hp2648/linemod.c line 76
- in /usr/src/usr.lib/libplot/hp2648/open.c line 38
- in /usr/src/usr.lib/libplot/hp2648/subr.c line 40-41(3), 47

currentx defined in line 15; used 6 times

- in line 39
- in /usr/src/usr.lib/libplot/hp2648/line.c line 16-18(2)
- in /usr/src/usr.lib/libplot/hp2648/move.c line 25
- in /usr/src/usr.lib/libplot/hp2648/open.c line 39
- in /usr/src/usr.lib/libplot/hp2648/point.c line 16

currenty defined in line 16; used 6 times

- in line 40
- in /usr/src/usr.lib/libplot/hp2648/line.c line 16-18(2)
- in /usr/src/usr.lib/libplot/hp2648/move.c line 26
- in /usr/src/usr.lib/libplot/hp2648/open.c line 40
- in /usr/src/usr.lib/libplot/hp2648/point.c line 16

fildes defined in line 18; used 8 times

- in line 29-32(3)
- in /usr/src/usr.lib/libplot/hp2648/open.c line 29-32(3)
- in /usr/src/usr.lib/libplot/hp2648/subr.c line 25, 32

lowx defined in line 19; used 3 times

- in /usr/src/usr.lib/libplot/hp2648/hp2648.h line 37
- in /usr/src/usr.lib/libplot/hp2648/space.c line 16-18(2)

lowy defined in line 20; used 3 times

- in /usr/src/usr.lib/libplot/hp2648/hp2648.h line 38
- in /usr/src/usr.lib/libplot/hp2648/space.c line 17-19(2)

sarg defined in line 23; used 13 times

- in line 30-33(6)
- in /usr/src/usr.lib/libplot/hp2648/open.c line 30-33(6)
- in /usr/src/usr.lib/libplot/hp2648/subr.c line 32

scalex defined in line 21; used 2 times

- in /usr/src/usr.lib/libplot/hp2648/hp2648.h line 37
- in /usr/src/usr.lib/libplot/hp2648/space.c line 18

scaley defined in line 22; used 2 times

- in /usr/src/usr.lib/libplot/hp2648/hp2648.h line 38
- in /usr/src/usr.lib/libplot/hp2648/space.c line 19

sccsid defined in line 8; never used
shakehands defined in line 14; used 5 times

- in line 28, 36
- in /usr/src/usr.lib/libplot/hp2648/open.c line 28, 36
- in /usr/src/usr.lib/libplot/hp2648/subr.c line 19

Last modified: 1987-02-18 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1195 |