On Fri, Oct 10, 2014 at 01:02:17PM -0400, Ted Unangst wrote:
> On Sun, Oct 05, 2014 at 19:42, Martin Natano wrote:
> > Let's make tree.h conform to style(9).
> >
> > Index: tree.h
> > ===================================================================
> > RCS file: /cvs/src/sys/sys/tree.h,v
> > retrieving revision 1.13
> > diff -u -r1.13 tree.h
> > --- tree.h 9 Jul 2011 00:19:45 -0000 1.13
> > +++ tree.h 5 Oct 2014 17:25:24 -0000
> > @@ -237,7 +237,8 @@
> > /* Splay with either the minimum or the maximum element
> > \
> > * Used to find minimum or maximum element in tree. \
> > */ \
> > -void name##_SPLAY_MINMAX(struct name *head, int __comp) \
> > +void
> > \
> > +name##_SPLAY_MINMAX(struct name *head, int __comp) \
> > { \
> > struct type __node, *__left, *__right, *__tmp; \
> > \
> >
> > cheers,
> > natano
>
> Thanks ayway, but this doesn't really help. The rationale for the
> style is so one can find function definitions by searcing for
> ^function. That won't work here becase the function name doesn't
> appear in the text.
I agree that it doesn't aid grepability. Although, it would be nice if
the function definition style inside of tree.h would be at least
consistent. All the other function definitions in that file are written
different (i.e. including a newline after the return type).
cheers,
natano