parent
116cd3c6dc
commit
b6524f2b20
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
ret=0
|
||||
|
||||
check(){
|
||||
i=$1
|
||||
shift
|
||||
sed -n "/^$i(/{g;1!p;};h" $@ >eapi.decl
|
||||
lines=$(wc -l eapi.decl|cut -f1 -d' ')
|
||||
if [ $lines == 0 ]; then
|
||||
echo -e "\e[31;1mNOT IMPLEMENTED\e[m\t $i"
|
||||
ret=1
|
||||
elif [ $lines != 1 ]; then
|
||||
echo -e "\e[31;1mMULTI IMPLEMENTED\e[m\t $i"
|
||||
ret=1
|
||||
else
|
||||
cat eapi.decl | grep -qe '^EAPI'
|
||||
if [ $? != 0 ];then
|
||||
echo -e "\e[31;1mMISSING EAPI\e[m\t $i"
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
rm eapi.decl
|
||||
}
|
||||
|
||||
grep -e "^ *EAPI.*(.*)" src/lib/Elementary.h.in | grep -oe 'elm_\w\+' >eapi.list
|
||||
|
||||
for i in $(cat eapi.list); do
|
||||
check $i $(ls -1 src/lib/*.c | grep -v elm_widget | grep -v els_cursor)
|
||||
done
|
||||
|
||||
grep -e "^ *EAPI.*(.*)" src/lib/Elementary_Cursor.h | grep -oe 'elm_\w\+' >eapi.list
|
||||
|
||||
for i in $(cat eapi.list); do
|
||||
check $i src/lib/els_cursor.c src/lib/elm_main.c
|
||||
done
|
||||
|
||||
grep -e "^ *EAPI.*(.*)" src/lib/elm_widget.h | grep -oe '_\?elm_\w\+' >eapi.list
|
||||
|
||||
for i in $(cat eapi.list); do
|
||||
check $i src/lib/elm_widget.c
|
||||
done
|
||||
|
||||
rm eapi.list
|
||||
exit $ret
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
ret=0
|
||||
|
||||
sed -n '/^EAPI /{n;p;}' src/lib/*.c >eapi.list
|
||||
|
||||
for i in $(cat eapi.list|grep -o "^\w\+"); do
|
||||
grep -q "\<$i\>" src/lib/elm_priv.h
|
||||
if [ $? == 0 ]; then
|
||||
echo -e "\e[31;1mEAPI in priv.h\e[m\t $i"
|
||||
ret=1
|
||||
fi
|
||||
|
||||
echo $i | grep -qe '^_\?elm_widget'
|
||||
if [ $? == 0 ]; then
|
||||
grep -qe "EAPI.*\<$i\>" src/lib/elm_widget.h
|
||||
if [ $? != 0 ]; then
|
||||
echo -e "\e[31;1m WIDGET missing in widget.h\e[m\t $i"
|
||||
ret=1
|
||||
fi
|
||||
grep -qe "EAPI.*\<$i\>" src/lib/Elementary.h.in
|
||||
if [ $? == 0 ]; then
|
||||
echo -e "\e[31;1m WIDGET in Elm.h\e[m\t $i"
|
||||
ret=1
|
||||
fi
|
||||
else
|
||||
grep -qe "EAPI.*\<$i\>" src/lib/Elementary.h.in
|
||||
if [ $? != 0 ]; then
|
||||
echo -e "\e[31;1m ELM missing in Elm.h\e[m\t $i"
|
||||
ret=1
|
||||
fi
|
||||
grep -qe "EAPI.*\<$i\>" src/lib/elm_widget.h
|
||||
if [ $? == 0 ]; then
|
||||
echo -e "\e[31;1m ELM in widget.h\e[m\t $i"
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
rm eapi.list
|
||||
exit $ret
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
ret=0
|
||||
check(){
|
||||
func=$(echo $1 | grep -oe 'elm_\w\+')
|
||||
echo $1 | grep -qe "_get([^\(const \)]\([^,\*)]\)\+\*"
|
||||
if [ $? == 0 ];then
|
||||
echo -e "\e[31;1mNOT CONST\e[m\t $func"
|
||||
ret=1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
HEADERS="src/lib/Elementary.h.in
|
||||
src/lib/Elementary_Cursor.h
|
||||
src/lib/elm_widget.h"
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
for header in $HEADERS; do
|
||||
grep -e "^ *EAPI.*(.*)" $header | grep -e 'elm_\w\+_get' >eapi.list
|
||||
|
||||
for i in $(cat eapi.list); do
|
||||
check $i $header
|
||||
done
|
||||
rm eapi.list
|
||||
done
|
||||
exit $ret
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
ret=0
|
||||
|
||||
check(){
|
||||
func=$(echo $1 | grep -oe 'elm_\w\+')
|
||||
base=${func%_set}
|
||||
echo $1 | grep -qe "_set(const \+[^\(char \+\*\)]"
|
||||
if [ $? == 0 ];then
|
||||
echo -e "\e[31;1mCONST\e[m\t $func"
|
||||
ret=1
|
||||
fi
|
||||
echo $1 | grep -qe "EAPI \+\(void\|Eina_Bool\)"
|
||||
if [ $? != 0 ];then
|
||||
echo -e "\e[31;1mUNKNOWN RETURN\e[m\t $func"
|
||||
ret=1
|
||||
fi
|
||||
echo $1 | grep -qe "\(cb_set\|all_set\)("
|
||||
if [ $? != 0 ];then
|
||||
grep -qe "EAPI.*\<${base}_get\>" $2
|
||||
if [ $? != 0 ];then
|
||||
echo -e "\e[31;1mMISSING GETTER\e[m\t $func"
|
||||
ret=1
|
||||
fi
|
||||
echo $1 | grep -qe "\(content\|icon\|end\)_set(\w\+ \+\*obj, \w\+ \+\*\w\+);"
|
||||
if [ $? == 0 ];then
|
||||
grep -qe "EAPI.*\<${base}_unset\>" $2
|
||||
if [ $? != 0 ];then
|
||||
echo -e "\e[31;1mMISSING UNSETTER\e[m\t $func"
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
HEADERS="src/lib/Elementary.h.in
|
||||
src/lib/Elementary_Cursor.h
|
||||
src/lib/elm_widget.h"
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
for header in $HEADERS; do
|
||||
grep -e "^ *EAPI.*(.*)" $header | grep -e 'elm_\w\+_set' >eapi.list
|
||||
|
||||
for i in $(cat eapi.list); do
|
||||
check $i $header
|
||||
done
|
||||
rm eapi.list
|
||||
done
|
||||
exit $ret
|
Loading…
Reference in New Issue