Commit ddd4f438 authored by Colomban Wendling's avatar Colomban Wendling
Browse files

Added compatibility with C++, fixed some headers order and miss.

Surrounded all headers declarations with the G_BEGIN_DECLS/G_END_DECLS pair
to be compatible with C++ (now the headers can be included in C++ sources).

Added some missing includes and reordered some others:
In C files:
 * Always include first the module's header:
     This way, each header is directly checked for self-dependency.
 * then a blank line to separate the module's header;
 * then the external library headers:
     The external headers are not too affected by our own stuff, and it may
     be easier to detect conflicts.
 * then another blank line to separate the internal headers;
 * then finally the internal headers.
parent 8e914a3c
......@@ -18,13 +18,14 @@
*
*/
#include <glib.h>
#include "board.h"
#include <glib.h>
#include "tile.h"
#include "tilesdef.h"
/**
* SECTION: board
* @short_description: Implementation of the board of OVCC
......
......@@ -22,9 +22,13 @@
#define H_OVCC_BOARD
#include <glib.h>
#include "tile.h"
#include "stack.h"
G_BEGIN_DECLS
typedef struct _OVCCBoard OVCCBoard;
typedef struct _OVCCPosition OVCCPosition;
......@@ -102,4 +106,6 @@ gboolean ovcc_board_foreach (OVCCBoard *board,
void ovcc_board_dump (OVCCBoard *board);
G_END_DECLS
#endif /* guard */
......@@ -21,8 +21,9 @@
#ifndef H_OVCC_OVCC
#define H_OVCC_OVCC
G_BEGIN_DECLS
G_END_DECLS
#endif /* guard */
......@@ -21,8 +21,9 @@
#ifndef H_OVCC_PLAYER
#define H_OVCC_PLAYER
G_BEGIN_DECLS
G_END_DECLS
#endif /* guard */
......@@ -18,8 +18,10 @@
*
*/
#include <glib.h>
#include "stack.h"
#include <glib.h>
#include "tileset.h"
......
......@@ -21,8 +21,13 @@
#ifndef H_OVCC_STACK
#define H_OVCC_STACK
#include <glib.h>
#include "tileset.h"
G_BEGIN_DECLS
typedef struct _OVCCStack OVCCStack;
......@@ -40,4 +45,6 @@ gboolean ovcc_stack_is_empty (OVCCStack *stack);
guint ovcc_stack_size (const OVCCStack *stack);
G_END_DECLS
#endif /* guard */
......@@ -18,9 +18,10 @@
*
*/
#include "tile.h"
#include <glib.h>
#include <glib/gprintf.h>
#include "tile.h"
/**
......
......@@ -22,6 +22,11 @@
#define H_OVCC_TILE
#include <glib.h>
G_BEGIN_DECLS
/**
* OVCCTileContentType:
* @OVCC_TILE_CONTENT_TYPE_NONE: None type, no content
......@@ -177,6 +182,6 @@ OVCCTileContentType ovcc_tile_side_get_type (const OVCCTileSide *side);
OVCCTileSideRelation ovcc_tile_side_get_relations (const OVCCTileSide *side);
/** @} */
G_END_DECLS
#endif /* guard */
......@@ -18,11 +18,12 @@
*
*/
#include "tilesdef.h"
#include <libxml/parser.h>
#include <libxml/tree.h>
#include "xmlutils.h"
#include "tilesdef.h"
#include "tile.h"
......
......@@ -27,6 +27,8 @@
#include "tile.h"
G_BEGIN_DECLS
/**
* OVCCTilesDefError:
......@@ -71,4 +73,6 @@ gboolean ovcc_tilesdef_is_empty (const OVCCTilesDef *def);
guint ovcc_tilesdef_size (const OVCCTilesDef *def);
G_END_DECLS
#endif /* guard */
......@@ -18,13 +18,14 @@
*
*/
#include "tileset.h"
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <string.h>
#include "xmlutils.h"
#include "tilesdef.h"
#include "tileset.h"
#include "tile.h"
......
......@@ -28,6 +28,8 @@
#include "tilesdef.h"
#include "tile.h"
G_BEGIN_DECLS
/**
* OVCCTileSetError:
......@@ -98,4 +100,6 @@ gboolean ovcc_tileset_is_empty (OVCCTileSet *set);
guint ovcc_tileset_size (OVCCTileSet *set);
G_END_DECLS
#endif /* guard */
......@@ -24,6 +24,8 @@
#include <glib.h>
G_BEGIN_DECLS
/**
* OVCCXmlUtilsError:
......@@ -64,4 +66,6 @@ guint ovcc_xmlutils_read_id (const gchar *id,
GError **error);
G_END_DECLS
#endif /* guard */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment