2 # The list of all applet config symbols
3 test -f include/applets.h || { echo "No include/applets.h file"; exit 1; }
5 grep ^IF_ include/applets.h \
6 | grep -v ^IF_FEATURE_ \
7 | sed 's/IF_\([A-Z0-9._-]*\)(.*/\1/' \
11 test $# = 0 && set -- $apps
16 test -f "$b" || continue
17 text=`size "$b" | tail -1 | sed -e's/\t/ /g' -e's/^ *//' -e's/ .*//'`
18 #echo "text from $app: $text"
19 test x"${text//[0123456789]/}" = x"" || {
20 echo "Can't get: size $b"
23 test $mintext -gt $text && {
25 echo "New mintext from $app: $mintext"
27 eval "text_${app}=$text"
32 test -f "$b" || continue
33 eval "text=\$text_${app}"
34 echo "$app adds $((text-mintext))"
37 grep ^IF_ include/applets.h \
38 | grep -v ^IF_FEATURE_ \
42 | sed 's/(APPLET(/(/' \
43 | sed 's/(APPLET_[A-Z]*(/(/' \
44 | sed 's/(IF_[A-Z_]*(/(/' \
45 | sed 's/IF_\([A-Z0-9._-]*\)(\(.*\)/\1 \2/' \
47 | while read app name; do
49 test -f "$b" || continue
51 file=`grep -lF "bool \"$name" $(find -name '*.c') | xargs`
52 # so far all such items are in .c files; if need to check Config.* files:
53 #test "$file" || file=`grep -lF "bool \"$name" $(find -name 'Config.*') | xargs`
54 test "$file" || continue
57 eval "text=\$text_${app}"
60 sz_frac=$(( (sz - sz_kb*1000) ))
61 sz_f=$((sz_frac / 100))
63 echo -n "sed 's/bool \"$name *(*[0-9tinykbytes .]*)*\"/"
64 if test "$sz_kb" -ge 10; then
65 echo -n "bool \"$name (${sz_kb} kb)\""
66 elif test "$sz_kb" -gt 0 -a "$sz_f" = 0; then
67 echo -n "bool \"$name (${sz_kb} kb)\""
68 elif test "$sz_kb" -gt 0; then
69 echo -n "bool \"$name ($sz_kb.${sz_f} kb)\""
70 elif test "$sz" -ge 200; then
71 echo -n "bool \"$name ($sz bytes)\""
73 echo -n "bool \"$name (tiny)\""