summaryrefslogtreecommitdiffhomepage
path: root/src/singleheader.py
diff options
context:
space:
mode:
author_Tradam <[email protected]>2023-09-08 01:29:47 +0000
committerGitHub <[email protected]>2023-09-08 01:29:47 +0000
commit3c76c7f3d5db3f9586a90d03f8fbb02d79de9acd (patch)
treeafbe4b540967223911f7c5de36559b82154f02f3 /src/singleheader.py
parent0841165881871ee01b782129be681209aeed2423 (diff)
parent1a72205fe05c2375cfd380dd8381a8460d9ed8d1 (diff)
downloadSTC-modified-modified.tar.gz
STC-modified-modified.zip
Merge branch 'stclib:master' into modifiedHEADmodified
Diffstat (limited to 'src/singleheader.py')
-rw-r--r--src/singleheader.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/singleheader.py b/src/singleheader.py
index 2255568d..637edbcb 100644
--- a/src/singleheader.py
+++ b/src/singleheader.py
@@ -68,12 +68,14 @@ def process_file(
if __name__ == "__main__":
- print(
- process_file(
- abspath(sys.argv[1]),
- [],
- # We use an include guard instead of `#pragma once` because Godbolt will
- # cause complaints about `#pragma once` when they are used in URL includes.
- [abspath(sys.argv[1])],
+ with open(sys.argv[2], "w", newline='\n') as f:
+ print(
+ process_file(
+ abspath(sys.argv[1]),
+ [],
+ # We use an include guard instead of `#pragma once` because Godbolt will
+ # cause complaints about `#pragma once` when they are used in URL includes.
+ [abspath(sys.argv[1])],
+ ),
+ file=f
)
- )