diff options
| author | 2010-05-15 12:30:59 +0000 | |
|---|---|---|
| committer | 2010-05-15 12:30:59 +0000 | |
| commit | 73e41f78d22fc5d9d3e42f552b957fa9e8c583cc (patch) | |
| tree | 477b814f6cafa1707ef7aaeea739f20a1527ce6e /usr.bin/mandoc/libmdoc.h | |
| parent | normalize() cannot be inline and extern at the same time; prompted by (diff) | |
| download | wireguard-openbsd-73e41f78d22fc5d9d3e42f552b957fa9e8c583cc.tar.xz wireguard-openbsd-73e41f78d22fc5d9d3e42f552b957fa9e8c583cc.zip | |
Distinguish OPEN, MIDDLE and CLOSE delimiters (using an enum).
Only OPEN are drawn before the beginning of a macro;
this is new, before this, MIDDLE ('|') were drawn in front, too.
Only CLOSE are pushed after the end of a macro (as before).
ok kristaps@
This allows us to finally enable handling of leading punctuation
without regressions.
Diffstat (limited to 'usr.bin/mandoc/libmdoc.h')
| -rw-r--r-- | usr.bin/mandoc/libmdoc.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/mandoc/libmdoc.h b/usr.bin/mandoc/libmdoc.h index d8175f8267a..3b59e440d82 100644 --- a/usr.bin/mandoc/libmdoc.h +++ b/usr.bin/mandoc/libmdoc.h @@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.30 2010/05/14 14:47:44 schwarze Exp $ */ +/* $Id: libmdoc.h,v 1.31 2010/05/15 12:30:59 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -130,6 +130,13 @@ enum margverr { ARGV_WORD }; +enum mdelim { + DELIM_NONE = 0, + DELIM_OPEN, + DELIM_MIDDLE, + DELIM_CLOSE +}; + extern const struct mdoc_macro *const mdoc_macros; __BEGIN_DECLS @@ -160,8 +167,8 @@ int mdoc_body_alloc(struct mdoc *, int, int, enum mdoct); void mdoc_node_delete(struct mdoc *, struct mdoc_node *); void mdoc_hash_init(void); enum mdoct mdoc_hash_find(const char *); -int mdoc_iscdelim(char); -int mdoc_isdelim(const char *); +enum mdelim mdoc_iscdelim(char); +enum mdelim mdoc_isdelim(const char *); size_t mdoc_isescape(const char *); enum mdoc_sec mdoc_str2sec(const char *); time_t mdoc_atotime(const char *); |
