2 # *** External Formatter (Indenter) for GNU Midnight Commander.
4 # $1 - Name of the file being edited
5 # $2 - Name of the file to be processed
9 case `echo $1 |sed 's/^.*\.//'` in
11 # ftp://ftp.gnu.org/pub/gnu/indent/
12 # Please add options to your ~/.indent.pro, not here.
15 C|cc|CC|cxx|CXX|cpp|CPP
)
16 # http://astyle.sourceforge.net/
20 # http://astyle.sourceforge.net/
21 astyle
--style=java
--mode=java
"$2"
24 # http://tidy.sourceforge.net/
25 tidy
-q -m -ascii -wrap 80 "$2"
28 # http://www.gnu.org/software/coreutils/
29 fmt "$2" >"$2.tmp" && rm -f "$2" && mv -f "$2.tmp" "$2"