]> git.cameronkatri.com Git - mandoc.git/blobdiff - out.c
Added mail archive periodically generated by hypermail.
[mandoc.git] / out.c
diff --git a/out.c b/out.c
index 423e22ceb3f2522f25798b905758415531f68d0b..20d4a9151312dc136a2d146b1dea791785a6c947 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.24 2010/08/16 09:37:58 kristaps Exp $ */
 /*
  * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
  *
 /*
  * 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);
        }
 
                return(0);
        }
 
+       /* FIXME: do this in the caller. */
        if ((dst->scale = atof(buf)) < 0)
                dst->scale = 0;
        dst->unit = unit;
        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;
                        break;
                }
                break;
+       case ('M'):
+               /* FALLTHROUGH */
+       case ('m'):
+               /* FALLTHROUGH */
        case ('*'):
        case ('*'):
-               *d = DECO_RESERVED;
+               if ('*' == c)
+                       *d = DECO_RESERVED;
+
                switch (wp[i++]) {
                case ('('):
                        lim = 2;
                switch (wp[i++]) {
                case ('('):
                        lim = 2;
@@ -233,11 +240,16 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
                        break;
                }
                break;
                        break;
                }
                break;
+       case ('h'):
+               /* FALLTHROUGH */
+       case ('v'):
+               /* FALLTHROUGH */
        case ('s'):
        case ('s'):
-               if ('+' == wp[i] || '-' == wp[i])
+               j = 0;
+               if ('+' == wp[i] || '-' == wp[i]) {
                        i++;
                        i++;
-
-               j = ('s' != wp[i - 1]);
+                       j = 1;
+               }
 
                switch (wp[i++]) {
                case ('('):
 
                switch (wp[i++]) {
                case ('('):
@@ -249,6 +261,9 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
                case ('\''):
                        term = '\'';
                        break;
                case ('\''):
                        term = '\'';
                        break;
+               case ('0'):
+                       j = 1;
+                       /* FALLTHROUGH */
                default:
                        i--;
                        lim = 1;
                default:
                        i--;
                        lim = 1;
@@ -256,13 +271,11 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
                }
 
                if ('+' == wp[i] || '-' == wp[i]) {
                }
 
                if ('+' == wp[i] || '-' == wp[i]) {
-                       if (j++)
+                       if (j)
                                return(i);
                        i++;
                } 
                
                                return(i);
                        i++;
                } 
                
-               if (0 == j)
-                       return(i);
                break;
        case ('['):
                *d = DECO_SPECIAL;
                break;
        case ('['):
                *d = DECO_SPECIAL;
@@ -272,7 +285,7 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
                *d = DECO_NOSPACE;
                return(i);
        default:
                *d = DECO_NOSPACE;
                return(i);
        default:
-               *d = DECO_SPECIAL;
+               *d = DECO_SSPECIAL;
                i--;
                lim = 1;
                break;
                i--;
                lim = 1;
                break;