comparison src/buffer.c @ 474:a5fcf36ef512 v7.0127

updated for version 7.0127
author vimboss
date Wed, 10 Aug 2005 21:07:57 +0000
parents 7472c565592a
children 52e76e2b5b65
comparison
equal deleted inserted replaced
473:4a7320e53f32 474:a5fcf36ef512
3344 /* Find the first character that should be included. */ 3344 /* Find the first character that should be included. */
3345 n = 0; 3345 n = 0;
3346 while (l >= item[groupitem[groupdepth]].maxwid) 3346 while (l >= item[groupitem[groupdepth]].maxwid)
3347 { 3347 {
3348 l -= ptr2cells(t + n); 3348 l -= ptr2cells(t + n);
3349 n += (*mb_ptr2len_check)(t + n); 3349 n += (*mb_ptr2len)(t + n);
3350 } 3350 }
3351 } 3351 }
3352 else 3352 else
3353 #endif 3353 #endif
3354 n = (p - t) - item[groupitem[groupdepth]].maxwid + 1; 3354 n = (p - t) - item[groupitem[groupdepth]].maxwid + 1;
3706 while (l >= maxwid) 3706 while (l >= maxwid)
3707 #ifdef FEAT_MBYTE 3707 #ifdef FEAT_MBYTE
3708 if (has_mbyte) 3708 if (has_mbyte)
3709 { 3709 {
3710 l -= ptr2cells(t); 3710 l -= ptr2cells(t);
3711 t += (*mb_ptr2len_check)(t); 3711 t += (*mb_ptr2len)(t);
3712 } 3712 }
3713 else 3713 else
3714 #endif 3714 #endif
3715 l -= byte2cells(*t++); 3715 l -= byte2cells(*t++);
3716 if (p + 1 >= out + outlen) 3716 if (p + 1 >= out + outlen)
3834 for (;;) 3834 for (;;)
3835 { 3835 {
3836 width += ptr2cells(s); 3836 width += ptr2cells(s);
3837 if (width >= maxwidth) 3837 if (width >= maxwidth)
3838 break; 3838 break;
3839 s += (*mb_ptr2len_check)(s); 3839 s += (*mb_ptr2len)(s);
3840 } 3840 }
3841 /* Fill up for half a double-wide character. */ 3841 /* Fill up for half a double-wide character. */
3842 while (++width < maxwidth) 3842 while (++width < maxwidth)
3843 *s++ = fillchar; 3843 *s++ = fillchar;
3844 } 3844 }
3859 { 3859 {
3860 n = 0; 3860 n = 0;
3861 while (width >= maxwidth) 3861 while (width >= maxwidth)
3862 { 3862 {
3863 width -= ptr2cells(s + n); 3863 width -= ptr2cells(s + n);
3864 n += (*mb_ptr2len_check)(s + n); 3864 n += (*mb_ptr2len)(s + n);
3865 } 3865 }
3866 } 3866 }
3867 else 3867 else
3868 #endif 3868 #endif
3869 n = width - maxwidth + 1; 3869 n = width - maxwidth + 1;