1 dnl GEANY_STATUS_ADD(description, value)
2 dnl Add a status message to be displayed by GEANY_STATUS_OUTPUT
3 AC_DEFUN([GEANY_STATUS_ADD],
5 _GEANY_STATUS="$_GEANY_STATUS
9 dnl GEANY_STATUS_OUTPUT
10 dnl Nicely displays all messages registered with GEANY_STATUS_ADD
11 AC_DEFUN([GEANY_STATUS_OUTPUT],
13 # Count the max lengths
17 d=`echo "$l" | cut -d: -f1`
18 v=`echo "$l" | cut -d: -f2`
21 test $dlen -lt $dl && dlen=$dl
22 test $vlen -lt $vl && vlen=$vl
27 # Print a nice top bar
28 # description + ' : ' + value
29 total=`expr $dlen + 3 + $vlen`
30 for i in `seq 1 $total`; do printf '-'; done
33 # And print the actual content
36 # second key : second value
38 test -z "$l" && continue
39 d=`echo "$l" | cut -d: -f1`
40 v=`echo "$l" | cut -d: -f2`
41 printf '%-*s : %s\n' $dlen "$d" "$v"