Added instructions and scripts the convert ETL header guards

This commit is contained in:
John Wellbelove 2025-07-27 11:21:06 +01:00
parent 5fc7e33228
commit fa25b8cd5e
5 changed files with 17 additions and 10 deletions

View File

@ -0,0 +1,12 @@
How to convert the ETL header beween #include guards and #pragma once.
Install
python3 -m pip install guardonce
Navigate to etl/scripts
Change from #include guard to #pragma once
./convert_headers_to_use_once.bat
Change from #pragma once to #include guard
./convert_headers_to_use_guards.bat

View File

@ -1,10 +0,0 @@
Install
python -m pip install guardonce
Navigate to etl/include/etl
Change from #include guard to #pragma once
guard2once -r "."
Change from #pragma once to #include guard
once2guard -r -p "path | snake | prepend ETL | upper" .

View File

@ -0,0 +1 @@
once2guard -r -p "name | snake | prepend ETL_ | append _INCLUDED | upper" ../include/etl

View File

@ -0,0 +1 @@
guard2once -r "../include/etl"

View File

@ -10496,6 +10496,8 @@
<None Include="..\..\library.properties" /> <None Include="..\..\library.properties" />
<None Include="..\..\meson.build" /> <None Include="..\..\meson.build" />
<None Include="..\..\README.md" /> <None Include="..\..\README.md" />
<None Include="..\..\scripts\convert_headers_to_use_guards.bat" />
<None Include="..\..\scripts\convert_headers_to_use_once.bat" />
<None Include="..\..\scripts\generator_test.bat" /> <None Include="..\..\scripts\generator_test.bat" />
<None Include="..\..\scripts\generator_test.py" /> <None Include="..\..\scripts\generator_test.py" />
<None Include="..\..\scripts\update_release.bat" /> <None Include="..\..\scripts\update_release.bat" />
@ -10512,6 +10514,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Text Include="..\..\CMakeLists.txt" /> <Text Include="..\..\CMakeLists.txt" />
<Text Include="..\..\Converting header guards.txt" />
<Text Include="..\..\support\Release notes.txt" /> <Text Include="..\..\support\Release notes.txt" />
<Text Include="..\..\todo.txt" /> <Text Include="..\..\todo.txt" />
<Text Include="..\..\version.txt" /> <Text Include="..\..\version.txt" />