Commit 077ee0c9aa76f542d3c39f41ddba158fd7ace75b

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

Ajustando tradução na tela de help, incluindo lista de argumentos aceitos no pop…

…up de argumento inválido para facilitar o uso em windows, removendo macros para chamadas de log
@@ -99,8 +99,8 @@ @@ -99,8 +99,8 @@
99 99
100 100
101 #include <lib3270/log.h> 101 #include <lib3270/log.h>
102 - #define WriteLog(module,fmt, ...) lib3270_write_log(NULL,module,fmt,__VA_ARGS__)  
103 - #define WriteRCLog(module,rc,fmt, ...) lib3270_write_rc(NULL,module,fmt,__VA_ARGS__) 102 +// #define WriteLog(module,fmt, ...) lib3270_write_log(NULL,module,fmt,__VA_ARGS__)
  103 +// #define WriteRCLog(module,rc,fmt, ...) lib3270_write_rc(NULL,module,fmt,__VA_ARGS__)
104 104
105 #ifdef LIB3270_MODULE_NAME 105 #ifdef LIB3270_MODULE_NAME
106 #define Log(fmt, ...) lib3270_write_log(NULL,LIB3270_MODULE_NAME,fmt,__VA_ARGS__) 106 #define Log(fmt, ...) lib3270_write_log(NULL,LIB3270_MODULE_NAME,fmt,__VA_ARGS__)
@@ -367,7 +367,7 @@ @@ -367,7 +367,7 @@
367 LOCAL_EXTERN int emulate_input(char *s, int len, int pasting); 367 LOCAL_EXTERN int emulate_input(char *s, int len, int pasting);
368 368
369 /* Network related calls */ 369 /* Network related calls */
370 - LOCAL_EXTERN int Get3270Socket(void); 370 +// LOCAL_EXTERN int Get3270Socket(void);
371 371
372 /* Misc calls */ 372 /* Misc calls */
373 LOCAL_EXTERN void popup_an_error(H3270 *session, const char *fmt, ...); 373 LOCAL_EXTERN void popup_an_error(H3270 *session, const char *fmt, ...);
@@ -819,7 +819,7 @@ void popup_an_errno(int errn, const char *fmt, ...) @@ -819,7 +819,7 @@ void popup_an_errno(int errn, const char *fmt, ...)
819 (void) vsprintf(vmsgbuf, fmt, args); 819 (void) vsprintf(vmsgbuf, fmt, args);
820 va_end(args); 820 va_end(args);
821 821
822 - WriteLog("3270", "Error Popup:\n%s\nrc=%d (%s)",vmsgbuf,errn,strerror(errn)); 822 + lib3270_write_log("3270", "Error Popup:\n%s\nrc=%d (%s)",vmsgbuf,errn,strerror(errn));
823 823
824 Error(NULL,vmsgbuf); 824 Error(NULL,vmsgbuf);
825 } 825 }
@@ -645,7 +645,7 @@ int lib3270_connect(H3270 *h, const char *n, int wait) @@ -645,7 +645,7 @@ int lib3270_connect(H3270 *h, const char *n, int wait)
645 */ 645 */
646 static void try_reconnect(H3270 *session) 646 static void try_reconnect(H3270 *session)
647 { 647 {
648 - WriteLog("3270","Starting auto-reconnect (Host: %s)",session->full_current_host ? session->full_current_host : "-"); 648 + lib3270_write_log("3270","Starting auto-reconnect (Host: %s)",session->full_current_host ? session->full_current_host : "-");
649 session->auto_reconnect_inprogress = False; 649 session->auto_reconnect_inprogress = False;
650 lib3270_reconnect(session,0); 650 lib3270_reconnect(session,0);
651 } 651 }
@@ -448,9 +448,6 @@ LIB3270_EXPORT char * lib3270_get_region(H3270 *h, int start_pos, int end_pos, u @@ -448,9 +448,6 @@ LIB3270_EXPORT char * lib3270_get_region(H3270 *h, int start_pos, int end_pos, u
448 return realloc(text,sz); 448 return realloc(text,sz);
449 } 449 }
450 450
451 -  
452 -  
453 -  
454 LIB3270_EXPORT char * lib3270_get_text(H3270 *h, int offset, int len) 451 LIB3270_EXPORT char * lib3270_get_text(H3270 *h, int offset, int len)
455 { 452 {
456 char * buffer; 453 char * buffer;
@@ -3277,7 +3277,7 @@ static void client_info_callback(INFO_CONST SSL *s, int where, int ret) @@ -3277,7 +3277,7 @@ static void client_info_callback(INFO_CONST SSL *s, int where, int ret)
3277 if (ret == 0) 3277 if (ret == 0)
3278 { 3278 {
3279 trace_dsn("SSL_connect: failed in %s\n",SSL_state_string_long(s)); 3279 trace_dsn("SSL_connect: failed in %s\n",SSL_state_string_long(s));
3280 - WriteLog("SSL","connect failed in %s (Alert: %s)",SSL_state_string_long(s),SSL_alert_type_string_long(ret)); 3280 + lib3270_write_log("SSL","connect failed in %s (Alert: %s)",SSL_state_string_long(s),SSL_alert_type_string_long(ret));
3281 } 3281 }
3282 else if (ret < 0) 3282 else if (ret < 0)
3283 { 3283 {
@@ -3452,7 +3452,9 @@ LIB3270_EXPORT int lib3270_get_ssl_state(H3270 *h) @@ -3452,7 +3452,9 @@ LIB3270_EXPORT int lib3270_get_ssl_state(H3270 *h)
3452 #endif 3452 #endif
3453 } 3453 }
3454 3454
  3455 +/*
3455 int Get3270Socket(void) 3456 int Get3270Socket(void)
3456 { 3457 {
3457 return h3270.sock; 3458 return h3270.sock;
3458 } 3459 }
  3460 +*/
@@ -76,7 +76,7 @@ int get_version_info(void) @@ -76,7 +76,7 @@ int get_version_info(void)
76 info.dwOSVersionInfoSize = sizeof(info); 76 info.dwOSVersionInfoSize = sizeof(info);
77 if(GetVersionEx(&info) == 0) 77 if(GetVersionEx(&info) == 0)
78 { 78 {
79 - WriteLog("lib3270","%s","Can't get Windows version"); 79 + lib3270_write_log("lib3270","%s","Can't get Windows version");
80 return -1; 80 return -1;
81 } 81 }
82 82
@@ -19,8 +19,7 @@ @@ -19,8 +19,7 @@
19 #if defined(_WIN32) /*[*/ 19 #if defined(_WIN32) /*[*/
20 20
21 #if defined(_WS2TCPIP_H) /*[*/ 21 #if defined(_WS2TCPIP_H) /*[*/
22 -LIB3270_INTERNAL const char *inet_ntop(int af, const void *src, char *dst,  
23 - socklen_t cnt); 22 +LIB3270_INTERNAL const char *inet_ntop(int af, const void *src, char *dst,socklen_t cnt);
24 #endif /*]*/ 23 #endif /*]*/
25 24
26 LIB3270_INTERNAL const char *win32_strerror(int e); 25 LIB3270_INTERNAL const char *win32_strerror(int e);