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

##### Functions

    cont              X
    putch             X

##### Variables

    botx              X
    boty              X
    obotx             X
    oboty             X
    ohix              X
    ohiy              X
    oloy              X
    scaleflag         X
    scalex            X
    scaley            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) 6/7/85";
       9: #endif not lint
      10:
      11: #include <stdio.h>
      12: float obotx = 0.;
      13: float oboty = 0.;
      14: float botx = 0.;
      15: float boty = 0.;
      16: float scalex = 1.;
      17: float scaley = 1.;
      18: int scaleflag;
      19:
      20: int oloy = -1;
      21: int ohiy = -1;
      22: int ohix = -1;
      23: cont(x,y){
      24:     int hix,hiy,lox,loy;
      25:     int n;
      26:     x = (x-obotx)*scalex + botx;
      27:     y = (y-oboty)*scaley + boty;
      28:     hix=(x>>5) & 037;
      29:     hiy=(y>>5) & 037;
      30:     lox = x & 037;
      31:     loy = y & 037;
      32:     n = (abs(hix-ohix) + abs(hiy-ohiy) + 6) / 12;
      33:     if(hiy != ohiy){
      34:         putch(hiy|040);
      35:         ohiy=hiy;
      36:     }
      37:     if(hix != ohix){
      38:         putch(loy|0140);
      39:         putch(hix|040);
      40:         ohix=hix;
      41:         oloy=loy;
      42:     }
      43:     else if(loy != oloy){
      44:         putch(loy|0140);
      45:         oloy=loy;
      46:     }
      47:     putch(lox|0100);
      48:     while(n--)
      49:         putch(0);
      50: }
      51:
      52: putch(c){
      53:     putc(c,stdout);
      54: }

#### Defined functions

cont defined in line 23; used 9 times

- in /usr/src/usr.lib/libplot/t4013/arc.c line 62, 90
- in /usr/src/usr.lib/libplot/t4013/box.c line 14-17(4)
- in /usr/src/usr.lib/libplot/t4013/line.c line 13
- in /usr/src/usr.lib/libplot/t4013/move.c line 13
- in /usr/src/usr.lib/libplot/t4013/point.c line 13

putch defined in line 52; used 13 times

- in line 34-49(6)
- in /usr/src/usr.lib/libplot/t4013/close.c line 13-17(2)
- in /usr/src/usr.lib/libplot/t4013/erase.c line 16-17(2)
- in /usr/src/usr.lib/libplot/t4013/label.c line 15-17(2)
- in /usr/src/usr.lib/libplot/t4013/move.c line 12

#### Defined variables

botx defined in line 14; used 2 times

- in line 26
- in /usr/src/usr.lib/libplot/t4013/space.c line 19

boty defined in line 15; used 2 times

- in line 27
- in /usr/src/usr.lib/libplot/t4013/space.c line 20

obotx defined in line 12; used 2 times

- in line 26
- in /usr/src/usr.lib/libplot/t4013/space.c line 21

oboty defined in line 13; used 2 times

- in line 27
- in /usr/src/usr.lib/libplot/t4013/space.c line 22

ohix defined in line 22; used 4 times

- in line 32-40(3)
- in /usr/src/usr.lib/libplot/t4013/erase.c line 19

ohiy defined in line 21; used 4 times

- in line 32-35(3)
- in /usr/src/usr.lib/libplot/t4013/erase.c line 18

oloy defined in line 20; used 4 times

- in line 41-45(3)
- in /usr/src/usr.lib/libplot/t4013/erase.c line 20

scaleflag defined in line 18; used 2 times

- in /usr/src/usr.lib/libplot/t4013/scale.c line 31
- in /usr/src/usr.lib/libplot/t4013/space.c line 23

scalex defined in line 16; used 3 times

- in line 26
- in /usr/src/usr.lib/libplot/t4013/scale.c line 28
- in /usr/src/usr.lib/libplot/t4013/space.c line 25

scaley defined in line 17; used 3 times

- in line 27
- in /usr/src/usr.lib/libplot/t4013/scale.c line 29
- in /usr/src/usr.lib/libplot/t4013/space.c line 26

sccsid defined in line 8; never used

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