- Timestamp:
- Jan 7, 2009, 5:28:19 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 50f8932
- Parents:
- e2a620b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fmtext.c
r2aaca94 rdb1af5f 169 169 170 170 /* Internal function. Append text from 'in' between index 'start' and 171 * 'stop' to the end of 'f' 171 * 'stop', inclusive, to the end of 'f'. This function works with 172 * bytes. 172 173 */ 173 174 void _owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in, int start, int stop) /*noproto*/ … … 474 475 _owl_fmtext_append_fmtext(out, in, ptr_s - in->textbuff, ptr_c - in->textbuff); 475 476 } 477 else if (chwidth > 1) { 478 /* Last char is wide, truncate. */ 479 _owl_fmtext_append_fmtext(out, in, ptr_s - in->textbuff, ptr_c - in->textbuff - 1); 480 owl_fmtext_append_normal(out, "\n"); 481 } 476 482 else { 477 if (chwidth > 1) { 478 /* Last char is wide, truncate. */ 479 _owl_fmtext_append_fmtext(out, in, ptr_s - in->textbuff, ptr_c - in->textbuff - 1); 480 owl_fmtext_append_normal(out, "\n"); 481 } 482 else { 483 /* Last char fits perfectly, leave alone.*/ 484 _owl_fmtext_append_fmtext(out, in, ptr_s - in->textbuff, ptr_c - in->textbuff); 485 } 483 /* Last char fits perfectly, We skip to the next char and back 484 * up a byte to make sure we get it all. 485 */ 486 ptr_c = g_utf8_next_char(ptr_c); 487 _owl_fmtext_append_fmtext(out, in, ptr_s - in->textbuff, ptr_c - in->textbuff - 1); 486 488 } 487 489 }
Note: See TracChangeset
for help on using the changeset viewer.