diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-14 16:22:13 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-14 16:22:13 +0000 |
commit | d5d023f683b23fe26ddea93738cb721d532804f0 (patch) | |
tree | 21e7398686c7a5d1604d58bfb71ca4329c84be66 /plugins/TabSRMM/chat | |
parent | e58823d961a630eb62e60d2ccb443761ba5f1704 (diff) |
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@411 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/chat')
-rw-r--r-- | plugins/TabSRMM/chat/log.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/plugins/TabSRMM/chat/log.cpp b/plugins/TabSRMM/chat/log.cpp index a297c9b006..d0fcf2e299 100644 --- a/plugins/TabSRMM/chat/log.cpp +++ b/plugins/TabSRMM/chat/log.cpp @@ -76,25 +76,17 @@ static char* u2a( const wchar_t* src, int codepage ) { }
static char* t2acp( const TCHAR* src, int codepage ) {
- #if defined( _UNICODE )
- return u2a( src, codepage );
- #else
- return mir_strdup( src );
- #endif
+ return u2a( src, codepage );
}
static TCHAR *a2tcp(const char *text, int cp) {
if ( text != NULL ) {
- #if defined ( _UNICODE )
int cbLen = MultiByteToWideChar( cp, 0, text, -1, NULL, 0 );
TCHAR* result = ( TCHAR* )mir_alloc( sizeof(TCHAR)*( cbLen+1 ));
if ( result == NULL )
return NULL;
MultiByteToWideChar(cp, 0, text, -1, result, cbLen);
return result;
- #else
- return mir_strdup(text);
- #endif
}
return NULL;
}
@@ -200,13 +192,11 @@ static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAl if ( streamData->lin->ptszText ) {
TCHAR *ptszTemp = NULL;
TCHAR *ptszText = streamData->lin->ptszText;
- #if defined( _UNICODE )
if (streamData->dat->codePage != CP_ACP) {
char *aText = t2acp(streamData->lin->ptszText, CP_ACP);
ptszText = ptszTemp = a2tcp(aText, streamData->dat->codePage);
mir_free(aText);
}
- #endif
Log_AppendIEView( streamData, FALSE, buffer, bufferEnd, bufferAlloced, _T("%s"), ptszText );
mir_free(ptszTemp);
}
@@ -344,9 +334,7 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, TCHAR *ptszNick) }
ied.dwData |= g_Settings.ShowTime ? IEEDD_GC_SHOW_TIME : 0;
ied.dwData |= IEEDD_GC_SHOW_ICON;
-#if defined( _UNICODE )
ied.dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK | IEEDF_UNICODE_TEXT2;
-#endif
ied.next = NULL;
CallService(streamData->dat->hwndIEView ? MS_IEVIEW_EVENT : MS_HPP_EG_EVENT, 0, (LPARAM)&event);
mir_free(buffer);
|