summaryrefslogtreecommitdiffstats
path: root/strings.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-14 11:58:24 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-14 11:58:24 +0000
commit70cf8b9ba04f6b8b92ec395086271c6218e80d1b (patch)
tree82cc42296cceb5b8a39bdf090850a579aed986d4 /strings.c
parent29a6a3e523dc0b1673d87a68f8801d248cc7926d (diff)
downloadmandoc-70cf8b9ba04f6b8b92ec395086271c6218e80d1b.tar.gz
*** empty log message ***
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 */
+}