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.56 by root, Mon Feb 21 07:41:02 2011 UTC vs.
Revision 1.58 by sf-exg, Fri Sep 5 19:02:53 2014 UTC

8 * Copyright (c) 1998-2000 Geoff Wing <gcw@pobox.com> 8 * Copyright (c) 1998-2000 Geoff Wing <gcw@pobox.com>
9 * Copyright (c) 2003-2006 Marc Lehmann <schmorp@schmorp.de> 9 * Copyright (c) 2003-2006 Marc Lehmann <schmorp@schmorp.de>
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by 12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or 13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version. 14 * (at your option) any later version.
15 * 15 *
16 * This program is distributed in the hope that it will be useful, 16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
327 if (!p) 327 if (!p)
328 rxvt_fatal ("memory allocation failure. aborting.\n"); 328 rxvt_fatal ("memory allocation failure. aborting.\n");
329 329
330 return p; 330 return p;
331} 331}
332
333KeySym
334rxvt_XKeycodeToKeysym (Display *dpy, KeyCode code, int index)
335{
336 int size;
337 KeySym *mapping = XGetKeyboardMapping (dpy, code, 1, &size);
338 KeySym keysym = IN_RANGE_EXC (index, 0, size) ? mapping[index] : NoSymbol;
339 XFree (mapping);
340 return keysym;
341}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines