Constified more tables.

This commit is contained in:
Tilman Sauerbeck 2007-05-16 18:24:42 +02:00
parent e699c4231c
commit 6c508eab5d
2 changed files with 7 additions and 4 deletions

View file

@ -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);
}

View file

@ -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"}