Commit 3a46fe564fa0ab920d285323d83b6fd95276a2c2

Authored by perry.werneck@gmail.com
1 parent 4e8ab8d4

Implementando metodos no plugin rexx

@@ -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: 2013-06-05 12:32-0300\n" 8 +"POT-Creation-Date: 2013-06-12 09:54-0300\n"
9 "PO-Revision-Date: 2013-05-08 14:30-0300\n" 9 "PO-Revision-Date: 2013-05-08 14:30-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"
@@ -83,7 +83,7 @@ msgstr &quot;%s: Tabulação vertical não é suportada&quot; @@ -83,7 +83,7 @@ msgstr &quot;%s: Tabulação vertical não é suportada&quot;
83 msgid "%s: unknown family %d" 83 msgid "%s: unknown family %d"
84 msgstr "%s: Familia %d é inválida" 84 msgstr "%s: Familia %d é inválida"
85 85
86 -#: telnet.c:1100 86 +#: telnet.c:1160
87 #, c-format 87 #, c-format
88 msgid "%s:%d" 88 msgid "%s:%d"
89 msgstr "%s:%d" 89 msgstr "%s:%d"
@@ -291,7 +291,7 @@ msgstr &quot;Portal do Software Público Brasileiro&quot; @@ -291,7 +291,7 @@ msgstr &quot;Portal do Software Público Brasileiro&quot;
291 msgid "Break" 291 msgid "Break"
292 msgstr "Break" 292 msgstr "Break"
293 293
294 -#: telnet.c:2068 294 +#: telnet.c:2128
295 msgid "Broken pipe" 295 msgid "Broken pipe"
296 msgstr "Conexão interrompida" 296 msgstr "Conexão interrompida"
297 297
@@ -324,7 +324,7 @@ msgstr &quot;At_ual&quot; @@ -324,7 +324,7 @@ msgstr &quot;At_ual&quot;
324 msgid "Can't accept unnamed %s" 324 msgid "Can't accept unnamed %s"
325 msgstr "Não posso aceitar elemento %s sem nome" 325 msgstr "Não posso aceitar elemento %s sem nome"
326 326
327 -#: telnet.c:614 327 +#: telnet.c:674
328 #, c-format 328 #, c-format
329 msgid "Can't connect to %s:%d" 329 msgid "Can't connect to %s:%d"
330 msgstr "Não foi possível conectar a %s:%d" 330 msgstr "Não foi possível conectar a %s:%d"
@@ -333,7 +333,7 @@ msgstr &quot;Não foi possível conectar a %s:%d&quot; @@ -333,7 +333,7 @@ msgstr &quot;Não foi possível conectar a %s:%d&quot;
333 msgid "Can't connect to host" 333 msgid "Can't connect to host"
334 msgstr "Não foi possível conectar ao servidor" 334 msgstr "Não foi possível conectar ao servidor"
335 335
336 -#: v3270/selection.c:387 336 +#: v3270/selection.c:425
337 #, c-format 337 #, c-format
338 msgid "Can't convert line %d from %s to %s" 338 msgid "Can't convert line %d from %s to %s"
339 msgstr "Não foi possível converter a linha %d de %s para %s" 339 msgstr "Não foi possível converter a linha %d de %s para %s"
@@ -428,7 +428,7 @@ msgstr &quot;Não é possível usar a Winsock versão %d.%d&quot; @@ -428,7 +428,7 @@ msgstr &quot;Não é possível usar a Winsock versão %d.%d&quot;
428 msgid "Cancelled by user" 428 msgid "Cancelled by user"
429 msgstr "Cancelado pelo usuário" 429 msgstr "Cancelado pelo usuário"
430 430
431 -#: telnet.c:648 431 +#: telnet.c:708
432 msgid "Cannot create socket handle" 432 msgid "Cannot create socket handle"
433 msgstr "Não foi possível criar um manipulador de socket" 433 msgstr "Não foi possível criar um manipulador de socket"
434 434
@@ -466,7 +466,7 @@ msgstr &quot;Certificado revogado&quot; @@ -466,7 +466,7 @@ msgstr &quot;Certificado revogado&quot;
466 msgid "Certificate signature failure" 466 msgid "Certificate signature failure"
467 msgstr "Falha na assinatura do certificado" 467 msgstr "Falha na assinatura do certificado"
468 468
469 -#: v3270/selection.c:389 469 +#: v3270/selection.c:427
470 msgid "Charset error" 470 msgid "Charset error"
471 msgstr "Erro de codificação de caracteres" 471 msgstr "Erro de codificação de caracteres"
472 472
@@ -503,7 +503,7 @@ msgstr &quot;Completo&quot; @@ -503,7 +503,7 @@ msgstr &quot;Completo&quot;
503 msgid "Connect on startup" 503 msgid "Connect on startup"
504 msgstr "Conectar ao iniciar" 504 msgstr "Conectar ao iniciar"
505 505
506 -#: telnet.c:2072 506 +#: telnet.c:2132
507 msgid "Connection reset by peer" 507 msgid "Connection reset by peer"
508 msgstr "Conexão foi cancelada pelo servidor" 508 msgstr "Conexão foi cancelada pelo servidor"
509 509
@@ -576,7 +576,7 @@ msgstr &quot;Padrão&quot; @@ -576,7 +576,7 @@ msgstr &quot;Padrão&quot;
576 msgid "Delete field" 576 msgid "Delete field"
577 msgstr "Apagar campo" 577 msgstr "Apagar campo"
578 578
579 -#: telnet.c:1743 579 +#: telnet.c:1803
580 msgid "Device type rejected" 580 msgid "Device type rejected"
581 msgstr "Tipo de dispositivo rejeitado" 581 msgstr "Tipo de dispositivo rejeitado"
582 582
@@ -584,7 +584,7 @@ msgstr &quot;Tipo de dispositivo rejeitado&quot; @@ -584,7 +584,7 @@ msgstr &quot;Tipo de dispositivo rejeitado&quot;
584 msgid "Disconnected from host" 584 msgid "Disconnected from host"
585 msgstr "Desconectado do servidor" 585 msgstr "Desconectado do servidor"
586 586
587 -#: telnet.c:1318 587 +#: telnet.c:1378
588 msgid "EOR received when not in 3270 mode, ignored." 588 msgid "EOR received when not in 3270 mode, ignored."
589 msgstr "EOR recebido fora do modo 3270, ignorado." 589 msgstr "EOR recebido fora do modo 3270, ignorado."
590 590
@@ -632,7 +632,7 @@ msgstr &quot;Apagar até o final do campo&quot; @@ -632,7 +632,7 @@ msgstr &quot;Apagar até o final do campo&quot;
632 msgid "Erase to end of line" 632 msgid "Erase to end of line"
633 msgstr "Apagar até o final da linha" 633 msgstr "Apagar até o final da linha"
634 634
635 -#: print.c:238 v3270/widget.c:215 util.c:994 635 +#: print.c:238 v3270/widget.c:215 util.c:1009
636 msgid "Error" 636 msgid "Error"
637 msgstr "Erro" 637 msgstr "Erro"
638 638
@@ -651,12 +651,12 @@ msgstr &quot;Erro \&quot;%s\&quot; gravando arquivo local (rc=%d)&quot; @@ -651,12 +651,12 @@ msgstr &quot;Erro \&quot;%s\&quot; gravando arquivo local (rc=%d)&quot;
651 msgid "Error %d resolving %s" 651 msgid "Error %d resolving %s"
652 msgstr "Erro %d resolvendo %s" 652 msgstr "Erro %d resolvendo %s"
653 653
654 -#: telnet.c:3056 telnet.c:3067 654 +#: telnet.c:3116 telnet.c:3127
655 #, c-format 655 #, c-format
656 msgid "Error in fcntl(%s) when setting non blocking mode" 656 msgid "Error in fcntl(%s) when setting non blocking mode"
657 msgstr "Erro em fcntl(%s) ao ativar o modo não blocante" 657 msgstr "Erro em fcntl(%s) ao ativar o modo não blocante"
658 658
659 -#: telnet.c:3046 659 +#: telnet.c:3106
660 #, c-format 660 #, c-format
661 msgid "Error in ioctl(%s) when setting no blocking mode" 661 msgid "Error in ioctl(%s) when setting no blocking mode"
662 msgstr "Erro em ioctl(%s) ao ativar o modo não blocante" 662 msgstr "Erro em ioctl(%s) ao ativar o modo não blocante"
@@ -780,7 +780,7 @@ msgstr &quot;Ajuda&quot; @@ -780,7 +780,7 @@ msgstr &quot;Ajuda&quot;
780 msgid "Host disconnected, transfer cancelled" 780 msgid "Host disconnected, transfer cancelled"
781 msgstr "Servidor desconectou, transferência cancelada" 781 msgstr "Servidor desconectou, transferência cancelada"
782 782
783 -#: telnet.c:1801 783 +#: telnet.c:1861
784 msgid "Host illegally added function(s)" 784 msgid "Host illegally added function(s)"
785 msgstr "Host illegally added function(s)" 785 msgstr "Host illegally added function(s)"
786 786
@@ -792,11 +792,11 @@ msgstr &quot;Servidor é AS_400&quot; @@ -792,11 +792,11 @@ msgstr &quot;Servidor é AS_400&quot;
792 msgid "Host is TSO" 792 msgid "Host is TSO"
793 msgstr "Servidor é TSO" 793 msgstr "Servidor é TSO"
794 794
795 -#: telnet.c:1726 795 +#: telnet.c:1786
796 msgid "Host rejected device type or request type" 796 msgid "Host rejected device type or request type"
797 msgstr "Servidor rejeitou o tipo de dispositivo ou requisição" 797 msgstr "Servidor rejeitou o tipo de dispositivo ou requisição"
798 798
799 -#: telnet.c:1739 799 +#: telnet.c:1799
800 msgid "Host rejected resource(s)" 800 msgid "Host rejected resource(s)"
801 msgstr "Servidor rejeitou recurso(s)" 801 msgstr "Servidor rejeitou recurso(s)"
802 802
@@ -946,11 +946,11 @@ msgstr &quot;Mostarda&quot; @@ -946,11 +946,11 @@ msgstr &quot;Mostarda&quot;
946 msgid "N/A" 946 msgid "N/A"
947 msgstr "N/A" 947 msgstr "N/A"
948 948
949 -#: telnet.c:359 telnet.c:618 949 +#: telnet.c:359 telnet.c:678
950 msgid "Network error" 950 msgid "Network error"
951 msgstr "Erro de rede" 951 msgstr "Erro de rede"
952 952
953 -#: telnet.c:315 telnet.c:326 telnet.c:647 telnet.c:658 953 +#: telnet.c:315 telnet.c:326 telnet.c:707 telnet.c:718
954 msgid "Network startup error" 954 msgid "Network startup error"
955 msgstr "Erro ao iniciar a rede" 955 msgstr "Erro ao iniciar a rede"
956 956
@@ -1464,15 +1464,15 @@ msgstr &quot;SOCKS5 Proxy: xmit version 5 nmethods 1 (no auth)\n&quot; @@ -1464,15 +1464,15 @@ msgstr &quot;SOCKS5 Proxy: xmit version 5 nmethods 1 (no auth)\n&quot;
1464 msgid "SOCKS5 proxy: %s/%u: %s" 1464 msgid "SOCKS5 proxy: %s/%u: %s"
1465 msgstr "SOCKS5 proxy: %s/%u: %s" 1465 msgstr "SOCKS5 proxy: %s/%u: %s"
1466 1466
1467 -#: telnet.c:1083 1467 +#: telnet.c:1143
1468 msgid "SSL Error" 1468 msgid "SSL Error"
1469 msgstr "Erro SSL" 1469 msgstr "Erro SSL"
1470 1470
1471 -#: telnet.c:1083 1471 +#: telnet.c:1143
1472 msgid "SSL Read error" 1472 msgid "SSL Read error"
1473 msgstr "Erro de leitura SSL" 1473 msgstr "Erro de leitura SSL"
1474 1474
1475 -#: telnet.c:773 telnet.c:787 1475 +#: telnet.c:833 telnet.c:847
1476 msgid "SSL connect failed!" 1476 msgid "SSL connect failed!"
1477 msgstr "Conexão SSL falhou" 1477 msgstr "Conexão SSL falhou"
1478 1478
@@ -1480,15 +1480,15 @@ msgstr &quot;Conexão SSL falhou&quot; @@ -1480,15 +1480,15 @@ msgstr &quot;Conexão SSL falhou&quot;
1480 msgid "SSL error" 1480 msgid "SSL error"
1481 msgstr "Erro SSL" 1481 msgstr "Erro SSL"
1482 1482
1483 -#: telnet.c:746 1483 +#: telnet.c:806
1484 msgid "SSL init failed!" 1484 msgid "SSL init failed!"
1485 msgstr "Inicialização SSL falhou" 1485 msgstr "Inicialização SSL falhou"
1486 1486
1487 -#: telnet.c:755 1487 +#: telnet.c:815
1488 msgid "SSL_set_fd failed!" 1488 msgid "SSL_set_fd failed!"
1489 msgstr "SSL_set_fd falhou!" 1489 msgstr "SSL_set_fd falhou!"
1490 1490
1491 -#: telnet.c:2058 1491 +#: telnet.c:2118
1492 #, c-format 1492 #, c-format
1493 msgid "" 1493 msgid ""
1494 "SSL_write:\n" 1494 "SSL_write:\n"
@@ -1637,11 +1637,11 @@ msgstr &quot;Mostrar padrão de teste&quot; @@ -1637,11 +1637,11 @@ msgstr &quot;Mostrar padrão de teste&quot;
1637 msgid "Smart paste" 1637 msgid "Smart paste"
1638 msgstr "Colar inteligente" 1638 msgstr "Colar inteligente"
1639 1639
1640 -#: telnet.c:1104 1640 +#: telnet.c:1164
1641 msgid "Socket read error" 1641 msgid "Socket read error"
1642 msgstr "Erro ao ler dados da rede" 1642 msgstr "Erro ao ler dados da rede"
1643 1643
1644 -#: telnet.c:2079 1644 +#: telnet.c:2139
1645 msgid "Socket write error" 1645 msgid "Socket write error"
1646 msgstr "Erro ao enviar dados para a rede" 1646 msgstr "Erro ao enviar dados para a rede"
1647 1647
@@ -1669,7 +1669,7 @@ msgstr &quot;Tipo de servidor:&quot; @@ -1669,7 +1669,7 @@ msgstr &quot;Tipo de servidor:&quot;
1669 msgid "TELNET Proxy: send error" 1669 msgid "TELNET Proxy: send error"
1670 msgstr "TELNET Proxy: Erro ao enviar" 1670 msgstr "TELNET Proxy: Erro ao enviar"
1671 1671
1672 -#: telnet.c:3253 1672 +#: telnet.c:3313
1673 msgid "TLS negotiation failure" 1673 msgid "TLS negotiation failure"
1674 msgstr "Negociação TLS falhou" 1674 msgstr "Negociação TLS falhou"
1675 1675
@@ -2070,7 +2070,7 @@ msgstr &quot;Alvo inesperado \&quot;%s\&quot;&quot; @@ -2070,7 +2070,7 @@ msgstr &quot;Alvo inesperado \&quot;%s\&quot;&quot;
2070 msgid "Unexpected type %d in typeahead queue" 2070 msgid "Unexpected type %d in typeahead queue"
2071 msgstr "Tipo inesperado %d na fila de teclado" 2071 msgstr "Tipo inesperado %d na fila de teclado"
2072 2072
2073 -#: ctlr.c:527 2073 +#: ctlr.c:583
2074 #, c-format 2074 #, c-format
2075 msgid "Unknown 3270 Data Stream command: 0x%X" 2075 msgid "Unknown 3270 Data Stream command: 0x%X"
2076 msgstr "Unknown 3270 Data Stream command: 0x%X" 2076 msgstr "Unknown 3270 Data Stream command: 0x%X"
@@ -2102,7 +2102,7 @@ msgstr &quot;&quot; @@ -2102,7 +2102,7 @@ msgstr &quot;&quot;
2102 "Servidor desconhecido:\n" 2102 "Servidor desconhecido:\n"
2103 "%s" 2103 "%s"
2104 2104
2105 -#: telnet.c:489 2105 +#: telnet.c:549
2106 #, c-format 2106 #, c-format
2107 msgid "Unknown passthru host: %s" 2107 msgid "Unknown passthru host: %s"
2108 msgstr "Servidor \"passthru\" desconhecido: %s" 2108 msgstr "Servidor \"passthru\" desconhecido: %s"
@@ -2112,7 +2112,7 @@ msgstr &quot;Servidor \&quot;passthru\&quot; desconhecido: %s&quot; @@ -2112,7 +2112,7 @@ msgstr &quot;Servidor \&quot;passthru\&quot; desconhecido: %s&quot;
2112 msgid "Unknown popup type \"%s\"" 2112 msgid "Unknown popup type \"%s\""
2113 msgstr "Tipo de popup \"%s\" não é conhecido" 2113 msgstr "Tipo de popup \"%s\" não é conhecido"
2114 2114
2115 -#: telnet.c:518 resolver.c:147 2115 +#: telnet.c:578 resolver.c:147
2116 #, c-format 2116 #, c-format
2117 msgid "Unknown port number or service: %s" 2117 msgid "Unknown port number or service: %s"
2118 msgstr "Número de porta ou serviço desconhecido: %s" 2118 msgstr "Número de porta ou serviço desconhecido: %s"
@@ -2125,7 +2125,7 @@ msgstr &quot;Unsupported RPQ term&quot; @@ -2125,7 +2125,7 @@ msgstr &quot;Unsupported RPQ term&quot;
2125 msgid "Unsupported certificate purpose" 2125 msgid "Unsupported certificate purpose"
2126 msgstr "Finalidade do certificado não é suportada" 2126 msgstr "Finalidade do certificado não é suportada"
2127 2127
2128 -#: telnet.c:474 2128 +#: telnet.c:534
2129 msgid "Unsupported passthru host session" 2129 msgid "Unsupported passthru host session"
2130 msgstr "Unsupported passthru host session" 2130 msgstr "Unsupported passthru host session"
2131 2131
@@ -2150,7 +2150,7 @@ msgstr &quot;Versão %s - Revisão %s&quot; @@ -2150,7 +2150,7 @@ msgstr &quot;Versão %s - Revisão %s&quot;
2150 msgid "View Field Delimiters" 2150 msgid "View Field Delimiters"
2151 msgstr "Mostrar delimitadores de campo" 2151 msgstr "Mostrar delimitadores de campo"
2152 2152
2153 -#: telnet.c:659 2153 +#: telnet.c:719
2154 msgid "WSAEventSelect failed" 2154 msgid "WSAEventSelect failed"
2155 msgstr "WSAEventSelect falhou" 2155 msgstr "WSAEventSelect falhou"
2156 2156
@@ -2238,7 +2238,7 @@ msgstr &quot;_Acrescentar&quot; @@ -2238,7 +2238,7 @@ msgstr &quot;_Acrescentar&quot;
2238 msgid "_Browse" 2238 msgid "_Browse"
2239 msgstr "_Procurar" 2239 msgstr "_Procurar"
2240 2240
2241 -#: hostdialog.c:232 2241 +#: hostdialog.c:250
2242 msgid "_Color table:" 2242 msgid "_Color table:"
2243 msgstr "Tabela de cores:" 2243 msgstr "Tabela de cores:"
2244 2244
@@ -2343,12 +2343,12 @@ msgstr &quot;um atributo \&quot;action\&quot;&quot; @@ -2343,12 +2343,12 @@ msgstr &quot;um atributo \&quot;action\&quot;&quot;
2343 msgid "select() failed when dispatching events" 2343 msgid "select() failed when dispatching events"
2344 msgstr "select() failed when dispatching events" 2344 msgstr "select() failed when dispatching events"
2345 2345
2346 -#: telnet.c:569 telnet.c:575 telnet.c:582 2346 +#: telnet.c:629 telnet.c:635 telnet.c:642
2347 #, c-format 2347 #, c-format
2348 msgid "setsockopt(%s)" 2348 msgid "setsockopt(%s)"
2349 msgstr "setsockopt(%s)" 2349 msgstr "setsockopt(%s)"
2350 2350
2351 -#: telnet.c:562 2351 +#: telnet.c:622
2352 msgid "socket" 2352 msgid "socket"
2353 msgstr "socket" 2353 msgstr "socket"
2354 2354
@@ -2356,7 +2356,7 @@ msgstr &quot;socket&quot; @@ -2356,7 +2356,7 @@ msgstr &quot;socket&quot;
2356 msgid "translator-credits" 2356 msgid "translator-credits"
2357 msgstr "translator-credits" 2357 msgstr "translator-credits"
2358 2358
2359 -#: telnet.c:1079 2359 +#: telnet.c:1139
2360 msgid "unknown error" 2360 msgid "unknown error"
2361 msgstr "Erro desconhecido" 2361 msgstr "Erro desconhecido"
2362 2362
@@ -242,7 +242,6 @@ @@ -242,7 +242,6 @@
242 <Option compilerVar="CC" /> 242 <Option compilerVar="CC" />
243 </Unit> 243 </Unit>
244 <Unit filename="src/plugins/dbus3270/daemon.h" /> 244 <Unit filename="src/plugins/dbus3270/daemon.h" />
245 - <Unit filename="src/plugins/dbus3270/dbus-glue.h" />  
246 <Unit filename="src/plugins/dbus3270/globals.h" /> 245 <Unit filename="src/plugins/dbus3270/globals.h" />
247 <Unit filename="src/plugins/dbus3270/gobject.c"> 246 <Unit filename="src/plugins/dbus3270/gobject.c">
248 <Option compilerVar="CC" /> 247 <Option compilerVar="CC" />
src/include/lib3270.h
@@ -872,7 +872,7 @@ @@ -872,7 +872,7 @@
872 * Find the next unprotected field. 872 * Find the next unprotected field.
873 * 873 *
874 * @param hSession Session handle. 874 * @param hSession Session handle.
875 - * @param baddr0 Search start addr. 875 + * @param baddr0 Search start addr (-1 to use current cursor position).
876 * 876 *
877 * @return address following the unprotected attribute byte, or 0 if no nonzero-width unprotected field can be found. 877 * @return address following the unprotected attribute byte, or 0 if no nonzero-width unprotected field can be found.
878 * 878 *
src/include/pw3270/ipcpackets.h
@@ -51,7 +51,8 @@ @@ -51,7 +51,8 @@
51 HLLAPI_PACKET_GET_CSTATE, 51 HLLAPI_PACKET_GET_CSTATE,
52 HLLAPI_PACKET_IS_READY, HLLAPI_PACKET_SET_TOGGLE, 52 HLLAPI_PACKET_IS_READY, HLLAPI_PACKET_SET_TOGGLE,
53 HLLAPI_PACKET_FIELD_START, 53 HLLAPI_PACKET_FIELD_START,
54 - HLLAPI_PACKET_FIELD_LEN, 54 + HLLAPI_PACKET_FIELD_LEN,
  55 + HLLAPI_PACKET_NEXT_UNPROTECTED,
