fns.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. /* buf.c */
  10. void initibuf(Ibuf*, Ioproc*, int);
  11. int readibuf(Ibuf*, char*, int);
  12. void unreadline(Ibuf*, char*);
  13. int readline(Ibuf*, char*, int);
  14. /* client.c */
  15. int newclient(int);
  16. void closeclient(Client*);
  17. void clonectl(Ctl*);
  18. int ctlwrite(Req*, Ctl*, char*, char*);
  19. int clientctlwrite(Req*, Client*, char*, char*);
  20. int globalctlwrite(Req*, char*, char*);
  21. void ctlread(Req*, Client*);
  22. void globalctlread(Req*);
  23. void plumburl(char*, char*);
  24. /* cookies.c */
  25. void cookieread(Req*);
  26. void cookiewrite(Req*);
  27. void cookieopen(Req*);
  28. void cookieclunk(Fid*);
  29. void initcookies(char*);
  30. void closecookies(void);
  31. void httpsetcookie(char*, char*, char*);
  32. char* httpcookies(char*, char*, int);
  33. /* fs.c */
  34. void initfs(void);
  35. /* http.c */
  36. int httpopen(Client*, Url*);
  37. int httpread(Client*, Req*);
  38. void httpclose(Client*);
  39. /* io.c */
  40. int iotlsdial(Ioproc*, char*, char*, char*, int*, int);
  41. int ioprint(Ioproc*, int, char*, ...);
  42. #pragma varargck argpos ioprint 3
  43. /* plumb.c */
  44. void plumbinit(void);
  45. void plumbstart(void);
  46. void replumb(Client*);
  47. /* url.c */
  48. Url* parseurl(char*, Url*);
  49. void freeurl(Url*);
  50. void rewriteurl(Url*);
  51. int seturlquery(Url*, char*);
  52. Url* copyurl(Url*);
  53. char* escapeurl(char*, int(*)(int));
  54. char* unescapeurl(char*);
  55. void initurl(void);
  56. /* util.c */
  57. char* estrdup(char*);
  58. char* estrmanydup(char*, ...);
  59. char* estredup(char*, char*);
  60. void* emalloc(uint);
  61. void* erealloc(void*, uint);
  62. char* strlower(char*);