aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libmandoc.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-22 14:05:45 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-22 14:05:45 +0000
commitb6591e91b037a5c71a68512372ea2da15154fe2f (patch)
treec96674dbcfbe48c6ed6f289d9f580bab9dab811f /libmandoc.h
parentbce51df74cd9c0cb090845736c5e6f8313d4fd6c (diff)
downloadmandoc-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 'libmandoc.h')
-rw-r--r--libmandoc.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/libmandoc.h b/libmandoc.h
index d3cc643e..e6742631 100644
--- a/libmandoc.h
+++ b/libmandoc.h
@@ -1,4 +1,4 @@
-/* $Id: libmandoc.h,v 1.15 2011/03/22 10:02:50 kristaps Exp $ */
+/* $Id: libmandoc.h,v 1.16 2011/03/22 14:05:45 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -29,17 +29,15 @@ enum rofferr {
ROFF_ERR /* badness: puke and stop */
};
-/*
- * Available registers (set in libroff, accessed elsewhere).
- */
enum regs {
- REG_nS = 0,
+ REG_nS = 0, /* nS register */
REG__MAX
};
/*
* A register (struct reg) can consist of many types: this consists of
- * normalised types from the original string form.
+ * normalised types from the original string form. For the time being,
+ * there's only an unsigned integer type.
*/
union regval {
unsigned u; /* unsigned integer */
@@ -76,9 +74,9 @@ void mandoc_msg(enum mandocerr, struct mparse *,
void mandoc_vmsg(enum mandocerr, struct mparse *,
int, int, const char *, ...);
int mandoc_special(char *);
-char *mandoc_strdup(const char *);
-char *mandoc_getarg(struct mparse *, char **, int, int *);
-char *mandoc_normdate(struct mparse *, char *, int, int);
+char *mandoc_strdup(const char *);
+char *mandoc_getarg(struct mparse *, char **, int, int *);
+char *mandoc_normdate(struct mparse *, char *, int, int);
int mandoc_eos(const char *, size_t, int);
int mandoc_hyph(const char *, const char *);
@@ -103,11 +101,10 @@ struct roff *roff_alloc(struct regset *, struct mparse *);
void roff_reset(struct roff *);
enum rofferr roff_parseln(struct roff *, int,
char **, size_t *, int, int *);
-void roff_endparse(struct roff *);
-
-const struct tbl_span *roff_span(const struct roff *);
-const struct eqn *roff_eqn(const struct roff *);
+void roff_endparse(struct roff *);
+const struct tbl_span *roff_span(const struct roff *);
+const struct eqn *roff_eqn(const struct roff *);
__END_DECLS