Surround declaration of functions with FOUG_C_LINKAGE_BEGIN and FOUG_C_LINKAGE_END
This avoids linking errors with use of FougDataX in C++ programs
This commit is contained in:
parent
381dd0d9b7
commit
52fea697cb
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_BEGIN
|
||||||
|
|
||||||
/*! This enum identifies endian representations of numbers */
|
/*! This enum identifies endian representations of numbers */
|
||||||
enum foug_endianness
|
enum foug_endianness
|
||||||
{
|
{
|
||||||
@ -17,4 +19,6 @@ typedef enum foug_endianness foug_endianness_t;
|
|||||||
/*! Returns endianness (byte order) of the host's CPU architecture */
|
/*! Returns endianness (byte order) of the host's CPU architecture */
|
||||||
FOUG_LIB_EXPORT foug_endianness_t foug_host_endianness();
|
FOUG_LIB_EXPORT foug_endianness_t foug_host_endianness();
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_END
|
||||||
|
|
||||||
#endif /* FOUG_ENDIAN_H */
|
#endif /* FOUG_ENDIAN_H */
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_BEGIN
|
||||||
|
|
||||||
/*! This enum defines common errors */
|
/*! This enum defines common errors */
|
||||||
enum foug_datax_error
|
enum foug_datax_error
|
||||||
{
|
{
|
||||||
@ -33,4 +35,6 @@ FOUG_LIB_EXPORT foug_bool_t foug_datax_no_error(int code);
|
|||||||
/*! Returns true if \p code != FOUG_DATAX_NO_ERROR */
|
/*! Returns true if \p code != FOUG_DATAX_NO_ERROR */
|
||||||
FOUG_LIB_EXPORT foug_bool_t foug_datax_error(int code);
|
FOUG_LIB_EXPORT foug_bool_t foug_datax_error(int code);
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_END
|
||||||
|
|
||||||
#endif /* FOUG_DATAX_C_ERROR_H */
|
#endif /* FOUG_DATAX_C_ERROR_H */
|
||||||
|
@ -73,4 +73,12 @@ typedef double foug_real64_t;
|
|||||||
# endif
|
# endif
|
||||||
#endif /* !FOUG_INLINE */
|
#endif /* !FOUG_INLINE */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# define FOUG_C_LINKAGE_BEGIN extern "C" {
|
||||||
|
# define FOUG_C_LINKAGE_END }
|
||||||
|
#else
|
||||||
|
# define FOUG_C_LINKAGE_BEGIN
|
||||||
|
# define FOUG_C_LINKAGE_END
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* FOUG_C_GLOBAL_H */
|
#endif /* FOUG_C_GLOBAL_H */
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "stl_global.h"
|
#include "stl_global.h"
|
||||||
#include "../stream.h"
|
#include "../stream.h"
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_BEGIN
|
||||||
|
|
||||||
/*! This enums defines the various STL formats */
|
/*! This enums defines the various STL formats */
|
||||||
enum foug_stl_format
|
enum foug_stl_format
|
||||||
{
|
{
|
||||||
@ -18,4 +20,6 @@ typedef enum foug_stl_format foug_stl_format_t;
|
|||||||
FOUG_DATAX_LIBSTL_EXPORT
|
FOUG_DATAX_LIBSTL_EXPORT
|
||||||
foug_stl_format_t foug_stl_get_format(foug_stream_t* stream, size_t data_size);
|
foug_stl_format_t foug_stl_get_format(foug_stream_t* stream, size_t data_size);
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_END
|
||||||
|
|
||||||
#endif /* FOUG_LIBSTL_FORMAT_H */
|
#endif /* FOUG_LIBSTL_FORMAT_H */
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include "../endian.h"
|
#include "../endian.h"
|
||||||
#include "../transfer.h"
|
#include "../transfer.h"
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_BEGIN
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* STL ascii
|
* STL ascii
|
||||||
*/
|
*/
|
||||||
@ -37,4 +39,6 @@ FOUG_DATAX_LIBSTL_EXPORT int foug_stlb_write(const foug_stl_geom_t* geom,
|
|||||||
const uint8_t* header_data,
|
const uint8_t* header_data,
|
||||||
foug_endianness_t byte_order);
|
foug_endianness_t byte_order);
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_END
|
||||||
|
|
||||||
#endif /* FOUG_DATAX_LIBSTL_STL_IO_H */
|
#endif /* FOUG_DATAX_LIBSTL_STL_IO_H */
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_BEGIN
|
||||||
|
|
||||||
/*! Stream that can get input from an arbitrary data source or can write output to an arbitrary
|
/*! Stream that can get input from an arbitrary data source or can write output to an arbitrary
|
||||||
* data sink
|
* data sink
|
||||||
*/
|
*/
|
||||||
@ -55,4 +57,6 @@ FOUG_LIB_EXPORT size_t foug_stream_write(foug_stream_t* stream,
|
|||||||
size_t size,
|
size_t size,
|
||||||
size_t count);
|
size_t count);
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_END
|
||||||
|
|
||||||
#endif /* FOUG_C_STREAM_H */
|
#endif /* FOUG_C_STREAM_H */
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_BEGIN
|
||||||
|
|
||||||
/*! Provides control over a general task.
|
/*! Provides control over a general task.
|
||||||
*
|
*
|
||||||
* "Control" here means task progress handling and interruption request (abort).
|
* "Control" here means task progress handling and interruption request (abort).
|
||||||
@ -26,4 +28,6 @@ FOUG_LIB_EXPORT foug_bool_t foug_task_control_handle_progress(foug_task_control_
|
|||||||
/*! Utility function that converts \p value as a percentage */
|
/*! Utility function that converts \p value as a percentage */
|
||||||
FOUG_LIB_EXPORT uint8_t foug_percentage(size_t range_min, size_t range_max, size_t value);
|
FOUG_LIB_EXPORT uint8_t foug_percentage(size_t range_min, size_t range_max, size_t value);
|
||||||
|
|
||||||
|
FOUG_C_LINKAGE_END
|
||||||
|
|
||||||
#endif /* FOUG_C_TASK_CONTROL_H */
|
#endif /* FOUG_C_TASK_CONTROL_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user