]> git.cameronkatri.com Git - mandoc.git/blobdiff - mandoc.c
`Ad' is supposed to underline. Found whilst trolling through manuals.
[mandoc.git] / mandoc.c
index c001b637897af4e9fb67b9c896677c0046f56f12..f63d7864df364b48a3c35fa0a60d1113789aa6f1 100644 (file)
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/*     $Id: mandoc.c,v 1.24 2010/07/18 22:55:06 kristaps Exp $ */
+/*     $Id: mandoc.c,v 1.27 2010/07/25 19:05:59 joerg Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -109,6 +109,9 @@ mandoc_special(char *p)
                case ('\''):
                        term = '\'';
                        break;
+               case ('0'):
+                       i++;
+                       /* FALLTHROUGH */
                default:
                        len = 1;
                        p--;
@@ -314,7 +317,7 @@ mandoc_eos(const char *p, size_t sz, int enclosed)
         */
 
        found = 0;
-       for (q = p + sz - 1; q >= p; q--) {
+       for (q = p + (int)sz - 1; q >= p; q--) {
                switch (*q) {
                case ('\"'):
                        /* FALLTHROUGH */
@@ -334,7 +337,7 @@ mandoc_eos(const char *p, size_t sz, int enclosed)
                        found = 1;
                        break;
                default:
-                       return(found && (!enclosed || isalnum(*q)));
+                       return(found && (!enclosed || isalnum((unsigned char)*q)));
                }
        }