Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] (PR#2847) documentation about config.h
Home

[Freeciv-Dev] (PR#2847) documentation about config.h

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#2847) documentation about config.h
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 17 Jan 2003 11:58:52 -0800
Reply-to: rt@xxxxxxxxxxxxxx

This patch documents the need to include config.h, as well as fixing a 
misnamed file reference in passing.

jason

? doc/README.borders_patch
Index: doc/CodingStyle
===================================================================
RCS file: /home/freeciv/CVS/freeciv/doc/CodingStyle,v
retrieving revision 1.5
diff -u -r1.5 CodingStyle
--- doc/CodingStyle     2002/12/22 18:02:16     1.5
+++ doc/CodingStyle     2003/01/17 19:55:17
@@ -165,11 +165,16 @@
     /* nothing */
   }
 
-- Order include files consistently:  First state all system include
-  files with <> in alphabetic order, then all Freeciv include files
-  with "", sorted by directory (common, server, ...) and then by
-  alphabetic order, with a blank line between the sections.  This helps
-  to avoid adding unnecessary or duplicated include files.
+- Order include files consistently:  First include config.h (see below),
+  then state all system include files with <> in alphabetic order, then all
+  Freeciv include files with "", sorted by directory (common, server, ...)
+  and then by alphabetic order, with a blank line between the sections.  This
+  helps to avoid adding unnecessary or duplicated include files.
+
+  It is very important that '#include <config.h>' be included at the top of
+  every .c file (it need not be included from .h files).  Some definitions in
+  config.h will affect how the code is compiled, without which you can end
+  up with bad and untraceable memory bugs.
 
 - If you use a system specific feature, don't add #ifdef __CRAY__ or
   something like that.  Rather write a check for that feature for
Index: doc/HACKING
===================================================================
RCS file: /home/freeciv/CVS/freeciv/doc/HACKING,v
retrieving revision 1.6
diff -u -r1.6 HACKING
--- doc/HACKING 2002/11/18 18:58:53     1.6
+++ doc/HACKING 2003/01/17 19:55:18
@@ -749,7 +749,7 @@
 Style Guide
 ===========================================================================
 
-See README.coding_style in this directory.
+See CodingStyle in this directory.
 
 - If you send patches, use "diff -u" (or "diff -r -u").  For further
   information, see <http://www.freeciv.org/contribute.html>.  Also,

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#2847) documentation about config.h, Jason Short via RT <=