aboutsummaryrefslogtreecommitdiffhomepage
path: root/env_universal_common.cpp
diff options
context:
space:
mode:
authorGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 22:00:00 -0800
committerGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 22:00:00 -0800
commit203c749e6cc2d5ac0e9e8e240c77d94e179c60d0 (patch)
treec28df4fa19ac064b0d03f77d14d98fc4154900d5 /env_universal_common.cpp
parentf3e2d2f68f14120e298fb1d50be89fa5e83c9222 (diff)
Improved const-correctness, eliminating warnings.
Migrated some int to size_t
Diffstat (limited to 'env_universal_common.cpp')
-rw-r--r--env_universal_common.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/env_universal_common.cpp b/env_universal_common.cpp
index 5fa6ebe5..2672e589 100644
--- a/env_universal_common.cpp
+++ b/env_universal_common.cpp
@@ -127,7 +127,7 @@ static int get_names_show_unexported;
/**
List of names for the UTF-8 character set.
*/
-static char *iconv_utf8_names[]=
+static const char *iconv_utf8_names[]=
{
"utf-8", "UTF-8",
"utf8", "UTF8",
@@ -138,7 +138,7 @@ static char *iconv_utf8_names[]=
/**
List of wide character names, undefined byte length.
*/
-static char *iconv_wide_names_unknown[]=
+static const char *iconv_wide_names_unknown[]=
{
"wchar_t", "WCHAR_T",
"wchar", "WCHAR",
@@ -149,7 +149,7 @@ static char *iconv_wide_names_unknown[]=
/**
List of wide character names, 4 bytes long.
*/
-static char *iconv_wide_names_4[]=
+static const char *iconv_wide_names_4[]=
{
"wchar_t", "WCHAR_T",
"wchar", "WCHAR",
@@ -164,7 +164,7 @@ static char *iconv_wide_names_4[]=
/**
List of wide character names, 2 bytes long.
*/
-static char *iconv_wide_names_2[]=
+static const char *iconv_wide_names_2[]=
{
"wchar_t", "WCHAR_T",
"wchar", "WCHAR",
@@ -192,7 +192,7 @@ static wchar_t *utf2wcs( const char *in )
really the character set used by wchar_t, but it is the best
assumption we can make.
*/
- char **to_name=0;
+ const char **to_name=0;
switch (sizeof (wchar_t))
{
@@ -214,7 +214,7 @@ static wchar_t *utf2wcs( const char *in )
/*
The line protocol fish uses is always utf-8.
*/
- char **from_name = iconv_utf8_names;
+ const char **from_name = iconv_utf8_names;
size_t in_len = strlen( in );
size_t out_len = sizeof( wchar_t )*(in_len+2);
@@ -306,7 +306,7 @@ static char *wcs2utf( const wchar_t *in )
really the character set used by wchar_t, but it is the best
assumption we can make.
*/
- char **from_name=0;
+ const char **from_name=0;
switch (sizeof (wchar_t))
{
@@ -324,7 +324,7 @@ static char *wcs2utf( const wchar_t *in )
break;
}
- char **to_name = iconv_utf8_names;
+ const char **to_name = iconv_utf8_names;
size_t in_len = wcslen( in );
size_t out_len = sizeof( char )*( (MAX_UTF8_BYTES*in_len)+1);