DragonFly submit List (threaded) for 2003-09
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: style(9) manpage __P removal
:Speaking of style how do people feel about K&R declarations?
:I'm wondering if I'm the only one that thinks that retaining
:them is silly.
:
: -Kip
I have been replacing them with their ANSI equivalents as I have come
across them.
Note to people who might be doing this cleanup work: The only thing to
watch out for when replacing a K&R declaration with an ANSI one is
that the arguments may be declared out of order. e.g.:
int
fubar(a, b, c, d)
int c; <<<<< note that this ordering might be different
int b; <<<<< from the ordering in the argument list above.
int a;
int d;
{
}
int
fubar(int a, int b, int c, int d) <<< correct conversion to ANSI
Extra long ANSI declarations can be handled in a number of ways, I am not
particular other then to request that additional lines be indented. I've
kinda moved to this format:
int
fubar(int a, int b, int c, int d, int e, int f, int g, int h, int i,
int j, int k, int l, int m)
{
}
But its up to you. I have no strong opinion either way (other then
additional lines being indented somehow).
-Matt
Matthew Dillon
<dillon@xxxxxxxxxxxxx>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]