You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
558 B

#!/bin/sh
TYPENAMES=""
for i in eterm_action_t button_t buttonbar_t menu_t menuitem_t ; do
TYPENAMES="$TYPENAMES -T $i"
done
for i in *.c src/*.c utils/*.c ; do
if test -f $i; then
echo Reformatting $i
indent -bad -bap -bbo -bli0 -br -brs -cdw -ce -ci4 -cli4 -cs -di1 -i4 -l132 \
-lp -lps -nbc -nbfda -npcs -nprs -nsob -nss -nut -psl -saf -sai -saw -sbi0 \
$TYPENAMES $i
fi
done
perl -p -i.bak -e '
s/(\w+)_t (\*+)\s+/$1_t $2/g;
s/^(\w+_t\s+\**)\s*(\w+)\s*(\([^\)]+\))\s*$/$1\n$2$3\n/g;
' */*.[ch]