Implement unifdef-all script
This script is useful for improving code readability when researching code. Do not commit results of this script.
This commit is contained in:
parent
b62a637157
commit
b47e5aa87f
1 changed files with 17 additions and 0 deletions
17
scripts/unifdef-all.sh
Executable file
17
scripts/unifdef-all.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script uses unifdef to mass-remove code inside ifdefs, that are not
|
||||
# relevant to Linux.
|
||||
#
|
||||
# Use it only to improve readability when researching code.
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)" || exit
|
||||
|
||||
git ls-files ./*.{h,cpp} | xargs unifdef \
|
||||
-U WIN32 \
|
||||
-U OS2 \
|
||||
-U _WIN32 \
|
||||
-U _WIN64 \
|
||||
-U MACOSX \
|
||||
-U C_DDRAW \
|
||||
-m
|
Loading…
Add table
Reference in a new issue