Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-29 Thread Brian Cully
On Thu, Jan 28, 1999 at 08:01:33AM +0100, Luigi Rizzo wrote: > not speaking about vinum, but to me, the indentation of 8 char and > line length of 80 chars are almost mutually exclusive. I've managed to do this for years without much problem. When it is un-avoidable, you can always use a macro. -

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-29 Thread Peter Jeremy
Matthew Dillon wrote: >:Judicious use of inline functions (and macros) should help move >:code to the left - and may even make it more understandable. > >More then judicious use -- inlines are an incredible advantage. Most >people don't realize that GCC will optimize constant arguments th

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Greg Lehey
On Friday, 29 January 1999 at 7:54:18 +1100, Peter Jeremy wrote: > Luigi Rizzo >> not speaking about vinum, but to me, the indentation of 8 char and >> line length of 80 chars are almost mutually exclusive. >> >> See e.g. tcp_input.c ip_input.c and many network device drivers as >> an example --

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Matthew Dillon
:> :> More then judicious use -- inlines are an incredible advantage. Most :> people don't realize that GCC will optimize constant arguments through :> an inline call. Try this: :> :> static __inline Yah, and if it's static it will not even output code for fubar. I've neve

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Steve Kargl
Matthew Dillon wrote: > :Luigi Rizzo > :>not speaking about vinum, but to me, the indentation of 8 char and > :... > : > :According to most of the coding standards I've read, readability > :(and hence maintainability) come before efficiency. That said, I > :agree that efficiency _is_ an issue wit

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Matthew Dillon
:Luigi Rizzo :>not speaking about vinum, but to me, the indentation of 8 char and :... : :According to most of the coding standards I've read, readability :(and hence maintainability) come before efficiency. That said, I :agree that efficiency _is_ an issue within the kernel's critical :paths (th

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Peter Jeremy
Luigi Rizzo >not speaking about vinum, but to me, the indentation of 8 char and >line length of 80 chars are almost mutually exclusive. > >See e.g. tcp_input.c ip_input.c and many network device drivers as >an example -- basically all places where, for efficiency reasons, >the code tries to expand

Re: Nesting levels (was: indent(1) and style(9) (was: btokup() macro in sys/malloc.h))

1999-01-28 Thread Alfred Perlstein
On Thu, 28 Jan 1999, Greg Lehey wrote: > On Thursday, 28 January 1999 at 20:39:03 +1100, Bruce Evans wrote: > >> See e.g. tcp_input.c ip_input.c and many network device drivers as > >> an example -- basically all places where, for efficiency reasons, > >> the code tries to expand in-line various b

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Brian Somers
> > >an example -- basically all places where, for efficiency reasons, > > >the code tries to expand in-line various block, the depth of > > >indentation pushes everything to the right end leaving only 20-30 > > >useful chars per line. > > > > See the Linux style guide (linux/Documentation/CodingS

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Brian Somers
> See the Linux style guide (linux/Documentation/CodingStyle) for Looks like an oxymoron to me. > Bruce -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of th

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Brian Somers
> They have an indentation of 4 > instead of 8, [.] 8 spaces is almost always *way* too much if a maximum of 80 columns is expected. IMHO, the requirement should be to either use TABs and only TABs or else two or more spaces. Either way, perhaps it's time someone fixed indent(1) so that it

Nesting levels (was: indent(1) and style(9) (was: btokup() macro in sys/malloc.h))

1999-01-28 Thread Greg Lehey
On Thursday, 28 January 1999 at 20:39:03 +1100, Bruce Evans wrote: >> not speaking about vinum, but to me, the indentation of 8 char and >> line length of 80 chars are almost mutually exclusive. >> >> See e.g. tcp_input.c ip_input.c and many network device drivers as >> an example -- basically all

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Luigi Rizzo
> >an example -- basically all places where, for efficiency reasons, > >the code tries to expand in-line various block, the depth of > >indentation pushes everything to the right end leaving only 20-30 > >useful chars per line. > > See the Linux style guide (linux/Documentation/CodingStyle) for >

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Bruce Evans
>not speaking about vinum, but to me, the indentation of 8 char and >line length of 80 chars are almost mutually exclusive. > >See e.g. tcp_input.c ip_input.c and many network device drivers as >an example -- basically all places where, for efficiency reasons, >the code tries to expand in-line vari

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Luigi Rizzo
> I see no evidence of this. vinum sources don't seem to have a single > line in KNF, except accidentally. They have an indentation of 4 > instead of 8, lots of per-statement comments, lots of lines longer > than 80 characters, lots of block comments without `/*' and `*/' on > a line by themself,

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Matthew D. Fuller
On Thu, Jan 28, 1999 at 06:05:37PM +1030, a little birdie told me that Greg Lehey remarked > On Thursday, 28 January 1999 at 14:16:25 +1100, Bruce Evans wrote: > >> It would be nice if style(9) documented the options to give indent(1) > >> to match the `approved' layout convections. (This would re

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Greg Lehey
On Thursday, 28 January 1999 at 19:19:12 +1100, Bruce Evans wrote: It would be nice if style(9) documented the options to give indent(1) to match the `approved' layout convections. (This would reduce the effort involved in importing large chunks of code). >>> >>> This is impossible,

Re: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-28 Thread Bruce Evans
>>> It would be nice if style(9) documented the options to give indent(1) >>> to match the `approved' layout convections. (This would reduce the >>> effort involved in importing large chunks of code). >> >> This is impossible, since indent(1) is buggy and out of date with both >> KNF and C. > >Wel

indent(1) and style(9) (was: btokup() macro in sys/malloc.h)

1999-01-27 Thread Greg Lehey
On Thursday, 28 January 1999 at 14:16:25 +1100, Bruce Evans wrote: >> It would be nice if style(9) documented the options to give indent(1) >> to match the `approved' layout convections. (This would reduce the >> effort involved in importing large chunks of code). > > This is impossible, since ind