fns.h - 9base - revived minimalist port of Plan 9 userland to Unix
HTML git clone git://git.suckless.org/9base
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
fns.h (7418B)
---
1 #define getline p9getline
2
3 #include "mbwc.h"
4
5 /*
6 * other
7 */
8 #ifdef NOTDEF
9 int pclose(FILE*);
10 long filesize(int fd);
11 int open(char *, int);
12 int read(int, char *, int);
13 int lseek(int, long, int);
14 int close(int);
15 int getpid(void);
16 #endif
17 char *unsharp(char*);
18
19 /*
20 * c1.c
21 */
22 void init0(void);
23 void init2(void);
24 void cvtime(void);
25 void errprint(void);
26 int control(int a, int b);
27 void casept(void);
28 int getrq(void);
29 Tchar getch(void);
30 void setxon(void);
31 Tchar getch0(void);
32 Tchar get1ch(FILE *);
33 void pushback(Tchar *b);
34 void cpushback(char *b);
35 int nextfile(void);
36 int popf(void);
37 void flushi(void);
38 int getach(void);
39 void casenx(void);
40 int getname(void);
41 void caseso(void);
42 void caself(void);
43 void casecf(void);
44 void getline(char *s, int n);
45 void casesy(void);
46 void getpn(char *a);
47 void setrpt(void);
48
49 /*
50 * n2.c
51 */
52 int pchar(Tchar i);
53 void pchar1(Tchar i);
54 int pchar2(Tchar i);
55 int flusho(void);
56 void casedone(void);
57 void caseex(void);
58 void done(int x);
59 void done1(int x);
60 void done2(int x);
61 void done3(int x);
62 void edone(int x);
63 void casepi(void);
64
65 /*
66 * c3.c
67 */
68 void blockinit(void);
69 char* grow(char *, int, int);
70 void mnspace(void);
71 void caseig(void);
72 void casern(void);
73 void maddhash(Contab *rp);
74 void munhash(Contab *mp);
75 void mrehash(void);
76 void caserm(void);
77 void caseas(void);
78 void caseds(void);
79 void caseam(void);
80 void casede(void);
81 int findmn(int i);
82 void clrmn(int i);
83 Offset finds(int mn);
84 int skip(void);
85 int copyb(void);
86 void copys(void);
87 Offset alloc(void);
88 void ffree(Offset i);
89 void wbf(Tchar i);
90 Tchar rbf(void);
91 Tchar popi(void);
92 Offset pushi(Offset newip, int mname);
93 void* setbrk(int x);
94 int getsn(void);
95 Offset setstr(void);
96 void collect(void);
97 void seta(void);
98 void caseda(void);
99 void casegd(void);
100 void casedi(void);
101 void casedt(void);
102 void casetl(void);
103 void casepc(void);
104 void casepm(void);
105 void stackdump(void);
106
107 /*
108 * c4.c
109 */
110 void setn(void);
111 int wrc(Tchar i);
112 void setn1(int i, int form, Tchar bits);
113 void nnspace(void);
114 void nrehash(void);
115 void nunhash(Numtab *rp);
116 int findr(int i);
117 int usedr(int i);
118 int fnumb(int i, int (*f)(Tchar));
119 int decml(int i, int (*f)(Tchar));
120 int roman(int i, int (*f)(Tchar));
121 int roman0(int i, int (*f)(Tchar), char *onesp, char *fivesp);
122 int abc(int i, int (*f)(Tchar));
123 int abc0(int i, int (*f)(Tchar));
124 long atoi0(void);
125 long ckph(void);
126 long atoi1(Tchar ii);
127 void caserr(void);
128 void casenr(void);
129 void caseaf(void);
130 void setaf(void);
131 int vnumb(int *i);
132 int hnumb(int *i);
133 int inumb(int *n);
134 int quant(int n, int m);
135
136 /*
137 * c5.c
138 */
139 void casead(void);
140 void casena(void);
141 void casefi(void);
142 void casenf(void);
143 void casers(void);
144 void casens(void);
145 int chget(int c);
146 void casecc(void);
147 void casec2(void);
148 void casehc(void);
149 void casetc(void);
150 void caselc(void);
151 void casehy(void);
152 int max(int aa, int bb);
153 void casenh(void);
154 void casece(void);
155 void casein(void);
156 void casell(void);
157 void caselt(void);
158 void caseti(void);
159 void casels(void);
160 void casepo(void);
161 void casepl(void);
162 void casewh(void);
163 void casech(void);
164 int findn(int i);
165 void casepn(void);
166 void casebp(void);
167 void casextm(void);
168 void casetm(void);
169 void casefm(void);
170 void casetm1(int ab, FILE *out);
171 void casesp(void);
172 void casesp1(int a);
173 void casert(void);
174 void caseem(void);
175 void casefl(void);
176 void caseev(void);
177 void envcopy(Env *e1, Env *e2);
178 void caseel(void);
179 void caseie(void);
180 void casexif(void);
181 void caseif(void);
182 void caseif1(int);
183 void eatblk(int inblk);
184 int cmpstr(Tchar c);
185 void caserd(void);
186 int rdtty(void);
187 void caseec(void);
188 void caseeo(void);
189 void caseta(void);
190 void casene(void);
191 void casetr(void);
192 void casecu(void);
193 void caseul(void);
194 void caseuf(void);
195 void caseit(void);
196 void casemc(void);
197 void casemk(void);
198 void casesv(void);
199 void caseos(void);
200 void casenm(void);
201 void getnm(int *p, int min);
202 void casenn(void);
203 void caseab(void);
204 void save_tty(void);
205 void restore_tty(void);
206 void set_tty(void);
207 void echo_off(void);
208 void echo_on(void);
209
210 /*
211 * t6.c
212 */
213 int t_width(Tchar j);
214 void zapwcache(int s);
215 int onfont(int n, int f);
216 int getcw(int i);
217 void xbits(Tchar i, int bitf);
218 Tchar t_setch(int c);
219 Tchar t_setabs(void);
220 int t_findft(int i);
221 void caseps(void);
222 void casps1(int i);
223 int findps(int i);
224 void t_mchbits(void);
225 void t_setps(void);
226 Tchar t_setht(void);
227 Tchar t_setslant(void);
228 void caseft(void);
229 void t_setfont(int a);
230 void t_setwd(void);
231 Tchar t_vmot(void);
232 Tchar t_hmot(void);
233 Tchar t_mot(void);
234 Tchar t_sethl(int k);
235 Tchar t_makem(int i);
236 Tchar getlg(Tchar i);
237 void caselg(void);
238 void casefp(void);
239 char *strdupl(const char *);
240 int setfp(int pos, int f, char *truename, int print);
241 void casecs(void);
242 void casebd(void);
243 void casevs(void);
244 void casess(void);
245 Tchar t_xlss(void);
246 Uchar* unpair(int i);
247 void outascii(Tchar i);
248
249 /*
250 * c7.c
251 */
252 void tbreak(void);
253 void donum(void);
254 void text(void);
255 void nofill(void);
256 void callsp(void);
257 void ckul(void);
258 void storeline(Tchar c, int w);
259 void newline(int a);
260 int findn1(int a);
261 void chkpn(void);
262 int findt(int a);
263 int findt1(void);
264 void eject(Stack *a);
265 int movword(void);
266 void horiz(int i);
267 void setnel(void);
268 int getword(int x);
269 void storeword(Tchar c, int w);
270 Tchar gettch(void);
271
272 /*
273 * c8.c
274 */
275 void hyphen(Tchar *wp);
276 int punct(Tchar i);
277 int alph(int i);
278 void caseha(void);
279 void caseht(void);
280 void casehw(void);
281 int exword(void);
282 int suffix(void);
283 int maplow(int i);
284 int vowel(int i);
285 Tchar* chkvow(Tchar *w);
286 void digram(void);
287 int dilook(int a, int b, char t[26][13]);
288
289 /*
290 * c9.c
291 */
292 Tchar setz(void);
293 void setline(void);
294 int eat(int c);
295 void setov(void);
296 void setbra(void);
297 void setvline(void);
298 void setdraw(void);
299 void casefc(void);
300 Tchar setfield(int x);
301
302 /*
303 * t10.c
304 */
305 void t_ptinit(void);
306 void t_specnames(void);
307 void t_ptout(Tchar i);
308 int ptout0(Tchar *pi);
309 void ptchname(int);
310 void ptflush(void);
311 void ptps(void);
312 void ptfont(void);
313 void ptfpcmd(int f, char *s, char *fn);
314 void t_ptlead(void);
315 void ptesc(void);
316 void ptpage(int n);
317 void pttrailer(void);
318 void ptstop(void);
319 void t_ptpause(void);
320
321 /*
322 * t11.c
323 */
324 int getdesc(char *name);
325 int getfont(char *name, int pos);
326 int chadd(char *s, int, int);
327 char* chname(int n);
328 int getlig(FILE *fin);
329
330 /*
331 * n6.c
332 */
333 int n_width(Tchar j);
334 Tchar n_setch(int c);
335 Tchar n_setabs(void);
336 int n_findft(int i);
337 void n_mchbits(void);
338 void n_setps(void);
339 Tchar n_setht(void);
340 Tchar n_setslant(void);
341 void n_caseft(void);
342 void n_setfont(int a);
343 void n_setwd(void);
344 Tchar n_vmot(void);
345 Tchar n_hmot(void);
346 Tchar n_mot(void);
347 Tchar n_sethl(int k);
348 Tchar n_makem(int i);
349 void n_casefp(void);
350 void n_casebd(void);
351 void n_casevs(void);
352 Tchar n_xlss(void);
353
354 /*
355 * n10.c
356 */
357 void n_ptinit(void);
358 char* skipstr(char *s);
359 char* getstr(char *s, char *t);
360 char* getint(char *s, int *pn);
361 void twdone(void);
362 void n_specnames(void);
363 int findch(char *s);
364 void n_ptout(Tchar i);
365 void ptout1(void);
366 char* plot(char *x);
367 void move(void);
368 void n_ptlead(void);
369 void n_ptpause(void);
370
371 /*
372 * indirect calls on TROFF/!TROFF. these are variables!
373 */
374 extern Tchar (*hmot)(void);
375 extern Tchar (*makem)(int i);
376 extern Tchar (*setabs)(void);
377 extern Tchar (*setch)(int c);
378 extern Tchar (*sethl)(int k);
379 extern Tchar (*setht)(void);
380 extern Tchar (*setslant)(void);
381 extern Tchar (*vmot)(void);
382 extern Tchar (*xlss)(void);
383 extern int (*findft)(int i);
384 extern int (*width)(Tchar j);
385 extern void (*mchbits)(void);
386 extern void (*ptlead)(void);
387 extern void (*ptout)(Tchar i);
388 extern void (*ptpause)(void);
389 extern void (*setfont)(int a);
390 extern void (*setps)(void);
391 extern void (*setwd)(void);