[PATCH] whitespace cleanups for fs/cifs/file.c

Jörn Engel joern at wohnheim.fh-wedel.de
Mon Mar 7 10:28:43 GMT 2005


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 ^]
o ^t
o :ts

o $ vi bar.c
o move over any identifier
o *
o #

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
cases.

Jörn

-- 
Data expands to fill the space available for storage.
-- Parkinson's Law


More information about the samba-technical mailing list