From 70cf8b9ba04f6b8b92ec395086271c6218e80d1b Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 14 Jan 2009 11:58:24 +0000 Subject: *** empty log message *** --- strings.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'strings.c') 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 */ +} -- cgit