summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-23 23:47:01 +0200
committertylov <[email protected]>2023-07-23 23:47:01 +0200
commit82668241cad0acdb6a56b0a520f496f06be9ff9a (patch)
tree4bdafdc0d7fb0063206ff0aa8f82188979dc98a9 /src
parent890e210893d96a6658a838331fa233b4a58723c7 (diff)
downloadSTC-modified-82668241cad0acdb6a56b0a520f496f06be9ff9a.tar.gz
STC-modified-82668241cad0acdb6a56b0a520f496f06be9ff9a.zip
Updated singleheader.py/singleupdate.sh scripts to update stcsingle repository.
Diffstat (limited to 'src')
-rw-r--r--src/singleheader.py18
-rw-r--r--src/singleupdate.sh53
2 files changed, 38 insertions, 33 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
)
- )
diff --git a/src/singleupdate.sh b/src/singleupdate.sh
index 8a621e57..e706dd97 100644
--- a/src/singleupdate.sh
+++ b/src/singleupdate.sh
@@ -1,27 +1,30 @@
d=$(git rev-parse --show-toplevel)
-mkdir -p $d/../stcsingle/c11 $d/../stcsingle/stc
-python singleheader.py $d/include/c11/fmt.h > $d/../stcsingle/c11/fmt.h
-python singleheader.py $d/include/stc/calgo.h > $d/../stcsingle/stc/calgo.h
-python singleheader.py $d/include/stc/carc.h > $d/../stcsingle/stc/carc.h
-python singleheader.py $d/include/stc/cbits.h > $d/../stcsingle/stc/cbits.h
-python singleheader.py $d/include/stc/cbox.h > $d/../stcsingle/stc/cbox.h
-python singleheader.py $d/include/stc/ccommon.h > $d/../stcsingle/stc/ccommon.h
-python singleheader.py $d/include/stc/cdeq.h > $d/../stcsingle/stc/cdeq.h
-python singleheader.py $d/include/stc/clist.h > $d/../stcsingle/stc/clist.h
-python singleheader.py $d/include/stc/cmap.h > $d/../stcsingle/stc/cmap.h
-python singleheader.py $d/include/stc/coption.h > $d/../stcsingle/stc/coption.h
-python singleheader.py $d/include/stc/cpque.h > $d/../stcsingle/stc/cpque.h
-python singleheader.py $d/include/stc/cqueue.h > $d/../stcsingle/stc/cqueue.h
-python singleheader.py $d/include/stc/crand.h > $d/../stcsingle/stc/crand.h
-python singleheader.py $d/include/stc/cregex.h > $d/../stcsingle/stc/cregex.h
-python singleheader.py $d/include/stc/cset.h > $d/../stcsingle/stc/cset.h
-python singleheader.py $d/include/stc/csmap.h > $d/../stcsingle/stc/csmap.h
-python singleheader.py $d/include/stc/cspan.h > $d/../stcsingle/stc/cspan.h
-python singleheader.py $d/include/stc/csset.h > $d/../stcsingle/stc/csset.h
-python singleheader.py $d/include/stc/cstack.h > $d/../stcsingle/stc/cstack.h
-python singleheader.py $d/include/stc/cstr.h > $d/../stcsingle/stc/cstr.h
-python singleheader.py $d/include/stc/csview.h > $d/../stcsingle/stc/csview.h
-python singleheader.py $d/include/stc/cvec.h > $d/../stcsingle/stc/cvec.h
-python singleheader.py $d/include/stc/extend.h > $d/../stcsingle/stc/extend.h
-python singleheader.py $d/include/stc/forward.h > $d/../stcsingle/stc/forward.h
+mkdir -p $d/../stcsingle/c11 $d/../stcsingle/stc/algo
+python singleheader.py $d/include/c11/fmt.h $d/../stcsingle/c11/fmt.h
+python singleheader.py $d/include/stc/algorithm.h $d/../stcsingle/stc/algorithm.h
+python singleheader.py $d/include/stc/coroutine.h $d/../stcsingle/stc/coroutine.h
+python singleheader.py $d/include/stc/algo/sort.h $d/../stcsingle/stc/algo/sort.h
+python singleheader.py $d/include/stc/carc.h $d/../stcsingle/stc/carc.h
+python singleheader.py $d/include/stc/cbits.h $d/../stcsingle/stc/cbits.h
+python singleheader.py $d/include/stc/cbox.h $d/../stcsingle/stc/cbox.h
+python singleheader.py $d/include/stc/ccommon.h $d/../stcsingle/stc/ccommon.h
+python singleheader.py $d/include/stc/cdeq.h $d/../stcsingle/stc/cdeq.h
+python singleheader.py $d/include/stc/clist.h $d/../stcsingle/stc/clist.h
+python singleheader.py $d/include/stc/cmap.h $d/../stcsingle/stc/cmap.h
+python singleheader.py $d/include/stc/coption.h $d/../stcsingle/stc/coption.h
+python singleheader.py $d/include/stc/cpque.h $d/../stcsingle/stc/cpque.h
+python singleheader.py $d/include/stc/cqueue.h $d/../stcsingle/stc/cqueue.h
+python singleheader.py $d/include/stc/crand.h $d/../stcsingle/stc/crand.h
+python singleheader.py $d/include/stc/cregex.h $d/../stcsingle/stc/cregex.h
+python singleheader.py $d/include/stc/cset.h $d/../stcsingle/stc/cset.h
+
+python singleheader.py $d/include/stc/csmap.h $d/../stcsingle/stc/csmap.h
+python singleheader.py $d/include/stc/cspan.h $d/../stcsingle/stc/cspan.h
+python singleheader.py $d/include/stc/csset.h $d/../stcsingle/stc/csset.h
+python singleheader.py $d/include/stc/cstack.h $d/../stcsingle/stc/cstack.h
+python singleheader.py $d/include/stc/cstr.h $d/../stcsingle/stc/cstr.h
+python singleheader.py $d/include/stc/csview.h $d/../stcsingle/stc/csview.h
+python singleheader.py $d/include/stc/cvec.h $d/../stcsingle/stc/cvec.h
+python singleheader.py $d/include/stc/extend.h $d/../stcsingle/stc/extend.h
+python singleheader.py $d/include/stc/forward.h $d/../stcsingle/stc/forward.h
echo "$d/../stcsingle headers updated"