libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 7871feb4e1439e1da6cd2d6540f884729a4fb0de
parent 2e15af5ae0c57071b621f07ee77142c72f8d44de
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu, 19 Dec 2019 17:02:19 +0100

Only export symbols which are part of the public API.

Diffstat:
MCMakeLists.txt | 3++-
Minclude/ansilove.h | 26++++++++++++++------------
2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -34,7 +34,8 @@ add_library(ansilove SHARED ${SRC} ${LOADERS}) target_link_libraries(ansilove ${GD_LIBRARIES} m) set_target_properties(ansilove PROPERTIES - VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_MAJOR}) + VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_MAJOR} + C_VISIBILITY_PRESET hidden) install(TARGETS ansilove DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES include/ansilove.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/include/ansilove.h b/include/ansilove.h @@ -17,6 +17,8 @@ #include <stddef.h> #include <stdint.h> +#define ANSILOVE_EXTERN __attribute__((visibility("default"))) + /* Version number */ #define ANSILOVE_VERSION "1.1.6" @@ -90,18 +92,18 @@ struct ansilove_options { uint8_t scale_factor; }; -int ansilove_init(struct ansilove_ctx *, struct ansilove_options *); -char *ansilove_error(struct ansilove_ctx *); -int ansilove_loadfile(struct ansilove_ctx *, char *); -int ansilove_savefile(struct ansilove_ctx *, char *); -int ansilove_clean(struct ansilove_ctx *); +ANSILOVE_EXTERN int ansilove_init(struct ansilove_ctx *, struct ansilove_options *); +ANSILOVE_EXTERN char *ansilove_error(struct ansilove_ctx *); +ANSILOVE_EXTERN int ansilove_loadfile(struct ansilove_ctx *, char *); +ANSILOVE_EXTERN int ansilove_savefile(struct ansilove_ctx *, char *); +ANSILOVE_EXTERN int ansilove_clean(struct ansilove_ctx *); -int ansilove_ansi(struct ansilove_ctx *, struct ansilove_options *); -int ansilove_artworx(struct ansilove_ctx *, struct ansilove_options *); -int ansilove_binary(struct ansilove_ctx *, struct ansilove_options *); -int ansilove_icedraw(struct ansilove_ctx *, struct ansilove_options *); -int ansilove_pcboard(struct ansilove_ctx *, struct ansilove_options *); -int ansilove_tundra(struct ansilove_ctx *, struct ansilove_options *); -int ansilove_xbin(struct ansilove_ctx *, struct ansilove_options *); +ANSILOVE_EXTERN int ansilove_ansi(struct ansilove_ctx *, struct ansilove_options *); +ANSILOVE_EXTERN int ansilove_artworx(struct ansilove_ctx *, struct ansilove_options *); +ANSILOVE_EXTERN int ansilove_binary(struct ansilove_ctx *, struct ansilove_options *); +ANSILOVE_EXTERN int ansilove_icedraw(struct ansilove_ctx *, struct ansilove_options *); +ANSILOVE_EXTERN int ansilove_pcboard(struct ansilove_ctx *, struct ansilove_options *); +ANSILOVE_EXTERN int ansilove_tundra(struct ansilove_ctx *, struct ansilove_options *); +ANSILOVE_EXTERN int ansilove_xbin(struct ansilove_ctx *, struct ansilove_options *); #endif /* ANSILOVE_H */