diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-22 14:05:45 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-22 14:05:45 +0000 |
commit | b6591e91b037a5c71a68512372ea2da15154fe2f (patch) | |
tree | c96674dbcfbe48c6ed6f289d9f580bab9dab811f /mandoc.h | |
parent | bce51df74cd9c0cb090845736c5e6f8313d4fd6c (diff) | |
download | mandoc-b6591e91b037a5c71a68512372ea2da15154fe2f.tar.gz mandoc-b6591e91b037a5c71a68512372ea2da15154fe2f.tar.zst mandoc-b6591e91b037a5c71a68512372ea2da15154fe2f.zip |
Move mandoc_isdelim() back into libmdoc.h. This fixes an unreported
error where (1) -man pages were punctuating delimiters (e.g., `.B a ;')
and where (2) standalone punctuation in -mdoc or -man (e.g., ";" on its
own line) would also be punctuated. This introduces a small amount of
complexity of mdoc_{html,term}.c must manage their own spacing with
running print_word() or print_text(). The check for delimiting now
happens in mdoc_macro.c's dword().
Diffstat (limited to 'mandoc.h')
-rw-r--r-- | mandoc.h | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.66 2011/03/22 10:35:26 kristaps Exp $ */ +/* $Id: mandoc.h,v 1.67 2011/03/22 14:05:45 kristaps Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -278,22 +278,6 @@ struct eqn { }; /* - * A punctuation delimiter, used only in mdoc(7) documents, is opening, - * closing, or "middle mark" punctuation. These govern spacing. - * Opening punctuation (e.g., the opening parenthesis) suppresses the - * following space; closing punctuation (e.g., the closing parenthesis) - * suppresses the leading space; middle punctuation (e.g., the vertical - * bar) can do either. The middle punctuation delimiter bends the rules - * depending on usage. - */ -enum mdelim { - DELIM_NONE = 0, - DELIM_OPEN, - DELIM_MIDDLE, - DELIM_CLOSE -}; - -/* * The type of parse sequence. This value is usually passed via the * mandoc(1) command line of -man and -mdoc. It's almost exclusively * -mandoc but the others have been retained for compatibility. @@ -323,8 +307,6 @@ void mparse_result(struct mparse *, struct mdoc **, struct man **); void *mandoc_calloc(size_t, size_t); void *mandoc_malloc(size_t); void *mandoc_realloc(void *, size_t); -#define DELIMSZ 6 /* hint: max possible size of a delimiter */ -enum mdelim mandoc_isdelim(const char *); __END_DECLS |