Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] I18n: Patch marked strings
Home

Re: [Freeciv-Dev] I18n: Patch marked strings

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] I18n: Patch marked strings
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 30 Aug 1999 12:09:36 +0200

David Pfitzner <dwp@xxxxxxxxxxxxxx> writes:

> Also, is there any reason for not following the "standard"
> header grouping when adding '#include "fcintl.h"'?
> (Probably my fault for not adding the explanation about
> this to the hackers guide or contribute.html yet;
> if there is no good reason, it should go alphabetically
> in with the rest of the headers from common/.)

Perhaps we should add a section to the hacker's guide, as it is not
that obvious. Suggestion:

===========================================================================
Mini Style Guide
===========================================================================

If you want to hack FreeCiv, and want your patches to be accepted, it
helps to follow some simple style rules:

- Use K&R indentation style with indentation 2 (in doubt, use
  'indent -kr -i2').

- First state all system include files with <> in alphabetic order,
  then all FreeCiv include files with "", sorted by folder (common,
  server...) and then by alphabet, with a blank line between the
  sections. This helps avoiding adding unnecessary include files.

- If you use a system specific feature, don't add #ifdef __CRAY__ or
  something like that. Rather write a check for that feature for
  configure.in and use a meaningful macro name in the source.

- Don't use C++-style // comments.

- If you send patches, use diff -u.

===========================================================================

Note: I tried using 'indent -kr -i2' on the source, and actually there 
are lots of differences; mostly improvements. Probably we should
reindent all existing source to make it look nicer. The problem is
that this would make old diffs unusable.

        Falk


[Prev in Thread] Current Thread [Next in Thread]