diff --git a/PowerEditor/scintilla.original.forUpdating/lexilla543.zip b/PowerEditor/scintilla.original.forUpdating/lexilla544.zip similarity index 76% rename from PowerEditor/scintilla.original.forUpdating/lexilla543.zip rename to PowerEditor/scintilla.original.forUpdating/lexilla544.zip index ecee8844a..ff3498c13 100644 Binary files a/PowerEditor/scintilla.original.forUpdating/lexilla543.zip and b/PowerEditor/scintilla.original.forUpdating/lexilla544.zip differ diff --git a/PowerEditor/scintilla.original.forUpdating/scintilla555.zip b/PowerEditor/scintilla.original.forUpdating/scintilla556.zip similarity index 72% rename from PowerEditor/scintilla.original.forUpdating/scintilla555.zip rename to PowerEditor/scintilla.original.forUpdating/scintilla556.zip index d9a249ecc..5b48ab2f9 100644 Binary files a/PowerEditor/scintilla.original.forUpdating/scintilla555.zip and b/PowerEditor/scintilla.original.forUpdating/scintilla556.zip differ diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 895ac6e9a..40a5bc7b9 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -1429,7 +1429,7 @@ bool NppParameters::load() for (const auto& i : udlFiles) { - auto udlDoc = new TiXmlDocument(i); + TiXmlDocument* udlDoc = new TiXmlDocument(i); loadOkay = udlDoc->LoadFile(); if (!loadOkay) { diff --git a/lexilla/.github/workflows/build-check-win32.yml b/lexilla/.github/workflows/build-check-win32.yml index a80e37a3d..5118496d8 100644 --- a/lexilla/.github/workflows/build-check-win32.yml +++ b/lexilla/.github/workflows/build-check-win32.yml @@ -3,16 +3,24 @@ name: "Build and check Lexilla on Win32 with Visual C++" on: [push] jobs: + # Compile for amd64 and cross-compile for arm64. Tests run only for amd64. build: runs-on: windows-latest + strategy: + matrix: + arch: + - amd64 + - amd64_arm64 + env: + TEST: ${{ matrix.arch == 'amd64' && 'test' || '' }} steps: - uses: actions/checkout@v4 - name: Preparing nmake uses: ilammy/msvc-dev-cmd@v1 with: - arch: x64 + arch: ${{ matrix.arch }} - name: Install Scintilla source run: | pwd @@ -24,7 +32,7 @@ jobs: - name: Unit Test run: | cd test/unit - nmake -f test.mak DEBUG=1 test + nmake -f test.mak DEBUG=1 $env:TEST cd ../.. - name: Build Lexilla run: | @@ -33,14 +41,15 @@ jobs: cd .. - uses: actions/upload-artifact@v4 with: - name: lexilla.dll + name: lexilla${{ matrix.arch == 'amd64_arm64' && '-arm64' || '' }}.dll path: bin/lexilla.dll - name: Test lexing and folding run: | cd test - nmake -f testlexers.mak DEBUG=1 test + nmake -f testlexers.mak DEBUG=1 $env:TEST cd .. - name: CheckLexilla C Example + if: matrix.arch == 'amd64' run: | cd examples/CheckLexilla cl -MP CheckLexilla.c -I ../../include -Fe: CheckLexilla diff --git a/lexilla/access/LexillaAccess.cxx b/lexilla/access/LexillaAccess.cxx index 0d77a8bab..4c0c9f240 100644 --- a/lexilla/access/LexillaAccess.cxx +++ b/lexilla/access/LexillaAccess.cxx @@ -30,12 +30,12 @@ namespace { #if defined(_WIN32) -typedef FARPROC Function; -typedef HMODULE Module; +using Function = FARPROC; +using Module = HMODULE; constexpr const char *pathSeparator = "\\"; #else -typedef void *Function; -typedef void *Module; +using Function = void *; +using Module = void *; constexpr const char *pathSeparator = "/"; #endif @@ -164,9 +164,10 @@ bool Lexilla::Load(std::string_view sharedLibraryPaths) { if (fnLexerCount && fnLexerName) { const int nLexers = fnLexerCount(); for (int i = 0; i < nLexers; i++) { - char name[100] = ""; + constexpr size_t lengthName = 200; + char name[lengthName]{}; fnLexerName(i, name, sizeof(name)); - lexers.push_back(name); + lexers.emplace_back(name); } } CreateLexerFn fnCL = FunctionPointer( @@ -268,7 +269,7 @@ std::string Lexilla::NameFromID(int identifier) { } } } - return std::string(); + return {}; } std::vector Lexilla::LibraryProperties() { diff --git a/lexilla/cppcheck.suppress b/lexilla/cppcheck.suppress index 7ad8796a3..7201642a0 100644 --- a/lexilla/cppcheck.suppress +++ b/lexilla/cppcheck.suppress @@ -70,12 +70,14 @@ variableScope:lexilla/lexers/LexCmake.cxx knownConditionTrueFalse:lexilla/lexers/LexCmake.cxx constParameterReference:lexilla/lexers/LexCmake.cxx constParameterReference:lexilla/lexers/LexCOBOL.cxx +constVariablePointer:lexilla/lexers/LexCOBOL.cxx constParameterReference:lexilla/lexers/LexCoffeeScript.cxx constParameterPointer:lexilla/lexers/LexCoffeeScript.cxx knownConditionTrueFalse:lexilla/lexers/LexCoffeeScript.cxx constVariableReference:lexilla/lexers/LexConf.cxx constParameterReference:lexilla/lexers/LexCPP.cxx variableScope:lexilla/lexers/LexCSS.cxx +constVariablePointer:lexilla/lexers/LexCSS.cxx knownConditionTrueFalse:lexilla/lexers/LexDataflex.cxx constParameterReference:lexilla/lexers/LexDataflex.cxx variableScope:lexilla/lexers/LexDataflex.cxx @@ -118,6 +120,7 @@ unreadVariable:lexilla/lexers/LexMatlab.cxx variableScope:lexilla/lexers/LexMatlab.cxx variableScope:lexilla/lexers/LexMetapost.cxx constParameterReference:lexilla/lexers/LexModula.cxx +duplicateBreak:lexilla/lexers/LexModula.cxx variableScope:lexilla/lexers/LexModula.cxx constParameterReference:lexilla/lexers/LexMPT.cxx variableScope:lexilla/lexers/LexMSSQL.cxx @@ -140,6 +143,7 @@ constVariableReference:lexilla/lexers/LexPerl.cxx knownConditionTrueFalse:lexilla/lexers/LexPerl.cxx constParameterReference:lexilla/lexers/LexPLM.cxx constParameterReference:lexilla/lexers/LexPO.cxx +constVariablePointer:lexilla/lexers/LexPOV.cxx constParameterReference:lexilla/lexers/LexPython.cxx shadowVariable:lexilla/lexers/LexPowerPro.cxx knownConditionTrueFalse:lexilla/lexers/LexPowerPro.cxx @@ -188,7 +192,6 @@ constVariableReference:lexilla/lexers/LexX12.cxx constParameterPointer:lexilla/lexers/LexX12.cxx uselessCallsSubstr:lexilla/lexers/LexX12.cxx constParameterReference:lexilla/lexers/LexYAML.cxx -constParameterPointer:lexilla/lexers/LexYAML.cxx knownConditionTrueFalse:lexilla/lexers/LexYAML.cxx // These are due to Accessor::IndentAmount not declaring the callback as taking a const. diff --git a/lexilla/doc/Lexilla.html b/lexilla/doc/Lexilla.html index f8d4f15da..a8379ac47 100644 --- a/lexilla/doc/Lexilla.html +++ b/lexilla/doc/Lexilla.html @@ -9,7 +9,7 @@ - +