Commit 83011b4e8eb5bba3aa6efbd50694a94fb5ce6090

Authored by perry.werneck@gmail.com
1 parent 5b102276

Implementando janela de trace

Showing 3 changed files with 6 additions and 5 deletions   Show diff stats
ft.c
... ... @@ -33,6 +33,7 @@
33 33 #include <lib3270.h>
34 34 #include <lib3270/filetransfer.h>
35 35 #include "globals.h"
  36 +#include <lib3270/trace.h>
36 37  
37 38 #include <errno.h>
38 39  
... ...
kybd.c
... ... @@ -39,6 +39,7 @@ struct ta;
39 39 #define LIB3270_TA struct ta
40 40  
41 41 #include "globals.h"
  42 +#include <lib3270/trace.h>
42 43  
43 44 #ifndef ANDROID
44 45 #include <stdlib.h>
... ...
trace_ds.c
... ... @@ -38,6 +38,7 @@
38 38 */
39 39  
40 40 #include "globals.h"
  41 +#include <lib3270/trace.h>
41 42  
42 43 #if defined(X3270_TRACE) /*[*/
43 44  
... ... @@ -74,9 +75,11 @@ static void wtrace(H3270 *session, const char *fmt, ...);
74 75 static void (*vwtrace)(H3270 *session, const char *fmt, va_list args) = __vwtrace;
75 76  
76 77  
77   -LIB3270_EXPORT void lib3270_set_trace_handler( void (*handler)(H3270 *session, const char *fmt, va_list args) )
  78 +LIB3270_EXPORT LIB3270_TRACE_HANDLER lib3270_set_trace_handler( LIB3270_TRACE_HANDLER handler )
78 79 {
  80 + void (*ret)(H3270 *session, const char *fmt, va_list args) = vwtrace;
79 81 vwtrace = handler ? handler : __vwtrace;
  82 + return ret;
80 83 }
81 84  
82 85 /* display a (row,col) */
... ... @@ -88,10 +91,6 @@ const char * rcba(H3270 *hSession, int baddr)
88 91 }
89 92  
90 93 /* Data Stream trace print, handles line wraps */
91   -
92   -// static char *tdsbuf = CN;
93   -// #define TDS_LEN 75
94   -
95 94 static void trace_ds_s(H3270 *hSession, char *s, Boolean can_break)
96 95 {
97 96 static int dscnt = 0;
... ...