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

Comparing rxvt-unicode/src/rxvtcolor.C (file contents):
Revision 1.11 by pcg, Tue Mar 30 14:45:13 2004 UTC vs.
Revision 1.12 by pcg, Fri Apr 2 20:41:01 2004 UTC

254 selection_owner = owner; 254 selection_owner = owner;
255} 255}
256 256
257rxvt_xim *rxvt_display::get_xim (const char *locale, const char *modifiers) 257rxvt_xim *rxvt_display::get_xim (const char *locale, const char *modifiers)
258{ 258{
259 // asprintf is a GNU and *BSD extension.. sorry...
260 char *id; 259 char *id;
260 int l, m;
261 261
262 if (asprintf (&id, "%s\n%s", locale, modifiers) < 0) 262 l = strlen (locale);
263 m = strlen (modifiers);
264
265 if (!(id = (char *)malloc (l + m + 2)))
263 return 0; 266 return 0;
267
268 memcpy (id, locale, l); id[l] = '\n';
269 memcpy (id + l + 1, modifiers, m); id[l + m + 1] = 0;
264 270
265 rxvt_xim *xim = xims.get (id); 271 rxvt_xim *xim = xims.get (id);
266 272
267 free (id); 273 free (id);
268 274

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines