fns.h 7.5 KB

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