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

Diff for /mandoc/roff.c between version 1.342 and 1.343

version 1.342, 2018/10/25 01:32:40 version 1.343, 2018/11/26 17:44:34
Line 2107  roff_cond_sub(ROFF_ARGS)
Line 2107  roff_cond_sub(ROFF_ARGS)
         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 2150  roff_cond_text(ROFF_ARGS)
Line 2153  roff_cond_text(ROFF_ARGS)
         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.342  
changed lines
  Added in v.1.343

CVSweb