[BACK]Return to roff.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/roff.c between version 1.214 and 1.215

version 1.214, 2018/10/25 01:21:30 version 1.215, 2018/11/26 17:44:29
Line 2105 
Line 2105 
         if (ep[0] == '\\' && ep[1] == '}')          if (ep[0] == '\\' && ep[1] == '}')
                 rr = 0;                  rr = 0;
   
         /* Always check for the closing delimiter `\}'. */          /*
            * The closing delimiter `\}' rewinds the conditional scope
            * but is otherwise ignored when interpreting the line.
            */
   
         while ((ep = strchr(ep, '\\')) != NULL) {          while ((ep = strchr(ep, '\\')) != NULL) {
                 switch (ep[1]) {                  switch (ep[1]) {
Line 2148 
Line 2151 
         if (roffnode_cleanscope(r))          if (roffnode_cleanscope(r))
                 irc |= endloop;                  irc |= endloop;
   
           /*
            * If `\}' occurs on a text line with neither preceding
            * nor following characters, drop the line completely.
            */
   
         ep = buf->buf + pos;          ep = buf->buf + pos;
           if (strcmp(ep, "\\}") == 0)
                   rr = 0;
   
           /*
            * The closing delimiter `\}' rewinds the conditional scope
            * but is otherwise ignored when interpreting the line.
            */
   
         while ((ep = strchr(ep, '\\')) != NULL) {          while ((ep = strchr(ep, '\\')) != NULL) {
                 if (*(++ep) == '}') {                  switch (ep[1]) {
                         *ep = '&';                  case '}':
                         if (roff_ccond(r, ln, ep - buf->buf - 1))                          memmove(ep, ep + 2, strlen(ep + 2) + 1);
                           if (roff_ccond(r, ln, ep - buf->buf))
                                 irc |= endloop;                                  irc |= endloop;
                 }                          break;
                 if (*ep != '\0')                  case '\0':
                         ++ep;                          ++ep;
                           break;
                   default:
                           ep += 2;
                           break;
                   }
         }          }
         if (rr)          if (rr)
                 irc |= ROFF_CONT;                  irc |= ROFF_CONT;

Legend:
Removed from v.1.214  
changed lines
  Added in v.1.215