|
|
1.1 ! root 1: #define HEAD1 1 ! 2: #define HEAD2 2 ! 3: #define HEAD12 (HEAD1+HEAD2) ! 4: #define INVIS 4 ! 5: #define CW_ARC 8 /* clockwise arc */ ! 6: #define dprintf if(dbg)printf ! 7: #define PI 3.141592654 ! 8: #define PI2 PI/2 ! 9: #define SCALE 200 /* default scale: units/inch */ ! 10: #define WID 150 /* default width for boxes and ellipses */ ! 11: #define HT 100 /* default height and line length */ ! 12: #define MAXOBJ 4000 ! 13: #define MAXTEXT 200 ! 14: #define SYMTAB 200 ! 15: #define DEV202 1 ! 16: #define DEVAPS 2 ! 17: #define DEVCAT 3 ! 18: #define DEV450 4 ! 19: ! 20: /* these have to be like so, so that we can write */ ! 21: /* things like R & V, etc. */ ! 22: #define H 0 ! 23: #define V 1 ! 24: #define R_DIR 0 ! 25: #define U_DIR 1 ! 26: #define L_DIR 2 ! 27: #define D_DIR 3 ! 28: #define ishor(n) (((n) & V) == 0) ! 29: #define isvert(n) (((n) & V) != 0) ! 30: #define isright(n) ((n) == R_DIR) ! 31: #define isleft(n) ((n) == L_DIR) ! 32: #define isdown(n) ((n) == D_DIR) ! 33: #define isup(n) ((n) == U_DIR) ! 34: ! 35: typedef int coord; ! 36: ! 37: struct attr { /* attribute of an object */ ! 38: int a_type; ! 39: int a_val; ! 40: }; ! 41: ! 42: struct obj { /* stores various things in variable length */ ! 43: int o_type; ! 44: int o_count; /* number of things */ ! 45: int o_nobj; /* index in objlist */ ! 46: int o_mode; /* hor or vert */ ! 47: coord o_x; /* coord of "center" */ ! 48: coord o_y; ! 49: int o_nt1; /* 1st index in text[] for this object */ ! 50: int o_nt2; /* 2nd; difference is #text strings */ ! 51: int o_attr; /* various attributes of interest */ ! 52: int o_dotdash; /* kludge in a dot/dash mode */ ! 53: int o_ddval; /* value of dot/dash expression */ ! 54: int o_val[1]; /* actually this will be > 1 in general */ ! 55: }; ! 56: ! 57: struct symtab { ! 58: char *s_name; ! 59: int s_type; ! 60: int s_val; ! 61: struct symtab *s_next; ! 62: }; ! 63: ! 64: struct text { ! 65: int t_type; ! 66: char *t_val; ! 67: }; ! 68: ! 69: #define dprintf if(dbg)printf ! 70: extern int dbg; ! 71: extern struct obj *objlist[]; ! 72: extern int nobj; ! 73: extern struct attr attr[]; ! 74: extern int nattr; ! 75: extern struct text text[]; ! 76: extern int ntext; ! 77: extern int ntext1; ! 78: extern coord curx, cury; ! 79: extern int hvmode; ! 80: extern int codegen; ! 81: extern struct obj *makenode(); ! 82: extern char *malloc(); ! 83: extern struct symtab *lookup(), *makevar(); ! 84: ! 85: extern float deltx, delty, scale; ! 86: extern int lineno; ! 87: extern int synerr; ! 88: extern int crop; ! 89: ! 90: extern int devtype, res, DX, DY; ! 91: ! 92: extern coord sxmin, sxmax, symin, symax; ! 93: extern coord xmin, ymin, xmax, ymax; ! 94: extern double atof(); ! 95: ! 96: struct pushstack { ! 97: coord p_x; ! 98: coord p_y; ! 99: int p_hvmode; ! 100: coord p_xmin; ! 101: coord p_ymin; ! 102: coord p_xmax; ! 103: coord p_ymax; ! 104: struct symtab *p_symtab; ! 105: }; ! 106: extern struct pushstack stack[]; ! 107: extern int nstack;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.