[lasem] build: single header include (dom).



commit 8cbd07a6605ac02251b39918498b710f0f79a83b
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Sun Nov 7 19:34:18 2010 +0100

    build: single header include (dom).

 src/Makefile.am            |    1 +
 src/lsmdom.h               |   23 ++++++++++++-----------
 src/lsmdomcharacterdata.c  |    2 +-
 src/lsmdomcharacterdata.h  |    3 +--
 src/lsmdomdocument.h       |    7 ++++---
 src/lsmdomimplementation.c |    5 ++++-
 src/lsmdomimplementation.h |    7 +++----
 src/lsmdomnode.h           |    6 +++---
 src/lsmdomparser.c         |    3 ++-
 src/lsmdomparser.h         |   11 ++++-------
 src/lsmdomtext.c           |    4 ++--
 src/lsmdomtext.h           |    5 ++---
 src/lsmdomtypes.h          |   41 +++++++++++++++++++++++++++++++++++++++++
 src/lsmdomview.h           |    5 +++--
 src/lsmmathmldocument.h    |    2 +-
 15 files changed, 84 insertions(+), 41 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 3f53616..a050afa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -133,6 +133,7 @@ LASEM_DOM_HDRS = 				\
 	lsmproperties.h				\
 	lsmattributes.h				\
 	lsmdom.h				\
+	lsmdomtypes.h				\
 	lsmdomnode.h				\
 	lsmdomnodelist.h			\
 	lsmdomdocument.h			\
diff --git a/src/lsmdom.h b/src/lsmdom.h
index 2823ab6..d920116 100644
--- a/src/lsmdom.h
+++ b/src/lsmdom.h
@@ -1,6 +1,6 @@
-/* lsmdom.h
+/* Lasem - SVG and Mathml library
  *
- * Copyright © 2007-2008  Emmanuel Pacaud
+ * Copyright © 2007-2008 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -26,16 +26,17 @@
 
 #include <lsm.h>
 
-G_BEGIN_DECLS
+#include <lsmdomtypes.h>
 
-typedef struct _LsmDomNode LsmDomNode;
-typedef struct _LsmDomElement LsmDomElement;
-typedef struct _LsmDomDocument LsmDomDocument;
-typedef struct _LsmDomCharacterData LsmDomCharacterData;
-typedef struct _LsmDomText LsmDomText;
+#include <lsmdomnode.h>
+#include <lsmdomnodelist.h>
+#include <lsmdomdocument.h>
+#include <lsmdomelement.h>
+#include <lsmdomcharacterdata.h>
+#include <lsmdomtext.h>
+#include <lsmdomimplementation.h>
 
-typedef struct _LsmDomView LsmDomView;
-
-G_END_DECLS
+#include <lsmdomparser.h>
+#include <lsmdomview.h>
 
 #endif
diff --git a/src/lsmdomcharacterdata.c b/src/lsmdomcharacterdata.c
index d41a785..f5470d8 100644
--- a/src/lsmdomcharacterdata.c
+++ b/src/lsmdomcharacterdata.c
@@ -1,4 +1,4 @@
-/* lsmdomcharacterdata.c
+/* Lasem - SVG and Mathml library
  *
  * Copyright © 2007-2010  Emmanuel Pacaud
  *
diff --git a/src/lsmdomcharacterdata.h b/src/lsmdomcharacterdata.h
index 4ecbc8c..1dc3f31 100644
--- a/src/lsmdomcharacterdata.h
+++ b/src/lsmdomcharacterdata.h
@@ -1,4 +1,4 @@
-/* gcharacterdata.h
+/* Lasem - SVG and Mathml library
  *
  * Copyright © 2007-2008  Emmanuel Pacaud
  *
@@ -24,7 +24,6 @@
 #ifndef LSM_DOM_CHARACTER_DATA_H
 #define LSM_DOM_CHARACTER_DATA_H
 
-#include <lsmdom.h>
 #include <lsmdomnode.h>
 
 G_BEGIN_DECLS
diff --git a/src/lsmdomdocument.h b/src/lsmdomdocument.h
index 0aa892f..2480e9e 100644
--- a/src/lsmdomdocument.h
+++ b/src/lsmdomdocument.h
@@ -1,6 +1,6 @@
-/* lsmdomdocument.h
+/* Lasem - SVG and Mathml library
  *
- * Copyright © 2007-2008  Emmanuel Pacaud
+ * Copyright © 2007-2008 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -24,7 +24,8 @@
 #ifndef LSM_DOM_DOCUMENT_H
 #define LSM_DOM_DOCUMENT_H
 
-#include <lsmdom.h>
+#include <lsmtypes.h>
+#include <lsmdomtypes.h>
 #include <lsmdomnode.h>
 #include <lsmdomview.h>
 
diff --git a/src/lsmdomimplementation.c b/src/lsmdomimplementation.c
index 428eaa3..af1a223 100644
--- a/src/lsmdomimplementation.c
+++ b/src/lsmdomimplementation.c
@@ -1,4 +1,5 @@
-/*
+/* Lasem - SVG and Mathml library
+ *
  * Copyright © 2007-2009 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
@@ -21,6 +22,8 @@
  */
 
 #include <lsmdomimplementation.h>
