summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxi <xi@18f92427-320e-0410-9341-c67f048884a3>2006-07-03 13:49:14 +0000
committerxi <xi@18f92427-320e-0410-9341-c67f048884a3>2006-07-03 13:49:14 +0000
commitb1c94e4d6ddea05c2bce31ae9607072824613944 (patch)
tree987c20174f5dbe6b13df1484796280058dc8a8e7
parentf75fdf3b557dd71c4151db91814e2bdcf4568982 (diff)
downloadlibyaml-b1c94e4d6ddea05c2bce31ae9607072824613944.tar.gz
Move yaml/yaml.h to yaml.h and merge version.c to api.c.
git-svn-id: http://svn.pyyaml.org/libyaml/trunk@200 18f92427-320e-0410-9341-c67f048884a3
-rw-r--r--include/Makefile.am2
-rw-r--r--include/yaml.h (renamed from include/yaml/yaml.h)0
-rw-r--r--include/yaml/yaml_error.h25
-rw-r--r--include/yaml/yaml_version.h33
-rw-r--r--src/Makefile.am2
-rw-r--r--src/api.c16
-rw-r--r--src/reader.c2
-rw-r--r--src/scanner.c2
-rw-r--r--src/version.c21
-rw-r--r--tests/test-reader.c2
-rw-r--r--tests/test-version.c2
11 files changed, 21 insertions, 86 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 5c5f7dd..3c7323c 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = yaml/yaml.h #yaml/yaml_version.h yaml/yaml_error.h
+INCLUDES = yaml.h
DOXYGEN_CFG = $(top_srcdir)/doc/doxygen.cfg
nobase_include_HEADERS = $(INCLUDES)
diff --git a/include/yaml/yaml.h b/include/yaml.h
index 7ca4a9b..7ca4a9b 100644
--- a/include/yaml/yaml.h
+++ b/include/yaml.h
diff --git a/include/yaml/yaml_error.h b/include/yaml/yaml_error.h
deleted file mode 100644
index df0ca7d..0000000
--- a/include/yaml/yaml_error.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef YAML_ERROR_H
-#define YAML_ERROR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- YAML_NO_ERROR,
-
- YAML_MEMORY_ERROR,
-
- YAML_READER_ERROR,
- YAML_SCANNER_ERROR,
- YAML_PARSER_ERROR,
-
- YAML_WRITER_ERROR,
- YAML_EMITTER_ERROR
-} yaml_error_type_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* #ifndef YAML_ERROR_H */
diff --git a/include/yaml/yaml_version.h b/include/yaml/yaml_version.h
deleted file mode 100644
index 9718db2..0000000
--- a/include/yaml/yaml_version.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * @file yaml_version.h
- * @brief Version information.
- *
- * Do not include yaml_version.h directly.
- */
-
-#ifndef YAML_VERSION_H
-#define YAML_VERSION_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * @brief Get the library version.
- */
-
-const char *
-yaml_get_version_string(void);
-
-/*
- * @brief Get the library version numbers.
- */
-
-void
-yaml_get_version(int *major, int *minor, int *patch);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* #ifndef YAML_VERSION_H */
diff --git a/src/Makefile.am b/src/Makefile.am
index d30f3dd..c8797dc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
lib_LTLIBRARIES = libyaml.la
-libyaml_la_SOURCES = version.c api.c reader.c scanner.c
+libyaml_la_SOURCES = api.c reader.c scanner.c
libyaml_la_LDFLAGS = -release $(YAML_LT_RELEASE) -version-info $(YAML_LT_CURRENT):$(YAML_LT_REVISION):$(YAML_LT_AGE)
diff --git a/src/api.c b/src/api.c
index 88e03e7..3047753 100644
--- a/src/api.c
+++ b/src/api.c
@@ -3,10 +3,24 @@
#include <config.h>
#endif
-#include <yaml/yaml.h>
+#include <yaml.h>
#include <assert.h>
+YAML_DECLARE(const char *)
+yaml_get_version_string(void)
+{
+ return YAML_VERSION_STRING;
+}
+
+YAML_DECLARE(void)
+yaml_get_version(int *major, int *minor, int *patch)
+{
+ *major = YAML_VERSION_MAJOR;
+ *minor = YAML_VERSION_MINOR;
+ *patch = YAML_VERSION_PATCH;
+}
+
/*
* Allocate a dynamic memory block.
*/
diff --git a/src/reader.c b/src/reader.c
index 946d298..9cc8e7b 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -3,7 +3,7 @@
#include <config.h>
#endif
-#include <yaml/yaml.h>
+#include <yaml.h>
#include <assert.h>
diff --git a/src/scanner.c b/src/scanner.c
index 8313acd..45af0c1 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -479,7 +479,7 @@
#include <config.h>
#endif
-#include <yaml/yaml.h>
+#include <yaml.h>
#include <assert.h>
diff --git a/src/version.c b/src/version.c
deleted file mode 100644
index b7f5904..0000000
--- a/src/version.c
+++ /dev/null
@@ -1,21 +0,0 @@
-
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <yaml/yaml.h>
-
-const char *
-yaml_get_version_string(void)
-{
- return YAML_VERSION_STRING;
-}
-
-void
-yaml_get_version(int *major, int *minor, int *patch)
-{
- *major = YAML_VERSION_MAJOR;
- *minor = YAML_VERSION_MINOR;
- *patch = YAML_VERSION_PATCH;
-}
-
diff --git a/tests/test-reader.c b/tests/test-reader.c
index 53e4e7a..c5ce279 100644
--- a/tests/test-reader.c
+++ b/tests/test-reader.c
@@ -1,4 +1,4 @@
-#include <yaml/yaml.h>
+#include <yaml.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/tests/test-version.c b/tests/test-version.c
index 578d678..ab4f93c 100644
--- a/tests/test-version.c
+++ b/tests/test-version.c
@@ -1,4 +1,4 @@
-#include <yaml/yaml.h>
+#include <yaml.h>
#include <stdlib.h>
#include <stdio.h>