summaryrefslogtreecommitdiff
path: root/plugins/CSList/strpos.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 18:52:16 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 18:52:16 +0000
commit58973a21a30bf95427fd43c456e41e35c386218c (patch)
tree1413fba069ecd351b2c99fa5a53e52c68d8a662c /plugins/CSList/strpos.h
parent55b5cf8a5506f03350e5c80ac86f5717425e4d10 (diff)
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CSList/strpos.h')
-rw-r--r--plugins/CSList/strpos.h26
1 files changed, 6 insertions, 20 deletions
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;