This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] *-dis.c: Fix formatting.
- To: Alan Modra <amodra at bigpond dot net dot au>
- Subject: Re: [patch] *-dis.c: Fix formatting.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sat, 18 Aug 2001 13:07:54 -0400
- Cc: Kazu Hirata <kazu at hxi dot com>, binutils at sources dot redhat dot com
- References: <200108171934.MAA23915@cygnus.com> <3B7DF02F.90201@cygnus.com> <20010818145846.E31523@bubble.sa.bigpond.net.au>
>
> Oh?
>
> http://www.gnu.org/prep/standards_23.html#SEC24
>
> "It is important to put the open-brace that starts the body of a C
> function in column zero, and avoid putting any other open-brace or
> open-parenthesis or open-bracket in column zero. Several tools look
> for open-braces in column zero to find the beginnings of C functions.
> These tools will not work on code not formatted that way."
Since we're quoting manuals at each other :-)
> The rest of this section gives our recommendations for other aspects of C formatting style, which is also the default style of the indent program in version 1.2 and newer. It corresponds to the options
>
> -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
> -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob
>
> We don't think of these recommendations as requirements, because it causes no problems for users if two different programs have different formatting styles.
Pulling a random (I'm being honest here) example out of emacs:
struct backtrace
{
struct backtrace *next;
Lisp_Object *function;
Lisp_Object *args; /* Points to vector of args. */
int nargs; /* length of vector. If nargs is UNEVALLED,
args points to slot holding list of
unevalled args */
char evalargs;
};