1: #ifndef lint
   2: static char sccsid[] = "@(#)subr.c	4.1 (Berkeley) 6/27/83";
   3: #endif
   4: 
   5: #include <stdio.h>
   6: float obotx = 0.;
   7: float oboty = 0.;
   8: float botx = 0.;
   9: float boty = 0.;
  10: float scalex = 1.;
  11: float scaley = 1.;
  12: int scaleflag;
  13: 
  14: int oloy = -1;
  15: int ohiy = -1;
  16: int ohix = -1;
  17: int oextra = -1;
  18: cont(x,y){
  19:     int hix,hiy,lox,loy,extra;
  20:     int n;
  21:     x = (x-obotx)*scalex + botx;
  22:     y = (y-oboty)*scaley + boty;
  23:     hix=(x>>7) & 037;
  24:     hiy=(y>>7) & 037;
  25:     lox = (x>>2)&037;
  26:     loy=(y>>2)&037;
  27:     extra=x&03+(y<<2)&014;
  28:     n = (abs(hix-ohix) + abs(hiy-ohiy) + 6) / 12;
  29:     if(hiy != ohiy){
  30:         putch(hiy|040);
  31:         ohiy=hiy;
  32:     }
  33:     if(hix != ohix){
  34:         if(extra != oextra){
  35:             putch(extra|0140);
  36:             oextra=extra;
  37:         }
  38:         putch(loy|0140);
  39:         putch(hix|040);
  40:         ohix=hix;
  41:         oloy=loy;
  42:     }
  43:     else{
  44:         if(extra != oextra){
  45:             putch(extra|0140);
  46:             putch(loy|0140);
  47:             oextra=extra;
  48:             oloy=loy;
  49:         }
  50:         else if(loy != oloy){
  51:             putch(loy|0140);
  52:             oloy=loy;
  53:         }
  54:     }
  55:     putch(lox|0100);
  56:     while(n--)
  57:         putch(0);
  58: }
  59: 
  60: putch(c){
  61:     putc(c,stdout);
  62: }

Defined functions

cont defined in line 18; never used
putch defined in line 60; used 9 times

Defined variables

botx defined in line 8; used 1 times
  • in line 21
boty defined in line 9; used 1 times
  • in line 22
obotx defined in line 6; used 1 times
  • in line 21
oboty defined in line 7; used 1 times
  • in line 22
oextra defined in line 17; used 4 times
ohix defined in line 16; used 3 times
ohiy defined in line 15; used 3 times
oloy defined in line 14; used 4 times
scaleflag defined in line 12; never used
scalex defined in line 10; used 1 times
  • in line 21
scaley defined in line 11; used 1 times
  • in line 22
sccsid defined in line 2; never used
Last modified: 1983-07-26
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 666
Valid CSS Valid XHTML 1.0 Strict