|
|
1.1 ! root 1: int x; float f; ! 2: struct { ! 3: int d; ! 4: int x; ! 5: } s, *sp; ! 6: ! 7: main() { ! 8: sp->x = x + f * x; ! 9: } ! 10: extern struct _iobuf { ! 11: int _cnt; ! 12: char *_ptr; ! 13: char *_base; ! 14: short _flag; ! 15: char _file; ! 16: } _iob[20]; ! 17: struct _iobuf *fopen(); ! 18: struct _iobuf *fdopen(); ! 19: struct _iobuf *freopen(); ! 20: long ftell(); ! 21: char *fgets(); ! 22: struct _Point { ! 23: int x; ! 24: int y; ! 25: }; ! 26: struct _Rectangle { ! 27: struct _Point ll; ! 28: struct _Point ur; ! 29: }; ! 30: struct _Object { ! 31: struct _Object *link; ! 32: }; ! 33: struct _Pool { ! 34: struct _Object *freelist; ! 35: struct _Object *arealist; ! 36: int objsize; ! 37: }; ! 38: struct _Vpool { ! 39: struct _Object *next; ! 40: struct _Object *arealist; ! 41: int left; ! 42: int quantum; ! 43: }; ! 44: struct _SEQFILE { ! 45: int hidden; ! 46: }; ! 47: extern char *myname; ! 48: extern int nullstring; ! 49: extern char *stringtab; ! 50: extern char *execname(); ! 51: extern struct _iobuf *chkfopen(); ! 52: extern struct _Pool *newpool(); ! 53: extern struct _Vpool *newvpool(); ! 54: extern char *maketemp(); ! 55: extern char *permspace(); ! 56: extern struct _SEQFILE *seqopen(); ! 57: extern char *nettoname(); ! 58: extern char *strchr(); ! 59: extern char *strrchr(); ! 60: extern char debug; ! 61: typedef struct { ! 62: float x; ! 63: float y; ! 64: } FPT; ! 65: typedef struct { ! 66: FPT ll; ! 67: FPT ur; ! 68: } FRECT; ! 69: struct _Traphd { ! 70: int magicnumb; ! 71: int nrows, ncols; ! 72: int xdelta, ydelta; ! 73: struct _Rectangle bb; ! 74: struct _Rectangle rbb ; ! 75: char empty; ! 76: }; ! 77: struct _Trapezoid { ! 78: int net; ! 79: int xmin, xmax, lby, lty, rby, rty; ! 80: }; ! 81: struct _Traplabel { ! 82: int net; ! 83: int x, y; ! 84: char label[4*sizeof(int)]; ! 85: }; ! 86: extern char intrflag; ! 87: extern struct _Point center; ! 88: extern struct _Rectangle iuwind; ! 89: extern double supiu; ! 90: extern char debug; ! 91: extern short netcolor; ! 92: extern char debug; ! 93: int iuplu = 1000; ! 94: short nlayers = 40; ! 95: short color [40]; ! 96: char *layername [40]; ! 97: char *colorfile; ! 98: char *fullname [40]; ! 99: static struct _Traphd *header; ! 100: static int **index; ! 101: static int identify (i, p) ! 102: struct _Point p; ! 103: { ! 104: register struct _Traphd *h; ! 105: register struct _iobuf *f; ! 106: int col, row, pos, addr, stop; ! 107: float w, x, slope; ! 108: struct _Trapezoid t; ! 109: h = &header[i]; ! 110: col = (((p.x) - ( h)->rbb.ll.x) / ( h)->xdelta); ! 111: row = (((p.y) - ( h)->rbb.ll.y) / ( h)->ydelta); ! 112: if (col < 0 || col >= h->ncols) return -1; ! 113: if (row < 0 || row >= h->nrows) return -1; ! 114: pos = col * h->nrows + row; ! 115: addr = index[i][pos]; ! 116: stop = index[i][pos + 1]; ! 117: if (addr >= stop) return -1; ! 118: f = (struct _iobuf *) forceopen(i); ! 119: fseek (f, addr, 0); ! 120: while (addr < stop) { ! 121: if (intrflag) return -1; ! 122: chkfread (&t, sizeof(struct _Trapezoid), 1, f); ! 123: addr += sizeof(struct _Trapezoid); ! 124: if (p.x < t.xmin || t.xmax < p.x) continue; ! 125: x = p.x - t.xmin; ! 126: w = t.xmax - t.xmin; ! 127: ! 128: slope = (t.rby - t.lby) / w; ! 129: if (p.y < t.lby + x*slope) continue; ! 130: ! 131: slope = (t.rty - t.lty) / w; ! 132: if (p.y > t.lty + x*slope) continue; ! 133: ! 134: return t.net; ! 135: } ! 136: return -1; ! 137: } ! 138: m() ! 139: { register unsigned char a, b; ! 140: a/=b; ! 141: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.