summaryrefslogtreecommitdiffstats
path: root/libmdoc.h
diff options
context:
space:
mode:
Diffstat (limited to 'libmdoc.h')
-rw-r--r--libmdoc.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libmdoc.h b/libmdoc.h
index d4ae2e2f..4165c9c2 100644
--- a/libmdoc.h
+++ b/libmdoc.h
@@ -80,6 +80,23 @@ enum margverr {
ARGV_WORD
};
+/*
+ * A punctuation delimiter 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,
+ DELIM_MAX
+};
+
extern const struct mdoc_macro *const mdoc_macros;
__BEGIN_DECLS
@@ -126,6 +143,9 @@ enum margserr mdoc_zargs(struct mdoc *, int,
int mdoc_macroend(struct mdoc *);
+#define DELIMSZ 6 /* hint: max possible size of a delimiter */
+enum mdelim mdoc_isdelim(const char *);
+
__END_DECLS
#endif /*!LIBMDOC_H*/