fns.h 1.4 KB

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