From 289cdd1f2b134860b4268c9d981b52196aeacff4 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Tue, 28 Feb 2012 17:30:22 +0000 Subject: [PATCH] Padronizando nome da função que obtem o nome de um toggle --- latest/src/include/lib3270.h | 10 ++++++++++ latest/src/include/lib3270/toggle.h | 9 +++++---- latest/src/lib/toggles.c | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/latest/src/include/lib3270.h b/latest/src/include/lib3270.h index 62b0898..30e18f5 100644 --- a/latest/src/include/lib3270.h +++ b/latest/src/include/lib3270.h @@ -403,6 +403,16 @@ LIB3270_EXPORT LIB3270_TOGGLE lib3270_get_toggle_id(const char *name); /** + * Get the toggle name as string. + * + * @param id Toggle id + * + * @return Constant string with the toggle name or "" if invalid. + * + */ + LIB3270_EXPORT const char * lib3270_get_toggle_name(LIB3270_TOGGLE ix); + + /** * Revert toggle status. * * @param h Session handle. diff --git a/latest/src/include/lib3270/toggle.h b/latest/src/include/lib3270/toggle.h index 19b4e74..9210658 100644 --- a/latest/src/include/lib3270/toggle.h +++ b/latest/src/include/lib3270/toggle.h @@ -75,7 +75,7 @@ LIB3270_EXPORT int set_3270_toggle(LIB3270_TOGGLE_ID ix, int value); - LIB3270_EXPORT const char * get_3270_toggle_name(LIB3270_TOGGLE_ID ix); +// LIB3270_EXPORT const char * get_3270_toggle_name(LIB3270_TOGGLE_ID ix); // LIB3270_EXPORT LIB3270_TOGGLE_ID get_3270_toggle_by_name(const char *name); #define get_3270_toggle_by_name(x) lib3270_get_toggle_id(x) @@ -86,8 +86,9 @@ #define register_tchange(ix,callback) register_3270_toggle_monitor(ix,callback) #define do_toggle(ix) lib3270_toggle(NULL,ix) - #define get_toggle_name(ix) get_3270_toggle_name(ix) - #define set_toggle(ix,value) lib3270_set_toggle(NULL,ix,value) - #define get_toggle_by_name(name) lib3270_get_toggle_id(name) + #define get_3270_toggle_name(ix) lib3270_get_toggle_name(ix) + #define get_toggle_name(ix) lib3270_get_toggle_name(ix) + #define set_toggle(ix,value) lib3270_set_toggle(NULL,ix,value) + #define get_toggle_by_name(name) lib3270_get_toggle_id(name) #endif /* TOGGLE3270_H_INCLUDED */ diff --git a/latest/src/lib/toggles.c b/latest/src/lib/toggles.c index 391f6d6..72f39f1 100644 --- a/latest/src/lib/toggles.c +++ b/latest/src/lib/toggles.c @@ -220,7 +220,7 @@ void shutdown_toggles(H3270 *session, struct toggle *toggle) #endif } -LIB3270_EXPORT const char * get_3270_toggle_name(LIB3270_TOGGLE_ID ix) +LIB3270_EXPORT const char * lib3270_get_toggle_name(LIB3270_TOGGLE_ID ix) { if(ix < N_TOGGLES) return toggle_names[ix]; -- libgit2 0.21.2