lkml.org 
[lkml]   [2003]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.5 Documentation/CodingStyle ANSI C function declarations.
On Fri, 30 May 2003 14:38:07 -0700, Linus Torvalds wrote:
> On Fri, 30 May 2003, Jörn Engel wrote:
> >
> > How about an all or nothing approach? If you really want to get rid
> > of K&R, change indentation as well, rip out some of the rather
> > tasteless macros (ZEXPORT, ZEXPORTVA, ZEXTERN, FAR, ...) and so on.
>
> I'd love to, but I suspect we lack the motivation to do so, and there
> aren't any obvious upsides. Yes, the code is ugly, but it's also fairly
> stable so people seldom need to look at it.

Well, since I'm currently working on the zlib anyway...

> The motivation for doing the ANSI-fication is just that there is now a
> sanity checker tool that will complain loudly about bad typing, and since
> I wrote it and I hate old-style K&R sources, it doesn't parse them.

Sounds nice. Did I miss it on lkml, or haven't you made it public
yet?

> I wouldn't mind syncing more, but one reason _against_ syncing the zlib
> sources have been the ugliness of them. Is there any reason for the
> K&R'ness any more, or the strange allocators?

The allocaters could be useful when lots of zlibs are fighting over
scarce memory, at least when operating in userspace. K&R and
indentation seem to be personal style (inflate and deflate also have a
different style, when you look closely). FAR, uInt and friends should
be portability wrappers, there was even a turboc bugfix in the code
before 1.1.4.

Who knows, the performance might even slightly improve after shaving
off some of the useless wrappers.

Jörn

--
Geld macht nicht glücklich.
Glück macht nicht satt.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.049 / U:1.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site