Commit f46dde11ffb486478016d050f6b2c8ab39a79dcb

Authored by perry.werneck@gmail.com
1 parent b09f3ac6

Retirando warnings quando compilado em MinGW64

ft_cut.c
... ... @@ -150,7 +150,7 @@ upload_convert(unsigned char *buf, int len)
150 150 unsigned char c = *buf++;
151 151 char *ixp;
152 152 int ix;
153   - int oq = -1;
  153 + // int oq = -1;
154 154  
155 155 retry:
156 156 if (quadrant < 0) {
... ... @@ -176,7 +176,7 @@ upload_convert(unsigned char *buf, int len)
176 176 ixp = strchr(alphas, ebc2asc[c]);
177 177 if (ixp == (char *)NULL) {
178 178 /* Try a different quadrant. */
179   - oq = quadrant;
  179 + // oq = quadrant;
180 180 quadrant = -1;
181 181 goto retry;
182 182 }
... ... @@ -189,7 +189,7 @@ upload_convert(unsigned char *buf, int len)
189 189 if (quadrant != OTHER_2 && c != XLATE_NULL &&
190 190 !conv[quadrant].xlate[ix]) {
191 191 /* Try a different quadrant. */
192   - oq = quadrant;
  192 +// oq = quadrant;
193 193 quadrant = -1;
194 194 goto retry;
195 195 }
... ...
globals.h
... ... @@ -349,7 +349,7 @@ LIB3270_INTERNAL void key_ACharacter(unsigned char c, enum keytype keytype, enum
349 349 LIB3270_INTERNAL void lib3270_initialize(void);
350 350 LIB3270_INTERNAL int cursor_move(H3270 *session, int baddr);
351 351  
352   -LIB3270_INTERNAL void add_input_calls(H3270 *, void (*)(H3270 *), void (*)(H3270 *));
  352 +// LIB3270_INTERNAL void add_input_calls(H3270 *, void (*)(H3270 *), void (*)(H3270 *));
353 353  
354 354 LIB3270_INTERNAL void toggle_rectselect(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt);
355 355  
... ...
host.c
... ... @@ -567,7 +567,18 @@ static int do_connect(H3270 *hSession, const char *n)
567 567 /* Success. */
568 568  
569 569 /* Setup socket I/O. */
570   - add_input_calls(hSession,net_input,net_exception);
  570 +// add_input_calls(hSession,net_input,net_exception);
  571 +#ifdef _WIN32
  572 + hSession->ns_exception_id = AddExcept((int) hSession->sockEvent, hSession, net_exception);
  573 + hSession->ns_read_id = AddInput((int) hSession->sockEvent, hSession, net_input);
  574 +#else
  575 + hSession->ns_exception_id = AddExcept(hSession->sock, hSession, net_exception);
  576 + hSession->ns_read_id = AddInput(hSession->sock, hSession, net_input);
  577 +#endif // WIN32
  578 +
  579 + hSession->excepting = 1;
  580 + hSession->reading = 1;
  581 +
571 582  
572 583 /* Set state and tell the world. */
573 584 if (pending)
... ...
html.c
... ... @@ -115,7 +115,7 @@
115 115 append_string(info,element_text[id]);
116 116 }
117 117  
118   - static update_colors(struct html_info *info, unsigned short attr)
  118 + static void update_colors(struct html_info *info, unsigned short attr)
119 119 {
120 120 unsigned short fg;
121 121 unsigned short bg = ((attr & 0x00F0) >> 4);
... ... @@ -141,7 +141,7 @@
141 141 info->bg = bg;
142 142 }
143 143  
144   - static const append_char(struct html_info *info, const struct chr_xlat *xlat, unsigned char chr)
  144 + static void append_char(struct html_info *info, const struct chr_xlat *xlat, unsigned char chr)
145 145 {
146 146 char txt[] = { chr, 0 };
147 147 int f;
... ...
iocalls.c
... ... @@ -582,6 +582,7 @@ void x_except_on(H3270 *h)
582 582 #endif // WIN32
583 583 }
584 584  
  585 +/*
585 586 void add_input_calls(H3270 *session, void (*in)(H3270 *session), void (*exc)(H3270 *session))
586 587 {
587 588 #ifdef _WIN32
... ... @@ -592,9 +593,10 @@ void add_input_calls(H3270 *session, void (*in)(H3270 *session), void (*exc)(H32
592 593 session->ns_read_id = AddInput(session->sock, session, in);
593 594 #endif // WIN32
594 595  
595   - session->excepting = 1;
  596 + session->excepting = 1;
596 597 session->reading = 1;
597 598 }
  599 +*/
598 600  
599 601 void remove_input_calls(H3270 *session)
600 602 {
... ...
proxy.c
... ... @@ -18,7 +18,7 @@
18 18 * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19 19 * St, Fifth Floor, Boston, MA 02110-1301 USA
20 20 *
21   - * Este programa está nomeado como proxy.c e possui 991 linhas de código.
  21 + * Este programa está nomeado como proxy.c e possui - linhas de código.
22 22 *
23 23 * Contatos:
24 24 *
... ... @@ -42,6 +42,7 @@
42 42 #endif // _WIN32
43 43  
44 44 #include "globals.h"
  45 +#include "utilc.h"
45 46  
46 47 //#include "appres.h"
47 48 #include "resources.h"
... ... @@ -51,9 +52,8 @@
51 52 #endif
52 53  
53 54 #if defined(_WIN32)
54   -
55 55 #include <ws2tcpip.h>
56   -
  56 + #include "w3miscc.h"
57 57 #else
58 58  
59 59 #include <sys/socket.h>
... ... @@ -824,8 +824,7 @@ proxy_socks5(int fd, char *host, unsigned short port, int force_d)
824 824 *s++ = 0x04; /* IPv6 */
825 825 memcpy(s, &ha.sin6.sin6_addr, sizeof(struct in6_addr));
826 826 s += sizeof(struct in6_addr);
827   - (void) inet_ntop(AF_INET6, &ha.sin6.sin6_addr, nbuf,
828   - sizeof(nbuf));
  827 + (void) inet_ntop(AF_INET6, &ha.sin6.sin6_addr, nbuf, sizeof(nbuf));
829 828 #endif /*]*/
830 829 }
831 830 SET16(s, port);
... ...
screen.c
... ... @@ -50,7 +50,7 @@
50 50 #include "tablesc.h"
51 51 #include "trace_dsc.h"
52 52 #include "utilc.h"
53   -#include "w3miscc.h"
  53 +// #include "w3miscc.h"
54 54 #include "widec.h"
55 55 #include "xioc.h"
56 56 #include "screen.h"
... ...
telnet.c
... ... @@ -217,7 +217,7 @@ static void net_connected(H3270 *session);
217 217 #if defined(X3270_TN3270E) /*[*/
218 218 static int tn3270e_negotiate(H3270 *hSession);
219 219 #endif /*]*/
220   -static int process_eor(void);
  220 +static int process_eor(H3270 *hSession);
221 221 #if defined(X3270_TN3270E) /*[*/
222 222 #if defined(X3270_TRACE) /*[*/
223 223 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
746 746 _exit(1);
747 747 }
748 748  
749   - trace("Socket: %d Event: %ld",session->sock,session->sockEvent);
  749 +// trace("Socket: %d Event: %ld",session->sock,(unsigned long) session->sockEvent);
