diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-14 11:58:24 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-14 11:58:24 +0000 |
commit | 70cf8b9ba04f6b8b92ec395086271c6218e80d1b (patch) | |
tree | 82cc42296cceb5b8a39bdf090850a579aed986d4 /strings.c | |
parent | 29a6a3e523dc0b1673d87a68f8801d248cc7926d (diff) | |
download | mandoc-70cf8b9ba04f6b8b92ec395086271c6218e80d1b.tar.gz |
*** empty log message ***
Diffstat (limited to 'strings.c')
-rw-r--r-- | strings.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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 */ +} |