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

##### Functions

    buffready         X
    handshake         X
    itoa              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[] = "@(#)subr.c	5.1 (Berkeley) 5/7/85";
       9: #endif not lint
      10:
      11: #include <sgtty.h>
      12: #include "hp2648.h"
      13:
      14: handshake()
      15: {
      16:     int i;
      17:     char ch;
      18:
      19:     if( shakehands != TRUE )
      20:         return;
      21:     ch = ' ';
      22:     putchar(ENQ);
      23:     fflush(stdout);
      24:     while(1){
      25:         i = read(fildes, &ch, 1);
      26:         if(i < 0)
      27:             continue;
      28:         if(ch == ACK)
      29:             break;
      30:         putchar('Z');
      31:         fflush(stdout);
      32:         stty(fildes, &sarg);
      33:         exit(0);
      34:     }
      35: }
      36:
      37: buffready(n)
      38: int n;
      39: {
      40:     buffcount = buffcount + n;
      41:     if(buffcount >= 80){
      42:         handshake();
      43:         putchar(ESC);
      44:         putchar(GRAPHIC);
      45:         putchar(PLOT);
      46:         putchar(BINARY);
      47:         buffcount = n+4;
      48:     }
      49: }
      50:
      51: itoa(num,byte1,byte2)
      52: int num;
      53: char *byte1,*byte2;
      54: {
      55:     *byte1 = (num & 037) | 040;
      56:     *byte2 = ((num>>5) & 037) | 040;
      57: }

#### Defined functions

buffready defined in line 37; used 5 times

- in /usr/src/usr.lib/libplot/hp2648/cont.c line 19
- in /usr/src/usr.lib/libplot/hp2648/erase.c line 15
- in /usr/src/usr.lib/libplot/hp2648/move.c line 19
- in /usr/src/usr.lib/libplot/hp2648/open.c line 41
- in /usr/src/usr.lib/libplot/hp2648/point.c line 18

handshake defined in line 14; used 5 times

- in line 42
- in /usr/src/usr.lib/libplot/hp2648/label.c line 16, 26
- in /usr/src/usr.lib/libplot/hp2648/linemod.c line 17, 71

itoa defined in line 51; used 4 times

- in /usr/src/usr.lib/libplot/hp2648/cont.c line 17-18(2)
- in /usr/src/usr.lib/libplot/hp2648/move.c line 17-18(2)

#### Defined variables

sccsid defined in line 8; never used

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