changeset 479:cd066a3f0405

Added some const quialifiers.
author corvid <corvid@lavabit.com>
date Mon, 22 Dec 2008 08:45:53 -0300
parents 76cb7e80f48e
children 0b47756eeb13
files dw/style.cc src/IO/about.c src/form.cc src/menu.cc src/ui.cc
diffstat 5 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/dw/style.cc	Sun Dec 21 08:39:59 2008 -0300
+++ b/dw/style.cc	Mon Dec 22 08:45:53 2008 -0300
@@ -570,10 +570,10 @@
 // ----------------------------------------------------------------------
 
 static const char
-   *roman_I0[] = { "","I","II","III","IV","V","VI","VII","VIII","IX" },
-   *roman_I1[] = { "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC" },
-   *roman_I2[] = { "","C","CC","CCC","CD","D","DC","DCC","DCCC","CM" },
-   *roman_I3[] = { "","M","MM","MMM","MMMM" };
+   *const roman_I0[] = { "","I","II","III","IV","V","VI","VII","VIII","IX" },
+   *const roman_I1[] = { "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC" },
+   *const roman_I2[] = { "","C","CC","CCC","CD","D","DC","DCC","DCCC","CM" },
+   *const roman_I3[] = { "","M","MM","MMM","MMMM" };
 
 void strtolower (char *s)
 {
--- a/src/IO/about.c	Sun Dec 21 08:39:59 2008 -0300
+++ b/src/IO/about.c	Mon Dec 22 08:45:53 2008 -0300
@@ -14,7 +14,7 @@
 /*
  * HTML text for startup screen
  */
-const char *AboutSplash=
+const char *const AboutSplash=
 "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n"
 "<html>\n"
 "<head>\n"
--- a/src/form.cc	Sun Dec 21 08:39:59 2008 -0300
+++ b/src/form.cc	Mon Dec 22 08:45:53 2008 -0300
@@ -342,7 +342,7 @@
 
 void Html_tag_close_form(DilloHtml *html, int TagIdx)
 {
-   static const char *SubmitTag =
+   static const char *const SubmitTag =
       "<input type='submit' value='?Submit?' alt='dillo-generated-button'>";
    DilloHtmlForm *form;
 // int i;
--- a/src/menu.cc	Sun Dec 21 08:39:59 2008 -0300
+++ b/src/menu.cc	Mon Dec 22 08:45:53 2008 -0300
@@ -38,7 +38,7 @@
 // Weak reference to the popup's bw
 static BrowserWindow *popup_bw = NULL;
 // Where to place the filemenu popup
-int popup_x, popup_y;
+static int popup_x, popup_y;
 // History popup direction (-1 = back, 1 = forward).
 static int history_direction = -1; 
 // History popup, list of URL-indexes.
--- a/src/ui.cc	Sun Dec 21 08:39:59 2008 -0300
+++ b/src/ui.cc	Mon Dec 22 08:45:53 2008 -0300
@@ -993,7 +993,8 @@
  */
 void UI::color_change_cb_i()
 {
-   static int ncolor = 0, cols[] = {7,17,26,51,140,156,205,206,215,-1};
+   const int cols[] = {7,17,26,51,140,156,205,206,215,-1};
+   static int ncolor = 0;
 
    ncolor = (cols[ncolor+1] < 0) ? 0 : ncolor + 1;
    CuteColor = cols[ncolor];