dat.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. typedef struct Bytes Bytes;
  10. typedef struct URLwin URLwin;
  11. enum
  12. {
  13. STACK = 8192,
  14. EVENTSIZE = 256,
  15. };
  16. struct Bytes
  17. {
  18. uchar *b;
  19. long n;
  20. long nalloc;
  21. };
  22. struct URLwin
  23. {
  24. int infd;
  25. int outfd;
  26. int type;
  27. char *url;
  28. Item *items;
  29. Docinfo *docinfo;
  30. };
  31. extern char* url;
  32. extern int aflag;
  33. extern int width;
  34. extern int defcharset;
  35. extern char* loadhtml(int);
  36. extern char* readfile(char*, char*, int*);
  37. extern int charset(char*);
  38. extern void* emalloc(ulong);
  39. extern char* estrdup(char*);
  40. extern char* estrstrdup(char*, char*);
  41. extern char* egrow(char*, char*, char*);
  42. extern char* eappend(char*, char*, char*);
  43. extern void error(char*, ...);
  44. extern void growbytes(Bytes*, char*, long);
  45. extern void rendertext(URLwin*, Bytes*);
  46. extern void rerender(URLwin*);
  47. extern void freeurlwin(URLwin*);
  48. #pragma varargck argpos error 1