+#include <lsmmathmldocument.h>
+#include <lsmsvgdocument.h>
 #include <string.h>
 
 LsmDomDocument *
diff --git a/src/lsmdomimplementation.h b/src/lsmdomimplementation.h
index 50d76d8..c609120 100644
--- a/src/lsmdomimplementation.h
+++ b/src/lsmdomimplementation.h
@@ -1,4 +1,5 @@
-/*
+/* Lasem - SVG and Mathml library
+ *
  * Copyright © 2007-2009 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
@@ -23,10 +24,8 @@
 #ifndef LSM_DOM_IMPLEMENTATION_H
 #define LSM_DOM_IMPLEMENTATION_H
 
-#include <lsmdom.h>
+#include <lsmdomtypes.h>
 #include <lsmdomdocument.h>
-#include <lsmmathmldocument.h>
-#include <lsmsvgdocument.h>
 
 G_BEGIN_DECLS
 
diff --git a/src/lsmdomnode.h b/src/lsmdomnode.h
index 0812262..e8c5bf4 100644
--- a/src/lsmdomnode.h
+++ b/src/lsmdomnode.h
@@ -1,6 +1,6 @@
-/* lsmdomnode.h
+/* Lasem - SVG and Mathml library
  *
- * Copyright © 2007-2008  Emmanuel Pacaud
+ * Copyright © 2007-2008 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -24,7 +24,7 @@
 #ifndef LSM_DOM_NODE_H
 #define LSM_DOM_NODE_H
 
-#include <lsmdom.h>
+#include <lsmdomtypes.h>
 #include <gio/gio.h>
 
 G_BEGIN_DECLS
diff --git a/src/lsmdomparser.c b/src/lsmdomparser.c
index 39545a0..73d76ad 100644
--- a/src/lsmdomparser.c
+++ b/src/lsmdomparser.c
@@ -22,6 +22,7 @@
 
 #include <lsmdebug.h>
 #include <lsmdomimplementation.h>
+#include <lsmdomnode.h>
 #include <lsmmathmlpresentationtoken.h>
 #include <lsmmathmlentitydictionary.h>
 #include <lsmsvgtextelement.h>
@@ -281,7 +282,7 @@ typedef enum {
 } LsmDomDocumentError;
 
 LsmDomDocument *
-lsm_dom_document_new_from_memory (const char *buffer, int size, GError **error)
+lsm_dom_document_new_from_memory (const void *buffer, size_t size, GError **error)
 {
 	static LsmDomSaxParserState state;
 
diff --git a/src/lsmdomparser.h b/src/lsmdomparser.h
index 11551bb..2633e04 100644
--- a/src/lsmdomparser.h
+++ b/src/lsmdomparser.h
@@ -1,4 +1,5 @@
-/*
+/* Lasem - SVG and Mathml library
+ *
  * Copyright © 2007-2009 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
@@ -28,13 +29,9 @@
 
 G_BEGIN_DECLS
 
-typedef enum {
-	LSM_DOM_DOCUMENT_ERROR_INVALID_XML
-} LsmDomDocumentError;
-
 LsmDomDocument * 	lsm_dom_document_new_from_memory 	(const void *buffer, size_t size, GError **error);
-LsmDomDocument * 	lsm_dom_document_new_from_path 		(const char *path, GError *error);
-LsmDomDocument * 	lsm_dom_document_new_from_url 		(const char *url, GError *error);
+LsmDomDocument * 	lsm_dom_document_new_from_path 		(const char *path, GError **error);
+LsmDomDocument * 	lsm_dom_document_new_from_url 		(const char *url, GError **error);
 
 void			lsm_dom_document_save_to_stream		(LsmDomDocument *document,
 								 GOutputStream *stream,
diff --git a/src/lsmdomtext.c b/src/lsmdomtext.c
index 3caebb8..76c5307 100644
--- a/src/lsmdomtext.c
+++ b/src/lsmdomtext.c
@@ -1,6 +1,6 @@
-/* lsmdomtext.c
+/* Lasem - SVG and Mathml library
  *
- * Copyright © 2007-2008  Emmanuel Pacaud
+ * Copyright © 2007-2008 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff --git a/src/lsmdomtext.h b/src/lsmdomtext.h
index 3b8d81c..da73353 100644
--- a/src/lsmdomtext.h
+++ b/src/lsmdomtext.h
@@ -1,6 +1,6 @@
-/* lsmdomtext.h
+/* Lasem - SVG and Mathml library
  *
- * Copyright © 2007-2008  Emmanuel Pacaud
+ * Copyright © 2007-2008 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -24,7 +24,6 @@
 #ifndef LSM_DOM_TEXT_H
 #define LSM_DOM_TEXT_H
 
-#include <lsmdom.h>
 #include <lsmdomcharacterdata.h>
 
 G_BEGIN_DECLS
diff --git a/src/lsmdomtypes.h b/src/lsmdomtypes.h
new file mode 100644
index 0000000..b52efae
--- /dev/null
+++ b/src/lsmdomtypes.h
@@ -0,0 +1,41 @@
+/* Lasem - SVG and Mathml library
+ *
+ * Copyright © 2010 Emmanuel Pacaud
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author:
+ * 	Emmanuel Pacaud <emmanuel gnome org>
+ */
+
+#ifndef LSM_DOM_TYPES_H
+#define LSM_DOM_TYPES_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef struct _LsmDomNode LsmDomNode;
+typedef struct _LsmDomElement LsmDomElement;
+typedef struct _LsmDomDocument LsmDomDocument;
+typedef struct _LsmDomCharacterData LsmDomCharacterData;
+typedef struct _LsmDomText LsmDomText;
+
+typedef struct _LsmDomView LsmDomView;
+
+G_END_DECLS
+
+#endif
diff --git a/src/lsmdomview.h b/src/lsmdomview.h
index e74e1f0..15bd6c2 100644
--- a/src/lsmdomview.h
+++ b/src/lsmdomview.h
@@ -1,4 +1,5 @@
-/*
+/* Lasem - SVG and Mathml library
+ *
  * Copyright © 2009 Emmanuel Pacaud
  *
  * This library is free software; you can redistribute it and/or
@@ -23,7 +24,7 @@
 #ifndef LSM_DOM_VIEW_H
 #define LSM_DOM_VIEW_H
 
-#include <lsmdom.h>
+#include <lsmdomtypes.h>
 #include <cairo.h>
 #include <pango/pangocairo.h>
 
diff --git a/src/lsmmathmldocument.h b/src/lsmmathmldocument.h
index 91c822c..adf65f6 100644
--- a/src/lsmmathmldocument.h
+++ b/src/lsmmathmldocument.h
@@ -1,4 +1,4 @@
-/* lsmmathmldocument.h
+/* Lasem - SVG and Mathml library
  *
  * Copyright © 2007-2008  Emmanuel Pacaud
  *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]