Commit cf8407efb09b0eacfb762b20329563676dd5cefe

Authored by perry.werneck@gmail.com
1 parent b75921b8

Mudando tratamento das entradas de teclado para melhorar a performance

Showing 1 changed file with 14 additions and 3 deletions   Show diff stats
@@ -70,6 +70,7 @@ struct ta; @@ -70,6 +70,7 @@ struct ta;
70 #include "popupsc.h" 70 #include "popupsc.h"
71 // #include "printc.h" 71 // #include "printc.h"
72 #include "screenc.h" 72 #include "screenc.h"
  73 +#include "screen.h"
73 // #if defined(X3270_DISPLAY) /*[*/ 74 // #if defined(X3270_DISPLAY) /*[*/
74 // #include "selectc.h" 75 // #include "selectc.h"
75 // #endif /*]*/ 76 // #endif /*]*/
@@ -735,8 +736,6 @@ static void key_Character_wrapper(H3270 *hSession, const char *param1, const cha @@ -735,8 +736,6 @@ static void key_Character_wrapper(H3270 *hSession, const char *param1, const cha
735 code &= ~PASTE_WFLAG; 736 code &= ~PASTE_WFLAG;
736 } 737 }
737 738
738 -// lib3270_trace_event(hSession," %s -> Key(%s\"%s\")\n",ia_name[(int) ia_cause],with_ge ? "GE " : "",ctl_see((int) ebc2asc[code]));  
739 -  
740 (void) key_Character(hSession, code, with_ge, pasting, NULL); 739 (void) key_Character(hSession, code, with_ge, pasting, NULL);
741 } 740 }
742 741
@@ -987,6 +986,18 @@ static Boolean key_Character(H3270 *hSession, int code, Boolean with_ge, Boolean @@ -987,6 +986,18 @@ static Boolean key_Character(H3270 *hSession, int code, Boolean with_ge, Boolean
987 return True; 986 return True;
988 } 987 }
989 988
  989 +
  990 +LIB3270_EXPORT void lib3270_input_string(H3270 *hSession, const unsigned char *str)
  991 +{
  992 + while(*str)
  993 + {
  994 + key_ACharacter(hSession,(unsigned char)((*str) & 0xff), KT_STD, IA_KEY, NULL);
  995 + str++;
  996 + }
  997 +
  998 + screen_update(hSession,0,hSession->rows*hSession->cols);
  999 +}
  1000 +
990 /** 1001 /**
991 * Handle an ordinary character key, given an ASCII code. 1002 * Handle an ordinary character key, given an ASCII code.
992 * 1003 *
@@ -996,7 +1007,7 @@ void key_ACharacter(H3270 *hSession, unsigned char c, enum keytype keytype, enum @@ -996,7 +1007,7 @@ void key_ACharacter(H3270 *hSession, unsigned char c, enum keytype keytype, enum
996 if (skipped != NULL) 1007 if (skipped != NULL)
997 *skipped = False; 1008 *skipped = False;
998 1009
999 - lib3270_trace_event(hSession," %s -> Key(\"%s\")\n",ia_name[(int) cause], ctl_see((int) c)); 1010 + lib3270_trace_event(hSession," %s -> Key(\"%s\") Hex(%02x)\n",ia_name[(int) cause], ctl_see((int) c), (int) c);
1000 1011
1001 if (IN_3270) 1012 if (IN_3270)
1002 { 1013 {