diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-05-15 12:31:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-05-15 12:31:00 +0000 |
commit | a355e7868a2177fe355b4911c68ec4103093780b (patch) | |
tree | 0ecfe75c1bf25d6889187d8e20809583b057c59f /usr.bin/mandoc/libmdoc.h | |
parent | 4365040b802cae8f70e1ea7ab12e7e0b1bf991ee (diff) |
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 *); |