|
|
1.1 ! root 1: #define MAXLINES (1024/9) /*9=tiniest known height*/ ! 2: #define newlnsz fontheight(&defont) ! 3: ! 4: typedef struct String{ ! 5: char *s; /* pointer to string */ ! 6: short n; /* number used */ ! 7: short size; /* size of allocated area */ ! 8: } String; ! 9: ! 10: typedef unsigned char Nchar; /* number of chars on a line */ ! 11: typedef struct Frame{ ! 12: Rectangle rect; /* Screen area of frame, exact #lines high */ ! 13: Rectangle scrollrect; /* Screen area of scrollbar */ ! 14: Rectangle totalrect; /* Screen area covered by entire frame */ ! 15: String str; /* What's in the frame */ ! 16: unsigned short s1, s2; /* Indexes of ends of selected text */ ! 17: Point scroll; /* Scroll bar, 0<=(x=top),(y=bot)<=4096 */ ! 18: short nlines; /* Number of screen lines of text */ ! 19: short nullsel; /* True if last selection was null */ ! 20: short lastch; /* Last selected char when s1==s2 */ ! 21: short margin; /* margin around frame */ ! 22: Nchar cpl[MAXLINES]; /* Number of characters per line */ ! 23: } Frame; ! 24: ! 25: #define SCROLLWIDTH 10 /* width of scroll bar */ ! 26: #define SCROLLRANGE 4096 /* range of scrolling parameter */ ! 27: ! 28: #define D (&display) ! 29: #undef TRUE ! 30: #undef FALSE ! 31: #define TRUE 1 ! 32: #define FALSE 0 ! 33: #define cwidth(c) fontwidth(&defont) ! 34: ! 35: extern Frame *fralloc(); ! 36: extern Rectangle canon(); ! 37: extern Point nullpoint; ! 38: extern Point toscreen(),ptofchar(), startline(); ! 39: extern void oprectf(); ! 40: extern void opclear(); ! 41: extern Point endpoint; /* last position drawn during a frameop() */ ! 42: extern int complete; /* did frameop do all it was supposed to? */ ! 43: extern int inscomplete; /* is full insertion visible on screen? */ ! 44: extern int F_rectf; /* function code for oprectf */ ! 45: extern void opnull(); /* nop routine for frameop side effects */ ! 46: extern void opdraw(); /* standard routine to draw the text */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.