From 58973a21a30bf95427fd43c456e41e35c386218c Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Fri, 15 Jun 2012 18:52:16 +0000 Subject: another portion of "#ifsef Unicode" removal git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CSList/cslist.h | 9 ++------- plugins/CSList/strpos.h | 26 ++++++-------------------- 2 files changed, 8 insertions(+), 27 deletions(-) (limited to 'plugins/CSList') diff --git a/plugins/CSList/cslist.h b/plugins/CSList/cslist.h index 652c8f7195..9fd1b5a5c9 100644 --- a/plugins/CSList/cslist.h +++ b/plugins/CSList/cslist.h @@ -43,16 +43,11 @@ #ifndef __CSLIST_H #define __CSLIST_H 1 -#if defined UNICODE + #define WINVER 0x501 #define _WIN32_WINNT 0x501 #define _WIN32_IE 0x600 -#else -#define WINVER 0x400 -#define _WIN32_WINNT 0x400 -#define _WIN32_IE 0x400 -#define LVIF_GROUPID 0 -#endif + #define MIRANDA_VER 0x0A00 #pragma warning( disable: 4996 ) diff --git a/plugins/CSList/strpos.h b/plugins/CSList/strpos.h index aaffa3988b..210bfddf0a 100644 --- a/plugins/CSList/strpos.h +++ b/plugins/CSList/strpos.h @@ -31,15 +31,12 @@ * You might want to place this next block in a header file somewhere: */ -#ifndef UNICODE -# define TCHAR char -# define STRING char * -#else + # ifndef TCHAR # define TCHAR wchar_t # endif /* TCHAR */ # define STRING wchar_t * -#endif /* UNICODE */ + @@ -52,32 +49,21 @@ int strpos( STRING haystack, STRING needle ) TCHAR lpBuf[1024]; #endif /* def DEBUG_VERBOSE */ - #ifndef UNICODE - pDest = (STRING) strstr( haystack, needle ); - #else - pDest = (STRING) wcsstr( haystack, needle ); - #endif /* UNICODE */ + pDest = (STRING) wcsstr( haystack, needle ); + if ( pDest ) position = pDest - haystack; else { #ifdef DEBUG_VERBOSE -# ifdef UNICODE - printf( L"strpos(): Could not find '%s' in '%s'.\tFAIL.", needle, haystack ); -# else - printf( "strpos(): Could not find '%s' in '%s'.\tFAIL.", needle, haystack ); -# endif /* def UNICODE */ + printf( L"strpos(): Could not find '%s' in '%s'.\tFAIL.", needle, haystack ); #endif /* def DEBUG_VERBOSE */ return -1; } #ifdef DEBUG_VERBOSE -# ifdef UNICODE - printf( L"strpos(): Found '%s' at position: %d.\t\tOK.", needle, position ); -# else - printf( "strpos(): Found '%s' at position: %d.\t\tOK.", needle, position ); -# endif /* def UNICODE */ + printf( L"strpos(): Found '%s' at position: %d.\t\tOK.", needle, position ); #endif /* def DEBUG_VERBOSE */ return position; -- cgit v1.2.3