]> git.cameronkatri.com Git - mandoc.git/blobdiff - out.c
Correctly make quotes around `Lk' link-name argument. Noted by Aldis
[mandoc.git] / out.c
diff --git a/out.c b/out.c
index 423e22ceb3f2522f25798b905758415531f68d0b..93f70add07744abfff4f7e27d286f248ae50b86f 100644 (file)
--- a/out.c
+++ b/out.c
@@ -1,4 +1,4 @@
-/*     $Id: out.c,v 1.18 2010/07/18 22:55:06 kristaps Exp $ */
+/*     $Id: out.c,v 1.23 2010/07/22 23:03:15 kristaps Exp $ */
 /*
  * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -116,6 +116,7 @@ a2roffsu(const char *src, struct roffsu *dst, enum roffscale def)
                return(0);
        }
 
+       /* FIXME: do this in the caller. */
        if ((dst->scale = atof(buf)) < 0)
                dst->scale = 0;
        dst->unit = unit;
@@ -218,8 +219,14 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
                        break;
                }
                break;
+       case ('M'):
+               /* FALLTHROUGH */
+       case ('m'):
+               /* FALLTHROUGH */
        case ('*'):
-               *d = DECO_RESERVED;
+               if ('*' == c)
+                       *d = DECO_RESERVED;
+
                switch (wp[i++]) {
                case ('('):
                        lim = 2;
@@ -249,6 +256,9 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
                case ('\''):
                        term = '\'';
                        break;
+               case ('0'):
+                       j++;
+                       /* FALLTHROUGH */
                default:
                        i--;
                        lim = 1;
@@ -272,7 +282,7 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
                *d = DECO_NOSPACE;
                return(i);
        default:
-               *d = DECO_SPECIAL;
+               *d = DECO_SSPECIAL;
                i--;
                lim = 1;
                break;