[BACK]Return to mandoc.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mandoc.c between version 1.58 and 1.60

version 1.58, 2011/07/27 07:32:26 version 1.60, 2011/10/24 20:30:57
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
Line 161  mandoc_escape(const char **end, const char **start, in
Line 161  mandoc_escape(const char **end, const char **start, in
         case ('V'):          case ('V'):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case ('Y'):          case ('Y'):
                 if (ESCAPE_ERROR == gly)                  gly = ESCAPE_IGNORE;
                         gly = ESCAPE_IGNORE;  
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case ('f'):          case ('f'):
                 if (ESCAPE_ERROR == gly)                  if (ESCAPE_ERROR == gly)
Line 222  mandoc_escape(const char **end, const char **start, in
Line 221  mandoc_escape(const char **end, const char **start, in
         case ('L'):          case ('L'):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case ('l'):          case ('l'):
                   gly = ESCAPE_NUMBERED;
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case ('N'):  
                 if (ESCAPE_ERROR == gly)  
                         gly = ESCAPE_NUMBERED;  
                 /* FALLTHROUGH */  
         case ('S'):          case ('S'):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case ('v'):          case ('v'):
Line 240  mandoc_escape(const char **end, const char **start, in
Line 236  mandoc_escape(const char **end, const char **start, in
                         return(ESCAPE_ERROR);                          return(ESCAPE_ERROR);
                 term = numeric = '\'';                  term = numeric = '\'';
                 break;                  break;
   
           /*
            * Special handling for the numbered character escape.
            * XXX Do any other escapes need similar handling?
            */
           case ('N'):
                   if ('\0' == cp[i])
                           return(ESCAPE_ERROR);
                   *end = &cp[++i];
                   if (isdigit((unsigned char)cp[i-1]))
                           return(ESCAPE_IGNORE);
                   while (isdigit((unsigned char)**end))
                           (*end)++;
                   if (start)
                           *start = &cp[i];
                   if (sz)
                           *sz = *end - &cp[i];
                   if ('\0' != **end)
                           (*end)++;
                   return(ESCAPE_NUMBERED);
   
         /*          /*
          * Sizes get a special category of their own.           * Sizes get a special category of their own.

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.60

CVSweb