From c796e9972dddb2bb3df6a4812e7e6e9aaf7c0d44 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 18 Jan 2019 16:24:59 -0200 Subject: [PATCH] Removing unused methods Updating win32 build --- src/include/lib3270.h | 15 --------------- src/lib3270/glue.c | 8 +++----- src/lib3270/linux/connect.c | 46 ---------------------------------------------- src/lib3270/windows/connect.c | 46 ---------------------------------------------- src/lib3270/windows/util.c | 2 +- 5 files changed, 4 insertions(+), 113 deletions(-) diff --git a/src/include/lib3270.h b/src/include/lib3270.h index 92c9176..fda21ec 100644 --- a/src/include/lib3270.h +++ b/src/include/lib3270.h @@ -553,21 +553,6 @@ */ LIB3270_EXPORT int lib3270_reconnect(H3270 *h,int seconds); -// LIB3270_EXPORT int lib3270_set_connected(H3270 *h,int state); - - /** - * @brief Connect to defined host, keep main loop running. - * - * @param hSession Session handle. - * @param hostname Host name. - * @param srvc Service name (telnet if NULL). - * @param opt Session options. - * - * @return 0 for success, EAGAIN if auto-reconnect is in progress, EBUSY if connected, ENOTCONN if connection has failed, -1 on unexpected failure. - * - */ -// LIB3270_EXPORT int lib3270_connect_host(H3270 *hSession, const char *hostname, const char *srvc, LIB3270_HOST_TYPE opt); - /** * @brief Connect by URL * diff --git a/src/lib3270/glue.c b/src/lib3270/glue.c index 87b952c..3aacd26 100644 --- a/src/lib3270/glue.c +++ b/src/lib3270/glue.c @@ -94,10 +94,8 @@ /*---[ Globals ]--------------------------------------------------------------------------------------------------------------*/ -/* - * parse_ctlchar - * Parse an stty control-character specification. - * A cheap, non-complaining implementation. +/** + * @brief Parse an stty control-character specification; a cheap, non-complaining implementation. */ static char parse_ctlchar(char *s) { @@ -141,7 +139,7 @@ int lib3270_unloaded(void) #if defined WIN32 -BOOL WINAPI DllMain(HANDLE hinst, DWORD dwcallpurpose, LPVOID lpvResvd) +BOOL WINAPI DllMain(HANDLE hinst unused, DWORD dwcallpurpose, LPVOID lpvResvd unused) { // Trace("%s - Library %s",__FUNCTION__,(dwcallpurpose == DLL_PROCESS_ATTACH) ? "Loaded" : "Unloaded"); diff --git a/src/lib3270/linux/connect.c b/src/lib3270/linux/connect.c index 9b4dbd6..2846556 100644 --- a/src/lib3270/linux/connect.c +++ b/src/lib3270/linux/connect.c @@ -128,52 +128,6 @@ static void net_connected(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag u } - /* - LIB3270_EXPORT int lib3270_connect_host(H3270 *hSession, const char *hostname, const char *srvc, LIB3270_HOST_TYPE opt) - { - CHECK_SESSION_HANDLE(hSession); - - if(!hostname) - return EINVAL; - - if(!srvc) - srvc = "telnet"; - - if(*hostname == '$') - { - const char *name = getenv(hostname+1); - if(!name) - { - lib3270_popup_dialog( hSession, - LIB3270_NOTIFY_ERROR, - _( "Connection error" ), - _( "Unable to find selected hostname." ), - _( "Can't determine value for environment variable \"%s\" " ), - hostname); - lib3270_set_disconnected(hSession); - return ENOENT; - } - hostname = name; - } - - hSession->options = opt & ~LIB3270_HOST_TYPE_WAIT; - Replace(hSession->host.current,strdup(hostname)); - Replace(hSession->host.srvc,strdup(srvc)); - - Replace(hSession->host.full, - lib3270_strdup_printf( - "%s%s:%s", - opt&LIB3270_HOST_TYPE_SSL ? "tn3270s://" : "tn3270://", - hostname, - srvc )); - - trace("current_host=\"%s\"",hSession->host.current); - - return lib3270_reconnect(hSession,opt & LIB3270_HOST_TYPE_WAIT); - - } - */ - struct resolver { const char * message; diff --git a/src/lib3270/windows/connect.c b/src/lib3270/windows/connect.c index d80479d..ee37ae5 100644 --- a/src/lib3270/windows/connect.c +++ b/src/lib3270/windows/connect.c @@ -163,52 +163,6 @@ LIB3270_EXPORT int lib3270_connect_url(H3270 *hSession, const char *url, int wai } -/* -LIB3270_EXPORT int lib3270_connect_host(H3270 *hSession, const char *hostname, const char *srvc, LIB3270_HOST_TYPE opt) -{ - CHECK_SESSION_HANDLE(hSession); - - if(!hostname) - return EINVAL; - - if(!srvc) - srvc = "telnet"; - - if(*hostname == '$') - { - const char *name = getenv(hostname+1); - if(!name) - { - lib3270_popup_dialog( hSession, - LIB3270_NOTIFY_ERROR, - _( "Connection error" ), - _( "Unable to find selected hostname." ), - _( "Can't determine value for environment variable \"%s\" " ), - hostname); - lib3270_set_disconnected(hSession); - return ENOENT; - } - hostname = name; - } - - hSession->options = opt & ~LIB3270_HOST_TYPE_WAIT; - Replace(hSession->host.current,strdup(hostname)); - Replace(hSession->host.srvc,strdup(srvc)); - - Replace(hSession->host.full, - lib3270_strdup_printf( - "%s%s:%s", - opt&LIB3270_HOST_TYPE_SSL ? "tn3270s://" : "tn3270://", - hostname, - srvc )); - - trace("current_host=\"%s\"",hSession->host.current); - - return lib3270_reconnect(hSession,opt & LIB3270_HOST_TYPE_WAIT); - -} -*/ - struct resolver { int convert; diff --git a/src/lib3270/windows/util.c b/src/lib3270/windows/util.c index 12293cc..2f12b27 100644 --- a/src/lib3270/windows/util.c +++ b/src/lib3270/windows/util.c @@ -194,7 +194,7 @@ LIB3270_EXPORT const char * lib3270_win32_local_charset(void) #define SECS_BETWEEN_EPOCHS 11644473600ULL #define SECS_TO_100NS 10000000ULL /* 10^7 */ -int gettimeofday(struct timeval *tv, void *ignored) +int gettimeofday(struct timeval *tv, void *ignored unused) { FILETIME t; ULARGE_INTEGER u; -- libgit2 0.21.2