Commit 128ffd00db9a32d1f188190b44e99afdf2d21fa6

Authored by Perry Werneck
1 parent 55e27d24
Exists in master and in 1 other branch develop

Updating HLLAPI.

hllapi.cbp
... ... @@ -2,7 +2,7 @@
2 2 <CodeBlocks_project_file>
3 3 <FileVersion major="1" minor="6" />
4 4 <Project>
5   - <Option title="pw3270 HLLAPI v5.1 compatibility plugin" />
  5 + <Option title="HLLAPI Language binding for pw3270/lib3270" />
6 6 <Option makefile_is_custom="1" />
7 7 <Option pch_mode="2" />
8 8 <Option compiler="gcc" />
... ...
src/core/calls.cc
... ... @@ -180,6 +180,27 @@
180 180  
181 181 }
182 182  
  183 + HLLAPI_API_CALL hllapi_wait_for_change(WORD seconds) {
  184 +
  185 + try {
  186 +
  187 + TN3270::Host &host = getSession();
  188 +
  189 + if(host.isConnected())
  190 + host.waitForChange((unsigned int) seconds);
  191 +
  192 + return hllapi_get_state();
  193 +
  194 + } catch(std::exception &e) {
  195 +
  196 + hllapi_lasterror = e.what();
  197 +
  198 + }
  199 +
  200 + return HLLAPI_STATUS_SYSTEM_ERROR;
  201 +
  202 + }
  203 +
183 204 HLLAPI_API_CALL hllapi_pfkey(WORD key) {
184 205  
185 206 try {
... ...
src/core/hllapi.cc
... ... @@ -428,7 +428,6 @@ static int reset_system(char *buffer, unsigned short *length, unsigned short *rc
428 428  
429 429 static int pause_system(char *buffer, unsigned short *length, unsigned short *rc) {
430 430  
431   - /*
432 431 if(!*length)
433 432 {
434 433 // If you use the IPAUSE option and the pause value is zero, then the function
... ... @@ -450,11 +449,8 @@ static int pause_system(char *buffer, unsigned short *length, unsigned short *rc
450 449 }
451 450  
452 451 // Pause "flexivel", aguarda mudança no conteúdo da tela!!!
  452 + return hllapi_wait_for_change((*length) / 2);
453 453  
454   - // #warning Mudar comportamento na lib!
455   -
456   - return hllapi_wait_for_ready((*length) / 2);
457   - */
458 454 }
459 455  
460 456 static int set_session_parameters(char *buffer, unsigned short *length, unsigned short *rc)
... ...
src/include/config.h.in
... ... @@ -27,6 +27,18 @@
27 27 *
28 28 */
29 29  
  30 +/**
  31 + * @file config.h
  32 + *
  33 + * @brief Configuração para o aplicativo.
  34 + *
  35 + * Gerado automaticamente pelo processo ./configure esse arquivo descreve
  36 + * as configurações de ambiente detectadas automaticamente.
  37 + *
  38 + * @author perry.werneck@gmail.com
  39 + *
  40 + */
  41 +
30 42 #ifndef CONFIG_H_INCLUDED
31 43  
32 44 #define CONFIG_H_INCLUDED 1
... ...