Annotation of researchv10no/libplot/lib4014/vec.c, revision 1.1.1.1

1.1       root        1: #include <stdio.h>
                      2: #include "tek.h"
                      3: int    oloy = -1;
                      4: int    ohiy = -1;
                      5: int    ohix = -1;
                      6: int    oextra = -1;
                      7: 
                      8: vec(xx, yy) 
                      9: double xx, yy; 
                     10: {
                     11:        int     x, y, hix, hiy, lox, loy, extra;
                     12:        int     n;
                     13:        e1->copyx = xx; 
                     14:        e1->copyy = yy;
                     15:        x = SCX(xx);
                     16:        y = SCY(yy);
                     17:        hix = (x >> 7) & 037;
                     18:        hiy = (y >> 7) & 037;
                     19:        lox = (x >> 2) & 037;
                     20:        loy = (y >> 2) & 037;
                     21:        extra = (x & 03) + ((y << 2) & 014);
                     22:        n = (abs(hix - ohix) + abs(hiy - ohiy) + 6) / 12;
                     23:        if (hiy != ohiy) {
                     24:                putchar(hiy | 040);
                     25:                ohiy = hiy;
                     26:        }
                     27:        if (hix != ohix) {
                     28:                if (extra != oextra) {
                     29:                        putchar(extra | 0140);
                     30:                        oextra = extra;
                     31:                }
                     32:                putchar(loy | 0140);
                     33:                putchar(hix | 040);
                     34:                ohix = hix;
                     35:                oloy = loy;
                     36:        } else {
                     37:                if (extra != oextra) {
                     38:                        putchar(extra | 0140);
                     39:                        putchar(loy | 0140);
                     40:                        oextra = extra;
                     41:                        oloy = loy;
                     42:                } else if (loy != oloy) {
                     43:                        putchar(loy | 0140);
                     44:                        oloy = loy;
                     45:                }
                     46:        }
                     47:        putchar(lox | 0100);
                     48:        while (n--)
                     49:                putchar(0);
                     50: }

unix.superglobalmegacorp.com

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