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
@@ -134,6 +134,7 @@ struct hllapi_packet_at | @@ -134,6 +134,7 @@ struct hllapi_packet_at | ||
134 | unsigned short row; | 134 | unsigned short row; |
135 | unsigned short col; | 135 | unsigned short col; |
136 | unsigned short len; | 136 | unsigned short len; |
137 | + char lf; | ||
137 | }; | 138 | }; |
138 | 139 | ||
139 | struct hllapi_packet_text_at | 140 | struct hllapi_packet_text_at |
src/include/pw3270cpp.h
@@ -204,9 +204,9 @@ | @@ -204,9 +204,9 @@ | ||
204 | 204 | ||
205 | // Get/Set/Text with charset translation | 205 | // Get/Set/Text with charset translation |
206 | string get_string(int baddr = 0, size_t len = -1, bool lf = false); | 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 | int set_string_at(int row, int col, const char *str); | 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 | int wait_for_string_at(int row, int col, const char *key, int timeout); | 210 | int wait_for_string_at(int row, int col, const char *key, int timeout); |
211 | int input_string(const char *str); | 211 | int input_string(const char *str); |
212 | string get_contents(bool lf = true); | 212 | string get_contents(bool lf = true); |
src/libpw3270cpp/remote.cc
@@ -1111,7 +1111,7 @@ | @@ -1111,7 +1111,7 @@ | ||
1111 | query->packet_id = HLLAPI_PACKET_CMP_TEXT_AT; | 1111 | query->packet_id = HLLAPI_PACKET_CMP_TEXT_AT; |
1112 | query->row = row; | 1112 | query->row = row; |
1113 | query->col = col; | 1113 | query->col = col; |
1114 | - query->lf = lf ? '\n' : 0 | 1114 | + query->lf = lf ? '\n' : 0; |
1115 | strcpy(query->text,text); | 1115 | strcpy(query->text,text); |
1116 | 1116 | ||
1117 | return query_intval((void *) query, cbSize, true); | 1117 | return query_intval((void *) query, cbSize, true); |
src/libpw3270cpp/session.cc
@@ -515,9 +515,9 @@ | @@ -515,9 +515,9 @@ | ||
515 | return rc; | 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 | int session::set_string_at(int row, int col, const char *str) | 523 | int session::set_string_at(int row, int col, const char *str) |
@@ -586,9 +586,9 @@ | @@ -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 | int session::wait_for_string_at(int row, int col, const char *key, int timeout) | 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,7 +300,8 @@ | ||
300 | send_text(source,lib3270_get_text_at( lib3270_get_default_session_handle(), | 300 | send_text(source,lib3270_get_text_at( lib3270_get_default_session_handle(), |
301 | ((struct hllapi_packet_at *) source->buffer)->row, | 301 | ((struct hllapi_packet_at *) source->buffer)->row, |
302 | ((struct hllapi_packet_at *) source->buffer)->col, | 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 | break; | 305 | break; |
305 | 306 | ||
306 | case HLLAPI_PACKET_GET_TEXT_AT_OFFSET: | 307 | case HLLAPI_PACKET_GET_TEXT_AT_OFFSET: |
@@ -314,7 +315,8 @@ | @@ -314,7 +315,8 @@ | ||
314 | send_result(source,lib3270_cmp_text_at( lib3270_get_default_session_handle(), | 315 | send_result(source,lib3270_cmp_text_at( lib3270_get_default_session_handle(), |
315 | ((struct hllapi_packet_text_at *) source->buffer)->row, | 316 | ((struct hllapi_packet_text_at *) source->buffer)->row, |
316 | ((struct hllapi_packet_text_at *) source->buffer)->col, | 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 | break; | 320 | break; |
319 | 321 | ||
320 | case HLLAPI_PACKET_INPUT_STRING: | 322 | case HLLAPI_PACKET_INPUT_STRING: |