From 12d3ecef1fc60c0f4bed61a144580937bf103a03 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Fri, 3 Dec 2021 14:03:21 -0500 Subject: [PATCH] Add reindent-allman.sh --- scripts/Makefile.am | 1 + scripts/reindent-allman.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 scripts/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" -- 2.20.1