#include <stddef.h>
#include <stdio.h>
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
#if defined(GC_DLL) && !defined(CORD_NOT_DLL)
/* Same as for GC_API in gc_config_macros.h. */
# ifdef CORD_BUILD
/* A simpler version that starts at the end: */
CORD_API int CORD_riter(CORD x, CORD_iter_fn f1, void * client_data);
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
/* Functions that operate on cord positions. The easy way to traverse */
/* cords. A cord position is logically a pair consisting of a cord */
/* and an index into that cord. But it is much faster to retrieve a */
/* definitions. The former may evaluate their argument more than once. */
#include "cord_pos.h"
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
/*
Visible definitions from above:
/* must be < CORD_len(x). */
CORD_API size_t CORD_rchr(CORD x, size_t i, int c);
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
/* The following are also not primitive, but are implemented in */
/* cordprnt.c. They provide functionality similar to the ANSI C */
#include <stdarg.h>
+# ifdef __cplusplus
+ extern "C" {
+# endif
+
CORD_API int CORD_sprintf(CORD * out, CORD format, ...);
CORD_API int CORD_vsprintf(CORD * out, CORD format, va_list args);
CORD_API int CORD_fprintf(FILE * f, CORD format, ...);
CORD_API int CORD_printf(CORD format, ...);
CORD_API int CORD_vprintf(CORD format, va_list args);
+# ifdef __cplusplus
+ } /* extern "C" */
+# endif
+
#endif /* CORD_NO_IO */
#endif /* CORD_H */
#if !defined(CORD_POSITION_H) && defined(CORD_H)
#define CORD_POSITION_H
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
/* The representation of CORD_position. This is private to the */
/* implementation, but the size is known to clients. Also */
/* the implementation of some exported macros relies on it. */
(p)[0].cur_leaf + ((p)[0].cur_pos - (p)[0].cur_start)
/* address of current character in cache. */
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
#endif
# include "cord.h"
# endif
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
/* Extensible cords are strings that may be destructively appended to. */
/* They allow fast construction of cords from characters that are */
/* being read from a stream. */
/* original. */
void CORD_ec_append_cord(CORD_ec x, CORD s);
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
# endif /* EC_H */