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

Diff for /mandoc/tbl_data.c between version 1.58 and 1.59

version 1.58, 2021/09/10 12:07:21 version 1.59, 2021/09/10 13:24:38
Line 147  getdata(struct tbl_node *tbl, struct tbl_span *dp,
Line 147  getdata(struct tbl_node *tbl, struct tbl_span *dp,
                 dp->last->next = dat;                  dp->last->next = dat;
         dp->last = dat;          dp->last = dat;
   
           /* Strip leading and trailing spaces, if requested. */
   
           endpos = *pos;
           if (dp->opts->opts & TBL_OPT_NOSPACE) {
                   while (p[startpos] == ' ')
                           startpos++;
                   while (endpos > startpos && p[endpos - 1] == ' ')
                           endpos--;
           }
   
         /*          /*
          * Check for a continued-data scope opening.  This consists of a           * Check for a continued-data scope opening.  This consists of a
          * trailing `T{' at the end of the line.  Subsequent lines,           * trailing `T{' at the end of the line.  Subsequent lines,
          * until a standalone `T}', are included in our cell.           * until a standalone `T}', are included in our cell.
          */           */
   
         if (*pos - startpos == 2 &&          if (endpos - startpos == 2 &&
             p[startpos] == 'T' && p[startpos + 1] == '{') {              p[startpos] == 'T' && p[startpos + 1] == '{') {
                 tbl->part = TBL_PART_CDATA;                  tbl->part = TBL_PART_CDATA;
                 return;                  return;
         }          }
   
         endpos = *pos;  
         if (dp->opts->opts & TBL_OPT_NOSPACE) {  
                 while (p[startpos] == ' ')  
                         startpos++;  
                 while (endpos > startpos && p[endpos - 1] == ' ')  
                         endpos--;  
         }  
         dat->string = mandoc_strndup(p + startpos, endpos - startpos);          dat->string = mandoc_strndup(p + startpos, endpos - startpos);
   
         if (p[*pos] != '\0')          if (p[*pos] != '\0')

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

CVSweb