Annotation of 43BSDTahoe/usr.lib/libplot/t4013/subr.c, revision 1.1

1.1     ! root        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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.