diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 14:13:45 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 14:13:45 +0000 |
commit | 4aa6229698b946e52ce19018aaf13f8b92fb168e (patch) | |
tree | 29334e8c5ee492a80f11a97fedab2373b8fbb392 /src/modules/srfile/filexferdlg.cpp | |
parent | 5e8e561a80d1ac9ca1c2f1c3d388105733ed4e4e (diff) |
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@426 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/srfile/filexferdlg.cpp')
-rw-r--r-- | src/modules/srfile/filexferdlg.cpp | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/src/modules/srfile/filexferdlg.cpp b/src/modules/srfile/filexferdlg.cpp index ab7090166b..5775f29265 100644 --- a/src/modules/srfile/filexferdlg.cpp +++ b/src/modules/srfile/filexferdlg.cpp @@ -44,26 +44,16 @@ struct virusscanthreadstartinfo { TCHAR* PFTS_StringToTchar( int flags, const PROTOCHAR* s )
{
-#ifdef _UNICODE
if ( flags & PFTS_UTF )
return Utf8DecodeUcs2(( char* )s );
else if ( flags & PFTS_UNICODE )
return mir_tstrdup( s );
else
return mir_a2t(( char* )s );
-#else
- if ( flags & PFTS_UTF ) {
- char *szAnsi = mir_strdup(( char* )s );
- return Utf8Decode(szAnsi, NULL);
- }
- else
- return mir_strdup( s );
-#endif
}
int PFTS_CompareWithTchar( PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHAR* r )
{
-#ifdef _UNICODE
if ( ft->flags & PFTS_UTF ) {
TCHAR* ts = Utf8DecodeUcs2(( char* )s );
int res = _tcscmp( ts, r );
@@ -78,14 +68,6 @@ int PFTS_CompareWithTchar( PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHA mir_free( ts );
return res;
}
-#else
- if ( ft->flags & PFTS_UTF ) {
- char *ts = NEWSTR_ALLOCA(( char* )s );
- return _tcscmp( Utf8Decode(( char* )ts, NULL), r );
- }
- else
- return _tcscmp( s, r );
-#endif
}
static void SetOpenFileButtonStyle(HWND hwndButton, int enabled)
@@ -100,12 +82,8 @@ void FillSendData( FileDlgData* dat, DBEVENTINFO& dbei ) dbei.eventType = EVENTTYPE_FILE;
dbei.flags = DBEF_SENT;
dbei.timestamp = time(NULL);
- #if defined( _UNICODE )
- char *szFileNames = Utf8EncodeT(dat->szFilenames), *szMsg = Utf8EncodeT(dat->szMsg);
- dbei.flags |= DBEF_UTF;
- #else
- char *szFileNames = dat->szFilenames, *szMsg = dat->szMsg;
- #endif
+ char *szFileNames = Utf8EncodeT(dat->szFilenames), *szMsg = Utf8EncodeT(dat->szMsg);
+ dbei.flags |= DBEF_UTF;
dbei.cbBlob = sizeof(DWORD) + lstrlenA(szFileNames)+lstrlenA(szMsg)+2;
dbei.pBlob=(PBYTE)mir_alloc(dbei.cbBlob);
@@ -113,9 +91,8 @@ void FillSendData( FileDlgData* dat, DBEVENTINFO& dbei ) lstrcpyA((char*)dbei.pBlob+sizeof(DWORD), szFileNames);
lstrcpyA((char*)dbei.pBlob+sizeof(DWORD)+lstrlenA(szFileNames)+1, szMsg);
- #if defined( _UNICODE )
- mir_free( szFileNames ), mir_free( szMsg );
- #endif
+ mir_free( szFileNames ), mir_free( szMsg );
+
}
static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info)
|