From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 14:32:25 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3558E43; Fri, 5 Sep 2014 14:32:25 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F35A1CBE; Fri, 5 Sep 2014 14:32:25 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9B3E01FE027; Fri, 5 Sep 2014 16:32:23 +0200 (CEST) Message-ID: <5409C976.3030308@selasky.org> Date: Fri, 05 Sep 2014 16:32:22 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Glen Barber Subject: Re: patchchecker for FreeBSD ? References: <5409C4DD.9020703@selasky.org> <20140905141741.GZ36287@hub.FreeBSD.org> In-Reply-To: <20140905141741.GZ36287@hub.FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 14:32:25 -0000 On 09/05/14 16:17, Glen Barber wrote: > On Fri, Sep 05, 2014 at 04:12:45PM +0200, Hans Petter Selasky wrote: >> The attached script does the trick for me at least. Might be useful to >> others too :-) >> > > I think mailman ate it. > > Glen > #!/bin/sh # # This script should be run on every USB C- and H- file before # commit to enforce correct style. # [ -z "$1" ] && (echo "Please specify a filename.") && exit # # The "-ta" option is an extension to indent. # Contact hselasky@freebsd.org to receive a # patch that adds support for this option to # indent ! # # # sed -E 's/&\(([^, \)]*)\)/\&\1/' | # for F in $* do echo "Now styling $F" (cat $F | indent -Toss_mixerinfo -TFILE -Tu_char -Tu_int -Tu_long \ -TTAILQ_HEAD -TLIST_HEAD -TTAILQ_ENTRY -TLIST_ENTRY \ -TSTAILQ_HEAD -TSTAILQ_ENTRY \ -Tu_short -Tfd_set -ta -st -bad -bap -nbbb -nbc -br -nbs \ -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 \ -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc \ -nsob -nv | sed -e "s/_HEAD [(]/_HEAD(/g" | sed -e "s/_ENTRY [(]/_ENTRY(/g" | sed -e "s/ __packed/ __packed/g" | sed -e "s/ __aligned/ __aligned/g" | sed -e "s/^#define /#define /g") > temp (diff temp $F > /dev/null) || (cp temp $F) done