summaryrefslogtreecommitdiffstats
path: root/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/strings.c b/strings.c
index 0a30ecfe..28d29aba 100644
--- a/strings.c
+++ b/strings.c
@@ -307,3 +307,30 @@ mdoc_atoatt(const char *p)
return(ATT_DEFAULT);
}
+
+
+char *
+mdoc_type2a(enum mdoc_type type)
+{
+ switch (type) {
+ case (MDOC_ROOT):
+ return("root");
+ case (MDOC_BLOCK):
+ return("block");
+ case (MDOC_HEAD):
+ return("block-head");
+ case (MDOC_BODY):
+ return("block-body");
+ case (MDOC_TAIL):
+ return("block-tail");
+ case (MDOC_ELEM):
+ return("elem");
+ case (MDOC_TEXT):
+ return("text");
+ default:
+ break;
+ }
+
+ abort();
+ /* NOTREACHED */
+}