Skip to content

Commit 7837bf1

Browse files
committed
Fix deprecated function usages
and fix typo. Fix notepad-plus-plus#16645, fix notepad-plus-plus#17094
1 parent fa2fbbf commit 7837bf1

19 files changed

Lines changed: 44 additions & 44 deletions

PowerEditor/installer/nativeLang/english.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Translation note:
226226
<Item id="43020" name="Paste to (Replace) Bookmarked Lines"/>
227227
<Item id="43021" name="Remove Bookmarked Lines"/>
228228
<Item id="43051" name="Remove Non-Bookmarked Lines"/>
229-
<Item id="43050" name="Inverse Bookmark"/>
229+
<Item id="43050" name="Inverse Bookmarks"/>
230230
<Item id="43052" name="Find characters in rang&amp;e..."/>
231231
<Item id="43053" name="Select All In-betw&amp;een {} [] or ()"/>
232232
<Item id="43009" name="Go to &amp;Matching Brace"/>

PowerEditor/installer/nativeLang/english_customizable.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Translation note:
226226
<Item id="43020" name="Paste to (Replace) Bookmarked Lines"/>
227227
<Item id="43021" name="Remove Bookmarked Lines"/>
228228
<Item id="43051" name="Remove Non-Bookmarked Lines"/>
229-
<Item id="43050" name="Inverse Bookmark"/>
229+
<Item id="43050" name="Inverse Bookmarks"/>
230230
<Item id="43052" name="Find characters in rang&amp;e..."/>
231231
<Item id="43053" name="Select All In-betw&amp;een {} [] or ()"/>
232232
<Item id="43009" name="Go to &amp;Matching Brace"/>

PowerEditor/src/DarkMode/DarkMode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void RefreshTitleBarThemeColor(HWND hWnd)
160160
bool IsColorSchemeChangeMessage(LPARAM lParam)
161161
{
162162
bool is = false;
163-
if (lParam && (0 == lstrcmpi(reinterpret_cast<LPCWCH>(lParam), L"ImmersiveColorSet")) && _RefreshImmersiveColorPolicyState)
163+
if (lParam && (lstrcmpi(reinterpret_cast<LPCWCH>(lParam), L"ImmersiveColorSet") == 0) && _RefreshImmersiveColorPolicyState)
164164
{
165165
_RefreshImmersiveColorPolicyState();
166166
is = true;

PowerEditor/src/EncodingMapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ bool isInListA(const char *token, const char *list)
8989
word[j] = '\0';
9090
j = 0;
9191

92-
if (!stricmp(token, word))
92+
if (!_stricmp(token, word))
9393
return true;
9494
}
9595
}

PowerEditor/src/MISC/Common/Common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ bool isInList(const wchar_t *token, const wchar_t *list)
282282
word[j] = '\0';
283283
j = 0;
284284

285-
if (!wcsicmp(token, word))
285+
if (!_wcsicmp(token, word))
286286
return true;
287287
}
288288
}

