diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-21 16:58:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-21 16:58:18 +0000 |
commit | 2072201029bdd799396b37de23410bab71cc653e (patch) | |
tree | 2a54c58861c12287fd74d655930cd0fc9cbfec4f /plugins/Scriver/src | |
parent | 0c633e766422e0bb45cf8b89755acf2a10acc153 (diff) |
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@5083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r-- | plugins/Scriver/src/chat/main.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/utils.cpp | 61 |
2 files changed, 1 insertions, 62 deletions
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index 23bc536582..160683beab 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -68,7 +68,7 @@ int Chat_Unload(void) int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam)
{
char* mods[3] = { "Chat", "ChatFonts" };
- CallService( "DBEditorpp/RegisterModule", (WPARAM)mods, 2 );
+ CallService("DBEditorpp/RegisterModule", (WPARAM)mods, 2);
RegisterChatFonts();
OptionsInit();
LoadIcons();
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index d6602f039f..4e07d78598 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -36,67 +36,6 @@ int safe_wcslen(wchar_t *msg, int maxLen) { return 0;
}
-TCHAR *a2tcp(const char *text, int cp) {
- if ( text != NULL ) {
- 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;
- }
- return NULL;
-}
-
-char* u2a( 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;
-}
-
-wchar_t* a2u( 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;
-}
-
-TCHAR *a2t(const char *text) {
- if ( text == NULL )
- return NULL;
- return a2tcp(text, CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 ));
-}
-
-char* t2a( const TCHAR* src ) {
-return u2a( src, CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 ));
-}
-
-char* t2acp( const TCHAR* src, int codepage ) {
- return u2a( src, codepage );
-}
-
-wchar_t *a2w(const char *src, int len) {
- wchar_t *wline;
- int i;
- if (len <0) {
- len = (int)strlen(src);
- }
- wline = (wchar_t*)mir_alloc(2 * (len + 1));
- for (i = 0; i < len; i ++) {
- wline[i] = src[i];
- }
- wline[i] = 0;
- return wline;
-}
-
static int mimFlags = 0;
enum MIMFLAGS {
|