comparison ifndef_wrapper.sh @ 1739:13d834efc376 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Thu, 15 Oct 2020 19:55:15 +0800
parents 0196f4f83fee
children
comparison
equal deleted inserted replaced
1562:768ebf737aa0 1739:13d834efc376
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # Wrap all "#define X Y" with a #ifndef X...#endif" 3 # Wrap all "#define X Y" with a #ifndef X...#endif"
4 4
5 sed -E 's/^( *#define ([^ ]+) .*)/#ifndef \2\ 5 sed 's/^\( *#define \([^ ][^ ]*\) .*\)/#ifndef \2\
6 \1\ 6 \1\
7 #endif/' 7 #endif/'