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 */
64 extern Cursor bullseye;
65 extern Cursor deadmouse;
66 extern Cursor lockarrow;
67 extern Cursor *cursor;
72 extern long nscralloc;
74 extern char hasunlocked;
76 extern Mousectl* mousectl;
77 extern Keyboardctl* keyboardctl;
81 extern Readbuf hostbuf[2]; /* double buffer; it's synchronous communication */
82 extern Readbuf plumbbuf[2]; /* double buffer; it's synchronous communication */
83 extern Channel *plumbc;
84 extern Channel *hostc;
88 extern int autoindent;
90 Rune *gettext(Flayer*, long, ulong*);
94 void getscreen(int, char**);
99 void startnewfile(int, Text*);
101 void mouseunblock(void);
104 void hoststart(void);
105 int plumbstart(void);
107 int load(char*, int);
113 void cut(Text*, int, int, int);
114 void paste(Text*, int);
115 void snarf(Text*, int);
116 int center(Flayer*, long);
117 int xmenuhit(int, Menu*);
119 int getr(Rectangle*);
120 void current(Flayer*);
121 void duplicate(Flayer*, Rectangle, Font*, int);
122 void startfile(Text*);
124 void panic1(Display*, char*);
125 void closeup(Flayer*);
126 void Strgrow(Rune**, long*, int);
130 void type(Flayer*, int);
133 void scroll(Flayer*, int);
137 void hcut(int, long, long);
138 void horigin(int, long);
139 void hgrow(int, long, long, int);
140 int hdata(int, long, uchar*, int);
141 int hdatarune(int, long, Rune*, int);
142 Rune *rload(Rasp*, ulong, ulong, ulong*);
143 void menuins(int, uchar*, Text*, int, int);
145 Text *sweeptext(int, int);
147 void scrdraw(Flayer*, long tot);
148 int rcontig(Rasp*, ulong, ulong, int);
149 int rmissing(Rasp*, ulong, ulong);
150 void rresize(Rasp *, long, long, long);
151 void rdata(Rasp*, long, long, Rune*);
153 void scrorigin(Flayer*, int, long);
154 long scrtotal(Flayer*);
155 void flnewlyvisible(Flayer*);
156 char *rcvstring(void);
157 void Strcpy(Rune*, Rune*);
158 void Strncpy(Rune*, Rune*, long);
159 void flushtyping(int);
160 void dumperrmsg(int, int, int, int);
161 int screensize(int*,int*);
166 void outTs(Tmesg, int);
168 void outTl(Tmesg, long);
169 void outTslS(Tmesg, int, long, Rune*);
170 void outTsll(Tmesg, int, long, long);
171 void outTsl(Tmesg, int, long);
172 void outTsv(Tmesg, int, vlong);
173 void outTv(Tmesg, vlong);
174 void outstart(Tmesg);
175 void outcopy(int, uchar*);
178 void outvlong(vlong);