Commit d033acda77de7e4b5b6eeb5b03265425ec431bd4
1 parent
3dd7d398
Exists in
master
and in
5 other branches
Incluindo tratamento de quebras de linha nas capturas de tela.
Showing
5 changed files
with
12 additions
and
9 deletions
Show diff stats
src/include/pw3270/ipcpackets.h
src/include/pw3270cpp.h
... | ... | @@ -204,9 +204,9 @@ |
204 | 204 | |
205 | 205 | // Get/Set/Text with charset translation |
206 | 206 | string get_string(int baddr = 0, size_t len = -1, bool lf = false); |
207 | - string get_string_at(int row, int col, size_t sz); | |
207 | + string get_string_at(int row, int col, size_t sz, bool lf = false); | |
208 | 208 | int set_string_at(int row, int col, const char *str); |
209 | - int cmp_string_at(int row, int col, const char *text); | |
209 | + int cmp_string_at(int row, int col, const char *text, bool lf = false); | |
210 | 210 | int wait_for_string_at(int row, int col, const char *key, int timeout); |
211 | 211 | int input_string(const char *str); |
212 | 212 | string get_contents(bool lf = true); | ... | ... |
src/libpw3270cpp/remote.cc
... | ... | @@ -1111,7 +1111,7 @@ |
1111 | 1111 | query->packet_id = HLLAPI_PACKET_CMP_TEXT_AT; |
1112 | 1112 | query->row = row; |
1113 | 1113 | query->col = col; |
1114 | - query->lf = lf ? '\n' : 0 | |
1114 | + query->lf = lf ? '\n' : 0; | |
1115 | 1115 | strcpy(query->text,text); |
1116 | 1116 | |
1117 | 1117 | return query_intval((void *) query, cbSize, true); | ... | ... |
src/libpw3270cpp/session.cc
... | ... | @@ -515,9 +515,9 @@ |
515 | 515 | return rc; |
516 | 516 | } |
517 | 517 | |
518 | - string session::get_string_at(int row, int col, size_t sz) | |
518 | + string session::get_string_at(int row, int col, size_t sz, bool lf) | |
519 | 519 | { |
520 | - return this->get_local_text(this->get_text_at(row,col,sz).c_str()); | |
520 | + return this->get_local_text(this->get_text_at(row,col,sz,lf).c_str()); | |
521 | 521 | } |
522 | 522 | |
523 | 523 | int session::set_string_at(int row, int col, const char *str) |
... | ... | @@ -586,9 +586,9 @@ |
586 | 586 | |
587 | 587 | } |
588 | 588 | |
589 | - int session::cmp_string_at(int row, int col, const char *text) | |
589 | + int session::cmp_string_at(int row, int col, const char *text, bool lf) | |
590 | 590 | { |
591 | - return cmp_text_at(row,col,get_3270_text(text).c_str()); | |
591 | + return cmp_text_at(row,col,get_3270_text(text).c_str(),lf); | |
592 | 592 | } |
593 | 593 | |
594 | 594 | int session::wait_for_string_at(int row, int col, const char *key, int timeout) | ... | ... |
src/plugins/hllapi/pluginmain.c
... | ... | @@ -300,7 +300,8 @@ |
300 | 300 | send_text(source,lib3270_get_text_at( lib3270_get_default_session_handle(), |
301 | 301 | ((struct hllapi_packet_at *) source->buffer)->row, |
302 | 302 | ((struct hllapi_packet_at *) source->buffer)->col, |
303 | - ((struct hllapi_packet_at *) source->buffer)->len)); | |
303 | + ((struct hllapi_packet_at *) source->buffer)->len, | |
304 | + ((struct hllapi_packet_at *) source->buffer)->lf)); | |
304 | 305 | break; |
305 | 306 | |
306 | 307 | case HLLAPI_PACKET_GET_TEXT_AT_OFFSET: |
... | ... | @@ -314,7 +315,8 @@ |
314 | 315 | send_result(source,lib3270_cmp_text_at( lib3270_get_default_session_handle(), |
315 | 316 | ((struct hllapi_packet_text_at *) source->buffer)->row, |
316 | 317 | ((struct hllapi_packet_text_at *) source->buffer)->col, |
317 | - ((struct hllapi_packet_text_at *) source->buffer)->text)); | |
318 | + ((struct hllapi_packet_text_at *) source->buffer)->text, | |
319 | + ((struct hllapi_packet_text_at *) source->buffer)->lf)); | |
318 | 320 | break; |
319 | 321 | |
320 | 322 | case HLLAPI_PACKET_INPUT_STRING: | ... | ... |