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

Diff for /mandoc/roff.c between version 1.274 and 1.275

version 1.274, 2015/08/29 21:37:20 version 1.275, 2015/08/29 23:56:01
Line 1484  roff_res(struct roff *r, struct buf *buf, int ln, int 
Line 1484  roff_res(struct roff *r, struct buf *buf, int ln, int 
 }  }
   
 /*  /*
  * Process text streams:   * Process text streams.
  * Convert all breakable hyphens into ASCII_HYPH.  
  * Decrement and spring input line trap.  
  */   */
 static enum rofferr  static enum rofferr
 roff_parsetext(struct buf *buf, int pos, int *offs)  roff_parsetext(struct buf *buf, int pos, int *offs)
Line 1497  roff_parsetext(struct buf *buf, int pos, int *offs)
Line 1495  roff_parsetext(struct buf *buf, int pos, int *offs)
         int              isz;          int              isz;
         enum mandoc_esc  esc;          enum mandoc_esc  esc;
   
           /* Spring the input line trap. */
   
           if (roffit_lines == 1) {
                   isz = mandoc_asprintf(&p, "%s\n.%s", buf->buf, roffit_macro);
                   free(buf->buf);
                   buf->buf = p;
                   buf->sz = isz + 1;
                   *offs = 0;
                   free(roffit_macro);
                   roffit_lines = 0;
                   return(ROFF_REPARSE);
           } else if (roffit_lines > 1)
                   --roffit_lines;
   
           /* Convert all breakable hyphens into ASCII_HYPH. */
   
         start = p = buf->buf + pos;          start = p = buf->buf + pos;
   
         while (*p != '\0') {          while (*p != '\0') {
Line 1525  roff_parsetext(struct buf *buf, int pos, int *offs)
Line 1539  roff_parsetext(struct buf *buf, int pos, int *offs)
                         *p = ASCII_HYPH;                          *p = ASCII_HYPH;
                 p++;                  p++;
         }          }
   
         /* Spring the input line trap. */  
         if (roffit_lines == 1) {  
                 isz = mandoc_asprintf(&p, "%s\n.%s", buf->buf, roffit_macro);  
                 free(buf->buf);  
                 buf->buf = p;  
                 buf->sz = isz + 1;  
                 *offs = 0;  
                 free(roffit_macro);  
                 roffit_lines = 0;  
                 return(ROFF_REPARSE);  
         } else if (roffit_lines > 1)  
                 --roffit_lines;  
         return(ROFF_CONT);          return(ROFF_CONT);
 }  }
   

Legend:
Removed from v.1.274  
changed lines
  Added in v.1.275

CVSweb