[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.146 and 1.147

version 1.146, 2015/08/29 21:37:11 version 1.147, 2015/08/29 23:55:53
Line 1482 
Line 1482 
 }  }
   
 /*  /*
  * 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 1495 
Line 1493 
         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 1523 
Line 1537 
                         *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.146  
changed lines
  Added in v.1.147