summaryrefslogtreecommitdiff
path: root/plugins/helpers/gen_helpers.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-18 20:53:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-18 20:53:59 +0000
commit3f23417a1099f73dc28ec1b7d6ec2a1a7fc2b7a2 (patch)
tree3e0bcd88c55dad310da0dc980e252bf9fbfa6dc5 /plugins/helpers/gen_helpers.cpp
parent537b94169bf2483798a651ee3b96f7904eebe7b4 (diff)
- PLUGININFO structure removed at all;
- Options_AddPage & UserInfo_AddPage replaced MS_OPT_ADDPAGE & MS_USERINFO_ADDPAGE services respectively - total internal redesign of options' translation - code reformatting git-svn-id: http://svn.miranda-ng.org/main/trunk@477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/helpers/gen_helpers.cpp')
-rw-r--r--plugins/helpers/gen_helpers.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp
index 817f1d9f48..084be88139 100644
--- a/plugins/helpers/gen_helpers.cpp
+++ b/plugins/helpers/gen_helpers.cpp
@@ -272,13 +272,10 @@ TCHAR *itot(int num) {
void Utf8Decode( char* str, wchar_t** ucs2 )
{
- int len;
- wchar_t* tempBuf;
-
if ( str == NULL )
return;
- len = strlen( str );
+ size_t len = strlen( str );
if ( len < 2 ) {
if ( ucs2 != NULL ) {
*ucs2 = ( wchar_t* )malloc(( len+1 )*sizeof( wchar_t ));
@@ -288,7 +285,7 @@ void Utf8Decode( char* str, wchar_t** ucs2 )
return;
}
- tempBuf = ( wchar_t* )alloca(( len+1 )*sizeof( wchar_t ));
+ wchar_t* tempBuf = ( wchar_t* )alloca(( len+1 )*sizeof( wchar_t ));
{
wchar_t* d = tempBuf;
BYTE* s = ( BYTE* )str;
@@ -332,19 +329,15 @@ void Utf8Decode( char* str, wchar_t** ucs2 )
char* Utf8Encode( const char* src )
{
- int len;
- char* result;
- wchar_t* tempBuf;
-
if ( src == NULL )
return NULL;
- len = strlen( src );
- result = ( char* )malloc( len*3 + 1 );
+ size_t len = strlen( src );
+ char* result = ( char* )malloc( len*3 + 1 );
if ( result == NULL )
return NULL;
- tempBuf = ( wchar_t* )alloca(( len+1 )*sizeof( wchar_t ));
+ wchar_t* tempBuf = ( wchar_t* )alloca(( len+1 )*sizeof( wchar_t ));
MultiByteToWideChar( CP_ACP, 0, src, -1, tempBuf, len );
tempBuf[ len ] = 0;
{