750 750  
751 751 #endif // WIN32
752 752  
... ... @@ -1260,7 +1260,7 @@ static int telnet_fsm(H3270 *session, unsigned char c)
1260 1260 case EOR: /* eor, process accumulated input */
1261 1261 if (IN_3270 || (IN_E && session->tn3270e_negotiated)) {
1262 1262 session->ns_rrcvd++;
1263   - if (process_eor())
  1263 + if (process_eor(session))
1264 1264 return -1;
1265 1265 } else
1266 1266 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)
1862 1862 #endif /*]*/
1863 1863  
1864 1864 static int
1865   -process_eor(void)
  1865 +process_eor(H3270 *hSession)
1866 1866 {
1867   - if (h3270.syncing || !(h3270.ibptr - h3270.ibuf))
  1867 + if (hSession->syncing || !(hSession->ibptr - hSession->ibuf))
1868 1868 return(0);
1869 1869  
1870 1870 #if defined(X3270_TN3270E) /*[*/
1871 1871 if (IN_E) {
1872   - tn3270e_header *h = (tn3270e_header *) h3270.ibuf;
  1872 + tn3270e_header *h = (tn3270e_header *) hSession->ibuf;
1873 1873 unsigned char *s;
1874 1874 enum pds rv;
1875 1875  
... ... @@ -1881,52 +1881,52 @@ process_eor(void)
1881 1881  
1882 1882 switch (h->data_type) {
1883 1883 case TN3270E_DT_3270_DATA:
1884   - if ((h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)) &&
1885   - !h3270.tn3270e_bound)
  1884 + if ((hSession->e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)) &&
  1885 + !hSession->tn3270e_bound)
1886 1886 return 0;
1887   - h3270.tn3270e_submode = E_3270;
1888   - check_in3270(&h3270);
1889   - h3270.response_required = h->response_flag;
1890   - rv = process_ds(h3270.ibuf + EH_SIZE,
1891   - (h3270.ibptr - h3270.ibuf) - EH_SIZE);
  1887 + hSession->tn3270e_submode = E_3270;
  1888 + check_in3270(hSession);
  1889 + hSession->response_required = h->response_flag;
  1890 + rv = process_ds(hSession->ibuf + EH_SIZE,
  1891 + (hSession->ibptr - hSession->ibuf) - EH_SIZE);
1892 1892 if (rv < 0 &&
1893   - h3270.response_required != TN3270E_RSF_NO_RESPONSE)
1894   - tn3270e_nak(&h3270,rv);
  1893 + hSession->response_required != TN3270E_RSF_NO_RESPONSE)
  1894 + tn3270e_nak(hSession,rv);
