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;
89 extern int spacesindent;
91 Rune *gettext(Flayer*, long, ulong*);
95 void getscreen(int, char**);
100 void startnewfile(int, Text*);
102 void mouseunblock(void);
105 void hoststart(void);
106 int plumbstart(void);
108 int load(char*, int);
114 void cut(Text*, int, int, int);
115 void paste(Text*, int);
116 void snarf(Text*, int);
117 int center(Flayer*, long);
118 int xmenuhit(int, Menu*);
120 int getr(Rectangle*);
121 void current(Flayer*);
122 void duplicate(Flayer*, Rectangle, Font*, int);
123 void startfile(Text*);
125 void panic1(Display*, char*);
126 void closeup(Flayer*);
127 void Strgrow(Rune**, long*, int);
131 void type(Flayer*, int);
134 void scroll(Flayer*, int);
138 void hcut(int, long, long);
139 void horigin(int, long);
140 void hgrow(int, long, long, int);
141 int hdata(int, long, uchar*, int);
142 int hdatarune(int, long, Rune*, int);
143 Rune *rload(Rasp*, ulong, ulong, ulong*);
144 void menuins(int, uchar*, Text*, int, int);
146 Text *sweeptext(int, int);
148 void scrdraw(Flayer*, long tot);
149 int rcontig(Rasp*, ulong, ulong, int);
150 int rmissing(Rasp*, ulong, ulong);
151 void rresize(Rasp *, long, long, long);
152 void rdata(Rasp*, long, long, Rune*);
154 void scrorigin(Flayer*, int, long);
155 long scrtotal(Flayer*);
156 void flnewlyvisible(Flayer*);
157 char *rcvstring(void);
158 void Strcpy(Rune*, Rune*);
159 void Strncpy(Rune*, Rune*, long);
160 void flushtyping(int);
161 void dumperrmsg(int, int, int, int);
162 int screensize(int*,int*);
167 void outTs(Tmesg, int);
169 void outTl(Tmesg, long);
170 void outTslS(Tmesg, int, long, Rune*);
171 void outTsll(Tmesg, int, long, long);
172 void outTsl(Tmesg, int, long);
173 void outTsv(Tmesg, int, vlong);
174 void outTv(Tmesg, vlong);
175 void outstart(Tmesg);
176 void outcopy(int, uchar*);
179 void outvlong(vlong);