Commit 1a1e8112973d5ada9af132185af3eb4501695451
1 parent
5d70e80b
Exists in
master
and in
3 other branches
Debugging the new set_field method.
Showing
3 changed files
with
20 additions
and
4 deletions
Show diff stats
src/core/keyboard/kybd.c
src/core/paste.c
| ... | ... | @@ -323,7 +323,7 @@ LIB3270_EXPORT int lib3270_set_field(H3270 *hSession, const char *text, int leng |
| 323 | 323 | lib3270_unselect(hSession); |
| 324 | 324 | |
| 325 | 325 | hSession->cbk.suspend(hSession); |
| 326 | - hSession->cursor_addr = addr; | |
| 326 | + hSession->cursor_addr = ++addr; | |
| 327 | 327 | numchars = set_string(hSession, (const unsigned char *) text, length); |
| 328 | 328 | hSession->cbk.resume(hSession); |
| 329 | 329 | ... | ... |
src/testprogram/testprogram.c
| ... | ... | @@ -110,9 +110,24 @@ int main(int argc, char *argv[]) |
| 110 | 110 | lib3270_enter(h); |
| 111 | 111 | lib3270_wait(h,5); |
| 112 | 112 | |
| 113 | - lib3270_autoptr(char) text = lib3270_get_string_at_address(h,0,-1,'\n'); | |
| 114 | - if(text) | |
| 115 | - printf("Screen:\n[%s]\n",text); | |
| 113 | + { | |
| 114 | + lib3270_autoptr(char) text = lib3270_get_string_at_address(h,0,-1,'\n'); | |
| 115 | + if(text) | |
| 116 | + printf("Screen:\n[%s]\n",text); | |
| 117 | + | |
| 118 | + lib3270_wait(h,2); | |
| 119 | + | |
| 120 | + } | |
| 121 | + | |
| 122 | + { | |
| 123 | + printf("\n\nSet field exits with %d\n",lib3270_set_field(h,"aaa",-1)); | |
| 124 | + printf("\n\nSet field exits with %d\n",lib3270_set_field(h,"bbb",-1)); | |
| 125 | + printf("\n\nSet field exits with %d\n",lib3270_set_field(h,"ccc",-1)); | |
| 126 | + | |
| 127 | + lib3270_autoptr(char) text = lib3270_get_string_at_address(h,0,-1,'\n'); | |
| 128 | + if(text) | |
| 129 | + printf("Screen:\n[%s]\n",text); | |
| 130 | + } | |
| 116 | 131 | |
| 117 | 132 | } |
| 118 | 133 | ... | ... |