[Rpcemu] Suggestion: making formatting consistent using GNU indent

Jake Waskett jake at waskett.org
Sat Apr 11 13:57:18 PDT 2009

I'm re-sending the following, as it bounced last time.  My apologies
in advance if two copies arrive.

>Date: Fri, 10 Apr 2009 13:39:54 +0100
>From: Jake Waskett <jake at waskett.org>
>To: rpcemu at riscos.info
>Subject: Suggestion: making formatting consistent using GNU indent
> While working on the idle time bug, I can't help noticing that the
> indentation style in the source code is somewhat inconsistent.
> To make the code a little easier to read (and thus understand and
> debug), I've been experimenting with GNU Indent (see links below) to
> automate the process.  I've been able to obtain something very
> readable -- and similar in style to much of the current RpcEmu code --
> using the command line in the script below.
> The only problem with this is that it modifies virtually all the
> codebase.  Consequently, "svn diff" is useless for checking
> differences against the repository, as it generates a 48,000 line
> diff!
> Would anyone have any objections to using this script (or something
> similar) to update the code in SVN?
> Links for GNU indent:
> http://www.gnu.org/software/indent/
> There is also apparently a Win32 version at:
> http://gnuwin32.sourceforge.net/packages/indent.htm
> [begin script]
> #!/bin/sh
> # indent-all script for RpcEmu
> for f in *.c *.h
> do
> indent -nbad -nbap -bbo -bls -c33 -cd33 -cdb -ce -ci4 -cli0  -cp33 -di1 -fc1 -fca -hnl -i4 -ip4 -l75 -lp -cs -npcs -nprs -npsl -saf -sai -saw -nsc -nsob -nss -ts8 -bli0 $f
> done
> [end script]
> Jake

More information about the Rpcemu mailing list