diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-12-08 12:46:28 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-12-08 12:46:28 +0000 |
commit | 590484168e25f0faf46db9b6df44c27b50ffeb50 (patch) | |
tree | 2710f24f8b76175801d4fb7b79499f2425c13e0d /literals.c | |
parent | 1dc52a2bad8738c62ac5bc9689c09600eb7b1269 (diff) | |
download | mandoc-590484168e25f0faf46db9b6df44c27b50ffeb50.tar.gz |
Added warnings for using macros in the wrong sections.
Diffstat (limited to 'literals.c')
-rw-r--r-- | literals.c | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -26,6 +26,46 @@ char * +ml_section(enum roffmsec sec) +{ + + switch (sec) { + case(ROFF_MSEC_1): + return("1"); + case(ROFF_MSEC_2): + return("2"); + case(ROFF_MSEC_3): + return("3"); + case(ROFF_MSEC_3p): + return("3p"); + case(ROFF_MSEC_4): + return("4"); + case(ROFF_MSEC_5): + return("5"); + case(ROFF_MSEC_6): + return("6"); + case(ROFF_MSEC_7): + return("7"); + case(ROFF_MSEC_8): + return("8"); + case(ROFF_MSEC_9): + return("9"); + case(ROFF_MSEC_UNASS): + return("unass"); + case(ROFF_MSEC_DRAFT): + return("draft"); + case(ROFF_MSEC_PAPER): + return("paper"); + default: + break; + } + + abort(); + /* NOTREACHED */ +} + + +char * ml_literal(int tok, const int *argc, const char **argv, const char **morep) { |