diff options
| author | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-06 16:14:05 +0000 | 
|---|---|---|
| committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-06 16:14:05 +0000 | 
| commit | c07180498b396b3664addfafb0bf850644976370 (patch) | |
| tree | 59a9b2affa601423ecf9665b48049d9de9c9c4ea /plugins/DbEditorPP/src | |
| parent | 5fc50c70d6b527b99f263893dfa5d695f45c5a5c (diff) | |
small cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@4337 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP/src')
| -rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 32 | 
1 files changed, 14 insertions, 18 deletions
| diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index 84f0c188dd..e3679d7d67 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -152,7 +152,6 @@ void exportModule(HANDLE hContact, char* module, FILE* file)  	FreeModuleSettingLL(&settinglist);
  }
 -
  char *NickFromHContact(HANDLE hContact)
  {
  	static char nick[512] = "";
 @@ -194,7 +193,6 @@ char *NickFromHContact(HANDLE hContact)  	return nick;
  }
 -
  void exportDB(HANDLE hContact, char* module) // hContact == -1 export entire db. module == NULL export entire contact.
  {                                            // hContact == -1, module == "" - all contacts
  	FILE* file = NULL;
 @@ -328,7 +326,6 @@ void exportDB(HANDLE hContact, char* module) // hContact == -1 export entire db.  	FreeModuleSettingLL(&modlist);
  }
 -
  HANDLE CheckNewContact(char *myProto, char *uid, char *myName)
  {
  	char szProto[256], szName[256];
 @@ -363,11 +360,11 @@ HANDLE CheckNewContact(char *myProto, char *uid, char *myName)  HANDLE Clist_GroupExists(WCHAR *tszGroup)
  {
  	unsigned int i = 0;
 -	WCHAR*		 _t = 0;
 -	char		 str[10];
 -	INT_PTR		 result = 0;
 -	DBVARIANT	 dbv = {0};
 -	int			 match;
 +	WCHAR *_t = 0;
 +	char str[10];
 +	INT_PTR result = 0;
 +	DBVARIANT dbv = {0};
 +	int match;
  	do {
  		_itoa(i, str, 10);
 @@ -440,16 +437,16 @@ void importSettings(HANDLE hContact, char *importstring )  							protouid = (char*)CallProtoService(szProto,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0);
  							if ((INT_PTR)protouid != CALLSERVICE_NOTFOUND) {
  								if (!mir_strcmp(protouid, uid))
 -        							hContact = CheckNewContact(szProto, uid, szUID);
 -        					}
 -	        				else hContact = CheckNewContact(szProto, uid, szUID);
 +									hContact = CheckNewContact(szProto, uid, szUID);
 +							}
 +							else hContact = CheckNewContact(szProto, uid, szUID);
  						}
  					}
  				}
  			}
 - 			if (hContact == INVALID_HANDLE_VALUE)
 - 			{
 +			if (hContact == INVALID_HANDLE_VALUE)
 +			{
  				HANDLE temp = (HANDLE)CallService(MS_DB_CONTACT_ADD,0,0);
  				if (temp)
  					hContact = temp;
 @@ -572,13 +569,12 @@ INT_PTR CALLBACK ImportDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam  					char *string = (char*)_alloca(length+3);
  					int Pos = 2;
 -    				if (length)
 +					if (length)
  					{
  						int	Range = SendDlgItemMessage(hwnd,IDC_TEXT,EM_GETSEL,0,0);
  						int Min = LOWORD(Range);
  						int Max = HIWORD(Range);
 -
  						GetDlgItemText(hwnd, IDC_TEXT, string, length+1);
  						if (Min == -1)
 @@ -666,8 +662,8 @@ int Openfile2Import(char *outputFiles)  }
  BOOL Exists(LPCTSTR strName)
 -{   
 -    return GetFileAttributes(strName) != INVALID_FILE_ATTRIBUTES;   
 +{
 +	return GetFileAttributes(strName) != INVALID_FILE_ATTRIBUTES;
  }
  void ImportSettingsFromFileMenuItem(HANDLE hContact, char* FilePath)
 @@ -708,7 +704,7 @@ void ImportSettingsFromFileMenuItem(HANDLE hContact, char* FilePath)  			if (hFile != INVALID_HANDLE_VALUE)
  			{
  				if (GetFileSize(hFile,  NULL) > 0)
 -			 	{
 +				{
  					hMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
  					if (hMap) {
 | 
