From 34fd1e8d060cbcdc26c32d9d4dba0e77a47af9c8 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 19 Sep 2001 00:05:32 +0000 Subject: [PATCH] Exported telnet description functions. --- src/sbbs3/telnet.c | 4 ++-- src/sbbs3/telnet.h | 29 +++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/sbbs3/telnet.c b/src/sbbs3/telnet.c index ee59b40266..442337d2e5 100644 --- a/src/sbbs3/telnet.c +++ b/src/sbbs3/telnet.c @@ -39,7 +39,7 @@ #include "gen_defs.h" #include "telnet.h" -const char *telnet_cmd_desc(uchar cmd) +const char* DLLCALL telnet_cmd_desc(uchar cmd) { static char unknown[32]; @@ -112,7 +112,7 @@ char* telnet_option_descriptions[]={ ,"TN3270E" }; -const char *telnet_opt_desc(uchar opt) +const char* DLLCALL telnet_opt_desc(uchar opt) { static char unknown[32]; diff --git a/src/sbbs3/telnet.h b/src/sbbs3/telnet.h index a3842d6b15..9225fd11a7 100644 --- a/src/sbbs3/telnet.h +++ b/src/sbbs3/telnet.h @@ -110,11 +110,36 @@ enum { #define TELNET_MODE_ECHO (1<<1) #define TELNET_MODE_GATE (1<<2) // Pass-through telnet commands/responses +#ifdef DLLEXPORT +#undef DLLEXPORT +#endif +#ifdef DLLCALL +#undef DLLCALL +#endif + +#ifdef _WIN32 + #ifdef SBBS_EXPORTS + #define DLLEXPORT __declspec(dllexport) + #else + #define DLLEXPORT __declspec(dllimport) + #endif + #ifdef __BORLANDC__ + #define DLLCALL __stdcall + #else + #define DLLCALL + #endif +#else + #define DLLEXPORT + #define DLLCALL +#endif + #ifdef __cplusplus extern "C" { #endif -const char *telnet_cmd_desc(uchar cmd); -const char *telnet_opt_desc(uchar opt); + +DLLEXPORT const char* DLLCALL telnet_cmd_desc(uchar cmd); +DLLEXPORT const char* DLLCALL telnet_opt_desc(uchar opt); + #ifdef __cplusplus } #endif \ No newline at end of file -- GitLab