changeset 1141:37306557a63c

consts
author corvid <corvid@lavabit.com>
date Fri, 29 May 2009 03:23:34 +0000
parents 88a9765121f3
children fd2b0634abe9
files dpip/dpip.c src/keys.cc src/misc.c src/url.c
diffstat 4 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/dpip/dpip.c	Wed May 27 19:49:54 2009 +0000
+++ b/dpip/dpip.c	Fri May 29 03:23:34 2009 +0000
@@ -18,7 +18,7 @@
 #include "dpip.h"
 #include "d_size.h"
 
-static char Quote = '\'';
+static const char Quote = '\'';
 
 /*
  * Basically the syntax of a dpip tag is:
--- a/src/keys.cc	Wed May 27 19:49:54 2009 +0000
+++ b/src/keys.cc	Fri May 29 03:23:34 2009 +0000
@@ -76,7 +76,7 @@
    { "Button3", fltk::BUTTON3 }
 };
 
-static KeyBinding_t default_keys[] = {
+static const KeyBinding_t default_keys[] = {
    { "open"         , KEYS_OPEN         , fltk::CTRL   , 'o'                },
    { "new-window"   , KEYS_NEW_WINDOW   , fltk::CTRL   , 'n'                },
    { "new-tab"      , KEYS_NEW_TAB      , fltk::CTRL   , 't'                },
--- a/src/misc.c	Wed May 27 19:49:54 2009 +0000
+++ b/src/misc.c	Fri May 29 03:23:34 2009 +0000
@@ -27,7 +27,7 @@
  */
 char *a_Misc_escape_chars(const char *str, const char *esc_set)
 {
-   static const char *hex = "0123456789ABCDEF";
+   static const char *const hex = "0123456789ABCDEF";
    char *p = NULL;
    Dstr *dstr;
    int i;
@@ -350,9 +350,9 @@
  */
 char *a_Misc_encode_base64(const char *in)
 {
-   static const char *base64_hex = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-                                   "abcdefghijklmnopqrstuvwxyz"
-                                   "0123456789+/";
+   static const char *const base64_hex = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                                         "abcdefghijklmnopqrstuvwxyz"
+                                         "0123456789+/";
    char *out = NULL;
    int len, i = 0;
 
--- a/src/url.c	Wed May 27 19:49:54 2009 +0000
+++ b/src/url.c	Fri May 29 03:23:34 2009 +0000
@@ -578,7 +578,7 @@
  */
 char *a_Url_encode_hex_str(const char *str)
 {
-   static const char *verbatim = "-_.*";
+   static const char *const verbatim = "-_.*";
    char *newstr, *c;
 
    if (!str)