Commit 0d1d338e4dfdda154394430f2687514acab4a186

Authored by Perry Werneck
1 parent c5066fd5

Fixing typeahead problem.

src/core/ctlr.c
@@ -2313,12 +2313,10 @@ int ctlr_dbcs_postprocess(H3270 *hSession) @@ -2313,12 +2313,10 @@ int ctlr_dbcs_postprocess(H3270 *hSession)
2313 */ 2313 */
2314 void ps_process(H3270 *hSession) 2314 void ps_process(H3270 *hSession)
2315 { 2315 {
2316 - while(run_ta(hSession))  
2317 - ; 2316 + while(run_ta(hSession));
2318 2317
2319 -// sms_continue(); 2318 + screen_update(hSession,0,hSession->view.rows * hSession->view.cols);
2320 2319
2321 -#if defined(X3270_FT)  
2322 /* Process file transfers. */ 2320 /* Process file transfers. */
2323 if (lib3270_get_ft_state(hSession) != LIB3270_FT_STATE_NONE && /* transfer in progress */ 2321 if (lib3270_get_ft_state(hSession) != LIB3270_FT_STATE_NONE && /* transfer in progress */
2324 hSession->formatted && /* screen is formatted */ 2322 hSession->formatted && /* screen is formatted */
@@ -2329,7 +2327,7 @@ void ps_process(H3270 *hSession) @@ -2329,7 +2327,7 @@ void ps_process(H3270 *hSession)
2329 { 2327 {
2330 ft_cut_data(hSession); 2328 ft_cut_data(hSession);
2331 } 2329 }
2332 -#endif 2330 +
2333 } 2331 }
2334 2332
2335 /* 2333 /*
src/core/keyboard/kybd.c
@@ -935,17 +935,23 @@ LIB3270_EXPORT int lib3270_input_string(H3270 *hSession, const unsigned char *st @@ -935,17 +935,23 @@ LIB3270_EXPORT int lib3270_input_string(H3270 *hSession, const unsigned char *st
935 int rc = 0; 935 int rc = 0;
936 936
937 if(check_online_session(hSession)) 937 if(check_online_session(hSession))
  938 + {
  939 + trace("%s: %s",__FUNCTION__,strerror(errno));
938 return errno; 940 return errno;
  941 + }
939 942
940 if(length < 0) 943 if(length < 0)
941 length = strlen((char *) str); 944 length = strlen((char *) str);
942 945
943 - if(hSession->kybdlock)  
944 - return (errno = EPERM);  
945 -  
946 int pos; 946 int pos;
947 for(pos = 0; pos < length && str[pos] && !rc; pos++) 947 for(pos = 0; pos < length && str[pos] && !rc; pos++)
  948 + {
  949 + if (KYBDLOCK_IS_OERR(hSession))
  950 + return (errno = EPERM);
  951 +
948 rc = key_ACharacter(hSession,(str[pos] & 0xff), KT_STD, IA_KEY, NULL); 952 rc = key_ACharacter(hSession,(str[pos] & 0xff), KT_STD, IA_KEY, NULL);
  953 + trace("%s: key_ACharacter(%c)=%d",__FUNCTION__,str[pos] & 0xff,rc);
  954 + }
949 955
950 screen_update(hSession,0,hSession->view.rows * hSession->view.cols); 956 screen_update(hSession,0,hSession->view.rows * hSession->view.cols);
951 957
src/selection/selection.c
@@ -307,7 +307,7 @@ LIB3270_EXPORT char * lib3270_get_string_at_address(H3270 *h, int offset, int le @@ -307,7 +307,7 @@ LIB3270_EXPORT char * lib3270_get_string_at_address(H3270 *h, int offset, int le
307 307
308 memset(buffer,0,len+1); 308 memset(buffer,0,len+1);
309 309
310 - trace("len=%d buffer=%p",len,buffer); 310 + // trace("len=%d buffer=%p",len,buffer);
311 311
312 while(len > 0) 312 while(len > 0)
313 { 313 {