Constify a global table and function arguments 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
diff --git a/src/xkbcomp/parseutils.c b/src/xkbcomp/parseutils.c
index 9c27c3a..06271c3 100644
--- a/src/xkbcomp/parseutils.c
+++ b/src/xkbcomp/parseutils.c
@@ -119,7 +119,7 @@ ExprCreateBinary(unsigned op, ExprDef * left, ExprDef * right)
}
KeycodeDef *
-KeycodeCreate(char *name, unsigned long value)
+KeycodeCreate(const char *name, unsigned long value)
{
KeycodeDef *def;
@@ -141,7 +141,7 @@ KeycodeCreate(char *name, unsigned long value)
}
KeyAliasDef *
-KeyAliasCreate(char *alias, char *real)
+KeyAliasCreate(const char *alias, const char *real)
{
KeyAliasDef *def;
@@ -259,7 +259,7 @@ KeyTypeCreate(xkb_atom_t name, VarDef * body)
}
SymbolsDef *
-SymbolsCreate(char *keyName, ExprDef * symbols)
+SymbolsCreate(const char *keyName, ExprDef *symbols)
{
SymbolsDef *def;
@@ -533,7 +533,7 @@ AppendMultiKeysymList(ExprDef * list, ExprDef * append)
}
int
-LookupKeysym(char *str, xkb_keysym_t * sym_rtrn)
+LookupKeysym(const char *str, xkb_keysym_t *sym_rtrn)
{
xkb_keysym_t sym;
diff --git a/src/xkbcomp/parseutils.h b/src/xkbcomp/parseutils.h
index 81c4165..82cd0fc 100644
--- a/src/xkbcomp/parseutils.h
+++ b/src/xkbcomp/parseutils.h
@@ -59,12 +59,12 @@ extern ExprDef *ExprCreateBinary(unsigned /* op */ ,
ExprDef * /* right */
);
-extern KeycodeDef *KeycodeCreate(char * /* name */ ,
+extern KeycodeDef *KeycodeCreate(const char * /* name */ ,
unsigned long /* value */
);
-extern KeyAliasDef *KeyAliasCreate(char * /* alias */ ,
- char * /* real */
+extern KeyAliasDef *KeyAliasCreate(const char * /* alias */ ,
+ const char * /* real */
);
extern VModDef *VModCreate(xkb_atom_t /* name */ ,
@@ -87,7 +87,7 @@ extern KeyTypeDef *KeyTypeCreate(xkb_atom_t /* name */ ,
VarDef * /* body */
);
-extern SymbolsDef *SymbolsCreate(char * /* keyName */ ,
+extern SymbolsDef *SymbolsCreate(const char * /* keyName */ ,
ExprDef * /* symbols */
);
@@ -126,7 +126,7 @@ extern ExprDef *AppendKeysymList(ExprDef * /* list */ ,
char * /* sym */
);
-extern int LookupKeysym(char * /* str */ ,
+extern int LookupKeysym(const char * /* str */ ,
xkb_keysym_t * /* sym_rtrn */
);