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

Defined variables

botx defined in line 14; used 2 times
boty defined in line 15; used 2 times
obotx defined in line 12; used 2 times
oboty defined in line 13; used 2 times
ohix defined in line 22; used 4 times
ohiy defined in line 21; used 4 times
oloy defined in line 20; used 4 times
scalex defined in line 16; used 3 times
scaley defined in line 17; used 3 times
sccsid defined in line 8; never used
Last modified: 1987-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2493
Valid CSS Valid XHTML 1.0 Strict