55 56
56 HLLAPI_PACKET_INVALID 57 HLLAPI_PACKET_INVALID
57 58
src/lib3270/ctlr.c
@@ -443,6 +443,11 @@ LIB3270_EXPORT int lib3270_get_next_unprotected(H3270 *hSession, int baddr0) @@ -443,6 +443,11 @@ LIB3270_EXPORT int lib3270_get_next_unprotected(H3270 *hSession, int baddr0)
443 { 443 {
444 register int baddr, nbaddr; 444 register int baddr, nbaddr;
445 445
  446 + CHECK_SESSION_HANDLE(hSession);
  447 +
  448 + if(baddr0 < 0)
  449 + baddr0 = hSession->cursor_addr;
  450 +
446 nbaddr = baddr0; 451 nbaddr = baddr0;
447 do 452 do
448 { 453 {
src/plugins/dbus3270/gobject.c
@@ -355,8 +355,14 @@ void pw3270_dbus_pa_key(PW3270Dbus *object, int key, DBusGMethodInvocation *cont @@ -355,8 +355,14 @@ void pw3270_dbus_pa_key(PW3270Dbus *object, int key, DBusGMethodInvocation *cont
355 dbus_g_method_return(context,lib3270_get_field_start(pw3270_dbus_get_session_handle(object),baddr)); 355 dbus_g_method_return(context,lib3270_get_field_start(pw3270_dbus_get_session_handle(object),baddr));
356 } 356 }
357 357
358 -void pw3270_dbus_get_field_length(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context) 358 + void pw3270_dbus_get_field_length(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context)
359 { 359 {
360 trace("%s object=%p context=%p",__FUNCTION__,object,context); 360 trace("%s object=%p context=%p",__FUNCTION__,object,context);
361 dbus_g_method_return(context,lib3270_get_field_len(pw3270_dbus_get_session_handle(object),baddr)); 361 dbus_g_method_return(context,lib3270_get_field_len(pw3270_dbus_get_session_handle(object),baddr));
362 } 362 }
  363 +
  364 + void pw3270_dbus_get_next_unprotected(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context)
  365 + {
  366 + trace("%s object=%p context=%p",__FUNCTION__,object,context);
  367 + dbus_g_method_return(context,lib3270_get_next_unprotected(pw3270_dbus_get_session_handle(object),baddr));
  368 + }
src/plugins/dbus3270/pw3270dbus.xml
@@ -93,6 +93,11 @@ @@ -93,6 +93,11 @@
93 <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> 93 <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
94 <arg type="i" name="addr" direction="out" /> 94 <arg type="i" name="addr" direction="out" />
95 </method> 95 </method>
  96 + <method name="getNextUnprotected">
  97 + <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
  98 + <arg type="i" name="addr" direction="in" />
  99 + <arg type="i" name="result" direction="out" />
  100 + </method>
96 <method name="setToggle"> 101 <method name="setToggle">
97 <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> 102 <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
98 <arg type="i" name="id" direction="in" /> 103 <arg type="i" name="id" direction="in" />
src/plugins/dbus3270/service.h
@@ -87,6 +87,7 @@ @@ -87,6 +87,7 @@
87 87
88 void pw3270_dbus_get_field_start(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); 88 void pw3270_dbus_get_field_start(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context);
89 void pw3270_dbus_get_field_length(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); 89 void pw3270_dbus_get_field_length(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context);
  90 + void pw3270_dbus_get_next_unprotected(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context);
90 91
91 // Actions 92 // Actions
92 void pw3270_dbus_enter(PW3270Dbus *object, DBusGMethodInvocation *context); 93 void pw3270_dbus_enter(PW3270Dbus *object, DBusGMethodInvocation *context);
src/plugins/hllapi/pluginmain.c
@@ -294,6 +294,11 @@ @@ -294,6 +294,11 @@
294 ((struct hllapi_packet_addr *) source->buffer)->addr)); 294 ((struct hllapi_packet_addr *) source->buffer)->addr));
295 break; 295 break;
296 296
  297 + case HLLAPI_PACKET_NEXT_UNPROTECTED:
  298 + send_result(source,lib3270_get_next_unprotected(lib3270_get_default_session_handle(),
  299 + ((struct hllapi_packet_addr *) source->buffer)->addr));
  300 + break;
  301 +