PowerEditor/src/MISC/Common/verifySignedfile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ bool SecurityGuard::verifySignedLibrary(const std::wstring& filepath)
154154
CONST wchar_t* msftTEXTest_site = L"http://www.msftncsi.com/ncsi.txt";
155155
bool online = false;
156156
online = (0 != IsNetworkAlive(&netstatus));
157-
online = online && (0 == GetLastError());
158-
online = online && (0 == IsDestinationReachable(msftTEXTest_site, &oci));
157+
online = online && (GetLastError() == 0);
158+
online = online && (IsDestinationReachable(msftTEXTest_site, &oci) == 0);
159159
if (!online)
160160
{
161161
winTEXTrust_data.fdwRevocationChecks = WTD_REVOKE_NONE;

PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ bool PluginsManager::loadPlugins(const wchar_t* dir, const PluginViewList* plugi
337337
const wchar_t* incompatibleWarningWithSolution = L"%s's version %s is not compatible to this version of Notepad++ (v%s).\r\nAs a result the plugin cannot be loaded.\r\n\r\nGo to Updates section and update your plugin to %s for solving the compatibility issue.";
338338

339339
wstring foundFileName = foundData.cFileName;
340-
if (foundFileName != L"." && foundFileName != L".." && wcsicmp(foundFileName.c_str(), L"Config") != 0)
340+
if (foundFileName != L"." && foundFileName != L".." && _wcsicmp(foundFileName.c_str(), L"Config") != 0)
341341
{
342342
wstring pluginsFullPathFilter = pluginsFolder;
343343
pathAppend(pluginsFullPathFilter, foundFileName);
@@ -409,7 +409,7 @@ bool PluginsManager::loadPlugins(const wchar_t* dir, const PluginViewList* plugi
409409
while (::FindNextFile(hFindFolder, &foundData))
410410
{
411411
wstring foundFileName2 = foundData.cFileName;
412-
if (foundFileName2 != L"." && foundFileName2 != L".." && wcsicmp(foundFileName2.c_str(), L"Config") != 0)
412+
if (foundFileName2 != L"." && foundFileName2 != L".." && _wcsicmp(foundFileName2.c_str(), L"Config") != 0)
413413
{
414414
wstring pluginsFullPathFilter2 = pluginsFolder;
415415
pathAppend(pluginsFullPathFilter2, foundFileName2);
@@ -652,7 +652,7 @@ void PluginsManager::runPluginCommand(const wchar_t *pluginName, int commandID)
652652
{
653653
for (size_t i = 0, len = _pluginsCommands.size() ; i < len ; ++i)
654654
{
655-
if (!wcsicmp(_pluginsCommands[i]._pluginName.c_str(), pluginName))
655+
if (!_wcsicmp(_pluginsCommands[i]._pluginName.c_str(), pluginName))
656656
{
657657
if (_pluginsCommands[i]._funcID == commandID)
658658
{

PowerEditor/src/MISC/PluginsManager/PluginsManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ friend class PluginsAdminDlg;
152152

153153
bool isInLoadedDlls(const wchar_t *fn) const {
154154
for (size_t i = 0; i < _loadedDlls.size(); ++i)
155-
if (wcsicmp(fn, _loadedDlls[i]._fileName.c_str()) == 0)
155+
if (_wcsicmp(fn, _loadedDlls[i]._fileName.c_str()) == 0)
156156
return true;
157157
return false;
158158
}

PowerEditor/src/MISC/RegExt/regExtDlg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ intptr_t CALLBACK RegExtDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPa
208208
{
209209
for (int i = 1 ; i < nbExtMax ; ++i)
210210
{
211-
if (!wcsicmp(ext2Sup, defExtArray[langIndex][i]))
211+
if (!_wcsicmp(ext2Sup, defExtArray[langIndex][i]))
212212
{
213213
::SendDlgItemMessage(_hSelf, IDC_REGEXT_LANGEXT_LIST, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(ext2Sup));
214214
return TRUE;
@@ -256,7 +256,7 @@ intptr_t CALLBACK RegExtDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPa
256256

257257
::SendDlgItemMessage(_hSelf, LOWORD(wParam), LB_GETTEXT, i, reinterpret_cast<LPARAM>(itemName));
258258

259-
if (!wcsicmp(defExtArray[nbSupportedLang-1][0], itemName))
259+
if (!_wcsicmp(defExtArray[nbSupportedLang-1][0], itemName))
260260
{
261261
::ShowWindow(::GetDlgItem(_hSelf, IDC_REGEXT_LANGEXT_LIST), SW_HIDE);
262262
::ShowWindow(::GetDlgItem(_hSelf, IDC_CUSTOMEXT_EDIT), SW_SHOW);

PowerEditor/src/Notepad_plus.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6307,7 +6307,7 @@ bool Notepad_plus::getIntegralDockingData(tTbData & dockData, int & iCont, bool
63076307
{
63086308
const PluginDlgDockingInfo & pddi = dockingData._pluginDockInfo[i];
63096309

6310-
if (!wcsicmp(pddi._name.c_str(), dockData.pszModuleName) && (pddi._internalID == dockData.dlgID))
6310+
if (!_wcsicmp(pddi._name.c_str(), dockData.pszModuleName) && (pddi._internalID == dockData.dlgID))
63116311
{
63126312
iCont = pddi._currContainer;
63136313
isVisible = pddi._isVisible;
@@ -8348,19 +8348,19 @@ int Notepad_plus::getQuoteIndexFrom(const wchar_t* quoter) const
83488348
if (!quoter)
83498349
return -1;
83508350

8351-
if (wcsicmp(quoter, L"Get them all!!!") == 0)
8351+
if (_wcsicmp(quoter, L"Get them all!!!") == 0)
83528352
return -2;
83538353

83548354
int nbQuote = sizeof(quotes) / sizeof(QuoteParams);
8355-
if (wcsicmp(quoter, L"random") == 0)
8355+
if (_wcsicmp(quoter, L"random") == 0)
83568356
{
83578357
srand(static_cast<UINT>(time(NULL)));
83588358
return getRandomNumber(nbQuote);
83598359
}
83608360

83618361
for (int i = 0; i < nbQuote; ++i)
83628362
{
8363-
if (wcsicmp(quotes[i]._quoter, quoter) == 0)
8363+
if (_wcsicmp(quotes[i]._quoter, quoter) == 0)
83648364
return i;
83658365
}
83668366
return -1;

0 commit comments

Comments
 (0)