Commit 050ff3dd84576da616e2f9f58c62fee681ef87e3

Authored by perry.werneck@gmail.com
1 parent 283e1e04

Incluindo testes

Showing 1 changed file with 4 additions and 13 deletions   Show diff stats
@@ -72,18 +72,10 @@ @@ -72,18 +72,10 @@
72 #define get_color_pair(fg,bg) (((bg&0x0F) << 4) | (fg&0x0F)) 72 #define get_color_pair(fg,bg) (((bg&0x0F) << 4) | (fg&0x0F))
73 #define DEFCOLOR_MAP(f) ((((f) & FA_PROTECT) >> 4) | (((f) & FA_INT_HIGH_SEL) >> 3)) 73 #define DEFCOLOR_MAP(f) ((((f) & FA_PROTECT) >> 4) | (((f) & FA_INT_HIGH_SEL) >> 3))
74 74
75 -// #if defined(WC3270)  
76 -// extern char *profile_name;  
77 -// #endif  
78 -  
79 static int logpopup(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg); 75 static int logpopup(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg);
80 76
81 static int (*popup_handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list) = logpopup; 77 static int (*popup_handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list) = logpopup;
82 78
83 -// static const struct lib3270_screen_callbacks *callbacks = NULL;  
84 -// static SCRIPT_STATE script_state = SCRIPT_STATE_NONE;  
85 -  
86 -  
87 enum ts { TS_AUTO, TS_ON, TS_OFF }; 79 enum ts { TS_AUTO, TS_ON, TS_OFF };
88 80
89 static void screen_update(H3270 *session, int bstart, int bend); 81 static void screen_update(H3270 *session, int bstart, int bend);
@@ -755,12 +747,14 @@ LIB3270_ACTION( testpattern ) @@ -755,12 +747,14 @@ LIB3270_ACTION( testpattern )
755 }; 747 };
756 748
757 int row = 0; 749 int row = 0;
758 - int max = (hSession->maxROWS * hSession->maxCOLS); 750 + int max;
759 int pos = 0; 751 int pos = 0;
760 int f; 752 int f;
761 int fg = COLOR_BLUE; 753 int fg = COLOR_BLUE;
762 754
763 - Trace("%s begins",__FUNCTION__); 755 + CHECK_SESSION_HANDLE(hSession);
  756 +
  757 + max = (hSession->maxROWS * hSession->maxCOLS);
764 for(f=0;f<max;f++) 758 for(f=0;f<max;f++)
765 { 759 {
766 if(!pat[row].cc[pos]) 760 if(!pat[row].cc[pos])
@@ -779,11 +773,8 @@ LIB3270_ACTION( testpattern ) @@ -779,11 +773,8 @@ LIB3270_ACTION( testpattern )
779 hSession->ea_buf[f].cc = pat[row].cc[pos++]; 773 hSession->ea_buf[f].cc = pat[row].cc[pos++];
780 } 774 }
781 775
782 - Trace("%s display",__FUNCTION__);  
783 -  
784 screen_disp(hSession); 776 screen_disp(hSession);
785 777
786 - Trace("%s ends",__FUNCTION__);  
787 return 0; 778 return 0;
788 } 779 }
789 780