3 #define RUNESIZE sizeof(Rune)
5 #define READBUFSIZE 8192
13 typedef struct Text Text;
14 typedef struct Section Section;
15 typedef struct Rasp Rasp;
16 typedef struct Readbuf Readbuf;
21 Rune *text; /* if null, we haven't got it */
31 #define Untagged ((ushort)65535)
37 short front; /* input window */
40 Flayer l[NL]; /* screen storage */
45 short n; /* # bytes in buf */
46 uchar data[READBUFSIZE]; /* data bytes */
59 extern int protodebug;
66 extern Cursor bullseye;
67 extern Cursor deadmouse;
68 extern Cursor lockarrow;
69 extern Cursor *cursor;
74 extern long nscralloc;
76 extern char hasunlocked;
78 extern Mousectl* mousectl;
79 extern Keyboardctl* keyboardctl;
83 extern Readbuf hostbuf[2]; /* double buffer; it's synchronous communication */
84 extern Readbuf plumbbuf[2]; /* double buffer; it's synchronous communication */
85 extern Channel *plumbc;
86 extern Channel *hostc;
91 extern int autoindent;
93 #define gettext sam_gettext /* stupid gcc built-in functions */
94 Rune *gettext(Flayer*, long, ulong*);
98 void getscreen(int, char**);
103 void startnewfile(int, Text*);
105 void mouseunblock(void);
108 void hoststart(void);
109 int plumbstart(void);
111 int load(char*, int);
117 void cut(Text*, int, int, int);
118 void paste(Text*, int);
119 void snarf(Text*, int);
120 int center(Flayer*, long);
121 int xmenuhit(int, Menu*);
123 int getr(Rectangle*);
124 void current(Flayer*);
125 void duplicate(Flayer*, Rectangle, Font*, int);
126 void startfile(Text*);
128 void panic1(Display*, char*);
129 void closeup(Flayer*);
130 void Strgrow(Rune**, long*, int);
134 void type(Flayer*, int);
137 void scroll(Flayer*, int);
141 void hcut(int, long, long);
142 void horigin(int, long);
143 void hgrow(int, long, long, int);
144 int hdata(int, long, uchar*, int);
145 int hdatarune(int, long, Rune*, int);
146 Rune *rload(Rasp*, ulong, ulong, ulong*);
147 void menuins(int, uchar*, Text*, int, int);
149 Text *sweeptext(int, int);
151 void scrdraw(Flayer*, long tot);
152 int rcontig(Rasp*, ulong, ulong, int);
153 int rmissing(Rasp*, ulong, ulong);
154 void rresize(Rasp *, long, long, long);
155 void rdata(Rasp*, long, long, Rune*);
157 void scrorigin(Flayer*, int, long);
158 long scrtotal(Flayer*);
159 void flnewlyvisible(Flayer*);
160 char *rcvstring(void);
161 void Strcpy(Rune*, Rune*);
162 void Strncpy(Rune*, Rune*, long);
163 void flushtyping(int);
164 void dumperrmsg(int, int, int, int);
165 int screensize(int*,int*);
170 void outTs(Tmesg, int);
172 void outTl(Tmesg, long);
173 void outTslS(Tmesg, int, long, Rune*);
174 void outTsll(Tmesg, int, long, long);
175 void outTsl(Tmesg, int, long);
176 void outTsv(Tmesg, int, vlong);
177 void outTv(Tmesg, vlong);
178 void outstart(Tmesg);
179 void outcopy(int, uchar*);
182 void outvlong(vlong);