From 8ccb487c21368a7fdc8c7c72315325bf0aa06147 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 19:44:12 +0200 Subject: Adding upstream version 3:4.8.29. Signed-off-by: Daniel Baumann --- misc/edit.indent.rc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 misc/edit.indent.rc (limited to 'misc/edit.indent.rc') diff --git a/misc/edit.indent.rc b/misc/edit.indent.rc new file mode 100755 index 0000000..92f82d5 --- /dev/null +++ b/misc/edit.indent.rc @@ -0,0 +1,31 @@ +#! /bin/sh +# *** External Formatter (Indenter) for GNU Midnight Commander. +# arguments: +# $1 - Name of the file being edited +# $2 - Name of the file to be processed + +exec >/dev/null + +case `echo $1 |sed 's/^.*\.//'` in + c|h) + # ftp://ftp.gnu.org/pub/gnu/indent/ + # Please add options to your ~/.indent.pro, not here. + indent "$2" + ;; + C|cc|CC|cxx|CXX|cpp|CPP) + # http://astyle.sourceforge.net/ + astyle "$2" + ;; + java|JAVA) + # http://astyle.sourceforge.net/ + astyle --style=java --mode=java "$2" + ;; + htm|html|HTM|HTML) + # http://tidy.sourceforge.net/ + tidy -q -m -ascii -wrap 80 "$2" + ;; + *) + # http://www.gnu.org/software/coreutils/ + fmt "$2" >"$2.tmp" && rm -f "$2" && mv -f "$2.tmp" "$2" + ;; +esac -- cgit v1.2.3