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

Diff for /mandoc/mdoc_validate.c between version 1.381 and 1.382

version 1.381, 2020/04/01 20:21:08 version 1.382, 2020/04/02 15:04:36
Line 2164  post_rs(POST_ARGS)
Line 2164  post_rs(POST_ARGS)
 static void  static void
 post_hyph(POST_ARGS)  post_hyph(POST_ARGS)
 {  {
         struct roff_node        *nch;          struct roff_node        *n, *nch;
         char                    *cp;          char                    *cp;
   
         for (nch = mdoc->last->child; nch != NULL; nch = nch->next) {          n = mdoc->last;
           for (nch = n->child; nch != NULL; nch = nch->next) {
                 if (nch->type != ROFFT_TEXT)                  if (nch->type != ROFFT_TEXT)
                         continue;                          continue;
                 cp = nch->string;                  cp = nch->string;
Line 2176  post_hyph(POST_ARGS)
Line 2177  post_hyph(POST_ARGS)
                 while (*(++cp) != '\0')                  while (*(++cp) != '\0')
                         if (*cp == '-' &&                          if (*cp == '-' &&
                             isalpha((unsigned char)cp[-1]) &&                              isalpha((unsigned char)cp[-1]) &&
                             isalpha((unsigned char)cp[1]))                              isalpha((unsigned char)cp[1])) {
                                   if (n->string == NULL && n->flags & NODE_ID)
                                           n->string = mandoc_strdup(nch->string);
                                 *cp = ASCII_HYPH;                                  *cp = ASCII_HYPH;
                           }
         }          }
 }  }
   

Legend:
Removed from v.1.381  
changed lines
  Added in v.1.382

CVSweb