summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-01-10 11:20:14 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-01-10 11:27:05 +0100
commit63b36a2b5b8e04f5d96fa9aa8d212a01c73aad49 (patch)
treea49c9f8982cade3491ff7d0448a1d20b4bee5319
parent01d771403e3a0b20bd39186b079294e60307ee56 (diff)
downloadlogdiag-63b36a2b5b8e04f5d96fa9aa8d212a01c73aad49.tar.gz
logdiag-63b36a2b5b8e04f5d96fa9aa8d212a01c73aad49.tar.xz
logdiag-63b36a2b5b8e04f5d96fa9aa8d212a01c73aad49.zip
Use a central header.
$ time (make clean; make) Before: ~8.0 seconds After: ~8.1 seconds
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/ld-canvas.c12
-rw-r--r--src/ld-diagram-object.c5
-rw-r--r--src/ld-diagram-symbol.c6
-rw-r--r--src/ld-diagram.c7
-rw-r--r--src/ld-library.c11
-rw-r--r--src/ld-lua-symbol.c11
-rw-r--r--src/ld-lua.c9
-rw-r--r--src/ld-symbol-category.c8
-rw-r--r--src/ld-symbol.c8
-rw-r--r--src/ld-types.c5
-rw-r--r--src/ld-window-main.c12
-rw-r--r--src/liblogdiag.h34
13 files changed, 46 insertions, 83 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 493904f..75eb11a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -95,6 +95,7 @@ set (logdiag_SOURCES
src/ld-lua-symbol.c)
set (logdiag_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/config.h
+ src/liblogdiag.h
src/ld-marshal.h
src/ld-types.h
src/ld-window-main.h
diff --git a/src/ld-canvas.c b/src/ld-canvas.c
index e41d014..9523d9d 100644
--- a/src/ld-canvas.c
+++ b/src/ld-canvas.c
@@ -10,21 +10,11 @@
#include <math.h>
#include <string.h>
-
-#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-marshal.h"
-#include "ld-types.h"
-#include "ld-diagram-object.h"
-#include "ld-diagram-symbol.h"
-#include "ld-diagram.h"
-#include "ld-symbol.h"
-#include "ld-library.h"
-#include "ld-canvas.h"
-
/**
* SECTION:ld-canvas
diff --git a/src/ld-diagram-object.c b/src/ld-diagram-object.c
index a9f87ba..f43e620 100644
--- a/src/ld-diagram-object.c
+++ b/src/ld-diagram-object.c
@@ -8,12 +8,9 @@
*
*/
-#include <gtk/gtk.h>
-
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-diagram-object.h"
-
/**
* SECTION:ld-diagram-object
diff --git a/src/ld-diagram-symbol.c b/src/ld-diagram-symbol.c
index 0310579..3308dbb 100644
--- a/src/ld-diagram-symbol.c
+++ b/src/ld-diagram-symbol.c
@@ -8,13 +8,9 @@
*
*/
-#include <gtk/gtk.h>
-
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-diagram-object.h"
-#include "ld-diagram-symbol.h"
-
/**
* SECTION:ld-diagram-symbol
diff --git a/src/ld-diagram.c b/src/ld-diagram.c
index 7a6694c..0129e2b 100644
--- a/src/ld-diagram.c
+++ b/src/ld-diagram.c
@@ -8,14 +8,9 @@
*
*/
-#include <gtk/gtk.h>
-#include <json-glib/json-glib.h>
-
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-diagram-object.h"
-#include "ld-diagram.h"
-
/**
* SECTION:ld-diagram
diff --git a/src/ld-library.c b/src/ld-library.c
index adf069d..37e2bc9 100644
--- a/src/ld-library.c
+++ b/src/ld-library.c
@@ -10,18 +10,9 @@
#include <string.h>
-#include <gtk/gtk.h>
-#include <json-glib/json-glib.h>
-
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-types.h"
-#include "ld-symbol.h"
-#include "ld-symbol-category.h"
-#include "ld-library.h"
-
-#include "ld-lua.h"
-
/**
* SECTION:ld-library
diff --git a/src/ld-lua-symbol.c b/src/ld-lua-symbol.c
index 955bd97..27a6279 100644
--- a/src/ld-lua-symbol.c
+++ b/src/ld-lua-symbol.c
@@ -8,18 +8,9 @@
*
*/
-#include <gtk/gtk.h>
-
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-types.h"
-#include "ld-symbol.h"
-#include "ld-symbol-category.h"
-#include "ld-library.h"
-
-#include "ld-lua.h"
-#include "ld-lua-symbol.h"
-
#include "ld-lua-private.h"
#include "ld-lua-symbol-private.h"
diff --git a/src/ld-lua.c b/src/ld-lua.c
index 448e25c..47a41b5 100644
--- a/src/ld-lua.c
+++ b/src/ld-lua.c
@@ -8,20 +8,13 @@
*
*/
-#include <gtk/gtk.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-types.h"
-#include "ld-symbol.h"
-#include "ld-library.h"
-
-#include "ld-lua.h"
-#include "ld-lua-symbol.h"
-
#include "ld-lua-private.h"
#include "ld-lua-symbol-private.h"
diff --git a/src/ld-symbol-category.c b/src/ld-symbol-category.c
index b9d70b1..e4b86a9 100644
--- a/src/ld-symbol-category.c
+++ b/src/ld-symbol-category.c
@@ -8,15 +8,9 @@
*
*/
-#include <gtk/gtk.h>
-
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-types.h"
-#include "ld-symbol.h"
-#include "ld-symbol-category.h"
-#include "ld-library.h"
-
/**
* SECTION:ld-symbol-category
diff --git a/src/ld-symbol.c b/src/ld-symbol.c
index fd9ef5a..fafa9ab 100644
--- a/src/ld-symbol.c
+++ b/src/ld-symbol.c
@@ -8,15 +8,9 @@
*
*/
-#include <gtk/gtk.h>
-
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-types.h"
-#include "ld-symbol.h"
-#include "ld-symbol-category.h"
-#include "ld-library.h"
-
/**
* SECTION:ld-symbol
diff --git a/src/ld-types.c b/src/ld-types.c
index 5bed9dc..cde3da6 100644
--- a/src/ld-types.c
+++ b/src/ld-types.c
@@ -10,12 +10,9 @@
#include <math.h>
-#include <gtk/gtk.h>
-
+#include "liblogdiag.h"
#include "config.h"
-#include "ld-types.h"
-
#define DEFINE_BOXED_TYPE(TypeName, type_name) \
GType \
diff --git a/src/ld-window-main.c b/src/ld-window-main.c
index 08e18e8..6cea286 100644
--- a/src/ld-window-main.c
+++ b/src/ld-window-main.c
@@ -10,21 +10,11 @@
#include <gtk/gtk.h>
+#include "liblogdiag.h"
#include "config.h"
#include "ld-window-main.h"
-#include "ld-types.h"
-#include "ld-symbol.h"
-#include "ld-symbol-category.h"
-#include "ld-library.h"
-
-#include "ld-diagram-object.h"
-#include "ld-diagram-symbol.h"
-#include "ld-diagram.h"
-
-#include "ld-canvas.h"
-
/**
* SECTION:ld-window-main
diff --git a/src/liblogdiag.h b/src/liblogdiag.h
new file mode 100644
index 0000000..800826f
--- /dev/null
+++ b/src/liblogdiag.h
@@ -0,0 +1,34 @@
+/*
+ * liblogdiag.h
+ *
+ * This file is a part of logdiag.
+ * Copyright Přemysl Janouch 2011. All rights reserved.
+ *
+ * See the file LICENSE for licensing information.
+ *
+ */
+
+#ifndef __LIBLOGDIAG_H__
+#define __LIBLOGDIAG_H__
+
+#include <gtk/gtk.h>
+#include <json-glib/json-glib.h>
+
+#include "ld-marshal.h"
+#include "ld-types.h"
+
+#include "ld-symbol.h"
+#include "ld-symbol-category.h"
+#include "ld-library.h"
+
+#include "ld-diagram-object.h"
+#include "ld-diagram-symbol.h"
+#include "ld-diagram.h"
+
+#include "ld-canvas.h"
+
+#include "ld-lua.h"
+#include "ld-lua-symbol.h"
+
+#endif /* ! __LIBLOGDIAG_H__ */
+