Index: lexilla/.gitattributes =================================================================== --- lexilla/.gitattributes (版本 0) +++ lexilla/.gitattributes (版本 45) @@ -0,0 +1,95 @@ +* -text +**.cxx text +**.cpp text +**.c text +**.h text +**.hpp text +**.m text +**.mm text +**.iface text +**.template text +**.mk text +**.mk text +**.py text +**.rc text +**.css text +**.html text +**.bat text +**.bsh text +**.zsh text +**.mak text +**.def text +**.manifest text +**.properties text +**.props text +**.session text +**.styled text +**.folded text +**.adoc text +**.asp text +**.aspx text +**.php text +**.vb text +**.vbs text +**.asm text +**.cob text +**.cmake text +**.d text +**.dart text +**.diff text +**.erl text +**.f text +**.gd text +**.gui text +**.iss text +**.jl text +**.json text +**.lua text +**.m3 text +**.matlab text +**.ml text +**.nim text +**.nix text +**.octave text +**.p text +**.pas text +**.pl text +**.p6 text +**.ps1 text +**.r text +**.rb text +**.roff text +**.rs text +**.sql text +**.st text +**.tcl text +**.toml text +**.tsql text +**.err text +**.mms text +**.tex text +**.fs text +**.vh text +**.vhd text +**.x12 text +**.xml text +**.yaml text +**.zig text +**.md text +**.txt text +**.pch text +**.hg* text +**.dsp text +**.pbxproj text +**.plist text +**.xcworkspacedata text +**.pro text +**.gen text +**makefile text +**.bmp binary +**.cur binary +**.ico binary +**.jpg binary +**.png binary +**.sh text eol=lf +tgzsrc text eol=lf Index: lexilla/.github/workflows/build-check-win32.yml =================================================================== --- lexilla/.github/workflows/build-check-win32.yml (版本 44) +++ lexilla/.github/workflows/build-check-win32.yml (版本 45) @@ -3,16 +3,24 @@ 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 @@ - 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 @@ 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 Index: lexilla/access/LexillaAccess.cxx =================================================================== --- lexilla/access/LexillaAccess.cxx (版本 44) +++ lexilla/access/LexillaAccess.cxx (版本 45) @@ -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 @@ 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 @@ } } } - return std::string(); + return {}; } std::vector Lexilla::LibraryProperties() { Index: lexilla/cppcheck.suppress =================================================================== --- lexilla/cppcheck.suppress (版本 44) +++ lexilla/cppcheck.suppress (版本 45) @@ -70,6 +70,7 @@ 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 @@ -76,6 +77,7 @@ 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 @@ 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 @@ 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 @@ 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. Index: lexilla/doc/Lexilla.html =================================================================== --- lexilla/doc/Lexilla.html (版本 44) +++ lexilla/doc/Lexilla.html (版本 45) @@ -9,7 +9,7 @@ - +