Commit bf9fe328 authored by deuce's avatar deuce
Browse files

Do the DLL thing-a-ma-roo.

parent 7d413c59
......@@ -30,6 +30,8 @@ target_include_directories(uifc PRIVATE "${CIOLib_DIR}/../../../include")
target_compile_definitions(uifc PRIVATE $<TARGET_PROPERTY:ciolib,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(uifc PRIVATE $<TARGET_PROPERTY:ciolib,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(uifc ciolib)
target_compile_definitions(ciolib PRIVATE UIFC_EXPORTS)
target_compile_definitions(ciolib INTERFACE UIFC_IMPORTS)
set(INSTALL_HEADERS
uifc.h
......
......@@ -53,6 +53,30 @@
#include <sys/param.h> /* PATH_MAX */
#endif
#ifdef _WIN32
#ifdef __BORLANDC__
#define UIFCCALL __stdcall
#else
#define UIFCCALL
#endif
#if defined(UIFC_IMPORTS) || defined(UIFC_EXPORTS)
#if defined(UIFC_IMPORTS)
#define UIFCEXPORT __declspec( dllimport )
#define UIFCEXPORTVAR __declspec( dllimport )
#else
#define UIFCEXPORT __declspec( dllexport )
#define UIFCEXPORTVAR __declspec( dllexport )
#endif
#else /* self-contained executable */
#define UIFCEXPORT
#define UIFCEXPORTVAR extern
#endif
#else
#define UIFCCALL
#define UIFCEXPORT
#define UIFCEXPORTVAR extern
#endif
#if defined(__unix__) && !defined(stricmp)
#define stricmp strcasecmp
#define strnicmp strncasecmp
......@@ -417,7 +441,7 @@ enum {
uifcNo=1
};
extern char* uifcYesNoOpts[];
UIFCEXPORTVAR char* uifcYesNoOpts[];
/****************************************************************************/
/* Initialization routines for each UIFC implementation. */
......@@ -425,7 +449,7 @@ extern char* uifcYesNoOpts[];
/****************************************************************************/
int uifcini(uifcapi_t*); /* Original implementation based on conio */
int uifcinix(uifcapi_t*); /* Standard I/O implementation */
int uifcini32(uifcapi_t*); /* conio/curses implementation */
UIFCEXPORT int UIFCCALL uifcini32(uifcapi_t*); /* modern implementation */
/****************************************************************************/
#ifdef __cplusplus
......
......@@ -146,7 +146,7 @@ int inkey(void)
return(c);
}
int uifcini32(uifcapi_t* uifcapi)
int UIFCCALL uifcini32(uifcapi_t* uifcapi)
{
unsigned i;
struct text_info txtinfo;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment