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