summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2007-05-16 18:24:42 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2007-05-16 18:24:42 +0200
commit6c508eab5df5d517f7e4cbe6087308cd53a564b2 (patch)
treeb50f6ec681b3dcda17b7c7e5e771e15d20093cbc
parente699c4231c205ef00d687b6412308d031b99806b (diff)
Constified more tables.
-rw-r--r--src/StBytes.c5
-rw-r--r--src/imConv.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/src/StBytes.c b/src/StBytes.c
index b81e7a1..1476e83 100644
--- a/src/StBytes.c
+++ b/src/StBytes.c
@@ -33,7 +33,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xatom.h>
/* insulate predefined atom numbers from cut routines */
-static Atom n_to_atom[8] = {
+static const Atom n_to_atom[8] = {
XA_CUT_BUFFER0,
XA_CUT_BUFFER1,
XA_CUT_BUFFER2,
@@ -48,6 +48,9 @@ XRotateBuffers (
register Display *dpy,
int rotate)
{
+ /* XRotateWindowProperties wants a non-const Atom*, but it doesn't
+ * modify it, so this is safe.
+ */
return XRotateWindowProperties(dpy, RootWindow(dpy, 0), n_to_atom, 8, rotate);
}
diff --git a/src/imConv.c b/src/imConv.c
index 408336b..e30f8ef 100644
--- a/src/imConv.c
+++ b/src/imConv.c
@@ -67,11 +67,11 @@ typedef int (*ucstocsConvProc)(
);
struct SubstRec {
- const char* encoding_name;
- const char* charset_name;
+ const char encoding_name[8];
+ const char charset_name[12];
};
-static struct SubstRec SubstTable[] = {
+static const struct SubstRec SubstTable[] = {
{"STRING", "ISO8859-1"},
{"TIS620", "TIS620-0"},
{"UTF-8", "ISO10646-1"}