Skip to content

Commit

Permalink
Use explicite L to replace TEXT - part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Jul 18, 2024
1 parent 8866d4b commit a427ace
Show file tree
Hide file tree
Showing 59 changed files with 185 additions and 185 deletions.
4 changes: 2 additions & 2 deletions PowerEditor/src/MISC/Common/verifySignedfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ bool SecurityGuard::checkSha256(const std::wstring& filePath, NppModule module2c

wchar_t sha2hashStr[65] = { '\0' };
for (size_t i = 0; i < 32; i++)
wsprintf(sha2hashStr + i * 2, TEXT("%02x"), sha2hash[i]);
wsprintf(sha2hashStr + i * 2, L"%02x", sha2hash[i]);

std::vector<std::wstring>* moduleSha256 = nullptr;

Expand Down Expand Up @@ -149,7 +149,7 @@ bool SecurityGuard::verifySignedLibrary(const std::wstring& filepath)
DWORD netstatus;
QOCINFO oci;
oci.dwSize = sizeof(oci);
CONST TCHAR* msftTEXTest_site = TEXT("http://www.msftncsi.com/ncsi.txt");
CONST TCHAR* msftTEXTest_site = L"http://www.msftncsi.com/ncsi.txt";
bool online = false;
online = (0 != IsNetworkAlive(&netstatus));
online = online && (0 == GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/MISC/Exception/MiniDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bool MiniDumper::writeDump(EXCEPTION_POINTERS * pExceptionInfo)
wcscat_s(szDumpPath, L"\\NppDump.dmp");

// ask the user if they want to save a dump file
int msgret = ::MessageBox(NULL, TEXT("Do you want to save a dump file?\r\nDoing so can aid in developing Notepad++."), msgTitle, MB_YESNO);
int msgret = ::MessageBox(NULL, L"Do you want to save a dump file?\r\nDoing so can aid in developing Notepad++.", msgTitle, MB_YESNO);
if (msgret == IDYES)
{
// create the file
Expand Down
4 changes: 2 additions & 2 deletions PowerEditor/src/MISC/RegExt/regExtDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const TCHAR defExtArray[nbSupportedLang][nbExtMax][extNameMax] =
{L"Notepad",
L".txt", L".log"
},
{TEXT("ms ini/inf"),
{L"ms ini/inf",
L".ini", L".inf"
},
{L"c, c++, objc",
L".h", L".hh", L".hpp", L".hxx", L".c", L".cpp", L".cxx", L".cc",
L".m", L".mm",
L".vcxproj", L".vcproj", L".props", L".vsprops", L".manifest"
},
{TEXT("java, c#, pascal"),
{L"java, c#, pascal",
L".java", L".cs", L".pas", L".pp", L".inc"
},
{L"web script",
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/MISC/RegExt/regExtDlg.rc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

IDD_REGEXT_BOX DIALOGEX 115, 10, 460, 205
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | DS_CONTROL
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "Please exit Notepad++ and relaunch Notepad++ in Administrator mode to use this feature.",IDC_ADMINMUSTBEONMSG_STATIC,20,0,300,16
LTEXT "Supported extensions:",IDC_SUPPORTEDEXTS_STATIC,70,18,80,8
Expand Down
10 changes: 5 additions & 5 deletions PowerEditor/src/MISC/md5/md5Dlgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ intptr_t CALLBACK HashFromFilesDlg::run_dlgProc(UINT message, WPARAM wParam, LPA
case IDC_HASH_FILEBROWSER_BUTTON:
{
CustomFileDialog fDlg(_hSelf);
fDlg.setExtFilter(L"All types", TEXT(".*"));
fDlg.setExtFilter(L"All types", L".*");

const auto& fns = fDlg.doOpenMultiFilesDlg();
if (!fns.empty())
Expand Down Expand Up @@ -272,28 +272,28 @@ void HashFromFilesDlg::doDialog(bool isRTL)
case hash_md5:
{
title = L"Generate MD5 digest from files";
buttonText = TEXT("Choose files to &generate MD5...");
buttonText = L"Choose files to &generate MD5...";
}
break;

case hash_sha1:
{
title = L"Generate SHA-1 digest from files";
buttonText = TEXT("Choose files to &generate SHA-1...");
buttonText = L"Choose files to &generate SHA-1...";
}
break;

case hash_sha256:
{
title = L"Generate SHA-256 digest from files";
buttonText = TEXT("Choose files to &generate SHA-256...");
buttonText = L"Choose files to &generate SHA-256...";
}
break;

case hash_sha512:
{
title = L"Generate SHA-1 digest from files";
buttonText = TEXT("Choose files to &generate SHA-512...");
buttonText = L"Choose files to &generate SHA-512...";
}
break;

Expand Down
10 changes: 5 additions & 5 deletions PowerEditor/src/Notepad_plus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ END

IDD_ABOUTBOX DIALOGEX 0, 0, 270, 240
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER | WS_SYSMENU
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
EDITTEXT IDC_BUILD_DATETIME,150,2,150,10, ES_READONLY | NOT WS_BORDER
CONTROL "", IDI_NPPABOUT_LOGO,"Static",SS_OWNERDRAW,10,5,128,128
Expand Down Expand Up @@ -1343,7 +1343,7 @@ IDD_DEBUGINFOBOX DIALOGEX 0, 0, 246, 195
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Debug Info"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "",IDC_STATIC,8,3,230,151,BS_CENTER
EDITTEXT IDC_DEBUGINFO_EDIT,18,16,210,128,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
Expand All @@ -1355,7 +1355,7 @@ IDD_DOSAVEORNOTBOX DIALOGEX 0, 0, 312, 80
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Save"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "",IDC_DOSAVEORNOTTEXT,7,10,290,40,SS_EDITCONTROL
DEFPUSHBUTTON "&Yes",IDYES,10,60,50,14
Expand All @@ -1369,7 +1369,7 @@ IDD_DOSAVEALLBOX DIALOGEX 0, 0, 260, 95
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Save"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "",IDC_DOSAVEALLTEXT,7,10,250,70,SS_EDITCONTROL
DEFPUSHBUTTON "&Yes",IDYES,47,75,50,14
Expand All @@ -1381,7 +1381,7 @@ IDD_GOLINE DIALOGEX 0, 0, 258, 75
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Go To..."
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
FONT 8, L"MS Shell Dlg", 0, 0, 0x0
BEGIN
CONTROL "&Line",IDC_RADIO_GOTOLINE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,5,80,10
CONTROL "&Offset",IDC_RADIO_GOTOOFFSET,"Button",BS_AUTORADIOBUTTON,98,5,80,10
Expand Down
4 changes: 2 additions & 2 deletions PowerEditor/src/ScintillaComponent/FindReplaceDlg.rc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ IDB_INCREMENTAL_BG BITMAP "../icons/incrementalBg.bmp"

IDD_INCREMENT_FIND DIALOGEX 0, 0, 680, 20
STYLE DS_SYSMODAL | DS_CONTROL | DS_FIXEDSYS | WS_CHILD | WS_CLIPCHILDREN
FONT 8, TEXT("MS Shell Dlg")
FONT 8, L"MS Shell Dlg"
BEGIN
PUSHBUTTON "✕",IDCANCEL,2,3,16,14
RTEXT "Find:",IDC_INCSTATIC,18,6,46,12
Expand All @@ -114,7 +114,7 @@ IDD_FINDRESULT DIALOGEX 0, 0, 223, 67
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE
CAPTION "Search results"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
FONT 8, L"MS Shell Dlg", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON ">",IDC_INCFINDNXTOK,243,0,16,14,NOT WS_VISIBLE // dummy control to prevent issue with focus (search result selection)
END
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/ScintillaComponent/FunctionCallTip.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FunctionCallTip {
TCHAR _stop = ')';
TCHAR _param = ',';
TCHAR _terminal = ';';
generic_string _additionalWordChar = TEXT("");
generic_string _additionalWordChar = L"";
bool _ignoreCase = true;
bool _selfActivated = false;

Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/ScintillaComponent/GoToLineDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public :
else
{
// clean Line Edit
::SetDlgItemText(_hSelf, ID_GOLINE_EDIT, TEXT(""));
::SetDlgItemText(_hSelf, ID_GOLINE_EDIT, L"");
}
};

Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/ScintillaComponent/columnEditor.rc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ IDD_COLUMNEDIT DIALOGEX 0, 0, 220, 214
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Column / Multi-Selection Editor"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
FONT 8, L"MS Shell Dlg", 0, 0, 0x0
BEGIN
CONTROL "&Text to Insert",IDC_COL_TEXT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,13,6,124,10
CONTROL "&Number to Insert",IDC_COL_NUM_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,13,68,204,10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findText(const
search.chrg.cpMax = static_cast<Sci_Position>(end);

LangType lang = (_pEditView->getCurrentBuffer())->getLangType();
if (lang == L_XML || (lang == L_HTML && wcsicmp(PathFindExtension((_pEditView->getCurrentBuffer())->getFileName()), TEXT(".xhtml")) == 0))
if (lang == L_XML || (lang == L_HTML && wcsicmp(PathFindExtension((_pEditView->getCurrentBuffer())->getFileName()), L".xhtml") == 0))
flags = flags | SCFIND_MATCHCASE;

intptr_t result = _pEditView->execute(SCI_FINDTEXTFULL, flags, reinterpret_cast<LPARAM>(&search));
Expand Down
4 changes: 2 additions & 2 deletions PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ bool TiXmlDocumentA::LoadUnicodeFilePath( const TCHAR* filename )
// See STL_STRING_BUG above.
// Fixed with the StringToBuffer class.

FILE* file = _wfopen(filename, TEXT("r"));
FILE* file = _wfopen(filename, L"r");

if ( file )
{
Expand Down Expand Up @@ -832,7 +832,7 @@ bool TiXmlDocumentA::SaveFile( const char * filename ) const
bool TiXmlDocumentA::SaveUnicodeFilePath( const TCHAR* filename ) const
{
// The old c stuff lives on...
FILE* fp = _wfopen( filename, TEXT("wc") );
FILE* fp = _wfopen( filename, L"wc" );
if ( fp )
{
Print( fp, 0 );
Expand Down
4 changes: 2 additions & 2 deletions PowerEditor/src/TinyXml/tinystr.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class TiXmlString
{
if (allocated)
return cstring;
return TEXT("");
return L"";
}

// Return the length of a TiXmlString
Expand Down Expand Up @@ -115,7 +115,7 @@ class TiXmlString
}

// Checks if a TiXmlString contains only whitespace (same rules as isspace)
// Not actually used in tinyxml. Conflicts with a C macro, TEXT("isblank"),
// Not actually used in tinyxml. Conflicts with a C macro, L"isblank",
// which is a problem. Commenting out. -lee
// bool isblank () const;

Expand Down
14 changes: 7 additions & 7 deletions PowerEditor/src/TinyXml/tinyxml.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class TiXmlNode : public TiXmlBase
void SetValue( const std::wstring& _value )
{
StringToBuffer buf( _value );
SetValue( buf.buffer ? buf.buffer : TEXT("") );
SetValue( buf.buffer ? buf.buffer : L"" );
}
#endif

Expand Down Expand Up @@ -614,13 +614,13 @@ class TiXmlAttribute : public TiXmlBase
void SetName( const std::wstring& _name )
{
StringToBuffer buf( _name );
SetName ( buf.buffer ? buf.buffer : TEXT("error") );
SetName ( buf.buffer ? buf.buffer : L"error" );
}
/// STL string form.
void SetValue( const std::wstring& _value )
{
StringToBuffer buf( _value );
SetValue( buf.buffer ? buf.buffer : TEXT("error") );
SetValue( buf.buffer ? buf.buffer : L"error" );
}
#endif

Expand Down Expand Up @@ -1092,7 +1092,7 @@ class TiXmlDocument : public TiXmlNode
*/
void ClearError() { error = false;
errorId = 0;
errorDesc = TEXT("");
errorDesc = L"";
errorLocation.row = errorLocation.col = 0;
//errorLocation.last = 0;
}
Expand Down Expand Up @@ -1130,9 +1130,9 @@ protected :
Take an example:
@verbatim
<Document>
<Element attributeA = TEXT("valueA")>
<Child attributeB = TEXT("value1") />
<Child attributeB = TEXT("value2") />
<Element attributeA = L"valueA">
<Child attributeB = L"value1" />
<Child attributeB = L"value2" />
</Element>
<Document>
@endverbatim
Expand Down
28 changes: 14 additions & 14 deletions PowerEditor/src/TinyXml/tinyxmlerror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ distribution.

const TCHAR* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
{
TEXT("No error"),
TEXT("Error"),
TEXT("Failed to open file"),
TEXT("Memory allocation failed."),
TEXT("Error parsing Element."),
TEXT("Failed to read Element name"),
TEXT("Error reading Element value."),
TEXT("Error reading Attributes."),
TEXT("Error: empty tag."),
TEXT("Error reading end tag."),
TEXT("Error parsing Unknown."),
TEXT("Error parsing Comment."),
TEXT("Error parsing Declaration."),
TEXT("Error document empty.")
L"No error",
L"Error",
L"Failed to open file",
L"Memory allocation failed.",
L"Error parsing Element.",
L"Failed to read Element name",
L"Error reading Element value.",
L"Error reading Attributes.",
L"Error: empty tag.",
L"Error reading end tag.",
L"Error parsing Unknown.",
L"Error parsing Comment.",
L"Error parsing Declaration.",
L"Error document empty."
};
Loading

0 comments on commit a427ace

Please sign in to comment.