Re: Question about style when converting from K&R to ANSI C.

Martin Waitz (tali@admingilde.org)
Tue, 3 Jun 2003 14:32:56 +0200


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-32033-1054643781-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

hi :)

On Mon, Jun 02, 2003 at 02:09:17AM +0000, Linus Torvalds wrote:
> And I personally don't normally do "grep for random function
> declarations", that just sounds like a contrieved example. I grep for
> specific function names to find usage, and then it's _doubly_ important
> to see that the return (and argument) types match and make sense.
well, but it is nice to be able to grep for the declaration of a
function like

grep "^where_is_it" *.c

without showing all the uses of that function.

also, putting the return type on its own line makes sure that
the function name is always at the same position.
this greatly enhances readability (at least for me ;)

--=20
CU, / Friedrich-Alexander University Erlangen, Germany
Martin Waitz // Department of Computer Science 3 _________
______________/// - - - - - - - - - - - - - - - - - - - - ///
dies ist eine manuell generierte mail, sie beinhaltet //
tippfehler und ist auch ohne grossbuchstaben gueltig. /

--=_courier-32033-1054643781-0001-2
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+3JV3j/Eaxd/oD7IRAn5EAJwLiex+o0aT66Mb7yxbYSZjmCtCCACggiJ6
9G4n5Wyj/YXEPSo4bObf+M0=
=8skR
-----END PGP SIGNATURE-----

--=_courier-32033-1054643781-0001-2--