summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-10-23 23:00:21 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2010-10-23 23:00:21 (GMT)
commitd485dbd52ebc6a911a5ddcf6891212fccb82e8c0 (patch)
tree2494d29b36b7406eaa0b0a634fe9260001bd914e
parent6537f4f4acc41eb0608fdb1506ff8fc947cfb121 (diff)
downloadlibparserutils-d485dbd52ebc6a911a5ddcf6891212fccb82e8c0.tar.gz
libparserutils-d485dbd52ebc6a911a5ddcf6891212fccb82e8c0.tar.bz2
Sprinkle some C++ scoping around
svn path=/trunk/libparserutils/; revision=10901
-rw-r--r--include/parserutils/charset/codec.h9
-rw-r--r--include/parserutils/charset/mibenum.h9
-rw-r--r--include/parserutils/charset/utf16.h9
-rw-r--r--include/parserutils/charset/utf8.h9
-rw-r--r--include/parserutils/errors.h9
-rw-r--r--include/parserutils/functypes.h9
-rw-r--r--include/parserutils/input/inputstream.h9
-rw-r--r--include/parserutils/parserutils.h9
-rw-r--r--include/parserutils/types.h9
-rw-r--r--include/parserutils/utils/buffer.h9
-rw-r--r--include/parserutils/utils/stack.h9
-rw-r--r--include/parserutils/utils/vector.h9
12 files changed, 108 insertions, 0 deletions
diff --git a/include/parserutils/charset/codec.h b/include/parserutils/charset/codec.h
index d49c858..96934a6 100644
--- a/include/parserutils/charset/codec.h
+++ b/include/parserutils/charset/codec.h
@@ -8,6 +8,11 @@
#ifndef parserutils_charset_codec_h_
#define parserutils_charset_codec_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <inttypes.h>
#include <parserutils/errors.h>
@@ -113,4 +118,8 @@ parserutils_error parserutils_charset_codec_decode(
parserutils_error parserutils_charset_codec_reset(
parserutils_charset_codec *codec);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/charset/mibenum.h b/include/parserutils/charset/mibenum.h
index 8b3ac9d..e033b4d 100644
--- a/include/parserutils/charset/mibenum.h
+++ b/include/parserutils/charset/mibenum.h
@@ -8,6 +8,11 @@
#ifndef parserutils_charset_mibenum_h_
#define parserutils_charset_mibenum_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <inttypes.h>
#include <stdbool.h>
@@ -21,4 +26,8 @@ const char *parserutils_charset_mibenum_to_name(uint16_t mibenum);
/* Determine if a MIB enum value represents a Unicode variant */
bool parserutils_charset_mibenum_is_unicode(uint16_t mibenum);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/charset/utf16.h b/include/parserutils/charset/utf16.h
index 6569d6e..572a72d 100644
--- a/include/parserutils/charset/utf16.h
+++ b/include/parserutils/charset/utf16.h
@@ -12,6 +12,11 @@
#ifndef parserutils_charset_utf16_h_
#define parserutils_charset_utf16_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <inttypes.h>
#include <parserutils/errors.h>
@@ -34,5 +39,9 @@ parserutils_error parserutils_charset_utf16_next(const uint8_t *s,
parserutils_error parserutils_charset_utf16_next_paranoid(const uint8_t *s,
uint32_t len, uint32_t off, uint32_t *nextoff);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/charset/utf8.h b/include/parserutils/charset/utf8.h
index 16e012e..88e1a15 100644
--- a/include/parserutils/charset/utf8.h
+++ b/include/parserutils/charset/utf8.h
@@ -12,6 +12,11 @@
#ifndef parserutils_charset_utf8_h_
#define parserutils_charset_utf8_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <inttypes.h>
#include <parserutils/errors.h>
@@ -34,5 +39,9 @@ parserutils_error parserutils_charset_utf8_next(const uint8_t *s, uint32_t len,
parserutils_error parserutils_charset_utf8_next_paranoid(const uint8_t *s,
uint32_t len, uint32_t off, uint32_t *nextoff);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/errors.h b/include/parserutils/errors.h
index 74c7f34..6a6aa0b 100644
--- a/include/parserutils/errors.h
+++ b/include/parserutils/errors.h
@@ -8,6 +8,11 @@
#ifndef parserutils_errors_h_
#define parserutils_errors_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stddef.h>
typedef enum parserutils_error {
@@ -27,5 +32,9 @@ const char *parserutils_error_to_string(parserutils_error error);
/* Convert a string to a parserutils error value */
parserutils_error parserutils_error_from_string(const char *str, size_t len);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/functypes.h b/include/parserutils/functypes.h
index 703a329..7ff626d 100644
--- a/include/parserutils/functypes.h
+++ b/include/parserutils/functypes.h
@@ -8,6 +8,11 @@
#ifndef parserutils_functypes_h_
#define parserutils_functypes_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@@ -17,5 +22,9 @@
/* Type of allocation function for parserutils */
typedef void *(*parserutils_alloc)(void *ptr, size_t size, void *pw);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/input/inputstream.h b/include/parserutils/input/inputstream.h
index eca08ad..1fd95e9 100644
--- a/include/parserutils/input/inputstream.h
+++ b/include/parserutils/input/inputstream.h
@@ -8,6 +8,11 @@
#ifndef parserutils_input_inputstream_h_
#define parserutils_input_inputstream_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stdbool.h>
#ifndef NDEBUG
#include <stdio.h>
@@ -175,5 +180,9 @@ parserutils_error parserutils_inputstream_change_charset(
parserutils_inputstream *stream,
const char *enc, uint32_t source);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/parserutils.h b/include/parserutils/parserutils.h
index 460e80c..aa2b5ac 100644
--- a/include/parserutils/parserutils.h
+++ b/include/parserutils/parserutils.h
@@ -8,6 +8,11 @@
#ifndef parserutils_parserutils_h_
#define parserutils_parserutils_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <parserutils/errors.h>
#include <parserutils/functypes.h>
#include <parserutils/types.h>
@@ -19,5 +24,9 @@ parserutils_error parserutils_initialise(const char *aliases_file,
/* Clean up after ParserUtils */
parserutils_error parserutils_finalise(parserutils_alloc alloc, void *pw);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/types.h b/include/parserutils/types.h
index b36e4aa..a4bd9b3 100644
--- a/include/parserutils/types.h
+++ b/include/parserutils/types.h
@@ -8,8 +8,17 @@
#ifndef parserutils_types_h_
#define parserutils_types_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stdbool.h>
#include <inttypes.h>
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/utils/buffer.h b/include/parserutils/utils/buffer.h
index c988564..cf3cb02 100644
--- a/include/parserutils/utils/buffer.h
+++ b/include/parserutils/utils/buffer.h
@@ -8,6 +8,11 @@
#ifndef parserutils_utils_buffer_h_
#define parserutils_utils_buffer_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <parserutils/errors.h>
#include <parserutils/functypes.h>
@@ -37,5 +42,9 @@ parserutils_error parserutils_buffer_grow(parserutils_buffer *buffer);
parserutils_error parserutils_buffer_randomise(parserutils_buffer *buffer);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/utils/stack.h b/include/parserutils/utils/stack.h
index 58a3c19..5bfe412 100644
--- a/include/parserutils/utils/stack.h
+++ b/include/parserutils/utils/stack.h
@@ -8,6 +8,11 @@
#ifndef parserutils_utils_stack_h_
#define parserutils_utils_stack_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stddef.h>
#include <parserutils/errors.h>
@@ -26,5 +31,9 @@ parserutils_error parserutils_stack_pop(parserutils_stack *stack, void *item);
void *parserutils_stack_get_current(parserutils_stack *stack);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/parserutils/utils/vector.h b/include/parserutils/utils/vector.h
index a9fa19e..ca4f06a 100644
--- a/include/parserutils/utils/vector.h
+++ b/include/parserutils/utils/vector.h
@@ -8,6 +8,11 @@
#ifndef parserutils_utils_vector_h_
#define parserutils_utils_vector_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stddef.h>
#include <parserutils/errors.h>
@@ -32,5 +37,9 @@ const void *parserutils_vector_iterate(const parserutils_vector *vector,
const void *parserutils_vector_peek(const parserutils_vector *vector,
int32_t ctx);
+#ifdef __cplusplus
+}
+#endif
+
#endif