diff options
| author | George Hazan <george.hazan@gmail.com> | 2014-11-30 21:20:14 +0000 | 
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 21:20:14 +0000 | 
| commit | d9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (patch) | |
| tree | a6f925c63bc31e4b4dba301183cc3b429d52d816 /plugins/SpellChecker/src | |
| parent | ce2d4f19e3f810b282eb7d47d470d426ff459e1f (diff) | |
new sorting functions applied
git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src')
| -rw-r--r-- | plugins/SpellChecker/src/dictionary.cpp | 10 | ||||
| -rw-r--r-- | plugins/SpellChecker/src/options.cpp | 6 | ||||
| -rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 2 | ||||
| -rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 10 | 
4 files changed, 14 insertions, 14 deletions
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index c794aca5f8..44597254e0 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -741,7 +741,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString)  	for (int i = 0; i < tmp_dicts->getCount(); i++) {  		Dictionary *dict = (*tmp_dicts)[i]; -		if (lstrcmpi(dict->language, name) == 0) { +		if (mir_tstrcmpi(dict->language, name) == 0) {  			GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SENGLANGUAGE, dict->english_name, SIZEOF(dict->english_name));  			GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SLANGUAGE, dict->localized_name, SIZEOF(dict->localized_name)); @@ -793,7 +793,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts)  			if (dict->localized_name[0] == _T('\0')) {  				for (size_t j = 0; j < SIZEOF(aditionalLanguages); j++) { -					if (!lstrcmp(aditionalLanguages[j].language, dict->language)) { +					if (!mir_tstrcmp(aditionalLanguages[j].language, dict->language)) {  						mir_tstrncpy(dict->localized_name, TranslateTS(aditionalLanguages[j].localized_name), SIZEOF(dict->localized_name));  						break;  					} @@ -848,7 +848,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH  			// Check if dict is new  			bool exists = false;  			for (int i = 0; i < dicts.getCount() && !exists; i++) -				if (lstrcmp(dicts[i]->language, lang) == 0) +				if (mir_tstrcmp(dicts[i]->language, lang) == 0)  					exists = true;  			if (!exists) { @@ -899,7 +899,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa  						key[cchValue] = 0;  						TCHAR *pos;  						if (pos = _tcsrchr(key, _T('\\'))) { -							if (!lstrcmpi(&pos[1], otherHunspellApps[i].key)) { +							if (!mir_tstrcmpi(&pos[1], otherHunspellApps[i].key)) {  								pos[0] = 0;  								lResult = ERROR_SUCCESS;  								break; @@ -927,7 +927,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa  	// Sort dicts  	for (int i = 0; i < dicts.getCount(); i++) {  		for (int j = i + 1; j < dicts.getCount(); j++) { -			if (lstrcmp(dicts[i]->full_name, dicts[j]->full_name) > 0) { +			if (mir_tstrcmp(dicts[i]->full_name, dicts[j]->full_name) > 0) {  				Dictionary *dict = dicts[i];  				sl->items[i] = dicts[j];  				sl->items[j] = dict; diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp index 99f9348962..ba60ccf58d 100644 --- a/plugins/SpellChecker/src/options.cpp +++ b/plugins/SpellChecker/src/options.cpp @@ -101,7 +101,7 @@ void LoadOptions()  	int i;
  	for(i = 0; i < languages.getCount(); i++)
 -		if (lstrcmp(languages[i]->language, opts.default_language) == 0)
 +		if (mir_tstrcmp(languages[i]->language, opts.default_language) == 0)
  			break;
  	if (i >= languages.getCount())
 @@ -180,7 +180,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP  				SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_ADDSTRING, 0, (LPARAM)languages[i]->full_name);
  				SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETITEMDATA, i, (LPARAM)languages[i]);
 -				if ( !lstrcmp(opts.default_language, languages[i]->language))
 +				if ( !mir_tstrcmp(opts.default_language, languages[i]->language))
  					sel = i;
  			}
  			SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETCURSEL, sel, 0);
 @@ -379,7 +379,7 @@ static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam  				SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM)p->full_name);
  				SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, i, (LPARAM)new AutoreplaceData(p));
 -				if ( !lstrcmp(opts.default_language, p->language))
 +				if ( !mir_tstrcmp(opts.default_language, p->language))
  					sel = i;
  			}
  			SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, sel, 0);
 diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 1027a2a732..cbfab5dddf 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -188,7 +188,7 @@ static int ModulesLoaded(WPARAM, LPARAM)  		mir_sntprintf(filename, MAX_PATH, _T("%s\\%s.ar"), customDictionariesFolder, dict->language);  		dict->autoReplace = new AutoReplaceMap(filename, dict); -		if (lstrcmp(dict->language, opts.default_language) == 0) +		if (mir_tstrcmp(dict->language, opts.default_language) == 0)  			dict->load();  	} diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 6b29b3335e..ccf4baf5ee 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -684,7 +684,7 @@ int GetClosestLanguage(TCHAR *lang_name)  	// Search the language by name
  	for (i = 0; i < languages.getCount(); i++)
 -		if (lstrcmpi(languages[i]->language, lang_name) == 0)
 +		if (mir_tstrcmpi(languages[i]->language, lang_name) == 0)
  			return i;
  	// Try searching by the prefix only
 @@ -697,7 +697,7 @@ int GetClosestLanguage(TCHAR *lang_name)  	// First check if there is a language that is only the prefix
  	for (i = 0; i < languages.getCount(); i++)
 -		if (lstrcmpi(languages[i]->language, lang) == 0)
 +		if (mir_tstrcmpi(languages[i]->language, lang) == 0)
  			return i;
  	// Now try any suffix
 @@ -744,9 +744,9 @@ void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, ch  		for (int i = 0; i < languages.getCount(); i++) {
  			Dictionary *dict = languages[i];
 -			if (lstrcmpi(dict->localized_name, lang) == 0
 -				 || lstrcmpi(dict->english_name, lang) == 0
 -				 || lstrcmpi(dict->language, lang) == 0) {
 +			if (mir_tstrcmpi(dict->localized_name, lang) == 0
 +				 || mir_tstrcmpi(dict->english_name, lang) == 0
 +				 || mir_tstrcmpi(dict->language, lang) == 0) {
  				mir_tstrncpy(dlg->lang_name, dict->language, SIZEOF(dlg->lang_name));
  				break;
  			}
  | 
