diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-14 11:13:37 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-14 11:13:37 +0000 |
commit | 721aea0764451e985d575236205808bbef298244 (patch) | |
tree | 3a1c566c364e5fc2fff86b87d494497e7de6f93d /plugins/Scriver/chat/services.c | |
parent | 1784cdf49b8196219563795cf3b11b7c4c2a6746 (diff) |
one more "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@409 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/chat/services.c')
-rw-r--r-- | plugins/Scriver/chat/services.c | 76 |
1 files changed, 29 insertions, 47 deletions
diff --git a/plugins/Scriver/chat/services.c b/plugins/Scriver/chat/services.c index 1104aa262b..22afdfd389 100644 --- a/plugins/Scriver/chat/services.c +++ b/plugins/Scriver/chat/services.c @@ -117,20 +117,11 @@ static INT_PTR Service_GetInfo(WPARAM wParam,LPARAM lParam) if ( gci->Flags & TYPE ) gci->iType = si->iType;
if ( gci->Flags & COUNT ) gci->iCount = si->nUsersInNicklist;
if ( gci->Flags & USERS ) gci->pszUsers = SM_GetUsers(si);
-
- #if defined( _UNICODE )
- if ( si->dwFlags & GC_UNICODE ) {
- if ( gci->Flags & ID ) gci->pszID = si->ptszID;
- if ( gci->Flags & NAME ) gci->pszName = si->ptszName;
- }
- else {
- if ( gci->Flags & ID ) gci->pszID = ( TCHAR* )si->pszID;
- if ( gci->Flags & NAME ) gci->pszName = ( TCHAR* )si->pszName;
- }
- #else
+ if ( si->dwFlags & GC_UNICODE ) {
if ( gci->Flags & ID ) gci->pszID = si->ptszID;
if ( gci->Flags & NAME ) gci->pszName = si->ptszName;
- #endif
+ }
+
LeaveCriticalSection(&cs);
return 0;
@@ -171,11 +162,6 @@ static INT_PTR Service_Register(WPARAM wParam, LPARAM lParam) if (gcr->cbSize != SIZEOF_STRUCT_GCREGISTER_V1)
return GC_REGISTER_WRONGVER;
- #ifndef _UNICODE
- if (gcr->dwFlags & GC_UNICODE)
- return GC_REGISTER_NOUNICODE;
- #endif
-
EnterCriticalSection(&cs);
mi = MM_AddModule( gcr->pszModule );
@@ -243,12 +229,12 @@ static INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam) si->iLogFilterFlags = (int)DBGetContactSettingDword(NULL, "Chat", "FilterFlags", 0x03E0);
si->bFilterEnabled = DBGetContactSettingByte(NULL, "Chat", "FilterEnabled", 0);
si->bNicklistEnabled = DBGetContactSettingByte(NULL, "Chat", "ShowNicklist", 1);
- #if defined( _UNICODE )
- if ( !( gcw->dwFlags & GC_UNICODE )) {
- si->pszID = mir_strdup( gcw->pszID );
- si->pszName = mir_strdup( gcw->pszName );
- }
- #endif
+
+ if ( !( gcw->dwFlags & GC_UNICODE )) {
+ si->pszID = mir_strdup( gcw->pszID );
+ si->pszName = mir_strdup( gcw->pszName );
+ }
+
if ( mi->bColor ) {
si->iFG = 4;
@@ -480,18 +466,16 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) EnterCriticalSection(&cs);
- #if defined( _UNICODE )
- if ( !( gce->dwFlags & GC_UNICODE )) {
- save_gce = *gce;
- save_gcd = *gce->pDest;
- gce->pDest->ptszID = a2tf( gce->pDest->ptszID, gce->dwFlags );
- gce->ptszUID = a2tf( gce->ptszUID, gce->dwFlags );
- gce->ptszNick = a2tf( gce->ptszNick, gce->dwFlags );
- gce->ptszStatus = a2tf( gce->ptszStatus, gce->dwFlags );
- gce->ptszText = a2tf( gce->ptszText, gce->dwFlags );
- gce->ptszUserInfo = a2tf( gce->ptszUserInfo, gce->dwFlags );
- }
- #endif
+ if ( !( gce->dwFlags & GC_UNICODE )) {
+ save_gce = *gce;
+ save_gcd = *gce->pDest;
+ gce->pDest->ptszID = a2tf( gce->pDest->ptszID, gce->dwFlags );
+ gce->ptszUID = a2tf( gce->ptszUID, gce->dwFlags );
+ gce->ptszNick = a2tf( gce->ptszNick, gce->dwFlags );
+ gce->ptszStatus = a2tf( gce->ptszStatus, gce->dwFlags );
+ gce->ptszText = a2tf( gce->ptszText, gce->dwFlags );
+ gce->ptszUserInfo = a2tf( gce->ptszUserInfo, gce->dwFlags );
+ }
// Do different things according to type of event
switch(gcd->iType) {
@@ -627,18 +611,16 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) LBL_Exit:
LeaveCriticalSection(&cs);
- #if defined( _UNICODE )
- if ( !( gce->dwFlags & GC_UNICODE )) {
- mir_free((void*)gce->ptszText );
- mir_free((void*)gce->ptszNick );
- mir_free((void*)gce->ptszUID );
- mir_free((void*)gce->ptszStatus );
- mir_free((void*)gce->ptszUserInfo );
- mir_free((void*)gce->pDest->ptszID );
- *gce = save_gce;
- *gce->pDest = save_gcd;
- }
- #endif
+ if ( !( gce->dwFlags & GC_UNICODE )) {
+ mir_free((void*)gce->ptszText );
+ mir_free((void*)gce->ptszNick );
+ mir_free((void*)gce->ptszUID );
+ mir_free((void*)gce->ptszStatus );
+ mir_free((void*)gce->ptszUserInfo );
+ mir_free((void*)gce->pDest->ptszID );
+ *gce = save_gce;
+ *gce->pDest = save_gcd;
+ }
return iRetVal;
}
|