Commit c796e9972dddb2bb3df6a4812e7e6e9aaf7c0d44
1 parent
279ad7c7
Exists in
master
and in
3 other branches
Removing unused methods
Updating win32 build
Showing
5 changed files
with
4 additions
and
113 deletions
Show diff stats
src/include/lib3270.h
| @@ -553,21 +553,6 @@ | @@ -553,21 +553,6 @@ | ||
| 553 | */ | 553 | */ |
| 554 | LIB3270_EXPORT int lib3270_reconnect(H3270 *h,int seconds); | 554 | LIB3270_EXPORT int lib3270_reconnect(H3270 *h,int seconds); |
| 555 | 555 | ||
| 556 | -// LIB3270_EXPORT int lib3270_set_connected(H3270 *h,int state); | ||
| 557 | - | ||
| 558 | - /** | ||
| 559 | - * @brief Connect to defined host, keep main loop running. | ||
| 560 | - * | ||
| 561 | - * @param hSession Session handle. | ||
| 562 | - * @param hostname Host name. | ||
| 563 | - * @param srvc Service name (telnet if NULL). | ||
| 564 | - * @param opt Session options. | ||
| 565 | - * | ||
| 566 | - * @return 0 for success, EAGAIN if auto-reconnect is in progress, EBUSY if connected, ENOTCONN if connection has failed, -1 on unexpected failure. | ||
| 567 | - * | ||
| 568 | - */ | ||
| 569 | -// LIB3270_EXPORT int lib3270_connect_host(H3270 *hSession, const char *hostname, const char *srvc, LIB3270_HOST_TYPE opt); | ||
| 570 | - | ||
| 571 | /** | 556 | /** |
| 572 | * @brief Connect by URL | 557 | * @brief Connect by URL |
| 573 | * | 558 | * |
src/lib3270/glue.c
| @@ -94,10 +94,8 @@ | @@ -94,10 +94,8 @@ | ||
| 94 | 94 | ||
| 95 | /*---[ Globals ]--------------------------------------------------------------------------------------------------------------*/ | 95 | /*---[ Globals ]--------------------------------------------------------------------------------------------------------------*/ |
| 96 | 96 | ||
| 97 | -/* | ||
| 98 | - * parse_ctlchar | ||
| 99 | - * Parse an stty control-character specification. | ||
| 100 | - * A cheap, non-complaining implementation. | 97 | +/** |
| 98 | + * @brief Parse an stty control-character specification; a cheap, non-complaining implementation. | ||
| 101 | */ | 99 | */ |
| 102 | static char parse_ctlchar(char *s) | 100 | static char parse_ctlchar(char *s) |
| 103 | { | 101 | { |
| @@ -141,7 +139,7 @@ int lib3270_unloaded(void) | @@ -141,7 +139,7 @@ int lib3270_unloaded(void) | ||
| 141 | 139 | ||
| 142 | #if defined WIN32 | 140 | #if defined WIN32 |
| 143 | 141 | ||
| 144 | -BOOL WINAPI DllMain(HANDLE hinst, DWORD dwcallpurpose, LPVOID lpvResvd) | 142 | +BOOL WINAPI DllMain(HANDLE hinst unused, DWORD dwcallpurpose, LPVOID lpvResvd unused) |
| 145 | { | 143 | { |
| 146 | // Trace("%s - Library %s",__FUNCTION__,(dwcallpurpose == DLL_PROCESS_ATTACH) ? "Loaded" : "Unloaded"); | 144 | // Trace("%s - Library %s",__FUNCTION__,(dwcallpurpose == DLL_PROCESS_ATTACH) ? "Loaded" : "Unloaded"); |
| 147 | 145 |
src/lib3270/linux/connect.c
| @@ -128,52 +128,6 @@ static void net_connected(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag u | @@ -128,52 +128,6 @@ static void net_connected(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag u | ||
| 128 | 128 | ||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | - /* | ||
| 132 | - LIB3270_EXPORT int lib3270_connect_host(H3270 *hSession, const char *hostname, const char *srvc, LIB3270_HOST_TYPE opt) | ||
| 133 | - { | ||
| 134 | - CHECK_SESSION_HANDLE(hSession); | ||
| 135 | - | ||
| 136 | - if(!hostname) | ||
| 137 | - return EINVAL; | ||
| 138 | - | ||
| 139 | - if(!srvc) | ||
| 140 | - srvc = "telnet"; | ||
| 141 | - | ||
| 142 | - if(*hostname == '$') | ||
| 143 | - { | ||
| 144 | - const char *name = getenv(hostname+1); | ||
| 145 | - if(!name) | ||
| 146 | - { | ||
| 147 | - lib3270_popup_dialog( hSession, | ||
| 148 | - LIB3270_NOTIFY_ERROR, | ||
| 149 | - _( "Connection error" ), | ||
| 150 | - _( "Unable to find selected hostname." ), | ||
| 151 | - _( "Can't determine value for environment variable \"%s\" " ), | ||
| 152 | - hostname); | ||
| 153 | - lib3270_set_disconnected(hSession); | ||
| 154 | - return ENOENT; | ||
| 155 | - } | ||
| 156 | - hostname = name; | ||
| 157 | - } | ||
| 158 | - | ||
| 159 | - hSession->options = opt & ~LIB3270_HOST_TYPE_WAIT; | ||
| 160 | - Replace(hSession->host.current,strdup(hostname)); | ||
| 161 | - Replace(hSession->host.srvc,strdup(srvc)); | ||
| 162 | - | ||
| 163 | - Replace(hSession->host.full, | ||
| 164 | - lib3270_strdup_printf( | ||
| 165 | - "%s%s:%s", | ||
| 166 | - opt&LIB3270_HOST_TYPE_SSL ? "tn3270s://" : "tn3270://", | ||
| 167 | - hostname, | ||
| 168 | - srvc )); | ||
| 169 | - | ||
| 170 | - trace("current_host=\"%s\"",hSession->host.current); | ||
| 171 | - | ||
| 172 | - return lib3270_reconnect(hSession,opt & LIB3270_HOST_TYPE_WAIT); | ||
| 173 | - | ||
| 174 | - } | ||
| 175 | - */ | ||
| 176 | - | ||
| 177 | struct resolver | 131 | struct resolver |
| 178 | { | 132 | { |
| 179 | const char * message; | 133 | const char * message; |
src/lib3270/windows/connect.c
| @@ -163,52 +163,6 @@ LIB3270_EXPORT int lib3270_connect_url(H3270 *hSession, const char *url, int wai | @@ -163,52 +163,6 @@ LIB3270_EXPORT int lib3270_connect_url(H3270 *hSession, const char *url, int wai | ||
| 163 | 163 | ||
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | -/* | ||
| 167 | -LIB3270_EXPORT int lib3270_connect_host(H3270 *hSession, const char *hostname, const char *srvc, LIB3270_HOST_TYPE opt) | ||
| 168 | -{ | ||
| 169 | - CHECK_SESSION_HANDLE(hSession); | ||
| 170 | - | ||
| 171 | - if(!hostname) | ||
| 172 | - return EINVAL; | ||
| 173 | - | ||
| 174 | - if(!srvc) | ||
| 175 | - srvc = "telnet"; | ||
| 176 | - | ||
| 177 | - if(*hostname == '$') | ||
| 178 | - { | ||
| 179 | - const char *name = getenv(hostname+1); | ||
| 180 | - if(!name) | ||
| 181 | - { | ||
| 182 | - lib3270_popup_dialog( hSession, | ||
| 183 | - LIB3270_NOTIFY_ERROR, | ||
| 184 | - _( "Connection error" ), | ||
| 185 | - _( "Unable to find selected hostname." ), | ||
| 186 | - _( "Can't determine value for environment variable \"%s\" " ), | ||
| 187 | - hostname); | ||
| 188 | - lib3270_set_disconnected(hSession); | ||
| 189 | - return ENOENT; | ||
| 190 | - } | ||
| 191 | - hostname = name; | ||
| 192 | - } | ||
| 193 | - | ||
| 194 | - hSession->options = opt & ~LIB3270_HOST_TYPE_WAIT; | ||
| 195 | - Replace(hSession->host.current,strdup(hostname)); | ||
| 196 | - Replace(hSession->host.srvc,strdup(srvc)); | ||
| 197 | - | ||
| 198 | - Replace(hSession->host.full, | ||
| 199 | - lib3270_strdup_printf( | ||
| 200 | - "%s%s:%s", | ||
| 201 | - opt&LIB3270_HOST_TYPE_SSL ? "tn3270s://" : "tn3270://", | ||
| 202 | - hostname, | ||
| 203 | - srvc )); | ||
| 204 | - | ||
| 205 | - trace("current_host=\"%s\"",hSession->host.current); | ||
| 206 | - | ||
| 207 | - return lib3270_reconnect(hSession,opt & LIB3270_HOST_TYPE_WAIT); | ||
| 208 | - | ||
| 209 | -} | ||
| 210 | -*/ | ||
| 211 | - | ||
| 212 | struct resolver | 166 | struct resolver |
| 213 | { | 167 | { |
| 214 | int convert; | 168 | int convert; |
src/lib3270/windows/util.c
| @@ -194,7 +194,7 @@ LIB3270_EXPORT const char * lib3270_win32_local_charset(void) | @@ -194,7 +194,7 @@ LIB3270_EXPORT const char * lib3270_win32_local_charset(void) | ||
| 194 | #define SECS_BETWEEN_EPOCHS 11644473600ULL | 194 | #define SECS_BETWEEN_EPOCHS 11644473600ULL |
| 195 | #define SECS_TO_100NS 10000000ULL /* 10^7 */ | 195 | #define SECS_TO_100NS 10000000ULL /* 10^7 */ |
| 196 | 196 | ||
| 197 | -int gettimeofday(struct timeval *tv, void *ignored) | 197 | +int gettimeofday(struct timeval *tv, void *ignored unused) |
| 198 | { | 198 | { |
| 199 | FILETIME t; | 199 | FILETIME t; |
| 200 | ULARGE_INTEGER u; | 200 | ULARGE_INTEGER u; |