fns.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. #pragma varargck argpos warning 2
  10. void warning(Mntdir*, char*, ...);
  11. #define fbufalloc() emalloc(BUFSIZE)
  12. #define fbuffree(x) free(x)
  13. void plumblook(Plumbmsg*m);
  14. void plumbshow(Plumbmsg*m);
  15. void putsnarf(void);
  16. void getsnarf(void);
  17. int tempfile(void);
  18. void scrlresize(void);
  19. Font* getfont(int, int, char*);
  20. char* getarg(Text*, int, int, Rune**, int*);
  21. char* getbytearg(Text*, int, int, char**);
  22. void new(Text*, Text*, Text*, int, int, Rune*, int);
  23. void undo(Text*, Text*, Text*, int, int, Rune*, int);
  24. char* getname(Text*, Text*, Rune*, int, int);
  25. void scrsleep(uint);
  26. void savemouse(Window*);
  27. int restoremouse(Window*);
  28. void clearmouse(void);
  29. void allwindows(void(*)(Window*, void*), void*);
  30. uint loadfile(int, uint, int*, int(*)(void*, uint, Rune*, int), void*);
  31. void movetodel(Window*);
  32. Window* errorwin(Mntdir*, int);
  33. Window* errorwinforwin(Window*);
  34. Runestr cleanrname(Runestr);
  35. void run(Window*, char*, Rune*, int, int, char*, char*, int);
  36. void fsysclose(void);
  37. void setcurtext(Text*, int);
  38. int isfilec(Rune);
  39. void rxinit(void);
  40. int rxnull(void);
  41. Runestr dirname(Text*, Rune*, int);
  42. void error(char*);
  43. void cvttorunes(char*, int, Rune*, int*, int*, int*);
  44. void* tmalloc(uint);
  45. void tfree(void);
  46. void killprocs(void);
  47. void killtasks(void);
  48. int runeeq(Rune*, uint, Rune*, uint);
  49. int ALEF_tid(void);
  50. void iconinit(void);
  51. Timer* timerstart(int);
  52. void timerstop(Timer*);
  53. void timercancel(Timer*);
  54. void timerinit(void);
  55. void cut(Text*, Text*, Text*, int, int, Rune*, int);
  56. void paste(Text*, Text*, Text*, int, int, Rune*, int);
  57. void get(Text*, Text*, Text*, int, int, Rune*, int);
  58. void put(Text*, Text*, Text*, int, int, Rune*, int);
  59. void putfile(File*, int, int, Rune*, int);
  60. void fontx(Text*, Text*, Text*, int, int, Rune*, int);
  61. int isalnum(Rune);
  62. void execute(Text*, uint, uint, int, Text*);
  63. int search(Text*, Rune*, uint);
  64. void look3(Text*, uint, uint, int);
  65. void editcmd(Text*, Rune*, uint);
  66. uint min(uint, uint);
  67. uint max(uint, uint);
  68. Window* lookfile(Rune*, int);
  69. Window* lookid(int, int);
  70. char* runetobyte(Rune*, int);
  71. Rune* bytetorune(char*, int*);
  72. void fsysinit(void);
  73. Mntdir* fsysmount(Rune*, int, Rune**, int);
  74. void fsysincid(Mntdir*);
  75. void fsysdelid(Mntdir*);
  76. Xfid* respond(Xfid*, Fcall*, char*);
  77. int rxcompile(Rune*);
  78. int rgetc(void*, uint);
  79. int tgetc(void*, uint);
  80. int isaddrc(int);
  81. int isregexc(int);
  82. void *emalloc(uint);
  83. void *erealloc(void*, uint);
  84. char *estrdup(char*);
  85. Range address(Mntdir*, Text*, Range, Range, void*, uint, uint, int (*)(void*, uint), int*, uint*);
  86. int rxexecute(Text*, Rune*, uint, uint, Rangeset*);
  87. int rxbexecute(Text*, uint, Rangeset*);
  88. Window* makenewwindow(Text *t);
  89. int expand(Text*, uint, uint, Expand*);
  90. Rune* skipbl(Rune*, int, int*);
  91. Rune* findbl(Rune*, int, int*);
  92. char* edittext(Window*, int, Rune*, int);
  93. void flushwarnings(void);
  94. #define runemalloc(a) (Rune*)emalloc((a)*sizeof(Rune))
  95. #define runerealloc(a, b) (Rune*)erealloc((a), (b)*sizeof(Rune))
  96. #define runemove(a, b, c) memmove((a), (b), (c)*sizeof(Rune))