diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-17 09:22:39 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-17 09:22:39 +0000 |
commit | 0583916dc21aa81e3e794e0475fbcf58b45833fc (patch) | |
tree | 5410a515b6abfa173ec2bd3e585ea346fe455524 /mdoc_strings.c | |
parent | 8efc30176986c7bf8c728cecbe5daafe5657732b (diff) | |
download | mandoc-0583916dc21aa81e3e794e0475fbcf58b45833fc.tar.gz |
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.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/mdoc_strings.c b/mdoc_strings.c index 8f2dddbc..6745e36a 100644 --- a/mdoc_strings.c +++ b/mdoc_strings.c @@ -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) |