From 2ab61c3a59b6a781413129d247c1f0345c361102 Mon Sep 17 00:00:00 2001 From: Source Maintenance Date: Sat, 20 Dec 2014 09:00:23 +0000 Subject: [PATCH] Maintenance: bump astyle to 2.04 and quieten report --- scripts/formater.pl | 8 +++++--- scripts/source-maintenance.sh | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/formater.pl b/scripts/formater.pl index 7df24ed463..ba1d77e1c8 100755 --- a/scripts/formater.pl +++ b/scripts/formater.pl @@ -30,17 +30,17 @@ use strict; use IPC::Open2; # -# NP: The Squid code requires astyle version 2.03 (exactly for now) +# NP: The Squid code requires astyle version 2.04 (exactly for now) # my $ASTYLE_BIN="/usr/local/bin/astyle"; if (! -x $ASTYLE_BIN) { $ASTYLE_BIN="/usr/bin/astyle"; } if (! -x $ASTYLE_BIN) { - $ASTYLE_BIN="/usr/local/src/astyle-2.03/bin/astyle"; + $ASTYLE_BIN="/usr/local/src/astyle-2.04/bin/astyle"; } -my $ASTYLE_ARGS ="--mode=c -s4 --convert-tabs --keep-one-line-blocks "; +my $ASTYLE_ARGS ="--mode=c -s4 --convert-tabs --keep-one-line-blocks --lineend=linux"; #$ASTYLE_ARGS="--mode=c -s4 -O --break-blocks -l"; @@ -169,9 +169,11 @@ sub input_filter{ # print "----->".$$line."\n"; } elsif($$line =~ /\s*unsigned\s+([^:]*):\s*(\w+)\s*\;(.*)/s){ +# print ">>>>> ".$$line." ($1)\n"; my ($name,$val,$extra)=($1,$2,$3); my $prx =~ s/\s*$//g; $$line= "unsigned ".$name."__FORASTYLE__".$val.";".$extra; +# print "----->".$$line."\n"; } return 1; } diff --git a/scripts/source-maintenance.sh b/scripts/source-maintenance.sh index fd30e2dd82..51219b6fb2 100755 --- a/scripts/source-maintenance.sh +++ b/scripts/source-maintenance.sh @@ -32,8 +32,8 @@ fi ROOT=`bzr root` ASVER=`astyle --version 2>&1 | grep -o -E "[0-9.]+"` -if test "${ASVER}" != "2.03" ; then - echo "Astyle version problem. You have ${ASVER} instead of 2.03" +if test "${ASVER}" != "2.04" ; then + echo "Astyle version problem. You have ${ASVER} instead of 2.04" ASVER="" else echo "Found astyle ${ASVER}. Formatting..." -- 2.47.2