version 1.1, 2019/03/26 19:17:29 |
version 1.4, 2019/04/11 04:23:22 |
|
|
|
|
struct format { |
struct format { |
int level; /* Header level, starting at 1. */ |
int level; /* Header level, starting at 1. */ |
|
int flags; |
|
#define FMT_NOSPC (1 << 0) /* Suppress space before next node. */ |
|
#define FMT_ARG (1 << 1) /* May add argument to current macro. */ |
|
#define FMT_CHILD (1 << 2) /* Expect a single child macro. */ |
|
#define FMT_IMPL (1 << 3) /* Partial implicit block is open. */ |
enum linestate linestate; |
enum linestate linestate; |
}; |
}; |
|
|
|
|
void macro_open(struct format *, const char *); |
void macro_open(struct format *, const char *); |
void macro_close(struct format *); |
void macro_close(struct format *); |
void macro_line(struct format *, const char *); |
void macro_line(struct format *, const char *); |
void macro_closepunct(struct format *, struct pnode *); |
|
|
|
void macro_addarg(struct format *, const char *, int); |
void macro_addarg(struct format *, const char *, int); |
void macro_argline(struct format *, const char *, const char *); |
void macro_argline(struct format *, const char *, const char *); |
void macro_addnode(struct format *, struct pnode *, int); |
void macro_addnode(struct format *, struct pnode *, int); |
void macro_nodeline(struct format *, const char *, struct pnode *, int); |
void macro_nodeline(struct format *, const char *, struct pnode *, int); |
|
|
|
void print_text(struct format *, const char *, int); |
|
void print_textnode(struct format *, struct pnode *); |