Commit 4953c4147c79f0dfc074af6e544e1c0cb46657f9
1 parent
e75c1838
Exists in
master
and in
3 other branches
Fixing warnings (Windows).
Showing
6 changed files
with
69 additions
and
39 deletions
Show diff stats
locale/pt_BR.po
@@ -5,7 +5,7 @@ msgid "" | @@ -5,7 +5,7 @@ msgid "" | ||
5 | msgstr "" | 5 | msgstr "" |
6 | "Project-Id-Version: pw3270 5.0\n" | 6 | "Project-Id-Version: pw3270 5.0\n" |
7 | "Report-Msgid-Bugs-To: \n" | 7 | "Report-Msgid-Bugs-To: \n" |
8 | -"POT-Creation-Date: 2020-07-29 10:26-0300\n" | 8 | +"POT-Creation-Date: 2020-07-31 13:59-0300\n" |
9 | "PO-Revision-Date: 2020-07-27 18:12-0300\n" | 9 | "PO-Revision-Date: 2020-07-27 18:12-0300\n" |
10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
11 | "Language-Team: Português <>\n" | 11 | "Language-Team: Português <>\n" |
@@ -30,7 +30,7 @@ msgstr "%dx%d é negativa ou zero" | @@ -30,7 +30,7 @@ msgstr "%dx%d é negativa ou zero" | ||
30 | msgid "%dx%d screen size is bigger than the maximum size" | 30 | msgid "%dx%d screen size is bigger than the maximum size" |
31 | msgstr "Tela %dx%d é maior que o tamanho máximo" | 31 | msgstr "Tela %dx%d é maior que o tamanho máximo" |
32 | 32 | ||
33 | -#: src/core/iocalls.c:554 src/core/iocalls.c:571 | 33 | +#: src/core/iocalls.c:508 src/core/iocalls.c:525 |
34 | #, c-format | 34 | #, c-format |
35 | msgid "%s" | 35 | msgid "%s" |
36 | msgstr "%s" | 36 | msgstr "%s" |
@@ -359,11 +359,11 @@ msgstr "Não posso enviar requisição HTTP" | @@ -359,11 +359,11 @@ msgstr "Não posso enviar requisição HTTP" | ||
359 | msgid "Can't set LDAP protocol version" | 359 | msgid "Can't set LDAP protocol version" |
360 | msgstr "Não é possível setar a versão do protocolo LDAP" | 360 | msgstr "Não é possível setar a versão do protocolo LDAP" |
361 | 361 | ||
362 | -#: src/core/iocalls.c:570 | 362 | +#: src/core/iocalls.c:524 |
363 | msgid "Can't set socket to blocking mode." | 363 | msgid "Can't set socket to blocking mode." |
364 | msgstr "Não foi possível mudar o socket para o modo blocante." | 364 | msgstr "Não foi possível mudar o socket para o modo blocante." |
365 | 365 | ||
366 | -#: src/core/iocalls.c:570 | 366 | +#: src/core/iocalls.c:524 |
367 | msgid "Can't set socket to non blocking mode" | 367 | msgid "Can't set socket to non blocking mode" |
368 | msgstr "Não foi possível setar o socket para o modo não blocante." | 368 | msgstr "Não foi possível setar o socket para o modo não blocante." |
369 | 369 | ||
@@ -480,7 +480,7 @@ msgstr "Comando incompleto, transferência cancelada" | @@ -480,7 +480,7 @@ msgstr "Comando incompleto, transferência cancelada" | ||
480 | msgid "Connect on startup" | 480 | msgid "Connect on startup" |
481 | msgstr "Conectar ao iniciar" | 481 | msgstr "Conectar ao iniciar" |
482 | 482 | ||
483 | -#: src/core/iocalls.c:538 src/core/windows/connect.c:317 | 483 | +#: src/core/iocalls.c:492 src/core/windows/connect.c:317 |
484 | #: src/core/windows/connect.c:333 | 484 | #: src/core/windows/connect.c:333 |
485 | msgid "Connection error" | 485 | msgid "Connection error" |
486 | msgstr "Erro de conexão" | 486 | msgstr "Erro de conexão" |
@@ -739,7 +739,7 @@ msgstr "Erro de formato no campo \"notAfter\" do certificado" | @@ -739,7 +739,7 @@ msgstr "Erro de formato no campo \"notAfter\" do certificado" | ||
739 | msgid "Format error in certificate's notBefore field" | 739 | msgid "Format error in certificate's notBefore field" |
740 | msgstr "Erro de formato no campo \"notBefore\" do certificado" | 740 | msgstr "Erro de formato no campo \"notBefore\" do certificado" |
741 | 741 | ||
742 | -#: src/core/properties/boolean.c:175 | 742 | +#: src/core/properties/boolean.c:178 |
743 | msgid "Formatted screen" | 743 | msgid "Formatted screen" |
744 | msgstr "Tela formatada" | 744 | msgstr "Tela formatada" |
745 | 745 | ||
@@ -751,7 +751,7 @@ msgstr "Tela cheia" | @@ -751,7 +751,7 @@ msgstr "Tela cheia" | ||
751 | msgid "Got an invalid certificate revocation list from server" | 751 | msgid "Got an invalid certificate revocation list from server" |
752 | msgstr "Servidor enviou uma lista de certificados revogados inválida" | 752 | msgstr "Servidor enviou uma lista de certificados revogados inválida" |
753 | 753 | ||
754 | -#: src/core/properties/boolean.c:154 | 754 | +#: src/core/properties/boolean.c:157 |
755 | msgid "Has selected area" | 755 | msgid "Has selected area" |
756 | msgstr "Tem área selecionada" | 756 | msgstr "Tem área selecionada" |
757 | 757 | ||
@@ -929,23 +929,23 @@ msgstr "Opção xxxxxxxx inválida: Transferência cancelada" | @@ -929,23 +929,23 @@ msgstr "Opção xxxxxxxx inválida: Transferência cancelada" | ||
929 | msgid "Invalid oversize" | 929 | msgid "Invalid oversize" |
930 | msgstr "Valor inválido para 'oversize'" | 930 | msgstr "Valor inválido para 'oversize'" |
931 | 931 | ||
932 | -#: src/core/properties/boolean.c:75 | 932 | +#: src/core/properties/boolean.c:78 |
933 | msgid "Is connection secure" | 933 | msgid "Is connection secure" |
934 | msgstr "A conexão é segura ?" | 934 | msgstr "A conexão é segura ?" |
935 | 935 | ||
936 | -#: src/core/properties/boolean.c:168 | 936 | +#: src/core/properties/boolean.c:171 |
937 | msgid "Is starting (no first screen)?" | 937 | msgid "Is starting (no first screen)?" |
938 | msgstr "Está iniciando (não recebeu a primeira tela)?" | 938 | msgstr "Está iniciando (não recebeu a primeira tela)?" |
939 | 939 | ||
940 | -#: src/core/properties/boolean.c:68 | 940 | +#: src/core/properties/boolean.c:71 |
941 | msgid "Is terminal connected" | 941 | msgid "Is terminal connected" |
942 | msgstr "O terminal está conectado" | 942 | msgstr "O terminal está conectado" |
943 | 943 | ||
944 | -#: src/core/properties/boolean.c:147 | 944 | +#: src/core/properties/boolean.c:150 |
945 | msgid "Is terminal in the INITIAL_E state?" | 945 | msgid "Is terminal in the INITIAL_E state?" |
946 | msgstr "O terminal está no estad INITIAL_E?" | 946 | msgstr "O terminal está no estad INITIAL_E?" |
947 | 947 | ||
948 | -#: src/core/properties/boolean.c:61 | 948 | +#: src/core/properties/boolean.c:64 |
949 | msgid "Is terminal ready" | 949 | msgid "Is terminal ready" |
950 | msgstr "O terminal está pronto" | 950 | msgstr "O terminal está pronto" |
951 | 951 | ||
@@ -973,7 +973,7 @@ msgstr "Última mensagem de programa" | @@ -973,7 +973,7 @@ msgstr "Última mensagem de programa" | ||
973 | msgid "Left" | 973 | msgid "Left" |
974 | msgstr "Esquerda" | 974 | msgstr "Esquerda" |
975 | 975 | ||
976 | -#: src/core/properties/boolean.c:182 | 976 | +#: src/core/properties/boolean.c:185 |
977 | msgid "Lock keyboard on operator error" | 977 | msgid "Lock keyboard on operator error" |
978 | msgstr "Bloqueia teclado em caso de erro do operador" | 978 | msgstr "Bloqueia teclado em caso de erro do operador" |
979 | 979 | ||
@@ -1095,11 +1095,11 @@ msgstr "" | @@ -1095,11 +1095,11 @@ msgstr "" | ||
1095 | msgid "No transfer in progress" | 1095 | msgid "No transfer in progress" |
1096 | msgstr "Nenhuma transferência em andamento" | 1096 | msgstr "Nenhuma transferência em andamento" |
1097 | 1097 | ||
1098 | -#: src/core/properties/boolean.c:91 | 1098 | +#: src/core/properties/boolean.c:94 |
1099 | msgid "Non zero if the host is AS400." | 1099 | msgid "Non zero if the host is AS400." |
1100 | msgstr "Diferente de zero se o host é AS400" | 1100 | msgstr "Diferente de zero se o host é AS400" |
1101 | 1101 | ||
1102 | -#: src/core/properties/boolean.c:83 | 1102 | +#: src/core/properties/boolean.c:86 |
1103 | msgid "Non zero if the host is TSO." | 1103 | msgid "Non zero if the host is TSO." |
1104 | msgstr "Diferente de zero se o host é TSO" | 1104 | msgstr "Diferente de zero se o host é TSO" |
1105 | 1105 | ||
@@ -1455,7 +1455,7 @@ msgstr "Show timer when processing" | @@ -1455,7 +1455,7 @@ msgstr "Show timer when processing" | ||
1455 | msgid "Smart paste" | 1455 | msgid "Smart paste" |
1456 | msgstr "Colar inteligente" | 1456 | msgstr "Colar inteligente" |
1457 | 1457 | ||
1458 | -#: src/core/iocalls.c:552 src/core/iocalls.c:569 | 1458 | +#: src/core/iocalls.c:506 src/core/iocalls.c:523 |
1459 | msgid "Socket error" | 1459 | msgid "Socket error" |
1460 | msgstr "Erro no socket" | 1460 | msgstr "Erro no socket" |
1461 | 1461 | ||
@@ -1471,11 +1471,11 @@ msgstr "Erro ao enviar dados para a rede" | @@ -1471,11 +1471,11 @@ msgstr "Erro ao enviar dados para a rede" | ||
1471 | msgid "Sound" | 1471 | msgid "Sound" |
1472 | msgstr "Som" | 1472 | msgstr "Som" |
1473 | 1473 | ||
1474 | -#: src/core/properties/boolean.c:126 | 1474 | +#: src/core/properties/boolean.c:129 |
1475 | msgid "State is 3270, TN3270e or SSCP" | 1475 | msgid "State is 3270, TN3270e or SSCP" |
1476 | msgstr "Estado do terminal é 3270, TN3270e or SSCP" | 1476 | msgstr "Estado do terminal é 3270, TN3270e or SSCP" |
1477 | 1477 | ||
1478 | -#: src/core/properties/boolean.c:161 | 1478 | +#: src/core/properties/boolean.c:164 |
1479 | msgid "Still have text to paste" | 1479 | msgid "Still have text to paste" |
1480 | msgstr "Ainda existe texto para colar" | 1480 | msgstr "Ainda existe texto para colar" |
1481 | 1481 | ||
@@ -2178,11 +2178,11 @@ msgstr "desabilitar" | @@ -2178,11 +2178,11 @@ msgstr "desabilitar" | ||
2178 | msgid "enable" | 2178 | msgid "enable" |
2179 | msgstr "habilitar" | 2179 | msgstr "habilitar" |
2180 | 2180 | ||
2181 | -#: src/core/iocalls.c:553 | 2181 | +#: src/core/iocalls.c:507 |
2182 | msgid "fcntl() error when getting socket state." | 2182 | msgid "fcntl() error when getting socket state." |
2183 | msgstr "erro fcntl() ao obter estado do socket." | 2183 | msgstr "erro fcntl() ao obter estado do socket." |
2184 | 2184 | ||
2185 | -#: src/core/iocalls.c:539 | 2185 | +#: src/core/iocalls.c:493 |
2186 | msgid "ioctlsocket(FIONBIO) failed." | 2186 | msgid "ioctlsocket(FIONBIO) failed." |
2187 | msgstr "ioctlsocket(FIONBIO) failed." | 2187 | msgstr "ioctlsocket(FIONBIO) failed." |
2188 | 2188 | ||
@@ -2194,7 +2194,7 @@ msgstr "Revisão da lib3270" | @@ -2194,7 +2194,7 @@ msgstr "Revisão da lib3270" | ||
2194 | msgid "lib3270 version" | 2194 | msgid "lib3270 version" |
2195 | msgstr "Versão da lib3270" | 2195 | msgstr "Versão da lib3270" |
2196 | 2196 | ||
2197 | -#: src/core/properties/boolean.c:189 | 2197 | +#: src/core/properties/boolean.c:192 |
2198 | msgid "numeric lock" | 2198 | msgid "numeric lock" |
2199 | msgstr "numeric lock" | 2199 | msgstr "numeric lock" |
2200 | 2200 |
src/core/host.c
@@ -237,11 +237,11 @@ void lib3270_st_changed(H3270 *hSession, LIB3270_STATE tx, int mode) | @@ -237,11 +237,11 @@ void lib3270_st_changed(H3270 *hSession, LIB3270_STATE tx, int mode) | ||
237 | { | 237 | { |
238 | struct lib3270_linked_list_node * node; | 238 | struct lib3270_linked_list_node * node; |
239 | 239 | ||
240 | - debug("%s(%s,%d)",__FUNCTION__,lib3270_connection_state_get_name(tx),mode); | 240 | + debug("%s(%s,%d)",__FUNCTION__,lib3270_state_get_name(tx),mode); |
241 | trace_dsn( | 241 | trace_dsn( |
242 | hSession, | 242 | hSession, |
243 | "Notifying state %s with mode %d.\n", | 243 | "Notifying state %s with mode %d.\n", |
244 | - lib3270_connection_state_get_name(tx), | 244 | + lib3270_state_get_name(tx), |
245 | mode | 245 | mode |
246 | ); | 246 | ); |
247 | 247 |
src/core/properties/boolean.c
@@ -45,15 +45,19 @@ | @@ -45,15 +45,19 @@ | ||
45 | return hSession->starting != 0; | 45 | return hSession->starting != 0; |
46 | } | 46 | } |
47 | 47 | ||
48 | - int lib3270_disable_crl_download(H3270 *hSession, int enabled) | ||
49 | - { | ||
50 | #ifdef SSL_ENABLE_CRL_CHECK | 48 | #ifdef SSL_ENABLE_CRL_CHECK |
49 | + LIB3270_EXPORT int lib3270_ssl_set_crl_download(H3270 *hSession, int enabled) | ||
50 | + { | ||
51 | + FAIL_IF_ONLINE(hSession); | ||
51 | hSession->ssl.crl.download = enabled ? 1 : 0; | 52 | hSession->ssl.crl.download = enabled ? 1 : 0; |
52 | return 0; | 53 | return 0; |
54 | + } | ||
53 | #else | 55 | #else |
56 | + LIB3270_EXPORT int lib3270_ssl_set_crl_download(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(enabled)) | ||
57 | + { | ||
54 | return errno = ENOTSUP; | 58 | return errno = ENOTSUP; |
55 | -#endif // SSL_ENABLE_CRL_CHECK | ||
56 | } | 59 | } |
60 | +#endif // SSL_ENABLE_CRL_CHECK | ||
57 | 61 | ||
58 | const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) | 62 | const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) |
59 | { | 63 | { |
src/core/telnet.c
@@ -2016,24 +2016,48 @@ const char * lib3270_connection_state_get_name(const LIB3270_CSTATE cstate) | @@ -2016,24 +2016,48 @@ const char * lib3270_connection_state_get_name(const LIB3270_CSTATE cstate) | ||
2016 | { | 2016 | { |
2017 | static const char *state_names[] = | 2017 | static const char *state_names[] = |
2018 | { | 2018 | { |
2019 | - "unconnected", | ||
2020 | - "resolving", | ||
2021 | - "pending", | ||
2022 | - "connected initial", | ||
2023 | - "TN3270 NVT", | ||
2024 | - "TN3270 3270", | ||
2025 | - "TN3270E", | ||
2026 | - "TN3270E NVT", | ||
2027 | - "TN3270E SSCP-LU", | ||
2028 | - "TN3270E 3270" | 2019 | + N_("Unconnected"), |
2020 | + N_("Resolving"), | ||
2021 | + N_("Pending"), | ||
2022 | + N_("Connected initial"), | ||
2023 | + N_("TN3270 NVT"), | ||
2024 | + N_("TN3270 3270"), | ||
2025 | + N_("TN3270E"), | ||
2026 | + N_("TN3270E NVT"), | ||
2027 | + N_("TN3270E SSCP-LU"), | ||
2028 | + N_("TN3270E 3270") | ||
2029 | }; | 2029 | }; |
2030 | 2030 | ||
2031 | if(cstate > (sizeof(state_names)/sizeof(state_names[0]))) | 2031 | if(cstate > (sizeof(state_names)/sizeof(state_names[0]))) |
2032 | - return "unknown"; | 2032 | + return _("Unknown"); |
2033 | 2033 | ||
2034 | - return state_names[cstate]; | 2034 | + return dgettext(GETTEXT_PACKAGE,state_names[cstate]); |
2035 | } | 2035 | } |
2036 | 2036 | ||
2037 | +LIB3270_EXPORT const char * lib3270_state_get_name(const LIB3270_STATE state) | ||
2038 | +{ | ||
2039 | + static const char *state_names[] = | ||
2040 | + { | ||
2041 | + N_("Resolving"), | ||
2042 | + N_("Connecting"), | ||
2043 | + N_("Half connect"), | ||
2044 | + N_("Connect"), | ||
2045 | + N_("3270 Mode"), | ||
2046 | + N_("Line mode"), | ||
2047 | + N_("Remodel"), | ||
2048 | + N_("Printer"), | ||
2049 | + N_("Exiting"), | ||
2050 | + N_("Charset"), | ||
2051 | + }; | ||
2052 | + | ||
2053 | + if(state > (sizeof(state_names)/sizeof(state_names[0]))) | ||
2054 | + return _("Unknown"); | ||
2055 | + | ||
2056 | + return dgettext(GETTEXT_PACKAGE,state_names[state]); | ||
2057 | + | ||
2058 | +} | ||
2059 | + | ||
2060 | + | ||
2037 | /** | 2061 | /** |
2038 | * Check for switches between NVT, SSCP-LU and 3270 modes. | 2062 | * Check for switches between NVT, SSCP-LU and 3270 modes. |
2039 | * | 2063 | * |
src/include/lib3270.h
@@ -686,6 +686,8 @@ | @@ -686,6 +686,8 @@ | ||
686 | 686 | ||
687 | LIB3270_EXPORT const char * lib3270_connection_state_get_name(const LIB3270_CSTATE cstate); | 687 | LIB3270_EXPORT const char * lib3270_connection_state_get_name(const LIB3270_CSTATE cstate); |
688 | 688 | ||
689 | + LIB3270_EXPORT const char * lib3270_state_get_name(const LIB3270_STATE state); | ||
690 | + | ||
689 | /** | 691 | /** |
690 | * @brief Pretend that a sequence of keys was entered at the keyboard. | 692 | * @brief Pretend that a sequence of keys was entered at the keyboard. |
691 | * | 693 | * |
src/include/lib3270/properties.h
@@ -220,7 +220,7 @@ | @@ -220,7 +220,7 @@ | ||
220 | * | 220 | * |
221 | * @return 0 if ok or error code if not (Sets errno). | 221 | * @return 0 if ok or error code if not (Sets errno). |
222 | * | 222 | * |
223 | - * @retval 0 Download of the CRL was disabled. | 223 | + * @retval 0 Success, the property was set. |
224 | * @retval ENOTSUP No SSL/TLS support. | 224 | * @retval ENOTSUP No SSL/TLS support. |
225 | */ | 225 | */ |
226 | LIB3270_EXPORT int lib3270_ssl_set_crl_download(H3270 *hSession, int enabled); | 226 | LIB3270_EXPORT int lib3270_ssl_set_crl_download(H3270 *hSession, int enabled); |