fmt: don't include blanks in blocks
[ctxt.git] / ctxt.h
blobb26d6f8fe2c74c11b74c30ecd06d8b49a0b86acf
1 #ifndef _FMT_H
2 #define _FMT_H
4 void file_put(int fd, char *s);
6 struct fmt_ops {
7 void (*doc_beg)(int fd);
8 void (*doc_end)(int fd);
9 void (*head_beg)(int fd);
10 void (*head_end)(int fd);
11 void (*par_beg)(int fd);
12 void (*par_end)(int fd);
13 void (*list_beg)(int fd);
14 void (*list_end)(int fd);
15 void (*item_beg)(int fd);
16 void (*item_end)(int fd);
17 void (*put)(int fd, char *s);
20 struct txt {
21 char *txt;
22 char **lines;
23 int n;
26 struct txt *txt_alloc(int fd);
27 char *txt_line(struct txt *txt, int line);
28 void txt_free(struct txt *txt);
30 void fmt(int fd, struct txt *txt, struct fmt_ops *ops);
33 #endif