mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-05 18:40:01 +00:00
Merge pull request #8 from NirSonnenschein/fix_check-names.sh
modify check-names.sh and list-macros.sh to work with PSA constants
This commit is contained in:
commit
005401e6a7
@ -40,7 +40,7 @@ diff macros identifiers | sed -n -e 's/< //p' > actual-macros
|
||||
for THING in actual-macros enum-consts; do
|
||||
printf "Names of $THING: "
|
||||
test -r $THING
|
||||
BAD=$( grep -v '^MBEDTLS_[0-9A-Z_]*[0-9A-Z]$' $THING || true )
|
||||
BAD=$( grep -E -v '^(MBEDTLS|PSA)_[0-9A-Z_]*[0-9A-Z]$' $THING || true )
|
||||
if [ "x$BAD" = "x" ]; then
|
||||
echo "PASS"
|
||||
else
|
||||
@ -65,7 +65,7 @@ done
|
||||
|
||||
printf "Likely typos: "
|
||||
sort -u actual-macros enum-consts > _caps
|
||||
HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
|
||||
NL='
|
||||
'
|
||||
sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \
|
||||
|
@ -7,7 +7,7 @@ if [ -d include/mbedtls ]; then :; else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
|
||||
|
||||
sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
|
||||
| egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \
|
||||
|
Loading…
x
Reference in New Issue
Block a user