]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
makes some table const's
authorewt <ewt>
Sat, 3 Jan 1998 23:05:22 +0000 (23:05 +0000)
committerewt <ewt>
Sat, 3 Jan 1998 23:05:22 +0000 (23:05 +0000)
newt.c
newt.h

diff --git a/newt.c b/newt.c
index 817af3b30ba4a27fdc19d9000a457d4616a89dc2..8382d1687b9eecb5f6a85034ba50d246353832d7 100644 (file)
--- a/newt.c
+++ b/newt.c
@@ -36,7 +36,7 @@ static const char * defaultHelpLine =
 "  <Tab>/<Alt-Tab> between elements   |  <Space> selects   |  <F12> next screen"
 ;
 
-struct newtColors newtDefaultColorPalette = {
+const struct newtColors newtDefaultColorPalette = {
        "white", "blue",                        /* root fg, bg */     
        "black", "lightgray",                   /* border fg, bg */
        "black", "lightgray",                   /* window fg, bg */
@@ -62,7 +62,7 @@ struct newtColors newtDefaultColorPalette = {
        "black", "brown"                        /* selected listbox */
 };
 
-static struct keymap keymap[] = {
+static const struct keymap keymap[] = {
        { "\033OA",             NEWT_KEY_UP,            "kh" },
        { "\033[A",             NEWT_KEY_UP,            "ku" },
        { "\033OB",             NEWT_KEY_DOWN,          "kd" },
@@ -262,7 +262,7 @@ void newtSetColors(struct newtColors colors) {
 int newtGetKey(void) {
     int key;
     char buf[10], * chptr = buf;
-    struct keymap * curr;
+    const struct keymap * curr;
 
     do {
        key = SLang_getkey();
diff --git a/newt.h b/newt.h
index f43813cf15e2283f5878477d57b42f1f01d7f6ce..d3f011279a0cd9735f4cdb75d03b63aa80b31ae0 100644 (file)
--- a/newt.h
+++ b/newt.h
@@ -82,7 +82,7 @@ enum newtFlagsSense { NEWT_FLAGS_SET, NEWT_FLAGS_RESET, NEWT_FLAGS_TOGGLE };
 
 typedef struct newtComponent_struct * newtComponent;
 
-extern struct newtColors newtDefaultColorPalette;
+extern const struct newtColors newtDefaultColorPalette;
 
 typedef void (*newtCallback)(newtComponent, void *);
 typedef void (*newtSuspendCallback)(void);