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

Comparing rxvt-unicode/src/misc.C (file contents):
Revision 1.50 by ayin, Tue Dec 18 01:36:24 2007 UTC vs.
Revision 1.52 by root, Sat Apr 26 03:37:18 2008 UTC

38 while (len--) 38 while (len--)
39 { 39 {
40 ssize_t l = wcrtomb (dst, *str++, mbs); 40 ssize_t l = wcrtomb (dst, *str++, mbs);
41 41
42 if (l < 0) 42 if (l < 0)
43 {
43 *dst++ = '?'; 44 *dst++ = '?';
45 wcrtomb (0, 0, mbs); // reset undefined state
46 }
44 else 47 else
45 dst += l; 48 dst += l;
46 } 49 }
47 50
48 *dst++ = 0; 51 *dst++ = 0;
285 for (l = 0, t = s; l < n; l++) 288 for (l = 0, t = s; l < n; l++)
286 { 289 {
287 for ( ; *t && *t != ','; t++) ; 290 for ( ; *t && *t != ','; t++) ;
288 p = t - s; 291 p = t - s;
289 ret[l] = (char *)malloc (p + 1); 292 ret[l] = (char *)malloc (p + 1);
290 strncpy (ret[l], s, p); 293 memcpy (ret[l], s, p);
291 ret[l][p] = '\0'; 294 ret[l][p] = '\0';
292 rxvt_strtrim (ret[l]); 295 rxvt_strtrim (ret[l]);
293 s = ++t; 296 s = ++t;
294 } 297 }
295 298

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines