Commit 890f32dd80e67de6f2f92294f00ed306be2c8d63
1 parent
7efab0c3
Exists in
master
and in
3 other branches
Incluindo opção de envio do trace de comunicação e telas para o syslog
Showing
1 changed file
with
0 additions
and
45 deletions
Show diff stats
trace_ds.c
@@ -53,70 +53,25 @@ | @@ -53,70 +53,25 @@ | ||
53 | #include <stdarg.h> | 53 | #include <stdarg.h> |
54 | #include <fcntl.h> | 54 | #include <fcntl.h> |
55 | #include "3270ds.h" | 55 | #include "3270ds.h" |
56 | -//#include "appres.h" | ||
57 | -// #include "objects.h" | ||
58 | #include "resources.h" | 56 | #include "resources.h" |
59 | -// #include "ctlr.h" | ||
60 | 57 | ||
61 | #include "charsetc.h" | 58 | #include "charsetc.h" |
62 | -// #include "childc.h" | ||
63 | #include "ctlrc.h" | 59 | #include "ctlrc.h" |
64 | #include "popupsc.h" | 60 | #include "popupsc.h" |
65 | -// #include "printc.h" | ||
66 | -// #include "savec.h" | ||
67 | #include "tablesc.h" | 61 | #include "tablesc.h" |
68 | #include "telnetc.h" | 62 | #include "telnetc.h" |
69 | #include "trace_dsc.h" | 63 | #include "trace_dsc.h" |
70 | #include "utilc.h" | 64 | #include "utilc.h" |
71 | -// #include "w3miscc.h" | ||
72 | #include "toggle.h" | 65 | #include "toggle.h" |
73 | 66 | ||
74 | /* Maximum size of a tracefile header. */ | 67 | /* Maximum size of a tracefile header. */ |
75 | #define MAX_HEADER_SIZE (10*1024) | 68 | #define MAX_HEADER_SIZE (10*1024) |
76 | 69 | ||
77 | -/* Minimum size of a trace file. */ | ||
78 | -// #define MIN_TRACEFILE_SIZE (64*1024) | ||
79 | -// #define MIN_TRACEFILE_SIZE_NAME "64K" | ||
80 | - | ||
81 | -/* System calls which may not be there. */ | ||
82 | -// #if !defined(HAVE_FSEEKO) | ||
83 | -// #define fseeko(s, o, w) fseek(s, (long)o, w) | ||
84 | -// #define ftello(s) (off_t)ftell(s) | ||
85 | -// #endif | ||
86 | - | ||
87 | -// #include <lib3270/api.h> | ||
88 | 70 | ||
89 | /* Statics */ | 71 | /* Statics */ |
90 | -// static int dscnt = 0; | ||
91 | - | ||
92 | -/* | ||
93 | -#if defined (LIB3270) | ||
94 | - HCONSOLE tracewindow_handle = 0; | ||
95 | -#elif defined(_WIN32) | ||
96 | - static HANDLE tracewindow_handle = NULL; | ||
97 | -#else | ||
98 | - static int tracewindow_pid = -1; | ||
99 | -#endif | ||
100 | -*/ | ||
101 | - | ||
102 | -// static FILE *tracef = NULL; | ||
103 | -// static FILE *tracef_pipe = NULL; | ||
104 | -// static char *tracef_bufptr = CN; | ||
105 | -// static off_t tracef_size = 0; | ||
106 | -// static off_t tracef_max = 0; | ||
107 | -// static char *tracef_midpoint_header = CN; | ||
108 | -// static off_t tracef_midpoint = 0; | ||
109 | - | ||
110 | static void __vwtrace(H3270 *session, const char *fmt, va_list args); | 72 | static void __vwtrace(H3270 *session, const char *fmt, va_list args); |
111 | static void wtrace(H3270 *session, const char *fmt, ...); | 73 | static void wtrace(H3270 *session, const char *fmt, ...); |
112 | -// static char *create_tracefile_header(const char *mode); | ||
113 | -// static void stop_tracing(void); | ||
114 | - | ||
115 | -/* Globals */ | ||
116 | -// struct timeval ds_ts; | ||
117 | - | ||
118 | static void (*vwtrace)(H3270 *session, const char *fmt, va_list args) = __vwtrace; | 74 | static void (*vwtrace)(H3270 *session, const char *fmt, va_list args) = __vwtrace; |
119 | -// Boolean trace_skipping = False; | ||
120 | 75 | ||
121 | 76 | ||
122 | LIB3270_EXPORT void lib3270_set_trace_handler( void (*handler)(H3270 *session, const char *fmt, va_list args) ) | 77 | LIB3270_EXPORT void lib3270_set_trace_handler( void (*handler)(H3270 *session, const char *fmt, va_list args) ) |