From: Hugo Villeneuve Date: Fri, 3 Dec 2021 19:03:21 +0000 (-0500) Subject: Add reindent-allman.sh X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=12d3ecef1fc60c0f4bed61a144580937bf103a03;p=hvutilities.git Add reindent-allman.sh --- diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 9379273..b885496 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -32,6 +32,7 @@ dist_bin_SCRIPTS = \ git-project-tag.sh \ git-project-gitk.sh \ source-code-stats \ + reindent-allman.sh \ flac2ogg flac2mp3 \ hv-scan \ hvpdf-rotate \ diff --git a/scripts/reindent-allman.sh b/scripts/reindent-allman.sh new file mode 100644 index 0000000..b301048 --- /dev/null +++ b/scripts/reindent-allman.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +ASTYLE=`which astyle` +OPTIONS="--style=allman \ + --mode=c \ + --indent=spaces=4 \ + --pad-oper \ + --align-pointer=name \ + --pad-header \ + --min-conditional-indent=0 \ + --indent-col1-comments \ + --convert-tabs \ + --recursive \ + --suffix=none" + +${ASTYLE} ${OPTIONS} "*.c" +${ASTYLE} ${OPTIONS} "*.cpp" +${ASTYLE} ${OPTIONS} "*.h" +${ASTYLE} ${OPTIONS} "*.hpp"