diff --git a/src/core/actions/actions.c b/src/core/actions/actions.c index 2380d35..70bcb9b 100644 --- a/src/core/actions/actions.c +++ b/src/core/actions/actions.c @@ -77,11 +77,11 @@ LIB3270_EXPORT int lib3270_action_activate(const LIB3270_ACTION *action, H3270 * if(!action->activatable(hSession)) { - lib3270_trace_event(hSession,"Action \"%s\" is disabled\n",action->name); + lib3270_write_event_trace(hSession,"Action \"%s\" is disabled\n",action->name); return errno = EPERM; } - lib3270_trace_event(hSession,"Activating action \"%s\"\n",action->name); + lib3270_write_event_trace(hSession,"Activating action \"%s\"\n",action->name); return action->activate(hSession); @@ -93,7 +93,7 @@ LIB3270_EXPORT int lib3270_action_activate_by_name(const char *name, H3270 *hSes if(!action) { - lib3270_trace_event(hSession,"Can't find action \"%s\"\n",name); + lib3270_write_event_trace(hSession,"Can't find action \"%s\"\n",name); return errno; } diff --git a/src/core/connect.c b/src/core/connect.c index cf44911..795ec3f 100644 --- a/src/core/connect.c +++ b/src/core/connect.c @@ -92,7 +92,7 @@ if(lib3270_set_url(hSession,NULL)) { int err = errno; - lib3270_trace_event(hSession,"Can't set default URL (%s)\n",strerror(err)); + lib3270_write_event_trace(hSession,"Can't set default URL (%s)\n",strerror(err)); return errno = err; } @@ -120,7 +120,7 @@ snprintf(hSession->full_model_name,LIB3270_FULL_MODEL_NAME_LENGTH,"IBM-327%c-%d",hSession->m3279 ? '9' : '8', hSession->model_num); - lib3270_trace_event(hSession,"Reconnecting to %s\n",lib3270_get_url(hSession)); + lib3270_write_event_trace(hSession,"Reconnecting to %s\n",lib3270_get_url(hSession)); hSession->ever_3270 = False; diff --git a/src/core/ctlr.c b/src/core/ctlr.c index a2cb278..6dfb38d 100644 --- a/src/core/ctlr.c +++ b/src/core/ctlr.c @@ -564,13 +564,13 @@ void ctlr_erase(H3270 *session, int alt) if (alt) { // Going from 24x80 to maximum. - lib3270_write_screen_trace(session,"Going from 24x80 to %dx%d",session->max.rows,session->max.cols); + lib3270_write_screen_trace(session,"Going from 24x80 to %dx%d\n",session->max.rows,session->max.cols); set_viewsize(session,session->max.rows,session->max.cols); } else { // Going from maximum to 24x80. - lib3270_write_screen_trace(session,"Going from %dx%d to 24x80",session->max.rows,session->max.cols); + lib3270_write_screen_trace(session,"Going from %dx%d to 24x80\n",session->max.rows,session->max.cols); if (session->max.rows > 24 || session->max.cols > 80) { if(session->vcontrol) diff --git a/src/core/ft/ft.c b/src/core/ft/ft.c index 0649780..72c3c79 100644 --- a/src/core/ft/ft.c +++ b/src/core/ft/ft.c @@ -530,7 +530,7 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); return errno = EINVAL; } - lib3270_trace_event(hSession,"Sending FT request:\n%s\n",buffer); + lib3270_write_event_trace(hSession,"Sending FT request:\n%s\n",buffer); lib3270_emulate_input(ft->host, buffer, strlen(buffer), False); @@ -547,7 +547,7 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); /* External entry points called by ft_dft and ft_cut. */ void ft_message(H3270FT *ft, const char *msg) { - lib3270_trace_event(ft->host,"%s\n",msg); + lib3270_write_event_trace(ft->host,"%s\n",msg); ft->cbk.message(ft->host,msg,ft->user_data); } diff --git a/src/core/keyboard/kybd.c b/src/core/keyboard/kybd.c index 71fb72a..c43158d 100644 --- a/src/core/keyboard/kybd.c +++ b/src/core/keyboard/kybd.c @@ -138,7 +138,7 @@ struct ta * new_ta(H3270 *hSession, enum _ta_type type) if (!lib3270_is_connected(hSession)) { lib3270_ring_bell(hSession); - lib3270_trace_event(hSession,"typeahead action dropped (not connected)\n"); + lib3270_write_event_trace(hSession,"typeahead action dropped (not connected)\n"); return NULL; } @@ -146,7 +146,7 @@ struct ta * new_ta(H3270 *hSession, enum _ta_type type) if (hSession->kybdlock & KL_OERR_MASK) { lib3270_ring_bell(hSession); - lib3270_trace_event(hSession,"typeahead action dropped (operator error)\n"); + lib3270_write_event_trace(hSession,"typeahead action dropped (operator error)\n"); return NULL; } @@ -154,7 +154,7 @@ struct ta * new_ta(H3270 *hSession, enum _ta_type type) if (hSession->kybdlock & KL_SCROLLED) { lib3270_ring_bell(hSession); - lib3270_trace_event(hSession,"typeahead action dropped (scrolled)\n"); + lib3270_write_event_trace(hSession,"typeahead action dropped (scrolled)\n"); return NULL; } @@ -162,7 +162,7 @@ struct ta * new_ta(H3270 *hSession, enum _ta_type type) if (!hSession->typeahead) { lib3270_ring_bell(hSession); - lib3270_trace_event(hSession,"typeahead action dropped (no typeahead)\n"); + lib3270_write_event_trace(hSession,"typeahead action dropped (no typeahead)\n"); return NULL; } @@ -201,7 +201,7 @@ struct ta * new_ta(H3270 *hSession, enum _ta_type type) ta->args.aid_code = aid_code; - lib3270_trace_event(hSession,"typeahead action Key-aid queued (kybdlock 0x%x)\n", hSession->kybdlock); + lib3270_write_event_trace(hSession,"typeahead action Key-aid queued (kybdlock 0x%x)\n", hSession->kybdlock); } @@ -224,7 +224,7 @@ void enq_ta(H3270 *hSession, void (*fn)(H3270 *, const char *, const char *), co ta->args.def.parm[1] = NewString(parm2); - lib3270_trace_event(hSession,"typeahead action queued (kybdlock 0x%x)\n", hSession->kybdlock); + lib3270_write_event_trace(hSession,"typeahead action queued (kybdlock 0x%x)\n", hSession->kybdlock); } void enq_action(H3270 *hSession, int (*fn)(H3270 *)) @@ -235,7 +235,7 @@ void enq_action(H3270 *hSession, int (*fn)(H3270 *)) return; ta->args.action = fn; - lib3270_trace_event(hSession,"single action queued (kybdlock 0x%x)\n", hSession->kybdlock); + lib3270_write_event_trace(hSession,"single action queued (kybdlock 0x%x)\n", hSession->kybdlock); } @@ -321,7 +321,7 @@ static void kybdlock_set(H3270 *hSession, unsigned int bits) if (n != hSession->kybdlock) { #if defined(KYBDLOCK_TRACE) - lib3270_trace_event(hSession," %s: kybdlock |= 0x%04x, 0x%04x -> 0x%04x\n", "set", bits, hSession->kybdlock, n); + lib3270_write_event_trace(hSession," %s: kybdlock |= 0x%04x, 0x%04x -> 0x%04x\n", "set", bits, hSession->kybdlock, n); #endif if ((hSession->kybdlock ^ bits) & KL_DEFERRED_UNLOCK) { @@ -346,7 +346,7 @@ void lib3270_kybdlock_clear(H3270 *hSession, LIB3270_KEYBOARD_LOCK_STATE bits) if (n != hSession->kybdlock) { #if defined(KYBDLOCK_TRACE) - lib3270_trace_event(hSession," %s: kybdlock &= ~0x%04x, 0x%04x -> 0x%04x\n", "clear", bits, hSession->kybdlock, n); + lib3270_write_event_trace(hSession," %s: kybdlock &= ~0x%04x, 0x%04x -> 0x%04x\n", "clear", bits, hSession->kybdlock, n); #endif if ((hSession->kybdlock ^ n) & KL_DEFERRED_UNLOCK) { @@ -967,13 +967,13 @@ int key_ACharacter(H3270 *hSession, unsigned char c, enum keytype keytype, enum if (skipped != NULL) *skipped = False; - lib3270_trace_event(hSession," %s -> Key(\"%s\") Hex(%02x)\n",ia_name[(int) cause], ctl_see((int) c), (int) c); + lib3270_write_event_trace(hSession," %s -> Key(\"%s\") Hex(%02x)\n",ia_name[(int) cause], ctl_see((int) c), (int) c); if (IN_3270) { if (c < ' ') { - lib3270_trace_event(hSession," dropped (control char)\n"); + lib3270_write_event_trace(hSession," dropped (control char)\n"); return errno = EINVAL; } (void) key_Character(hSession, (int) hSession->charset.asc2ebc[c], keytype == KT_GE, False, skipped); @@ -986,7 +986,7 @@ int key_ACharacter(H3270 *hSession, unsigned char c, enum keytype keytype, enum #endif /*]*/ else { - lib3270_trace_event(hSession," dropped (not connected)\n"); + lib3270_write_event_trace(hSession," dropped (not connected)\n"); return errno = ENOTCONN; } return 0; @@ -1802,7 +1802,7 @@ LIB3270_EXPORT int lib3270_emulate_input(H3270 *hSession, const char *s, int len */ if (hSession->kybdlock) { - lib3270_trace_event(hSession," keyboard locked, string dropped\n"); + lib3270_write_event_trace(hSession," keyboard locked, string dropped\n"); return errno = EPERM; } @@ -1906,7 +1906,7 @@ LIB3270_EXPORT int lib3270_emulate_input(H3270 *hSession, const char *s, int len (void) key_WCharacter(ebc, &skipped); break; } else { - lib3270_trace_event(hSession,"Cannot convert U+%04x to " + lib3270_write_event_trace(hSession,"Cannot convert U+%04x to " "EBCDIC\n", c & 0xffff); break; } diff --git a/src/core/linux/curl.c b/src/core/linux/curl.c index 68d998e..7704724 100644 --- a/src/core/linux/curl.c +++ b/src/core/linux/curl.c @@ -165,7 +165,7 @@ static int internal_curl_trace_callback(CURL GNUC_UNUSED(*handle), curl_infotype char * lib3270_get_from_url(H3270 *hSession, const char *url, size_t *length, const char **error_message) { - lib3270_trace_event(hSession,"Getting data from %s",url); + lib3270_write_event_trace(hSession,"Getting data from %s",url); // Use CURL to download the CRL lib3270_autoptr(CURLDATA) crl_data = lib3270_malloc(sizeof(CURLDATA)); diff --git a/src/core/trace_ds.c b/src/core/trace_ds.c index 20dcf9f..0f914e2 100644 --- a/src/core/trace_ds.c +++ b/src/core/trace_ds.c @@ -248,7 +248,7 @@ LIB3270_EXPORT void lib3270_write_screen_trace(H3270 *session, const char *fmt, va_end(args); } -LIB3270_EXPORT void lib3270_trace_event(H3270 *session, const char *fmt, ...) +LIB3270_EXPORT void lib3270_write_event_trace(H3270 *session, const char *fmt, ...) { va_list args; diff --git a/src/include/lib3270/trace.h b/src/include/lib3270/trace.h index 4a4ed17..20085a0 100644 --- a/src/include/lib3270/trace.h +++ b/src/include/lib3270/trace.h @@ -117,8 +117,9 @@ * @param ... Arguments. * */ - LIB3270_EXPORT void lib3270_trace_event(H3270 *session, const char *fmt, ...) LIB3270_AS_PRINTF(2,3); + LIB3270_EXPORT void lib3270_write_event_trace(H3270 *session, const char *fmt, ...) LIB3270_AS_PRINTF(2,3); + LIB3270_EXPORT void LIB3270_DEPRECATED(lib3270_trace_event(H3270 *session, const char *fmt, ...)) LIB3270_AS_PRINTF(2,3); /** * @brief Write datablock on trace file. -- libgit2 0.21.2