Export symbols in order to support shared libraries (#54)
* Add BAC_ROUTING compile definition * Reorder cmake * Fix OpenSSL support: support both 1.0 and 1.1t pus * Explicitly export symbols, hidden by default * Build shared libraries on travis using cmake * Learn Makefile about static library * Fix build using mingw with cmake * Do not cleanup twice or after potential free
This commit is contained in:
committed by
GitHub
parent
bb5fafc06a
commit
4a916468c6
@@ -27,6 +27,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
|
||||
/* index and text pairs */
|
||||
typedef const struct {
|
||||
@@ -43,33 +44,39 @@ extern "C" {
|
||||
If the string is not found, false is returned
|
||||
If the string is found, true is returned and the found_index contains
|
||||
the first index where the string was found. */
|
||||
BACNET_STACK_EXPORT
|
||||
bool indtext_by_string(
|
||||
INDTEXT_DATA * data_list,
|
||||
const char *search_name,
|
||||
unsigned *found_index);
|
||||
/* case insensitive version */
|
||||
BACNET_STACK_EXPORT
|
||||
bool indtext_by_istring(
|
||||
INDTEXT_DATA * data_list,
|
||||
const char *search_name,
|
||||
unsigned *found_index);
|
||||
/* Searches for a matching string and returns the index to the string
|
||||
or the default_index if the string is not found. */
|
||||
BACNET_STACK_EXPORT
|
||||
unsigned indtext_by_string_default(
|
||||
INDTEXT_DATA * data_list,
|
||||
const char *search_name,
|
||||
unsigned default_index);
|
||||
/* case insensitive version */
|
||||
BACNET_STACK_EXPORT
|
||||
unsigned indtext_by_istring_default(
|
||||
INDTEXT_DATA * data_list,
|
||||
const char *search_name,
|
||||
unsigned default_index);
|
||||
/* for a given index, return the matching string,
|
||||
or NULL if not found */
|
||||
BACNET_STACK_EXPORT
|
||||
const char *indtext_by_index(
|
||||
INDTEXT_DATA * data_list,
|
||||
unsigned index);
|
||||
/* for a given index, return the matching string,
|
||||
or default_name if not found */
|
||||
BACNET_STACK_EXPORT
|
||||
const char *indtext_by_index_default(
|
||||
INDTEXT_DATA * data_list,
|
||||
unsigned index,
|
||||
@@ -78,6 +85,7 @@ extern "C" {
|
||||
or default_name if not found.
|
||||
if the index is before the split,
|
||||
the before_split_default_name is used */
|
||||
BACNET_STACK_EXPORT
|
||||
const char *indtext_by_index_split_default(
|
||||
INDTEXT_DATA * data_list,
|
||||
unsigned index,
|
||||
@@ -86,6 +94,7 @@ extern "C" {
|
||||
const char *default_name);
|
||||
|
||||
/* returns the number of elements in the list */
|
||||
BACNET_STACK_EXPORT
|
||||
unsigned indtext_count(
|
||||
INDTEXT_DATA * data_list);
|
||||
|
||||
@@ -98,6 +107,7 @@ extern "C" {
|
||||
|
||||
#ifdef TEST
|
||||
#include "ctest.h"
|
||||
BACNET_STACK_EXPORT
|
||||
void testIndexText(
|
||||
Test * pTest);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user