]> git.cameronkatri.com Git - mandoc.git/commitdiff
Added support for traditional `Ds' width.
authorKristaps Dzonsons <kristaps@bsd.lv>
Sat, 28 Feb 2009 14:40:07 +0000 (14:40 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Sat, 28 Feb 2009 14:40:07 +0000 (14:40 +0000)
action.c
validate.c

index 583079071270433917ec62a1df58293de3fa62d7..0e7e87baf8522f7a97afb620437041892aa672a2 100644 (file)
--- a/action.c
+++ b/action.c
@@ -1,4 +1,4 @@
-/* $Id: action.c,v 1.23 2009/02/28 13:47:36 kristaps Exp $ */
+/* $Id: action.c,v 1.24 2009/02/28 14:40:07 kristaps Exp $ */
 /*
  * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -392,10 +392,11 @@ post_bl_width(struct mdoc *mdoc)
         * the macro's width as set in share/tmac/mdoc/doc-common.
         */
 
-       if (MDOC_MAX == (tok = mdoc_find(mdoc, *p)))
+       if (xstrcmp(*p, "Ds"))
+               width = 6;
+       else if (MDOC_MAX == (tok = mdoc_find(mdoc, *p)))
                return(1);
-
-       if (0 == (width = mdoc_macro2len(tok))) 
+       else if (0 == (width = mdoc_macro2len(tok))) 
                return(mdoc_warn(mdoc, WARN_SYNTAX,
                                        "-%s macro has no length", 
                                        mdoc_argnames[MDOC_Width]));
index 5673e094ad517367f032c57d3f8b19a63e065ac9..0189cee304f804a7c2a845f03a4d3bf7961740c4 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: validate.c,v 1.64 2009/02/28 13:47:36 kristaps Exp $ */
+/* $Id: validate.c,v 1.65 2009/02/28 14:40:07 kristaps Exp $ */
 /*
  * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -491,8 +491,8 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p)
                        p += (int)c - 1;
                        continue;
                }
-               return(mdoc_perr(mdoc, line, pos,
-                                       "invalid escape sequence"));
+               return(mdoc_perr(mdoc, line, pos, 
+                               "invalid escape sequence"));
        }
 
        return(1);