]> git.cameronkatri.com Git - mandoc.git/blobdiff - mandoc.c
Get ready for a version.
[mandoc.git] / mandoc.c
index 9fdf9f98d300d63f97291b44b1e52536bb3bd6ab..604bb67e6ae480b8c736a3658fd667207b0c4b9b 100644 (file)
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/*     $Id: mandoc.c,v 1.60 2011/10/24 20:30:57 schwarze Exp $ */
+/*     $Id: mandoc.c,v 1.62 2011/12/03 16:08:51 schwarze Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -369,8 +369,15 @@ out:
 
        switch (gly) {
        case (ESCAPE_FONT):
-               if (1 != rlim)
+               /*
+                * Pretend that the constant-width font modes are the
+                * same as the regular font modes.
+                */
+               if (2 == rlim && 'C' == *rstart)
+                       rstart++;
+               else if (1 != rlim)
                        break;
+
                switch (*rstart) {
                case ('3'):
                        /* FALLTHROUGH */
@@ -616,9 +623,10 @@ mandoc_normdate(struct mparse *parse, char *in, int ln, int pos)
                mandoc_msg(MANDOCERR_NODATE, parse, ln, pos, NULL);
                time(&t);
        }
+       else if (a2time(&t, "%Y-%m-%d", in))
+               t = 0;
        else if (!a2time(&t, "$" "Mdocdate: %b %d %Y $", in) &&
-           !a2time(&t, "%b %d, %Y", in) &&
-           !a2time(&t, "%Y-%m-%d", in)) {
+           !a2time(&t, "%b %d, %Y", in)) {
                mandoc_msg(MANDOCERR_BADDATE, parse, ln, pos, NULL);
                t = 0;
        }