297 default: 302 default:
298 send_result(source, EINVAL); 303 send_result(source, EINVAL);
299 g_message("Invalid remote request (id=%d)",source->buffer[0]); 304 g_message("Invalid remote request (id=%d)",source->buffer[0]);
src/plugins/rx3270/local.cc
@@ -86,6 +86,7 @@ @@ -86,6 +86,7 @@
86 86
87 int get_field_start(int baddr = -1); 87 int get_field_start(int baddr = -1);
88 int get_field_len(int baddr = -1); 88 int get_field_len(int baddr = -1);
  89 + int get_next_unprotected(int baddr = -1);
89 90
90 private: 91 private:
91 92
@@ -112,6 +113,7 @@ @@ -112,6 +113,7 @@
112 int (*_set_cursor_addr)(H3270 *h, int addr); 113 int (*_set_cursor_addr)(H3270 *h, int addr);
113 int (*_get_cursor_addr)(H3270 *h); 114 int (*_get_cursor_addr)(H3270 *h);
114 int (*_emulate_input)(H3270 *session, const char *s, int len, int pasting); 115 int (*_emulate_input)(H3270 *session, const char *s, int len, int pasting);
  116 + int (*_get_next_unprotected)(H3270 *hSession, int baddr0);
115 117
116 #ifdef WIN32 118 #ifdef WIN32
117 HMODULE hModule; 119 HMODULE hModule;
@@ -244,6 +246,7 @@ dynamic::dynamic() @@ -244,6 +246,7 @@ dynamic::dynamic()
244 { (void **) & _set_cursor_addr, "lib3270_set_cursor_address" }, 246 { (void **) & _set_cursor_addr, "lib3270_set_cursor_address" },
245 { (void **) & _get_cursor_addr, "lib3270_get_cursor_address" }, 247 { (void **) & _get_cursor_addr, "lib3270_get_cursor_address" },
246 { (void **) & _emulate_input, "lib3270_emulate_input" }, 248 { (void **) & _emulate_input, "lib3270_emulate_input" },
  249 + { (void **) & _get_next_unprotected, "lib3270_get_next_unprotected" },
