diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-02-06 20:36:36 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-02-06 20:36:36 +0000 |
commit | 858bb68c9059fe5b8f8f613dab2761233ff36ba7 (patch) | |
tree | 570b9749d9aa62c9ea90cef7bcc920ac1ed44829 /libroff.h | |
parent | 07e8fdac90d41ba0de90ac17f5081f6feb4b4b99 (diff) | |
download | mandoc-858bb68c9059fe5b8f8f613dab2761233ff36ba7.tar.gz |
Add initial EQN support to mandoc. This parses, then throws away, data
between EQ and EN roff blocks. EQN is different from TBL in that data
after .EQ is unilaterally considered an equation until an .EN. Thus,
there's no need to jump through hoops in having table spans and so on.
This is ONLY the parse code framework in libroff. EQN is not yet passed
into the backends.
Diffstat (limited to 'libroff.h')
-rw-r--r-- | libroff.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -43,6 +43,13 @@ struct tbl_node { struct tbl_node *next; }; +struct eqn_node { + int pos; /* invocation column */ + int line; /* invocation line */ + struct eqn eqn; + struct eqn_node *next; +}; + #define TBL_MSG(tblp, type, line, col) \ (*(tblp)->msg)((type), (tblp)->data, (line), (col), NULL) @@ -57,6 +64,10 @@ int tbl_data(struct tbl_node *, int, const char *); int tbl_cdata(struct tbl_node *, int, const char *); const struct tbl_span *tbl_span(struct tbl_node *); void tbl_end(struct tbl_node *); +struct eqn_node *eqn_alloc(int, int); +void eqn_end(struct eqn_node *); +void eqn_free(struct eqn_node *); +enum rofferr eqn_read(struct eqn_node **, int, const char *, int); __END_DECLS |