Commit 509952b6e5c48bcf8d87c99840587c50c626db47
1 parent
cf1baf1b
Exists in
master
and in
3 other branches
Implementando versão android
Showing
2 changed files
with
23 additions
and
5 deletions
Show diff stats
host.c
| ... | ... | @@ -772,7 +772,7 @@ void lib3270_st_changed(H3270 *h, LIB3270_STATE tx, int mode) |
| 772 | 772 | |
| 773 | 773 | for (st = h->st_callbacks[tx];st;st = st->next) |
| 774 | 774 | { |
| 775 | - trace("st=%p func=%p",st,st->func); | |
| 775 | +// trace("st=%p func=%p",st,st->func); | |
| 776 | 776 | st->func(h,mode,st->data); |
| 777 | 777 | } |
| 778 | 778 | ... | ... |
kybd.c
| ... | ... | @@ -171,7 +171,12 @@ static struct ta |
| 171 | 171 | } *ta_head = (struct ta *) NULL, |
| 172 | 172 | *ta_tail = (struct ta *) NULL; |
| 173 | 173 | |
| 174 | -#define ENQUEUE_ACTION(x) enq_ta(hSession, (void (*)(H3270 *, const char *, const char *)) x, NULL, NULL) | |
| 174 | + | |
| 175 | +#if defined(DEBUG) || defined(ANDROID) | |
| 176 | + #define ENQUEUE_ACTION(x) enq_ta(hSession, (void (*)(H3270 *, const char *, const char *)) x, NULL, NULL, #x) | |
| 177 | +#else | |
| 178 | + #define ENQUEUE_ACTION(x) enq_ta(hSession, (void (*)(H3270 *, const char *, const char *)) x, NULL, NULL) | |
| 179 | +#endif // DEBUG | |
| 175 | 180 | |
| 176 | 181 | static const char dxl[] = "0123456789abcdef"; |
| 177 | 182 | #define FROM_HEX(c) (strchr(dxl, tolower(c)) - dxl) |
| ... | ... | @@ -250,15 +255,21 @@ static int enq_chk(H3270 *session) |
| 250 | 255 | /* |
| 251 | 256 | * Put an action on the typeahead queue. |
| 252 | 257 | */ |
| 258 | +#if defined(DEBUG) || defined(ANDROID) | |
| 259 | +static void enq_ta(H3270 *hSession, void (*fn)(H3270 *, const char *, const char *), const char *parm1, const char *parm2, const char *name) | |
| 260 | +#else | |
| 253 | 261 | static void enq_ta(H3270 *hSession, void (*fn)(H3270 *, const char *, const char *), const char *parm1, const char *parm2) |
| 262 | +#endif // DEBUG | |
| 254 | 263 | { |
| 255 | 264 | struct ta *ta; |
| 256 | 265 | |
| 266 | + CHECK_SESSION_HANDLE(hSession); | |
| 267 | + | |
| 268 | + trace("%s: %s",__FUNCTION__,name); | |
| 269 | + | |
| 257 | 270 | if(enq_chk(hSession)) |
| 258 | 271 | return; |
| 259 | 272 | |
| 260 | - CHECK_SESSION_HANDLE(hSession); | |
| 261 | - | |
| 262 | 273 | ta = (struct ta *) lib3270_malloc(sizeof(*ta)); |
| 263 | 274 | ta->session = hSession; |
| 264 | 275 | ta->next = (struct ta *) NULL; |
| ... | ... | @@ -773,7 +784,13 @@ static Boolean key_Character(int code, Boolean with_ge, Boolean pasting, Boolean |
| 773 | 784 | char codename[64]; |
| 774 | 785 | |
| 775 | 786 | (void) sprintf(codename, "%d", code |(with_ge ? GE_WFLAG : 0) | (pasting ? PASTE_WFLAG : 0)); |
| 787 | + | |
| 788 | +#if defined(DEBUG) || defined(ANDROID) | |
| 789 | + enq_ta(&h3270,key_Character_wrapper, codename, CN, "key_Character_wrapper"); | |
| 790 | +#else | |
| 776 | 791 | enq_ta(&h3270,key_Character_wrapper, codename, CN); |
| 792 | +#endif // DEBUG | |
| 793 | + | |
| 777 | 794 | return False; |
| 778 | 795 | } |
| 779 | 796 | baddr = h3270.cursor_addr; |
| ... | ... | @@ -1453,9 +1470,10 @@ LIB3270_KEY_ACTION( backtab ) |
| 1453 | 1470 | |
| 1454 | 1471 | static void defer_unlock(H3270 *session) |
| 1455 | 1472 | { |
| 1473 | + trace("%s",__FUNCTION__); | |
| 1456 | 1474 | kybdlock_clr(session,KL_DEFERRED_UNLOCK, "defer_unlock"); |
| 1457 | 1475 | status_reset(session); |
| 1458 | - if (CONNECTED) | |
| 1476 | + if(CONNECTED) | |
| 1459 | 1477 | ps_process(); |
| 1460 | 1478 | } |
| 1461 | 1479 | ... | ... |