- Timestamp:
- Jun 7, 2003, 12:09:47 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- b2b0773
- Parents:
- dafd919
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fmtext.c
r5789230 rd559df9 457 457 } 458 458 459 459 460 /* the first column is column 0 */ 461 /* the message is expected to end in a new line for now */ 460 462 void owl_fmtext_truncate_cols(owl_fmtext *in, int acol, int bcol, owl_fmtext *out) 461 463 { 462 464 char *ptr1, *ptr2, *last; 463 465 int len, offset; 464 465 /* the first column is column 0 */466 467 /* the message is expected to end in a new line for now */468 466 469 467 last=in->textbuff+in->textlen-1; … … 485 483 len=bcol-acol; 486 484 if (len > (ptr2-(ptr1+acol))) { 485 /* the whole line fits with room to spare, don't take a full 'len' */ 487 486 len=ptr2-(ptr1+acol); 488 487 } 489 488 if (len>last-ptr1) { 489 /* the whole rest of the text fits with room to spare, adjust for it */ 490 490 len-=(last-ptr1); 491 491 } 492 492 if (len<=0) { 493 /* saftey check */ 493 494 owl_fmtext_append_normal(out, "\n"); 494 495 ptr1=ptr2+1;
Note: See TracChangeset
for help on using the changeset viewer.