~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/xkb/XKBMisc.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
fee is hereby granted, provided that the above copyright
8
8
notice appear in all copies and that both that copyright
9
9
notice and this permission notice appear in supporting
10
 
documentation, and that the name of Silicon Graphics not be 
11
 
used in advertising or publicity pertaining to distribution 
 
10
documentation, and that the name of Silicon Graphics not be
 
11
used in advertising or publicity pertaining to distribution
12
12
of the software without specific prior written permission.
13
 
Silicon Graphics makes no representation about the suitability 
 
13
Silicon Graphics makes no representation about the suitability
14
14
of this software for any purpose. It is provided "as is"
15
15
without any express or implied warranty.
16
16
 
17
 
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
18
 
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
 
17
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
 
18
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19
19
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
20
 
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
21
 
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 
22
 
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 
 
20
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
 
21
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 
22
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
23
23
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
24
24
THE USE OR PERFORMANCE OF THIS SOFTWARE.
25
25
 
42
42
#include <X11/keysym.h>
43
43
#include "XKBlibint.h"
44
44
 
45
 
#else 
 
45
#else
46
46
 
47
47
#include <stdio.h>
48
48
#include <X11/X.h>
60
60
/***====================================================================***/
61
61
 
62
62
#define mapSize(m)      (sizeof(m)/sizeof(XkbKTMapEntryRec))
63
 
static  XkbKTMapEntryRec map2Level[]= { 
 
63
static  XkbKTMapEntryRec map2Level[]= {
64
64
  { True, ShiftMask, {1, ShiftMask, 0} }
65
65
};
66
66
 
67
 
static  XkbKTMapEntryRec mapAlpha[]= { 
 
67
static  XkbKTMapEntryRec mapAlpha[]= {
68
68
  { True, ShiftMask, { 1, ShiftMask, 0 } },
69
69
  { True, LockMask,  { 0,  LockMask, 0 } }
70
70
};
75
75
};
76
76
 
77
77
#define NL_VMOD_MASK    0
78
 
static  XkbKTMapEntryRec mapKeypad[]= { 
 
78
static  XkbKTMapEntryRec mapKeypad[]= {
79
79
        { True, ShiftMask, { 1, ShiftMask,            0 } },
80
80
        { False,        0, { 1,         0, NL_VMOD_MASK } }
81
81
};
82
82
 
83
83
static  XkbKeyTypeRec   canonicalTypes[XkbNumRequiredTypes] = {
84
 
        { { 0, 0, 0 }, 
 
84
        { { 0, 0, 0 },
85
85
          1,    /* num_levels */
86
86
          0,    /* map_count */
87
87
          NULL,         NULL,
88
88
          None,         NULL
89
89
        },
90
 
        { { ShiftMask, ShiftMask, 0 }, 
 
90
        { { ShiftMask, ShiftMask, 0 },
91
91
          2,    /* num_levels */
92
92
          mapSize(map2Level),   /* map_count */
93
93
          map2Level,    NULL,
94
94
          None,         NULL
95
95
        },
96
 
        { { ShiftMask|LockMask, ShiftMask|LockMask, 0 }, 
 
96
        { { ShiftMask|LockMask, ShiftMask|LockMask, 0 },
97
97
          2,                            /* num_levels */
98
98
          mapSize(mapAlpha),            /* map_count */
99
99
          mapAlpha,     preAlpha,
427
427
{
428
428
KeySym *                syms;
429
429
unsigned char           explicit,mods;
430
 
XkbSymInterpretPtr      *interps,ibuf[IBUF_SIZE]; 
 
430
XkbSymInterpretPtr      *interps,ibuf[IBUF_SIZE];
431
431
int                     n,nSyms,found;
432
432
unsigned                changed,tmp;
433
433