summaryrefslogtreecommitdiff
path: root/include/m_utils.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-18 23:20:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-18 23:20:51 +0000
commit7a2c6126cd995cfdbd5f3167609cd7e09ffacf35 (patch)
tree5abf4493f0b3bb435c5604fbdba453acfcc1e066 /include/m_utils.h
parent7984eb187eec59c96ce661e85575ee2cbf5b386e (diff)
useless junk removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@66 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_utils.h')
-rw-r--r--include/m_utils.h79
1 files changed, 0 insertions, 79 deletions
diff --git a/include/m_utils.h b/include/m_utils.h
index 75185bb1ee..bac74a2685 100644
--- a/include/m_utils.h
+++ b/include/m_utils.h
@@ -501,49 +501,6 @@ extern struct SHA1_INTERFACE sha1i;
#define mir_sha1_finish(A,B) sha1i.sha1_finish(A,B)
#define mir_sha1_hash(A,B,C) sha1i.sha1_hash(A,B,C)
-// Added in 0.4.0.1
-// Here are some string wrappers that are more safe than the win32 versions
-
-#if MIRANDA_VER < 0x0700
-static __inline int mir_snprintf(char *buffer, size_t count, const char* fmt, ...) {
- va_list va;
- int len;
-
- va_start(va, fmt);
- len = _vsnprintf(buffer, count-1, fmt, va);
- va_end(va);
- buffer[count-1] = 0;
- return len;
-}
-
-static __inline int mir_sntprintf(TCHAR *buffer, size_t count, const TCHAR* fmt, ...) {
- va_list va;
- int len;
-
- va_start(va, fmt);
- len = _vsntprintf(buffer, count-1, fmt, va);
- va_end(va);
- buffer[count-1] = 0;
- return len;
-}
-
-static __inline int mir_vsnprintf(char *buffer, size_t count, const char* fmt, va_list va) {
- int len;
-
- len = _vsnprintf(buffer, count-1, fmt, va);
- buffer[count-1] = 0;
- return len;
-}
-
-static __inline int mir_vsntprintf(TCHAR *buffer, size_t count, const TCHAR* fmt, va_list va) {
- int len;
-
- len = _vsntprintf(buffer, count-1, fmt, va);
- buffer[count-1] = 0;
- return len;
-}
-#endif
-
// allows to include TCHAR* strings into mir_snprintf and NetLib_Logf calls
#if defined( _UNICODE )
#define TCHAR_STR_PARAM "%S"
@@ -551,42 +508,6 @@ static __inline int mir_vsntprintf(TCHAR *buffer, size_t count, const TCHAR* fmt
#define TCHAR_STR_PARAM "%s"
#endif
-#if MIRANDA_VER < 0x0700
-static __inline wchar_t* mir_a2u_cp( const char* src, int codepage )
-{
- int cbLen = MultiByteToWideChar( codepage, 0, src, -1, NULL, 0 );
- wchar_t* result = ( wchar_t* )mir_alloc( sizeof( wchar_t )*(cbLen+1));
- if ( result == NULL )
- return NULL;
-
- MultiByteToWideChar( codepage, 0, src, -1, result, cbLen );
- result[ cbLen ] = 0;
- return result;
-}
-
-static __inline wchar_t* mir_a2u( const char* src )
-{
- return mir_a2u_cp( src, CallService("LangPack/GetCodePage", 0, 0 ));
-}
-
-static __inline char* mir_u2a_cp( const wchar_t* src, int codepage )
-{
- int cbLen = WideCharToMultiByte( codepage, 0, src, -1, NULL, 0, NULL, NULL );
- char* result = ( char* )mir_alloc( cbLen+1 );
- if ( result == NULL )
- return NULL;
-
- WideCharToMultiByte( codepage, 0, src, -1, result, cbLen, NULL, NULL );
- result[ cbLen ] = 0;
- return result;
-}
-
-static __inline char* mir_u2a( const wchar_t* src )
-{
- return mir_u2a_cp( src, CallService("LangPack/GetCodePage", 0, 0 ));
-}
-#endif
-
#ifdef _UNICODE
#define mir_t2a(s) mir_u2a(s)
#define mir_a2t(s) mir_a2u(s)