#ifndef DOC_H #define DOC_H #include "buf.h" #include "net.h" #define DOC_LINK_NONE 0xffff struct doc_line { unsigned short prev, link, len; char txt[]; }; struct doc { buf_t txt, lnk; size_t latest; }; void doc_init(struct doc *); void doc_fini(struct doc *); void doc_new_line(struct doc *); void doc_add_line(struct doc *, const char *); void doc_add_text(struct doc *, const char *); void doc_add_textn(struct doc *, const char *, size_t); #endif