[Freeciv-Dev] Re: Coding Style Guidelines
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Jan 11, 2002 at 01:42:37PM -0600, Mike Kaufman wrote:
> > > >>- Spaces should go before and after operators, and after commas:
> > > >
> > > > indent takes care of this.
> > >
> > > indent covers a lot of things, but some of them should perhaps be
> > > explicitly mentioned anyway.
> > >
>
> I agree. not everybody looks up exactly what indent does.
> Not everybody uses it. The more important things should be explicitly
> mentioned.
>
> >
> > > >>- Always prototype global functions in the appropriate header file.
> > > >> Local functions should always be declared as static.
> > > >
> > > > Use "-Wmissing-prototypes -Wmissing-declarations" to catch these.
> > >
> > > Shouldn't that then be "Local functions should always be declared as
> > > static and prototyped at the top of the file"?
>
> these should be added to the Makefile if necessary, not put into the
> style guide.
>
> > I have no problem if only the needed prototypes are provided for
> > static functions.
> >
> > Raimar
> - If an empty block is needed you should put an explanatory comment:
- If an empty block is needed you should put an explanatory comment in
an empty block (i.e. {}):
> while(*i++) {
> /* nothing */
> }
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"There are three ways to get something done. Do it yourself, hire someone
to do it for you or forbid your kids to do it."
- [Freeciv-Dev] Coding Style Guidelines, Mike Kaufman, 2002/01/11
- [Freeciv-Dev] Re: Coding Style Guidelines, Teemu Kurppa, 2002/01/11
- [Freeciv-Dev] Re: Coding Style Guidelines, Raimar Falke, 2002/01/11
- [Freeciv-Dev] Re: Coding Style Guidelines, Jason Short, 2002/01/11
- [Freeciv-Dev] Re: Coding Style Guidelines, Raimar Falke, 2002/01/11
- [Freeciv-Dev] Re: Coding Style Guidelines, Mike Kaufman, 2002/01/11
- [Freeciv-Dev] Re: Coding Style Guidelines,
Raimar Falke <=
- [Freeciv-Dev] Re: Coding Style Guidelines, Chris Richards, 2002/01/11
- [Freeciv-Dev] Re: Coding Style Guidelines, Raimar Falke, 2002/01/12
- [Freeciv-Dev] Re: Coding Style Guidelines, Mike Kaufman, 2002/01/12
- [Freeciv-Dev] Re: Coding Style Guidelines, Ross W. Wetmore, 2002/01/13
- [Freeciv-Dev] Re: Coding Style Guidelines, Tony Stuckey, 2002/01/14
- [Freeciv-Dev] Re: Coding Style Guidelines, Per I. Mathisen, 2002/01/14
- [Freeciv-Dev] Re: Coding Style Guidelines, Erik Sigra, 2002/01/23
- [Freeciv-Dev] Re: Coding Style Guidelines, Reinier Post, 2002/01/12
[Freeciv-Dev] Re: Coding Style Guidelines, Gregory Berkolaiko, 2002/01/11
|
|