Print this page
9718 update mandoc to 1.14.4

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mandoc/mdoc.c
          +++ new/usr/src/cmd/mandoc/mdoc.c
   1      -/*      $Id: mdoc.c,v 1.267 2017/06/17 13:06:16 schwarze Exp $ */
        1 +/*      $Id: mdoc.c,v 1.268 2017/08/11 16:56:21 schwarze Exp $ */
   2    2  /*
   3    3   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
   4    4   * Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
   5    5   *
   6    6   * Permission to use, copy, modify, and distribute this software for any
   7    7   * purpose with or without fee is hereby granted, provided that the above
   8    8   * copyright notice and this permission notice appear in all copies.
   9    9   *
  10   10   * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
  11   11   * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
↓ open down ↓ 278 lines elided ↑ open up ↑
 290  290  
 291  291          if (mandoc_eos(buf+offs, (size_t)(end-buf-offs)))
 292  292                  mdoc->last->flags |= NODE_EOS;
 293  293  
 294  294          for (c = buf + offs; c != NULL; c = strchr(c + 1, '.')) {
 295  295                  if (c - buf < offs + 2)
 296  296                          continue;
 297  297                  if (end - c < 3)
 298  298                          break;
 299  299                  if (c[1] != ' ' ||
 300      -                    isalpha((unsigned char)c[-2]) == 0 ||
 301      -                    isalpha((unsigned char)c[-1]) == 0 ||
      300 +                    isalnum((unsigned char)c[-2]) == 0 ||
      301 +                    isalnum((unsigned char)c[-1]) == 0 ||
 302  302                      (c[-2] == 'n' && c[-1] == 'c') ||
 303  303                      (c[-2] == 'v' && c[-1] == 's'))
 304  304                          continue;
 305  305                  c += 2;
 306  306                  if (*c == ' ')
 307  307                          c++;
 308  308                  if (*c == ' ')
 309  309                          c++;
 310  310                  if (isupper((unsigned char)(*c)))
 311  311                          mandoc_msg(MANDOCERR_EOS, mdoc->parse,
↓ open down ↓ 148 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX