ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.104 by root, Mon Aug 7 22:28:18 2006 UTC vs.
Revision 1.105 by root, Mon Aug 21 15:11:46 2006 UTC

1122 CODE: 1122 CODE:
1123{ 1123{
1124 wchar_t *wstr = sv2wcs (str); 1124 wchar_t *wstr = sv2wcs (str);
1125 1125
1126 rxvt_push_locale (THIS->locale); 1126 rxvt_push_locale (THIS->locale);
1127 //TODO: use same algorithm as screen.C 1127 RETVAL = 0;
1128 RETVAL = wcswidth (wstr, wcslen (wstr)); 1128 for (wchar_t *wc = wstr; *wc; wc++)
1129 {
1130 int w = WCWIDTH (*wc);
1131
1132 if (w)
1133 RETVAL += min (w, 1);
1134 }
1129 rxvt_pop_locale (); 1135 rxvt_pop_locale ();
1130 1136
1131 free (wstr); 1137 free (wstr);
1132} 1138}
1133 OUTPUT: 1139 OUTPUT:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines