summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2015-11-04 11:43:46 +0900
committerAkira TAGOH <akira@tagoh.org>2015-11-04 11:44:31 +0900
commitab8019a0f5d8089c3b1c916f3d22acc9b5ca61ec (patch)
treefab49844486f30b64491b1a38d6a217a05f2cca7
parent37a6aa8e4d667e16df2fcdd2f610ee45320fdd21 (diff)
Make some header files public (fixes: issue#14)
-rw-r--r--data/Makefile.am1
-rw-r--r--liblangtag/Makefile.am7
-rw-r--r--liblangtag/lt-atomic.h5
-rw-r--r--liblangtag/lt-ext-module-private.h6
-rw-r--r--liblangtag/lt-extension-private.h6
-rw-r--r--liblangtag/lt-extlang-private.h6
-rw-r--r--liblangtag/lt-grandfathered-private.h6
-rw-r--r--liblangtag/lt-iter-private.h6
-rw-r--r--liblangtag/lt-lang-private.h6
-rw-r--r--liblangtag/lt-lock.h6
-rw-r--r--liblangtag/lt-mem.h6
-rw-r--r--liblangtag/lt-messages.h4
-rw-r--r--liblangtag/lt-redundant-private.h6
-rw-r--r--liblangtag/lt-region-private.h6
-rw-r--r--liblangtag/lt-script-private.h6
-rw-r--r--liblangtag/lt-tag-private.h6
-rw-r--r--liblangtag/lt-trie.h6
-rw-r--r--liblangtag/lt-utils.h8
-rw-r--r--liblangtag/lt-variant-private.h6
-rw-r--r--tests/Makefile.am1
20 files changed, 82 insertions, 28 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 85c413d..84b9c5b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -112,6 +112,7 @@ reg2xml_SOURCES = \
$(NULL)
reg2xml_CFLAGS = \
$(LIBXML2_CFLAGS) \
+ -I$(top_srcdir) \
-I$(top_srcdir)/liblangtag \
-D__LANGTAG_COMPILATION \
$(NULL)
diff --git a/liblangtag/Makefile.am b/liblangtag/Makefile.am
index 4b09abb..8bc788b 100644
--- a/liblangtag/Makefile.am
+++ b/liblangtag/Makefile.am
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/liblangtag/ \
-I$(top_builddir) \
-D__LANGTAG_COMPILATION \
+ -D__LANGTAG_PRIVATE \
-DBUILDDIR="\"$(abs_top_builddir)\"" \
-DSRCDIR="\"$(abs_top_srcdir)\"" \
-DREGDATADIR="\"$(datadir)/liblangtag\"" \
@@ -64,6 +65,7 @@ liblangtag_public_headers = \
lt-lang-db.h \
lt-list.h \
lt-macros.h \
+ lt-messages.h \
lt-redundant.h \
lt-redundant-db.h \
lt-region.h \
@@ -72,8 +74,10 @@ liblangtag_public_headers = \
lt-script-db.h \
lt-string.h \
lt-tag.h \
+ lt-utils.h \
lt-variant.h \
lt-variant-db.h \
+ lt-xml.h \
$(NULL)
liblangtag_private_headers = \
lt-atomic.h \
@@ -85,16 +89,13 @@ liblangtag_private_headers = \
lt-lang-private.h \
lt-lock.h \
lt-mem.h \
- lt-messages.h \
lt-redundant-private.h \
lt-region-private.h \
lt-script-private.h \
lt-stdint.h \
lt-tag-private.h \
lt-trie.h \
- lt-utils.h \
lt-variant-private.h \
- lt-xml.h \
$(NULL)
liblangtag_built_public_headers = \
lt-config.h \
diff --git a/liblangtag/lt-atomic.h b/liblangtag/lt-atomic.h
index 236ae30..79bffa8 100644
--- a/liblangtag/lt-atomic.h
+++ b/liblangtag/lt-atomic.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-atomic.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,9 @@
#ifndef __LT_ATOMIC_H__
#define __LT_ATOMIC_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/liblangtag/lt-ext-module-private.h b/liblangtag/lt-ext-module-private.h
index c95a0fd..6c9ec11 100644
--- a/liblangtag/lt-ext-module-private.h
+++ b/liblangtag/lt-ext-module-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-ext-mdule-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_EXT_MODULE_PRIVATE_H__
#define __LT_EXT_MODULE_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include <liblangtag/lt-macros.h>
#include <liblangtag/lt-error.h>
#include <liblangtag/lt-ext-module-data.h>
diff --git a/liblangtag/lt-extension-private.h b/liblangtag/lt-extension-private.h
index 800737d..0efe4cf 100644
--- a/liblangtag/lt-extension-private.h
+++ b/liblangtag/lt-extension-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-extension-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_EXTENSION_PRIVATE_H__
#define __LT_EXTENSION_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-ext-module.h"
#include "lt-extension.h"
diff --git a/liblangtag/lt-extlang-private.h b/liblangtag/lt-extlang-private.h
index caceb48..0ce3b7f 100644
--- a/liblangtag/lt-extlang-private.h
+++ b/liblangtag/lt-extlang-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-extlang-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_EXTLANG_PRIVATE_H__
#define __LT_EXTLANG_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-extlang.h"
diff --git a/liblangtag/lt-grandfathered-private.h b/liblangtag/lt-grandfathered-private.h
index 7cb8a23..925355f 100644
--- a/liblangtag/lt-grandfathered-private.h
+++ b/liblangtag/lt-grandfathered-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-grandfathered-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_GRANDFATHERED_PRIVATE_H__
#define __LT_GRANDFATHERED_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-grandfathered.h"
diff --git a/liblangtag/lt-iter-private.h b/liblangtag/lt-iter-private.h
index ab0985a..363163c 100644
--- a/liblangtag/lt-iter-private.h
+++ b/liblangtag/lt-iter-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-iter-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_ITER_PRIVATE_H__
#define __LT_ITER_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-mem.h"
#include "lt-iter.h"
diff --git a/liblangtag/lt-lang-private.h b/liblangtag/lt-lang-private.h
index 5521dcd..ba764f5 100644
--- a/liblangtag/lt-lang-private.h
+++ b/liblangtag/lt-lang-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-lang-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_LANG_PRIVATE_H__
#define __LT_LANG_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-lang.h"
diff --git a/liblangtag/lt-lock.h b/liblangtag/lt-lock.h
index bb14cff..0194e1d 100644
--- a/liblangtag/lt-lock.h
+++ b/liblangtag/lt-lock.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-lock.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_LOCK_H__
#define __LT_LOCK_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/liblangtag/lt-mem.h b/liblangtag/lt-mem.h
index 2f1296b..f2d33cc 100644
--- a/liblangtag/lt-mem.h
+++ b/liblangtag/lt-mem.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-mem.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_MEM_H__
#define __LT_MEM_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
LT_BEGIN_DECLS
diff --git a/liblangtag/lt-messages.h b/liblangtag/lt-messages.h
index d20d4d6..8fc2e9c 100644
--- a/liblangtag/lt-messages.h
+++ b/liblangtag/lt-messages.h
@@ -16,10 +16,8 @@
#ifndef __LT_MESSAGES_H__
#define __LT_MESSAGES_H__
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
#include <stdarg.h>
+#include "lt-config.h"
#include "lt-macros.h"
LT_BEGIN_DECLS
diff --git a/liblangtag/lt-redundant-private.h b/liblangtag/lt-redundant-private.h
index e54e1fe..9af4685 100644
--- a/liblangtag/lt-redundant-private.h
+++ b/liblangtag/lt-redundant-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-redundant-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_REDUNDANT_PRIVATE_H__
#define __LT_REDUNDANT_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-redundant.h"
diff --git a/liblangtag/lt-region-private.h b/liblangtag/lt-region-private.h
index 7cc739e..cbd684c 100644
--- a/liblangtag/lt-region-private.h
+++ b/liblangtag/lt-region-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-region-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_REGION_PRIVATE_H__
#define __LT_REGION_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-region.h"
diff --git a/liblangtag/lt-script-private.h b/liblangtag/lt-script-private.h
index 4954a7a..e0e2bcb 100644
--- a/liblangtag/lt-script-private.h
+++ b/liblangtag/lt-script-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-script-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_SCRIPT_PRIVATE_H__
#define __LT_SCRIPT_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-script.h"
diff --git a/liblangtag/lt-tag-private.h b/liblangtag/lt-tag-private.h
index 58ed4e7..d99bf5b 100644
--- a/liblangtag/lt-tag-private.h
+++ b/liblangtag/lt-tag-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-tag-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_TAG_PRIVATE_H__
#define __LT_TAG_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-tag.h"
diff --git a/liblangtag/lt-trie.h b/liblangtag/lt-trie.h
index 9534cc8..133a810 100644
--- a/liblangtag/lt-trie.h
+++ b/liblangtag/lt-trie.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-trie.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_TRIE_H__
#define __LT_TRIE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include <liblangtag/lt-macros.h>
#include <liblangtag/lt-iter.h>
#include <liblangtag/lt-list.h>
diff --git a/liblangtag/lt-utils.h b/liblangtag/lt-utils.h
index b44d534..446c1f5 100644
--- a/liblangtag/lt-utils.h
+++ b/liblangtag/lt-utils.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-utils.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -14,12 +14,6 @@
#define __LT_UTILS_H__
#include <stdarg.h>
-#if HAVE_MEMORY_H
-#include <memory.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
#include "lt-macros.h"
LT_BEGIN_DECLS
diff --git a/liblangtag/lt-variant-private.h b/liblangtag/lt-variant-private.h
index 30e6121..de1dc32 100644
--- a/liblangtag/lt-variant-private.h
+++ b/liblangtag/lt-variant-private.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* lt-variant-private.h
- * Copyright (C) 2011-2012 Akira TAGOH
+ * Copyright (C) 2011-2015 Akira TAGOH
*
* Authors:
* Akira TAGOH <akira@tagoh.org>
@@ -13,6 +13,10 @@
#ifndef __LT_VARIANT_PRIVATE_H__
#define __LT_VARIANT_PRIVATE_H__
+#if !defined (__LANGTAG_PRIVATE)
+#error "Unable to use the private header publicly"
+#endif
+
#include "lt-macros.h"
#include "lt-variant.h"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 41cd6e4..049ebf1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
-DTEST_DATADIR=$(TEST_DATADIR) \
-DTEST_MODDIR="\"$(abs_top_builddir)/extensions/.libs\"" \
-D__LANGTAG_COMPILATION \
+ -D__LANGTAG_PRIVATE \
$(CHECK_CFLAGS) \
$(NULL)
DEPS = \