]> Pileus Git - ~andy/aweather-web/commitdiff
Add consts
authorAndy Spencer <andy753421@gmail.com>
Sat, 7 Apr 2012 05:56:05 +0000 (05:56 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 7 Apr 2012 05:56:05 +0000 (05:56 +0000)
html.h
index.c

diff --git a/html.h b/html.h
index 2ceaff7342c7afe29089c87b7776e5c3475c86ab..4b888ab884ecfd24f21c53614290cd4990362d5c 100644 (file)
--- a/html.h
+++ b/html.h
@@ -50,10 +50,10 @@ typedef struct {
 } page_t;
 
 /* Data */
 } page_t;
 
 /* Data */
-extern page_t header[];
-extern page_t other[];
-extern page_t footer[];
-extern page_t special[];
+const extern page_t header[];
+const extern page_t other[];
+const extern page_t footer[];
+const extern page_t special[];
 
 /* Global functions */
 void print_file(char *file);
 
 /* Global functions */
 void print_file(char *file);
diff --git a/index.c b/index.c
index 543b53eb729c5d0d7a7e17f070b7de705accc1aa..62490adb8f1390d4618f4178bf7c1c49692db276 100644 (file)
--- a/index.c
+++ b/index.c
@@ -9,7 +9,7 @@ const char desc[] =
        "and volume rendering.";
 
 /* Page data */
        "and volume rendering.";
 
 /* Page data */
-page_t header[] = {
+const page_t header[] = {
        {"about",       "About",       print_about,        0.7, NULL},
        {"news",        "News",        print_news,         0.3, NULL},
        {"manual",      "Manual",      print_manual,       0.5, NULL},
        {"about",       "About",       print_about,        0.7, NULL},
        {"news",        "News",        print_news,         0.3, NULL},
        {"manual",      "Manual",      print_manual,       0.5, NULL},
@@ -18,16 +18,16 @@ page_t header[] = {
        {"development", "Development", print_development,  0.3, NULL},
        {NULL,          NULL,          NULL,               0.0, NULL},
 };
        {"development", "Development", print_development,  0.3, NULL},
        {NULL,          NULL,          NULL,               0.0, NULL},
 };
-page_t other[] = {
+const page_t other[] = {
        {"grits",       "Grits",       print_grits,        0.8, NULL},
        {"rsl",         "RSL",         print_rsl,          0.3, NULL},
        {NULL,          NULL,          NULL,               0.0, NULL},
 };
        {"grits",       "Grits",       print_grits,        0.8, NULL},
        {"rsl",         "RSL",         print_rsl,          0.3, NULL},
        {NULL,          NULL,          NULL,               0.0, NULL},
 };
-page_t footer[] = {
+const page_t footer[] = {
        {"contact",     "Contact",     print_contact,      0.2, NULL},
        {NULL,          NULL,          NULL,               0.0, NULL},
 };
        {"contact",     "Contact",     print_contact,      0.2, NULL},
        {NULL,          NULL,          NULL,               0.0, NULL},
 };
-page_t special[] = {
+const page_t special[] = {
        {"",            NULL,          print_index,        1.0, desc},
        {"oldnews",     "Old News",    print_oldnews,      0.2, NULL},
        {NULL,          "Not found",   print_notfound,    -1.0, NULL},
        {"",            NULL,          print_index,        1.0, desc},
        {"oldnews",     "Old News",    print_oldnews,      0.2, NULL},
        {NULL,          "Not found",   print_notfound,    -1.0, NULL},