diff --git a/src/include/lib3270/trace.h b/src/include/lib3270/trace.h index f2a7d8d..549eddd 100644 --- a/src/include/lib3270/trace.h +++ b/src/include/lib3270/trace.h @@ -24,7 +24,6 @@ * * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) * kraucer@bb.com.br (Kraucer Fernandes Mazuco) * */ @@ -59,7 +58,7 @@ * @param ... Arguments. * */ - LIB3270_EXPORT void lib3270_write_dstrace(H3270 *session, const char *fmt, ...); + LIB3270_EXPORT void lib3270_write_dstrace(H3270 *session, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /** * Write on trace file. @@ -70,7 +69,7 @@ * @param ... Arguments. * */ - LIB3270_EXPORT void lib3270_write_nettrace(H3270 *session, const char *fmt, ...); + LIB3270_EXPORT void lib3270_write_nettrace(H3270 *session, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /** * Write on trace file. @@ -81,7 +80,7 @@ * @param ... Arguments. * */ - LIB3270_EXPORT void lib3270_trace_event(H3270 *session, const char *fmt, ...); + LIB3270_EXPORT void lib3270_trace_event(H3270 *session, const char *fmt, ...) __attribute__((format(printf, 2, 3))); #ifdef __cplusplus } diff --git a/src/lib3270/ft.c b/src/lib3270/ft.c index f0a6ecb..7190246 100644 --- a/src/lib3270/ft.c +++ b/src/lib3270/ft.c @@ -314,14 +314,14 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); if(ft->flags & LIB3270_FT_OPTION_RECEIVE) { // Receiving file - lib3270_write_log( ft->host, - "ft", - "Receiving file %s %s %s %s", - ft->local, - ft->ascii_flag ? "ASCII" : "BINARY", - ft->cr_flag ? "CRLF" : "NOCRLF", - ft->remap_flag ? "REMAP" : "NOREMAP" - ); + lib3270_write_dstrace( + ft->host, + "\nReceiving file %s (%s %s %s)\n", + ft->local, + ft->ascii_flag ? "ASCII" : "BINARY", + ft->cr_flag ? "CRLF" : "NOCRLF", + ft->remap_flag ? "REMAP" : "NOREMAP" + ); } else { @@ -334,16 +334,16 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); ft->length = ftell(ft->local_file); + lib3270_write_dstrace( + ft->host, + "\nSending file %s (%ld bytes %s %s %s)\n", + ft->local, + ft->length, + ft->ascii_flag ? "ASCII" : "BINARY", + ft->cr_flag ? "CRLF" : "NOCRLF", + ft->remap_flag ? "REMAP" : "NOREMAP" + ); - lib3270_write_log( ft->host, - "ft", - "Sending file %s (%ld bytes) %s %s %s", - ft->local, - ft->length, - ft->ascii_flag ? "ASCII" : "BINARY", - ft->cr_flag ? "CRLF" : "NOCRLF", - ft->remap_flag ? "REMAP" : "NOREMAP" - ); rewind(ft->local_file); } diff --git a/src/lib3270/ft_cut.c b/src/lib3270/ft_cut.c index c942072..ef8c503 100644 --- a/src/lib3270/ft_cut.c +++ b/src/lib3270/ft_cut.c @@ -517,7 +517,9 @@ static void cut_data(H3270 *hSession) conv_length = upload_convert(hSession, cvbuf, raw_length); if (conv_length < 0) + { return; + } /* Write it to the file. */ if (fwrite((char *)cvbuf, conv_length, 1, ft->local_file) == 0) diff --git a/src/lib3270/ft_dft.c b/src/lib3270/ft_dft.c index e78b2c7..be6fadf 100644 --- a/src/lib3270/ft_dft.c +++ b/src/lib3270/ft_dft.c @@ -24,9 +24,7 @@ * * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda) * */ @@ -77,18 +75,6 @@ struct data_buffer char data[256]; /**< The actual data */ }; -/* Globals. */ -// int dft_buffersize = 0; /* Buffer size (LIMIN, LIMOUT) */ - -/* Statics. */ -// static Boolean message_flag = False; /* Open Request for msg received */ -// static int dft_eof; -// static unsigned long recnum; -// static char *abort_string = CN; -// static unsigned char *dft_savebuf = NULL; -// static int dft_savebuf_len = 0; -// static int dft_savebuf_max = 0; - static void dft_abort(H3270 *hSession, unsigned short code, const char *fmt, ...); static void dft_close_request(H3270 *hSession); diff --git a/src/lib3270/trace_dsc.h b/src/lib3270/trace_dsc.h index 6b8844f..de85429 100644 --- a/src/lib3270/trace_dsc.h +++ b/src/lib3270/trace_dsc.h @@ -38,17 +38,12 @@ const char *rcba(H3270 *session, int baddr); -// void toggle_dsTrace(H3270 *h, struct toggle *t, LIB3270_TOGGLE_TYPE tt); -// void toggle_eventTrace(H3270 *h, struct toggle *t, LIB3270_TOGGLE_TYPE tt); -// void toggle_screenTrace(H3270 *h, struct toggle *t, LIB3270_TOGGLE_TYPE tt); - void trace_ansi_disc(H3270 *hSession); void trace_char(H3270 *hSession, char c); void trace_ds(H3270 *hSession, const char *fmt, ...) printflike(2, 3); void trace_ds_nb(H3270 *hSession, const char *fmt, ...) printflike(2, 3); void trace_dsn(H3270 *hSession, const char *fmt, ...) printflike(2, 3); void trace_screen(H3270 *session); -// void trace_rollover_check(void); // #define trace_event(...) lib3270_trace_event(&h3270,__VA_ARGS__) -- libgit2 0.21.2