summaryrefslogtreecommitdiffstats
path: root/literals.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-12-08 12:46:28 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-12-08 12:46:28 +0000
commit590484168e25f0faf46db9b6df44c27b50ffeb50 (patch)
tree2710f24f8b76175801d4fb7b79499f2425c13e0d /literals.c
parent1dc52a2bad8738c62ac5bc9689c09600eb7b1269 (diff)
downloadmandoc-590484168e25f0faf46db9b6df44c27b50ffeb50.tar.gz
Added warnings for using macros in the wrong sections.
Diffstat (limited to 'literals.c')
-rw-r--r--literals.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/literals.c b/literals.c
index 71059cfb..d132c7ea 100644
--- a/literals.c
+++ b/literals.c
@@ -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)
{