This is a discussion on Re: [PATCH] whitespace cleanups for fs/cifs/file.c - Samba ; On Mon, 7 March 2005 10:26:40 +0100, Edgar, Bob wrote: > > I lurk on the list and didn't comment last time but there is one aspect > of this patch that I think is "bad" style. The function declaration ...
On Mon, 7 March 2005 10:26:40 +0100, Edgar, Bob wrote:
> I lurk on the list and didn't comment last time but there is one aspect
> of this patch that I think is "bad" style. The function declaration should
> not be on the same line with the type. Why? Try to find the file where a
> function is defined instead of used. If you grep "^funcname" you'll find
> it quite simply. The same is true in YFE (mine being vi) /^funcname gets
> me there in one shot.
> This may not seem an important thing but when you are coming into a
> project cold and don't know how anything works or where it lives it
> can be very important. Consider trying to find where some common
> function from a library is defined in a project with sever 1000 files.
This point has been discussed before, also regarding Jesper's work.
In short, Linus prefers the style you dislike, but doesn't enforce
things too rigidly. Imo the "grep" argument doesn't really matter and
both styles have advantages sometimes.
Now to solve some of your problems a different way (in vim style):
o $ make tags
o $ vi foo.c
o move over any function
o $ vi bar.c
o move over any identifier
Works like a charm for me. lxr is still slightly better, but the
lacking integration into my editor makes is inferior in 99.9% of all
Data expands to fill the space available for storage.
-- Parkinson's Law