diff --git a/Makefile.in b/Makefile.in
index 0779a56..67ab99d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -274,6 +274,10 @@ clean:
@rm -f $(PACKAGE_NAME).png
@rm -f $(PACKAGE_NAME)-logo.png
@rm -f *.log
+ @echo "$@"
+
+cleanDebug: clean
+ @echo "$@"
distclean: clean
@make -C src/pw3270 distclean
@@ -289,4 +293,5 @@ distclean: clean
@rm -f $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar*
@rm -f Makefile
+ @echo "$@"
diff --git a/pw3270.cbp b/pw3270.cbp
index 71d2da9..413c001 100644
--- a/pw3270.cbp
+++ b/pw3270.cbp
@@ -9,8 +9,8 @@
-
-
+
+
@@ -20,8 +20,8 @@
-
-
+
+
@@ -35,292 +35,293 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
-
+
+
+
+
diff --git a/src/lib3270/ft_cut.c b/src/lib3270/ft_cut.c
index 90d80dd..aa84585 100644
--- a/src/lib3270/ft_cut.c
+++ b/src/lib3270/ft_cut.c
@@ -150,7 +150,7 @@ upload_convert(unsigned char *buf, int len)
unsigned char c = *buf++;
char *ixp;
int ix;
- int oq = -1;
+ // int oq = -1;
retry:
if (quadrant < 0) {
@@ -176,7 +176,7 @@ upload_convert(unsigned char *buf, int len)
ixp = strchr(alphas, ebc2asc[c]);
if (ixp == (char *)NULL) {
/* Try a different quadrant. */
- oq = quadrant;
+ // oq = quadrant;
quadrant = -1;
goto retry;
}
@@ -189,7 +189,7 @@ upload_convert(unsigned char *buf, int len)
if (quadrant != OTHER_2 && c != XLATE_NULL &&
!conv[quadrant].xlate[ix]) {
/* Try a different quadrant. */
- oq = quadrant;
+// oq = quadrant;
quadrant = -1;
goto retry;
}
diff --git a/src/lib3270/globals.h b/src/lib3270/globals.h
index 4d6852c..abaaf16 100644
--- a/src/lib3270/globals.h
+++ b/src/lib3270/globals.h
@@ -349,7 +349,7 @@ LIB3270_INTERNAL void key_ACharacter(unsigned char c, enum keytype keytype, enum
LIB3270_INTERNAL void lib3270_initialize(void);
LIB3270_INTERNAL int cursor_move(H3270 *session, int baddr);
-LIB3270_INTERNAL void add_input_calls(H3270 *, void (*)(H3270 *), void (*)(H3270 *));
+// LIB3270_INTERNAL void add_input_calls(H3270 *, void (*)(H3270 *), void (*)(H3270 *));
LIB3270_INTERNAL void toggle_rectselect(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt);
diff --git a/src/lib3270/host.c b/src/lib3270/host.c
index d9be4f1..63ef189 100644
--- a/src/lib3270/host.c
+++ b/src/lib3270/host.c
@@ -567,7 +567,18 @@ static int do_connect(H3270 *hSession, const char *n)
/* Success. */
/* Setup socket I/O. */
- add_input_calls(hSession,net_input,net_exception);
+// add_input_calls(hSession,net_input,net_exception);
+#ifdef _WIN32
+ hSession->ns_exception_id = AddExcept((int) hSession->sockEvent, hSession, net_exception);
+ hSession->ns_read_id = AddInput((int) hSession->sockEvent, hSession, net_input);
+#else
+ hSession->ns_exception_id = AddExcept(hSession->sock, hSession, net_exception);
+ hSession->ns_read_id = AddInput(hSession->sock, hSession, net_input);
+#endif // WIN32
+
+ hSession->excepting = 1;
+ hSession->reading = 1;
+
/* Set state and tell the world. */
if (pending)
diff --git a/src/lib3270/html.c b/src/lib3270/html.c
index 72b27e8..c503446 100644
--- a/src/lib3270/html.c
+++ b/src/lib3270/html.c
@@ -115,7 +115,7 @@
append_string(info,element_text[id]);
}
- static update_colors(struct html_info *info, unsigned short attr)
+ static void update_colors(struct html_info *info, unsigned short attr)
{
unsigned short fg;
unsigned short bg = ((attr & 0x00F0) >> 4);
@@ -141,7 +141,7 @@
info->bg = bg;
}
- static const append_char(struct html_info *info, const struct chr_xlat *xlat, unsigned char chr)
+ static void append_char(struct html_info *info, const struct chr_xlat *xlat, unsigned char chr)
{
char txt[] = { chr, 0 };
int f;
diff --git a/src/lib3270/iocalls.c b/src/lib3270/iocalls.c
index 0d52ac2..bc34380 100644
--- a/src/lib3270/iocalls.c
+++ b/src/lib3270/iocalls.c
@@ -582,6 +582,7 @@ void x_except_on(H3270 *h)
#endif // WIN32
}
+/*
void add_input_calls(H3270 *session, void (*in)(H3270 *session), void (*exc)(H3270 *session))
{
#ifdef _WIN32
@@ -592,9 +593,10 @@ void add_input_calls(H3270 *session, void (*in)(H3270 *session), void (*exc)(H32
session->ns_read_id = AddInput(session->sock, session, in);
#endif // WIN32
- session->excepting = 1;
+ session->excepting = 1;
session->reading = 1;
}
+*/
void remove_input_calls(H3270 *session)
{
diff --git a/src/lib3270/proxy.c b/src/lib3270/proxy.c
index 4e65e39..f277120 100644
--- a/src/lib3270/proxy.c
+++ b/src/lib3270/proxy.c
@@ -18,7 +18,7 @@
* programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
* St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * Este programa está nomeado como proxy.c e possui 991 linhas de código.
+ * Este programa está nomeado como proxy.c e possui - linhas de código.
*
* Contatos:
*
@@ -42,6 +42,7 @@
#endif // _WIN32
#include "globals.h"
+#include "utilc.h"
//#include "appres.h"
#include "resources.h"
@@ -51,9 +52,8 @@
#endif
#if defined(_WIN32)
-
#include
-
+ #include "w3miscc.h"
#else
#include
@@ -824,8 +824,7 @@ proxy_socks5(int fd, char *host, unsigned short port, int force_d)
*s++ = 0x04; /* IPv6 */
memcpy(s, &ha.sin6.sin6_addr, sizeof(struct in6_addr));
s += sizeof(struct in6_addr);
- (void) inet_ntop(AF_INET6, &ha.sin6.sin6_addr, nbuf,
- sizeof(nbuf));
+ (void) inet_ntop(AF_INET6, &ha.sin6.sin6_addr, nbuf, sizeof(nbuf));
#endif /*]*/
}
SET16(s, port);
diff --git a/src/lib3270/screen.c b/src/lib3270/screen.c
index 8e13641..feda462 100644
--- a/src/lib3270/screen.c
+++ b/src/lib3270/screen.c
@@ -50,7 +50,7 @@
#include "tablesc.h"
#include "trace_dsc.h"
#include "utilc.h"
-#include "w3miscc.h"
+// #include "w3miscc.h"
#include "widec.h"
#include "xioc.h"
#include "screen.h"
diff --git a/src/lib3270/telnet.c b/src/lib3270/telnet.c
index 55baa0e..2e1adb6 100644
--- a/src/lib3270/telnet.c
+++ b/src/lib3270/telnet.c
@@ -217,7 +217,7 @@ static void net_connected(H3270 *session);
#if defined(X3270_TN3270E) /*[*/
static int tn3270e_negotiate(H3270 *hSession);
#endif /*]*/
-static int process_eor(void);
+static int process_eor(H3270 *hSession);
#if defined(X3270_TN3270E) /*[*/
#if defined(X3270_TRACE) /*[*/
static const char *tn3270e_function_names(const unsigned char *, int);
@@ -746,7 +746,7 @@ int net_connect(H3270 *session, const char *host, char *portname, Boolean ls, Bo
_exit(1);
}
- trace("Socket: %d Event: %ld",session->sock,session->sockEvent);
+// trace("Socket: %d Event: %ld",session->sock,(unsigned long) session->sockEvent);
#endif // WIN32
@@ -1260,7 +1260,7 @@ static int telnet_fsm(H3270 *session, unsigned char c)
case EOR: /* eor, process accumulated input */
if (IN_3270 || (IN_E && session->tn3270e_negotiated)) {
session->ns_rrcvd++;
- if (process_eor())
+ if (process_eor(session))
return -1;
} else
Warning(session, _( "EOR received when not in 3270 mode, ignored." ));
@@ -1862,14 +1862,14 @@ static void process_bind(H3270 *hSession, unsigned char *buf, int buflen)
#endif /*]*/
static int
-process_eor(void)
+process_eor(H3270 *hSession)
{
- if (h3270.syncing || !(h3270.ibptr - h3270.ibuf))
+ if (hSession->syncing || !(hSession->ibptr - hSession->ibuf))
return(0);
#if defined(X3270_TN3270E) /*[*/
if (IN_E) {
- tn3270e_header *h = (tn3270e_header *) h3270.ibuf;
+ tn3270e_header *h = (tn3270e_header *) hSession->ibuf;
unsigned char *s;
enum pds rv;
@@ -1881,52 +1881,52 @@ process_eor(void)
switch (h->data_type) {
case TN3270E_DT_3270_DATA:
- if ((h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)) &&
- !h3270.tn3270e_bound)
+ if ((hSession->e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)) &&
+ !hSession->tn3270e_bound)
return 0;
- h3270.tn3270e_submode = E_3270;
- check_in3270(&h3270);
- h3270.response_required = h->response_flag;
- rv = process_ds(h3270.ibuf + EH_SIZE,
- (h3270.ibptr - h3270.ibuf) - EH_SIZE);
+ hSession->tn3270e_submode = E_3270;
+ check_in3270(hSession);
+ hSession->response_required = h->response_flag;
+ rv = process_ds(hSession->ibuf + EH_SIZE,
+ (hSession->ibptr - hSession->ibuf) - EH_SIZE);
if (rv < 0 &&
- h3270.response_required != TN3270E_RSF_NO_RESPONSE)
- tn3270e_nak(&h3270,rv);
+ hSession->response_required != TN3270E_RSF_NO_RESPONSE)
+ tn3270e_nak(hSession,rv);
else if (rv == PDS_OKAY_NO_OUTPUT &&
- h3270.response_required == TN3270E_RSF_ALWAYS_RESPONSE)
- tn3270e_ack(&h3270);
- h3270.response_required = TN3270E_RSF_NO_RESPONSE;
+ hSession->response_required == TN3270E_RSF_ALWAYS_RESPONSE)
+ tn3270e_ack(hSession);
+ hSession->response_required = TN3270E_RSF_NO_RESPONSE;
return 0;
case TN3270E_DT_BIND_IMAGE:
- if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
+ if (!(hSession->e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
return 0;
- process_bind(&h3270, h3270.ibuf + EH_SIZE, (h3270.ibptr - h3270.ibuf) - EH_SIZE);
- trace_dsn("< BIND PLU-name '%s'\n", h3270.plu_name);
- h3270.tn3270e_bound = 1;
- check_in3270(&h3270);
+ process_bind(hSession, hSession->ibuf + EH_SIZE, (hSession->ibptr - hSession->ibuf) - EH_SIZE);
+ trace_dsn("< BIND PLU-name '%s'\n", hSession->plu_name);
+ hSession->tn3270e_bound = 1;
+ check_in3270(hSession);
return 0;
case TN3270E_DT_UNBIND:
- if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
+ if (!(hSession->e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
return 0;
- h3270.tn3270e_bound = 0;
- if (h3270.tn3270e_submode == E_3270)
- h3270.tn3270e_submode = E_NONE;
- check_in3270(&h3270);
+ hSession->tn3270e_bound = 0;
+ if (hSession->tn3270e_submode == E_3270)
+ hSession->tn3270e_submode = E_NONE;
+ check_in3270(hSession);
return 0;
case TN3270E_DT_NVT_DATA:
/* In tn3270e NVT mode */
- h3270.tn3270e_submode = E_NVT;
- check_in3270(&h3270);
- for (s = h3270.ibuf; s < h3270.ibptr; s++) {
+ hSession->tn3270e_submode = E_NVT;
+ check_in3270(hSession);
+ for (s = hSession->ibuf; s < hSession->ibptr; s++) {
ansi_process(*s++);
}
return 0;
case TN3270E_DT_SSCP_LU_DATA:
- if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
+ if (!(hSession->e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
return 0;
- h3270.tn3270e_submode = E_SSCP;
- check_in3270(&h3270);
- ctlr_write_sscp_lu(&h3270, h3270.ibuf + EH_SIZE,(h3270.ibptr - h3270.ibuf) - EH_SIZE);
+ hSession->tn3270e_submode = E_SSCP;
+ check_in3270(hSession);
+ ctlr_write_sscp_lu(hSession, hSession->ibuf + EH_SIZE,(hSession->ibptr - hSession->ibuf) - EH_SIZE);
return 0;
default:
/* Should do something more extraordinary here. */
@@ -1935,7 +1935,7 @@ process_eor(void)
} else
#endif /*]*/
{
- (void) process_ds(h3270.ibuf, h3270.ibptr - h3270.ibuf);
+ (void) process_ds(hSession->ibuf, hSession->ibptr - hSession->ibuf);
}
return 0;
}
diff --git a/src/lib3270/trace_ds.c b/src/lib3270/trace_ds.c
index 9277b3f..562a843 100644
--- a/src/lib3270/trace_ds.c
+++ b/src/lib3270/trace_ds.c
@@ -68,7 +68,7 @@
#include "telnetc.h"
#include "trace_dsc.h"
#include "utilc.h"
-#include "w3miscc.h"
+// #include "w3miscc.h"
#include "toggle.h"
/* Maximum size of a tracefile header. */
diff --git a/src/lib3270/w3miscc.h b/src/lib3270/w3miscc.h
index a774a24..7eeebbb 100644
--- a/src/lib3270/w3miscc.h
+++ b/src/lib3270/w3miscc.h
@@ -16,12 +16,7 @@
* Miscellaneous Win32 functions.
*/
-#if defined(_WIN32) /*[*/
-
-#if defined(_WS2TCPIP_H) /*[*/
-LIB3270_INTERNAL const char *inet_ntop(int af, const void *src, char *dst,socklen_t cnt);
-#endif /*]*/
-
-LIB3270_INTERNAL const char *win32_strerror(int e);
-
-#endif /*]*/
+#if defined(_WIN32)
+ LIB3270_INTERNAL const char *inet_ntop(int af, const void *src, char *dst,socklen_t cnt);
+ LIB3270_INTERNAL const char *win32_strerror(int e);
+#endif
diff --git a/src/pw3270/common/config.c b/src/pw3270/common/config.c
index 751ba79..1efc3dc 100644
--- a/src/pw3270/common/config.c
+++ b/src/pw3270/common/config.c
@@ -139,7 +139,7 @@ gchar * get_last_error_msg(void)
if(RegQueryValueExA(hKey,pName,NULL,&datatype,data,&datalen) == ERROR_SUCCESS)
{
data[datalen+1] = 0;
- cbk(pName,data,user_data);
+ cbk(pName,(const gchar *) data, user_data);
}
cName = MAX_KEY_LENGTH;
}
@@ -169,7 +169,7 @@ gchar * get_last_error_msg(void)
data[datalen] = 0;
- * value = g_ascii_strtod(data, &end_of_valid_d);
+ * value = g_ascii_strtod((const gchar *) data, &end_of_valid_d);
if(*end_of_valid_d != '\0' || end_of_valid_d == ((gchar *) data))
{
@@ -347,7 +347,7 @@ gchar * get_last_error_msg(void)
if(RegQueryValueExA(key_handle,key,NULL,&datatype,data,&datalen) == ERROR_SUCCESS)
{
data[datalen+1] = 0;
- ret = g_strdup(data);
+ ret = g_strdup((const gchar *) data);
trace("datalen=%d",datalen);
}
else if(def)
diff --git a/src/pw3270/window.c b/src/pw3270/window.c
index 0b99299..dae4f6d 100644
--- a/src/pw3270/window.c
+++ b/src/pw3270/window.c
@@ -150,7 +150,7 @@
static void pw3270_class_init(pw3270Class *klass)
{
// GObjectClass * gobject_class = G_OBJECT_CLASS(klass);
- GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass);
+// GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass);
#if GTK_CHECK_VERSION(3,0,0)
--
libgit2 0.21.2