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

Diff for /mandoc/roff.c between version 1.396 and 1.397

version 1.396, 2023/04/28 19:11:04 version 1.397, 2023/10/21 17:10:18
Line 1387  roff_expand(struct roff *r, struct buf *buf, int ln, i
Line 1387  roff_expand(struct roff *r, struct buf *buf, int ln, i
                  */                   */
   
                 if (buf->buf[pos] != ec) {                  if (buf->buf[pos] != ec) {
                         if (ec != ASCII_ESC && buf->buf[pos] == '\\') {                          if (buf->buf[pos] == '\\') {
                                 roff_expand_patch(buf, pos, "\\e", pos + 1);                                  roff_expand_patch(buf, pos, "\\e", pos + 1);
                                 pos++;                                  pos++;
                         }                          }
Line 1632  roff_getarg(struct roff *r, char **cpp, int ln, int *p
Line 1632  roff_getarg(struct roff *r, char **cpp, int ln, int *p
                                 cp++;                                  cp++;
                                 break;                                  break;
                         case '\\':                          case '\\':
                                 /*                                  cp[-pairs] = '\\';
                                  * Signal to roff_expand() that an escape  
                                  * sequence resulted from copy-in processing  
                                  * and needs to be checked or interpolated.  
                                  */  
                                 cp[-pairs] = ASCII_ESC;  
                                 newesc = 1;                                  newesc = 1;
                                 pairs++;                                  pairs++;
                                 cp++;                                  cp++;
Line 1694  roff_getarg(struct roff *r, char **cpp, int ln, int *p
Line 1689  roff_getarg(struct roff *r, char **cpp, int ln, int *p
         buf.buf = start;          buf.buf = start;
         buf.sz = strlen(start) + 1;          buf.sz = strlen(start) + 1;
         buf.next = NULL;          buf.next = NULL;
         if (roff_expand(r, &buf, ln, 0, ASCII_ESC) & ROFF_IGN) {          if (roff_expand(r, &buf, ln, 0, '\\') & ROFF_IGN) {
                 free(buf.buf);                  free(buf.buf);
                 buf.buf = mandoc_strdup("");                  buf.buf = mandoc_strdup("");
         }          }

Legend:
Removed from v.1.396  
changed lines
  Added in v.1.397

CVSweb