247 250
248 }; 251 };
249 252
@@ -562,3 +565,10 @@ int dynamic::emulate_input(const char *str) @@ -562,3 +565,10 @@ int dynamic::emulate_input(const char *str)
562 return _emulate_input(hSession,str,-1,1); 565 return _emulate_input(hSession,str,-1,1);
563 return -1; 566 return -1;
564 } 567 }
  568 +
  569 +int dynamic::get_next_unprotected(int baddr)
  570 +{
  571 + if(hModule)
  572 + return _get_next_unprotected(hSession,baddr);
  573 + return -1;
  574 +}
src/plugins/rx3270/pluginmain.cc
@@ -99,6 +99,7 @@ @@ -99,6 +99,7 @@
99 99
100 int get_field_start(int baddr = -1); 100 int get_field_start(int baddr = -1);
101 int get_field_len(int baddr = -1); 101 int get_field_len(int baddr = -1);
  102 + int get_next_unprotected(int baddr = -1);
102 103
103 int set_copy(const char *text); 104 int set_copy(const char *text);
104 char * get_copy(void); 105 char * get_copy(void);
@@ -300,6 +301,11 @@ @@ -300,6 +301,11 @@
300 return lib3270_emulate_input(hSession, str, -1, 1); 301 return lib3270_emulate_input(hSession, str, -1, 1);
301 } 302 }
302 303
  304 + int plugin::get_next_unprotected(int baddr)
  305 + {
  306 + return lib3270_get_next_unprotected(hSession,baddr);
  307 + }
  308 +
