From: ewt Date: Sat, 3 Jan 1998 23:05:22 +0000 (+0000) Subject: makes some table const's X-Git-Tag: r0-21~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57c466b0aba588cf99c7278f57932cb4d19bcf4e;p=thirdparty%2Fnewt.git makes some table const's --- diff --git a/newt.c b/newt.c index 817af3b..8382d16 100644 --- a/newt.c +++ b/newt.c @@ -36,7 +36,7 @@ static const char * defaultHelpLine = " / between elements | selects | 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 f43813c..d3f0112 100644 --- 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);