Remove more float support Signed-off-by: Daniel Stone <daniel@fooishbar.org>
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
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index 60467cd..e4b0569 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -169,8 +169,7 @@ SimpleLookup(const void * priv, xkb_atom_t field, unsigned type,
const LookupEntry *entry;
const char *str;
- if ((priv == NULL) || (field == None) ||
- ((type != TypeInt) && (type != TypeFloat)))
+ if ((priv == NULL) || (field == None) || (type != TypeInt))
{
return False;
}
@@ -180,8 +179,6 @@ SimpleLookup(const void * priv, xkb_atom_t field, unsigned type,
if (uStrCaseCmp(str, entry->name) == 0)
{
val_rtrn->uval = entry->result;
- if (type == TypeFloat)
- val_rtrn->uval *= XkbGeomPtsPerMM;
return True;
}
}
@@ -335,7 +332,7 @@ ExprResolveFloat(ExprDef * expr,
return True;
}
}
- if ((expr->type != TypeInt) && (expr->type != TypeFloat))
+ if (expr->type != TypeInt)
{
ERROR("Found constant of type %s, expected a number\n",
exprTypeText(expr->type));
@@ -516,7 +513,7 @@ ExprResolveIntegerLookup(ExprDef * expr,
break;
}
}
- if ((expr->type != TypeInt) && (expr->type != TypeFloat))
+ if (expr->type != TypeInt)
{
ERROR
("Found constant of type %s where an int was expected\n",
@@ -524,8 +521,6 @@ ExprResolveIntegerLookup(ExprDef * expr,
return False;
}
val_rtrn->ival = expr->value.ival;
- if (expr->type == TypeFloat)
- val_rtrn->ival /= XkbGeomPtsPerMM;
return True;
case ExprIdent:
if (lookup)
diff --git a/src/xkbcomp/xkbcomp.h b/src/xkbcomp/xkbcomp.h
index 1261c73..08a32c6 100644
--- a/src/xkbcomp/xkbcomp.h
+++ b/src/xkbcomp/xkbcomp.h
@@ -45,7 +45,6 @@ extern char *scanFile;
#define TypeUnknown 0
#define TypeBoolean 1
#define TypeInt 2
-#define TypeFloat 3
#define TypeString 4
#define TypeAction 5
#define TypeKeyName 6
diff --git a/src/xkbcomp/xkbparse.y b/src/xkbcomp/xkbparse.y
index bf45dff..7c18e32 100644
--- a/src/xkbcomp/xkbparse.y
+++ b/src/xkbcomp/xkbparse.y
@@ -680,10 +680,7 @@ Terminal : String
}
| Float
{
- ExprDef *expr;
- expr= ExprCreate(ExprValue,TypeFloat);
- expr->value.ival= $1;
- $$= expr;
+ $$= NULL;
}
| KeyName
{