From 9b29e43acb952c5296c1ab5c2964533c83486b4c Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 12 Dec 2018 13:35:48 -0200 Subject: [PATCH] + Updating API. + Removing warnings. --- src/include/lib3270.h | 4 ++-- src/lib3270/html.c | 2 +- src/lib3270/selection.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/lib3270.h b/src/include/lib3270.h index 39821e9..6b54e31 100644 --- a/src/include/lib3270.h +++ b/src/include/lib3270.h @@ -975,10 +975,10 @@ * @param h Session Handle. * @param baddr Reference position. * - * @return Contents of the entire field, release it with lib3270_free() + * @return NULL if failed, contents of the entire field if suceeds (release it with lib3270_free()). * */ - LIB3270_EXPORT char * lib3270_get_field_at(H3270 *h, int baddr); + LIB3270_EXPORT char * lib3270_get_field_text_at(H3270 *h, int baddr); /** * @brief Find the next unprotected field. diff --git a/src/lib3270/html.c b/src/lib3270/html.c index 38bad86..9d7e7d7 100644 --- a/src/lib3270/html.c +++ b/src/lib3270/html.c @@ -280,7 +280,7 @@ } else if(session->text[baddr+col+1].chr == 'F') { - char *text = lib3270_get_field_at(session,baddr+col+1); + char *text = lib3270_get_field_text_at(session,baddr+col+1); if(text) { diff --git a/src/lib3270/selection.c b/src/lib3270/selection.c index c562747..14c6156 100644 --- a/src/lib3270/selection.c +++ b/src/lib3270/selection.c @@ -562,7 +562,7 @@ LIB3270_EXPORT int lib3270_cmp_text_at(H3270 *h, int row, int col, const char *t * * @return String with the field contents (release it with lib3270_free() */ -LIB3270_EXPORT char * lib3270_get_field_at(H3270 *session, int baddr) +LIB3270_EXPORT char * lib3270_get_field_text_at(H3270 *session, int baddr) { int first = lib3270_field_addr(session,baddr); @@ -718,7 +718,7 @@ char * cut_text(H3270 *hSession, char tok) text = lib3270_realloc(text,bufpos); // Move contents of the current field - while(daddr < (maxlen-1) && !hSession->ea_buf[daddr].fa) + while(daddr < (int) (maxlen-1) && !hSession->ea_buf[daddr].fa) { saddr = cut_addr(hSession,daddr,saddr,maxlen,&sattr); daddr++; -- libgit2 0.21.2