Add convenience script to replace stdint.h types with Types.h types
This commit is contained in:
parent
285c3cc411
commit
1f2901d41a
25
tools/replace-stdint.sh
Executable file
25
tools/replace-stdint.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
source $(dirname $0)/env.sh
|
||||||
|
|
||||||
|
cd $LUNA_ROOT
|
||||||
|
|
||||||
|
SOURCES=($(find kernel/src -type f | grep -v "\.asm" | grep -v "bootboot.h"))
|
||||||
|
SOURCES+=($(find luna -type f | grep -v "CMakeLists.txt" | grep -v "Types.h" | grep -v "PlacementNew.h"))
|
||||||
|
|
||||||
|
for f in ${SOURCES[@]}
|
||||||
|
do
|
||||||
|
sed -i 's/uint8_t/u8/g' $f
|
||||||
|
sed -i 's/uint16_t/u16/g' $f
|
||||||
|
sed -i 's/uint32_t/u32/g' $f
|
||||||
|
sed -i 's/uint64_t/u64/g' $f
|
||||||
|
|
||||||
|
sed -i 's/int8_t/i8/g' $f
|
||||||
|
sed -i 's/int16_t/i16/g' $f
|
||||||
|
sed -i 's/int32_t/i32/g' $f
|
||||||
|
sed -i 's/int64_t/i64/g' $f
|
||||||
|
|
||||||
|
sed -i 's/size_t/usize/g' $f
|
||||||
|
sed -i 's/ssize_t/isize/g' $f
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user