From fa25b8cd5ea6b25682f8efc6c6cb8a2ed13eb348 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 27 Jul 2025 11:21:06 +0100 Subject: [PATCH] Added instructions and scripts the convert ETL header guards --- Converting header guards.txt | 12 ++++++++++++ guard2once.txt | 10 ---------- scripts/convert_headers_to_use_guards.bat | 1 + scripts/convert_headers_to_use_once.bat | 1 + test/vs2022/etl.vcxproj | 3 +++ 5 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 Converting header guards.txt delete mode 100644 guard2once.txt create mode 100644 scripts/convert_headers_to_use_guards.bat create mode 100644 scripts/convert_headers_to_use_once.bat diff --git a/Converting header guards.txt b/Converting header guards.txt new file mode 100644 index 00000000..ebac60b0 --- /dev/null +++ b/Converting header guards.txt @@ -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 diff --git a/guard2once.txt b/guard2once.txt deleted file mode 100644 index b8476a5c..00000000 --- a/guard2once.txt +++ /dev/null @@ -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" . \ No newline at end of file diff --git a/scripts/convert_headers_to_use_guards.bat b/scripts/convert_headers_to_use_guards.bat new file mode 100644 index 00000000..fad64430 --- /dev/null +++ b/scripts/convert_headers_to_use_guards.bat @@ -0,0 +1 @@ +once2guard -r -p "name | snake | prepend ETL_ | append _INCLUDED | upper" ../include/etl diff --git a/scripts/convert_headers_to_use_once.bat b/scripts/convert_headers_to_use_once.bat new file mode 100644 index 00000000..b7dc1656 --- /dev/null +++ b/scripts/convert_headers_to_use_once.bat @@ -0,0 +1 @@ +guard2once -r "../include/etl" diff --git a/test/vs2022/etl.vcxproj b/test/vs2022/etl.vcxproj index 9955e527..721f9bcc 100644 --- a/test/vs2022/etl.vcxproj +++ b/test/vs2022/etl.vcxproj @@ -10496,6 +10496,8 @@ + + @@ -10512,6 +10514,7 @@ +