summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-07-25 18:05:55 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-07-25 18:05:55 +0000
commit2c7e21c9c6f035c407794c7a5c7f104993112ae9 (patch)
treec4b4a76dac0cea861453ea825cdd2a1a0476f6b3 /usr.bin/mandoc/mdoc.h
parentfce92b3e5f7a530f60b9a1d28e5efbd86d838887 (diff)
Sync to bsd.lv; in particular, pull in lots of bug fixes.
new features: * support the .in macro in man(7) * support minimal PDF output * support .Sm in mdoc(7) HTML output * support .Vb and .nf in man(7) HTML output * complete the mdoc(7) manual bug fixes: * do not let mdoc(7) .Pp produce a newline before/after .Sh; reported by jmc@ * avoid double blank lines related to man(7) .sp and .br * let man(7) .nf and .fi flush the line; reported by jsg@ and naddy@ * let "\ " produce a non-breaking space; reported by deraadt@ * discard \m colour escape sequences; reported by J.C. Roberts * map undefined 1-character-escapes to the literal character itself maintenance: * express mdoc(7) arguments in terms of an enum for additional type-safety * simplify mandoc_special() and a2roffdeco() * use strcspn in term_word() in place of a manual loop * minor optimisations in the -Tps and -Thtml formatting frontends
Diffstat (limited to 'usr.bin/mandoc/mdoc.h')
-rw-r--r--usr.bin/mandoc/mdoc.h63
1 files changed, 32 insertions, 31 deletions
diff --git a/usr.bin/mandoc/mdoc.h b/usr.bin/mandoc/mdoc.h
index 738db7976ef..7868408df2e 100644
--- a/usr.bin/mandoc/mdoc.h
+++ b/usr.bin/mandoc/mdoc.h
@@ -1,4 +1,4 @@
-/* $Id: mdoc.h,v 1.31 2010/07/13 01:09:13 schwarze Exp $ */
+/* $Id: mdoc.h,v 1.32 2010/07/25 18:05:54 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -155,35 +155,36 @@ enum mdoct {
/* What follows is a list of ALL possible macro arguments. */
-/* FIXME: make this into an enum. */
-#define MDOC_Split 0
-#define MDOC_Nosplit 1
-#define MDOC_Ragged 2
-#define MDOC_Unfilled 3
-#define MDOC_Literal 4
-#define MDOC_File 5
-#define MDOC_Offset 6
-#define MDOC_Bullet 7
-#define MDOC_Dash 8
-#define MDOC_Hyphen 9
-#define MDOC_Item 10
-#define MDOC_Enum 11
-#define MDOC_Tag 12
-#define MDOC_Diag 13
-#define MDOC_Hang 14
-#define MDOC_Ohang 15
-#define MDOC_Inset 16
-#define MDOC_Column 17
-#define MDOC_Width 18
-#define MDOC_Compact 19
-#define MDOC_Std 20
-#define MDOC_Filled 21
-#define MDOC_Words 22
-#define MDOC_Emphasis 23
-#define MDOC_Symbolic 24
-#define MDOC_Nested 25
-#define MDOC_Centred 26
-#define MDOC_ARG_MAX 27
+enum mdocargt {
+ MDOC_Split,
+ MDOC_Nosplit,
+ MDOC_Ragged,
+ MDOC_Unfilled,
+ MDOC_Literal,
+ MDOC_File,
+ MDOC_Offset,
+ MDOC_Bullet,
+ MDOC_Dash,
+ MDOC_Hyphen,
+ MDOC_Item,
+ MDOC_Enum,
+ MDOC_Tag,
+ MDOC_Diag,
+ MDOC_Hang,
+ MDOC_Ohang,
+ MDOC_Inset,
+ MDOC_Column,
+ MDOC_Width,
+ MDOC_Compact,
+ MDOC_Std,
+ MDOC_Filled,
+ MDOC_Words,
+ MDOC_Emphasis,
+ MDOC_Symbolic,
+ MDOC_Nested,
+ MDOC_Centred,
+ MDOC_ARG_MAX
+};
/* Type of a syntax node. */
enum mdoc_type {
@@ -236,7 +237,7 @@ struct mdoc_meta {
/* An argument to a macro (multiple values = `It -column'). */
struct mdoc_argv {
- int arg;
+ enum mdocargt arg;
int line;
int pos;
size_t sz;