From 590484168e25f0faf46db9b6df44c27b50ffeb50 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 8 Dec 2008 12:46:28 +0000 Subject: Added warnings for using macros in the wrong sections. --- literals.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'literals.c') diff --git a/literals.c b/literals.c index 71059cfb..d132c7ea 100644 --- a/literals.c +++ b/literals.c @@ -25,6 +25,46 @@ #include "ml.h" +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) -- cgit