Remove some more useless stuff Some unused defines and geometry-removal leftovers (specifically the file geom.c and the struct for the keyboard coordinates). Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
diff --git a/src/XKBcommonint.h b/src/XKBcommonint.h
index b26b56f..3205a01 100644
--- a/src/XKBcommonint.h
+++ b/src/XKBcommonint.h
@@ -137,9 +137,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XkmKeymapOptional ((XkmSemanticsOptional|XkmLayoutOptional)&(~XkmKeymapRequired))
#define XkmKeymapLegal (XkmKeymapRequired|XkmKeymapOptional)
-#define XkmLegalSection(m) (((m)&(~XkmKeymapLegal))==0)
-#define XkmSingleSection(m) (XkmLegalSection(m)&&(((m)&(~(m)+1))==(m)))
-
extern unsigned int xkb_key_get_group(struct xkb_state *state,
xkb_keycode_t key);
extern unsigned int xkb_key_get_level(struct xkb_state *state,
diff --git a/src/geom.c b/src/geom.c
deleted file mode 100644
index 6985a5f..0000000
--- a/src/geom.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <limits.h>
-#include "xkbgeom.h"
-#include "xkbcommon/xkbcommon.h"
-#include "XKBcommonint.h"
-
-static void
-_XkbCheckBounds(struct xkb_bounds * bounds, int x, int y)
-{
- if (x < bounds->x1)
- bounds->x1 = x;
- if (x > bounds->x2)
- bounds->x2 = x;
- if (y < bounds->y1)
- bounds->y1 = y;
- if (y > bounds->y2)
- bounds->y2 = y;
-}
-
-Bool
-XkbcComputeShapeBounds(struct xkb_shape * shape)
-{
- int o, p;
- struct xkb_outline * outline;
- struct xkb_point * pt;
-
- if ((!shape) || (shape->num_outlines < 1))
- return False;
-
- shape->bounds.x1 = shape->bounds.y1 = SHRT_MAX;
- shape->bounds.x2 = shape->bounds.y2 = SHRT_MIN;
-
- for (outline = shape->outlines, o = 0; o < shape->num_outlines;
- o++, outline++)
- {
- for (pt = outline->points, p = 0; p < outline->num_points; p++, pt++)
- _XkbCheckBounds(&shape->bounds, pt->x, pt->y);
- if (outline->num_points < 2)
- _XkbCheckBounds(&shape->bounds, 0, 0);
- }
- return True;
-}
-
-static Bool
-XkbcComputeRowBounds(struct xkb_geometry * geom, struct xkb_section * section, struct xkb_row * row)
-{
- int k, pos;
- struct xkb_key * key;
- struct xkb_bounds *bounds, *sbounds;
-
- if (!geom || !section || !row)
- return False;
-
- bounds = &row->bounds;
- memset(bounds, 0, sizeof(struct xkb_bounds));
-
- for (key = row->keys, pos = k = 0; k < row->num_keys; k++, key++) {
- sbounds = &XkbKeyShape(geom, key)->bounds;
- _XkbCheckBounds(bounds, pos, 0);
-
- if (!row->vertical) {
- if (key->gap != 0) {
- pos += key->gap;
- _XkbCheckBounds(bounds, pos, 0);
- }
- _XkbCheckBounds(bounds, pos + sbounds->x1, sbounds->y1);
- _XkbCheckBounds(bounds, pos + sbounds->x2, sbounds->y2);
- pos += sbounds->x2;
- }
- else {
- if (key->gap != 0) {
- pos += key->gap;
- _XkbCheckBounds(bounds, 0, pos);
- }
- _XkbCheckBounds(bounds,pos + sbounds->x1, sbounds->y1);
- _XkbCheckBounds(bounds,pos + sbounds->x2, sbounds->y2);
- pos += sbounds->y2;
- }
- }
-
- return True;
-}
-
-Bool
-XkbcComputeSectionBounds(struct xkb_geometry * geom, struct xkb_section * section)
-{
- int i;
- struct xkb_shape * shape;
- struct xkb_row * row;
- union xkb_doodad * doodad;
- struct xkb_bounds * bounds, *rbounds = NULL;
-
- if (!geom || !section)
- return False;
-
- bounds = §ion->bounds;
- memset(bounds, 0, sizeof(struct xkb_bounds));
-
- for (i = 0, row = section->rows; i < section->num_rows; i++, row++) {
- if (!XkbcComputeRowBounds(geom, section, row))
- return False;
- rbounds = &row->bounds;
- _XkbCheckBounds(bounds, row->left + rbounds->x1,
- row->top + rbounds->y1);
- _XkbCheckBounds(bounds, row->left + rbounds->x2,
- row->top + rbounds->y2);
- }
-
- for (i = 0, doodad = section->doodads; i < section->num_doodads;
- i++, doodad++)
- {
- static struct xkb_bounds tbounds;
-
- switch (doodad->any.type) {
- case XkbOutlineDoodad:
- case XkbSolidDoodad:
- shape = XkbShapeDoodadShape(geom, &doodad->shape);
- rbounds = &shape->bounds;
- break;
- case XkbTextDoodad:
- tbounds.x1 = doodad->text.left;
- tbounds.y1 = doodad->text.top;
- tbounds.x2 = tbounds.x1 + doodad->text.width;
- tbounds.y2 = tbounds.y1 + doodad->text.height;
- rbounds = &tbounds;
- break;
- case XkbIndicatorDoodad:
- shape = XkbIndicatorDoodadShape(geom, &doodad->indicator);
- rbounds = &shape->bounds;
- break;
- case XkbLogoDoodad:
- shape = XkbLogoDoodadShape(geom, &doodad->logo);
- rbounds = &shape->bounds;
- break;
- default:
- tbounds.x1 = tbounds.x2 = doodad->any.left;
- tbounds.y1 = tbounds.y2 = doodad->any.top;
- rbounds = &tbounds;
- break;
- }
-
- _XkbCheckBounds(bounds, rbounds->x1, rbounds->y1);
- _XkbCheckBounds(bounds, rbounds->x2, rbounds->y2);
- }
-
- return True;
-}
diff --git a/src/maprules.c b/src/maprules.c
index 96d7a31..dfb32e1 100644
--- a/src/maprules.c
+++ b/src/maprules.c
@@ -31,12 +31,6 @@
#include "xkbcommon/xkbcommon.h"
#include "XKBcommonint.h"
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#elif defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
diff --git a/src/xkbcomp/xkbcomp.h b/src/xkbcomp/xkbcomp.h
index 650d6ce..a63564d 100644
--- a/src/xkbcomp/xkbcomp.h
+++ b/src/xkbcomp/xkbcomp.h
@@ -76,7 +76,6 @@ typedef struct _ParseCommon
#define ExprArrayRef 4
#define ExprKeysymList 5
#define ExprActionList 6
-#define ExprCoord 7
#define OpAdd 20
#define OpSubtract 21
@@ -145,17 +144,11 @@ typedef struct _Expr
int szSyms;
char **syms;
} list;
- struct
- {
- int x;
- int y;
- } coord;
struct _Expr *child;
xkb_atom_t str;
unsigned uval;
int ival;
char keyName[5];
- void * ptr;
} value;
} ExprDef;