303 static int REXXENTRY Rexx_IO_exit(RexxExitContext *context, int exitnumber, int subfunction, PEXIT parmBlock) 309 static int REXXENTRY Rexx_IO_exit(RexxExitContext *context, int exitnumber, int subfunction, PEXIT parmBlock)
304 { 310 {
305 trace("%s call with ExitNumber: %d Subfunction: %d",__FUNCTION__,(int) exitnumber, (int) subfunction); 311 trace("%s call with ExitNumber: %d Subfunction: %d",__FUNCTION__,(int) exitnumber, (int) subfunction);
src/plugins/rx3270/remote.cc
@@ -81,6 +81,7 @@ @@ -81,6 +81,7 @@
81 81
82 int get_field_start(int baddr = -1); 82 int get_field_start(int baddr = -1);
83 int get_field_len(int baddr = -1); 83 int get_field_len(int baddr = -1);
  84 + int get_next_unprotected(int baddr = -1);
84 85
85 private: 86 private:
86 #if defined(WIN32) 87 #if defined(WIN32)
@@ -1125,3 +1126,32 @@ int remote::get_cursor_addr(void) @@ -1125,3 +1126,32 @@ int remote::get_cursor_addr(void)
1125 1126
1126 #endif 1127 #endif
1127 } 1128 }
  1129 +
  1130 +int remote::get_next_unprotected(int baddr)
  1131 +{
  1132 +#if defined(WIN32)
  1133 +
  1134 + if(hPipe != INVALID_HANDLE_VALUE)
  1135 + {
  1136 + struct hllapi_packet_addr query = { HLLAPI_PACKET_NEXT_UNPROTECTED, (unsigned short) baddr };
  1137 + struct hllapi_packet_result response;
  1138 + DWORD cbSize = sizeof(query);
  1139 + TransactNamedPipe(hPipe,(LPVOID) &query, cbSize, &response, sizeof(response), &cbSize,NULL);
  1140 + return response.rc;
  1141 + }
  1142 +
  1143 +#elif defined(HAVE_DBUS)
  1144 +
  1145 + dbus_int32_t k = (dbus_int32_t) baddr;
  1146 +
  1147 + DBusMessage * msg = create_message("getNextUnprotected");
  1148 + if(msg)
  1149 + {
  1150 + dbus_message_append_args(msg, DBUS_TYPE_INT32, &k, DBUS_TYPE_INVALID);
  1151 + return get_intval(call(msg));
  1152 + }
  1153 +
  1154 +#endif
  1155 +
  1156 + return -1;
  1157 +}
