aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_strings.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-17 09:22:39 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-17 09:22:39 +0000
commita689df0aa61055b688017fe251c1440d1b82ea09 (patch)
tree1f6daf38d574c1132ad5827ec38864d6490d43ba /mdoc_strings.c
parentc951da7ef21e3e87c07a7d4b730990bef506f6d4 (diff)
downloadmandoc-a689df0aa61055b688017fe251c1440d1b82ea09.tar.gz
mandoc-a689df0aa61055b688017fe251c1440d1b82ea09.tar.zst
mandoc-a689df0aa61055b688017fe251c1440d1b82ea09.zip
Move mdoc_str2sec() into mdoc_validate.c as a2sec(), as that's the only
place that it's being used.
Diffstat (limited to 'mdoc_strings.c')
-rw-r--r--mdoc_strings.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/mdoc_strings.c b/mdoc_strings.c
index dae31f2e..96f33fa2 100644
--- a/mdoc_strings.c
+++ b/mdoc_strings.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_strings.c,v 1.26 2011/03/17 09:16:38 kristaps Exp $ */
+/* $Id: mdoc_strings.c,v 1.27 2011/03/17 09:22:39 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -29,44 +29,6 @@
#include "mandoc.h"
#include "libmdoc.h"
-static const char * const secnames[SEC__MAX] = {
- NULL,
- "NAME",
- "LIBRARY",
- "SYNOPSIS",
- "DESCRIPTION",
- "IMPLEMENTATION NOTES",
- "RETURN VALUES",
- "ENVIRONMENT",
- "FILES",
- "EXIT STATUS",
- "EXAMPLES",
- "DIAGNOSTICS",
- "COMPATIBILITY",
- "ERRORS",
- "SEE ALSO",
- "STANDARDS",
- "HISTORY",
- "AUTHORS",
- "CAVEATS",
- "BUGS",
- "SECURITY CONSIDERATIONS",
- NULL
-};
-
-enum mdoc_sec
-mdoc_str2sec(const char *p)
-{
- int i;
-
- for (i = 0; i < (int)SEC__MAX; i++)
- if (secnames[i] && 0 == strcmp(p, secnames[i]))
- return((enum mdoc_sec)i);
-
- return(SEC_CUSTOM);
-}
-
-
/* FIXME: move this into an editable .in file. */
size_t
mdoc_macro2len(enum mdoct macro)