1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */ 2: /* $Header: supr.h,v 2.2 84/07/11 15:20:05 guido Exp $ */ 3: 4: /* 5: * B editor -- Superstructure for fine focusing. 6: */ 7: 8: /* 9: * Interpretation of mode and s1, s2, s3: 10: * WHOLE: whole node is the focus; 11: * SUBSET: s1/2, s2/2 are first and last child number under focus; 12: * even means fixed text, odd means child node; 13: * SUBRANGE: s1/2 is fixed text number; s2, s3 are 1st&last char; 14: * if s1 is odd, ditto for child which must be "text"; 15: * VHOLE: s1/2 is fixed text number; volatile hole before char s2; 16: * if s1 is odd, ditto for child which must be "text". 17: * ATEND: a volatile hole just after the entire node. 18: * ATBEGIN: ditto just before it. 19: * SUBLIST: s3 indicates how many times downrite() bring us 20: * beyond the focus (i.e., the focus is the subtree below 21: * ep->focus EXCLUDING the subtree reached after s3 times 22: * downrite(). Note s3 > 0. 23: * FHOLE: Like VHOLE but in Fixed text. 24: * 25: * It is assumed that if the focus is a substring of fixed text 26: * (SUBRANGE, VHOLE), it does not begin or end with lay-out of spaces. 27: */ 28: 29: #define WHOLE 'W' 30: #define SUBSET 'S' 31: #define SUBRANGE 'R' 32: #define VHOLE 'V' 33: #define ATEND 'E' 34: #define ATBEGIN 'B' 35: #define SUBLIST 'L' 36: #define FHOLE 'F' 37: 38: typedef struct { 39: path focus; 40: char mode; 41: char /*bool*/ copyflag; 42: char /*bool*/ spflag; 43: char /*bool*/ changed; 44: short /*0..2*MAXCHILD+1*/ s1; 45: short s2; 46: short s3; 47: short highest; 48: value copybuffer; /* Actually, a queue */ 49: value oldmacro; /* A text */ 50: value newmacro; /* A text, too */ 51: int generation; 52: } environ; 53: 54: #ifdef STRUCTASS 55: #define Emove(e1, e2) ((e2) = (e1)) 56: #else !STRUCTASS 57: #define Emove(e1, e2) emove(&(e1), &(e2)) 58: #endif !STRUCTASS 59: #define Ecopy(e1, e2) ecopy(&(e1), &(e2)) 60: #define Erelease(e) erelease(&(e))