1895 1895 else if (rv == PDS_OKAY_NO_OUTPUT &&
1896   - h3270.response_required == TN3270E_RSF_ALWAYS_RESPONSE)
1897   - tn3270e_ack(&h3270);
1898   - h3270.response_required = TN3270E_RSF_NO_RESPONSE;
  1896 + hSession->response_required == TN3270E_RSF_ALWAYS_RESPONSE)
  1897 + tn3270e_ack(hSession);
  1898 + hSession->response_required = TN3270E_RSF_NO_RESPONSE;
1899 1899 return 0;
1900 1900 case TN3270E_DT_BIND_IMAGE:
1901   - if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
  1901 + if (!(hSession->e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
1902 1902 return 0;
1903   - process_bind(&h3270, h3270.ibuf + EH_SIZE, (h3270.ibptr - h3270.ibuf) - EH_SIZE);
1904   - trace_dsn("< BIND PLU-name '%s'\n", h3270.plu_name);
1905   - h3270.tn3270e_bound = 1;
1906   - check_in3270(&h3270);
  1903 + process_bind(hSession, hSession->ibuf + EH_SIZE, (hSession->ibptr - hSession->ibuf) - EH_SIZE);
  1904 + trace_dsn("< BIND PLU-name '%s'\n", hSession->plu_name);
  1905 + hSession->tn3270e_bound = 1;
  1906 + check_in3270(hSession);
1907 1907 return 0;
1908 1908 case TN3270E_DT_UNBIND:
1909   - if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
  1909 + if (!(hSession->e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
1910 1910 return 0;
1911   - h3270.tn3270e_bound = 0;
1912   - if (h3270.tn3270e_submode == E_3270)
1913   - h3270.tn3270e_submode = E_NONE;
1914   - check_in3270(&h3270);
  1911 + hSession->tn3270e_bound = 0;
  1912 + if (hSession->tn3270e_submode == E_3270)
  1913 + hSession->tn3270e_submode = E_NONE;
  1914 + check_in3270(hSession);
1915 1915 return 0;
1916 1916 case TN3270E_DT_NVT_DATA:
1917 1917 /* In tn3270e NVT mode */
1918   - h3270.tn3270e_submode = E_NVT;
1919   - check_in3270(&h3270);
1920   - for (s = h3270.ibuf; s < h3270.ibptr; s++) {
  1918 + hSession->tn3270e_submode = E_NVT;
  1919 + check_in3270(hSession);
  1920 + for (s = hSession->ibuf; s < hSession->ibptr; s++) {
1921 1921 ansi_process(*s++);
1922 1922 }
1923 1923 return 0;
1924 1924 case TN3270E_DT_SSCP_LU_DATA:
1925   - if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
  1925 + if (!(hSession->e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)))
1926 1926 return 0;
1927   - h3270.tn3270e_submode = E_SSCP;
1928   - check_in3270(&h3270);
1929   - ctlr_write_sscp_lu(&h3270, h3270.ibuf + EH_SIZE,(h3270.ibptr - h3270.ibuf) - EH_SIZE);
  1927 + hSession->tn3270e_submode = E_SSCP;
  1928 + check_in3270(hSession);
  1929 + ctlr_write_sscp_lu(hSession, hSession->ibuf + EH_SIZE,(hSession->ibptr - hSession->ibuf) - EH_SIZE);
1930 1930 return 0;
1931 1931 default:
1932 1932 /* Should do something more extraordinary here. */
... ... @@ -1935,7 +1935,7 @@ process_eor(void)
1935 1935 } else
1936 1936 #endif /*]*/
1937 1937 {
1938   - (void) process_ds(h3270.ibuf, h3270.ibptr - h3270.ibuf);
  1938 + (void) process_ds(hSession->ibuf, hSession->ibptr - hSession->ibuf);
1939 1939 }
1940 1940 return 0;
1941 1941 }
... ...
trace_ds.c
... ... @@ -68,7 +68,7 @@
68 68 #include "telnetc.h"
69 69 #include "trace_dsc.h"
70 70 #include "utilc.h"
71   -#include "w3miscc.h"
  71 +// #include "w3miscc.h"
72 72 #include "toggle.h"
73 73  
74 74 /* Maximum size of a tracefile header. */
... ...
w3miscc.h
... ... @@ -16,12 +16,7 @@
16 16 * Miscellaneous Win32 functions.
17 17 */
18 18  
19   -#if defined(_WIN32) /*[*/
20   -
21   -#if defined(_WS2TCPIP_H) /*[*/
22   -LIB3270_INTERNAL const char *inet_ntop(int af, const void *src, char *dst,socklen_t cnt);
23   -#endif /*]*/
24   -
25   -LIB3270_INTERNAL const char *win32_strerror(int e);
26   -
27   -#endif /*]*/
  19 +#if defined(_WIN32)
  20 + LIB3270_INTERNAL const char *inet_ntop(int af, const void *src, char *dst,socklen_t cnt);
  21 + LIB3270_INTERNAL const char *win32_strerror(int e);
  22 +#endif
... ...