diff options
| author | _Tradam <[email protected]> | 2023-09-08 01:29:47 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-08 01:29:47 +0000 |
| commit | 3c76c7f3d5db3f9586a90d03f8fbb02d79de9acd (patch) | |
| tree | afbe4b540967223911f7c5de36559b82154f02f3 /src/singleheader.py | |
| parent | 0841165881871ee01b782129be681209aeed2423 (diff) | |
| parent | 1a72205fe05c2375cfd380dd8381a8460d9ed8d1 (diff) | |
| download | STC-modified-modified.tar.gz STC-modified-modified.zip | |
Diffstat (limited to 'src/singleheader.py')
| -rw-r--r-- | src/singleheader.py | 18 |
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 ) - ) |