src/plugins/rx3270/rexx_methods.cc
@@ -411,6 +411,19 @@ RexxMethod2(int, rx3270_method_get_field_start, CSELF, sessionPtr, OPTIONAL_int, @@ -411,6 +411,19 @@ RexxMethod2(int, rx3270_method_get_field_start, CSELF, sessionPtr, OPTIONAL_int,
411 return hSession->get_field_start(baddr)+1; 411 return hSession->get_field_start(baddr)+1;
412 } 412 }
413 413
  414 +RexxMethod2(int, rx3270_method_get_next_unprotected, CSELF, sessionPtr, OPTIONAL_int, baddr)
  415 +{
  416 + rx3270 *hSession = (rx3270 *) sessionPtr;
  417 + if(!hSession)
  418 + return -1;
  419 +
  420 + baddr = hSession->get_next_unprotected(baddr);
  421 + if(baddr < 1)
  422 + return -1;
  423 +
  424 + return baddr;
  425 +}
  426 +
414 RexxMethod1(RexxStringObject, rx3270_method_get_selection, CSELF, sessionPtr) 427 RexxMethod1(RexxStringObject, rx3270_method_get_selection, CSELF, sessionPtr)
415 { 428 {
416 rx3270 * hSession = (rx3270 *) sessionPtr; 429 rx3270 * hSession = (rx3270 *) sessionPtr;
src/plugins/rx3270/rx3270.cls
@@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
74 74
75 ::METHOD GETFIELDSTART EXTERNAL "LIBRARY rx3270 rx3270_method_get_field_start" 75 ::METHOD GETFIELDSTART EXTERNAL "LIBRARY rx3270 rx3270_method_get_field_start"
76 ::METHOD GETFIELDLEN EXTERNAL "LIBRARY rx3270 rx3270_method_get_field_len" 76 ::METHOD GETFIELDLEN EXTERNAL "LIBRARY rx3270 rx3270_method_get_field_len"
  77 +::METHOD GETNEXTUNPROTECTED EXTERNAL "LIBRARY rx3270 rx3270_method_get_next_unprotected"
77 78
78 ::METHOD GETSELECTION EXTERNAL "LIBRARY rx3270 rx3270_method_get_selection" 79 ::METHOD GETSELECTION EXTERNAL "LIBRARY rx3270 rx3270_method_get_selection"
79 ::METHOD SETSELECTION EXTERNAL "LIBRARY rx3270 rx3270_method_set_selection" 80 ::METHOD SETSELECTION EXTERNAL "LIBRARY rx3270 rx3270_method_set_selection"
src/plugins/rx3270/rx3270.h
@@ -109,6 +109,7 @@ @@ -109,6 +109,7 @@
109 REXX_METHOD_PROTOTYPE(rx3270_method_wait_for_text_at); 109 REXX_METHOD_PROTOTYPE(rx3270_method_wait_for_text_at);
110 REXX_METHOD_PROTOTYPE(rx3270_method_get_field_len); 110 REXX_METHOD_PROTOTYPE(rx3270_method_get_field_len);
111 REXX_METHOD_PROTOTYPE(rx3270_method_get_field_start); 111 REXX_METHOD_PROTOTYPE(rx3270_method_get_field_start);
  112 + REXX_METHOD_PROTOTYPE(rx3270_method_get_next_unprotected);
112 REXX_METHOD_PROTOTYPE(rx3270_method_get_selection); 113 REXX_METHOD_PROTOTYPE(rx3270_method_get_selection);
113 REXX_METHOD_PROTOTYPE(rx3270_method_set_selection); 114 REXX_METHOD_PROTOTYPE(rx3270_method_set_selection);
114 REXX_METHOD_PROTOTYPE(rx3270_method_get_clipboard); 115 REXX_METHOD_PROTOTYPE(rx3270_method_get_clipboard);
@@ -188,6 +189,7 @@ @@ -188,6 +189,7 @@
188 189
189 virtual int get_field_start(int baddr = -1) = 0; 190 virtual int get_field_start(int baddr = -1) = 0;
190 virtual int get_field_len(int baddr = -1) = 0; 191 virtual int get_field_len(int baddr = -1) = 0;
  192 + virtual int get_next_unprotected(int baddr = -1) = 0;
191 193
192 virtual int set_copy(const char *text); 194 virtual int set_copy(const char *text);
193 virtual char * get_copy(void); 195 virtual char * get_copy(void);
src/plugins/rx3270/rxapimain.cc
@@ -147,6 +147,7 @@ RexxMethodEntry rx3270_methods[] = @@ -147,6 +147,7 @@ RexxMethodEntry rx3270_methods[] =
147 147
148 REXX_METHOD(rx3270_method_get_field_len, rx3270_method_get_field_len ), 148 REXX_METHOD(rx3270_method_get_field_len, rx3270_method_get_field_len ),
149 REXX_METHOD(rx3270_method_get_field_start, rx3270_method_get_field_start ), 149 REXX_METHOD(rx3270_method_get_field_start, rx3270_method_get_field_start ),
  150 + REXX_METHOD(rx3270_method_get_next_unprotected, rx3270_method_get_next_unprotected ),
150 REXX_METHOD(rx3270_method_get_selection, rx3270_method_get_selection ), 151 REXX_METHOD(rx3270_method_get_selection, rx3270_method_get_selection ),
151 REXX_METHOD(rx3270_method_set_selection, rx3270_method_set_selection ), 152 REXX_METHOD(rx3270_method_set_selection, rx3270_method_set_selection ),
152 REXX_METHOD(rx3270_method_get_clipboard, rx3270_method_get_clipboard ), 153 REXX_METHOD(rx3270_method_get_clipboard, rx3270_method_get_clipboard ),
src/plugins/rx3270/sample/clipboard.rex
@@ -26,10 +26,16 @@ @@ -26,10 +26,16 @@
26 return 0 26 return 0
27 end 27 end
28 28
  29 + cursor = host~GetCursorAddr()
  30 + next = cursor
  31 +
29 while text <> "" 32 while text <> ""
30 do 33 do
  34 + addr = host~GetFieldStart(next)
  35 + next = host~GetNextUnprotected(addr)
  36 +
  37 + host~SetCursorAddr(addr)
31 38
32 - host~SetCursorAddr(host~GetFieldStart())  
33 field_len = host~GetFieldLen() 39 field_len = host~GetFieldLen()
34 40
35 if length(text) < field_len then 41 if length(text) < field_len then
@@ -64,6 +70,12 @@ @@ -64,6 +70,12 @@
64 70
65 say text 71 say text
66 72
  73 + if next <= cursor then
  74 + do
  75 + /* Next field is before the original position */
  76 + leave
  77 + end
  78 +
67 text = "" 79 text = ""
68 end 80 end
69 81