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