Commit 9b29e43acb952c5296c1ab5c2964533c83486b4c

Authored by Perry Werneck
1 parent dc0114b4

+ Updating API.

+ Removing warnings.
src/include/lib3270.h
... ... @@ -975,10 +975,10 @@
975 975 * @param h Session Handle.
976 976 * @param baddr Reference position.
977 977 *
978   - * @return Contents of the entire field, release it with lib3270_free()
  978 + * @return NULL if failed, contents of the entire field if suceeds (release it with lib3270_free()).
979 979 *
980 980 */
981   - LIB3270_EXPORT char * lib3270_get_field_at(H3270 *h, int baddr);
  981 + LIB3270_EXPORT char * lib3270_get_field_text_at(H3270 *h, int baddr);
982 982  
983 983 /**
984 984 * @brief Find the next unprotected field.
... ...
src/lib3270/html.c
... ... @@ -280,7 +280,7 @@
280 280 }
281 281 else if(session->text[baddr+col+1].chr == 'F')
282 282 {
283   - char *text = lib3270_get_field_at(session,baddr+col+1);
  283 + char *text = lib3270_get_field_text_at(session,baddr+col+1);
284 284  
285 285 if(text)
286 286 {
... ...
src/lib3270/selection.c
... ... @@ -562,7 +562,7 @@ LIB3270_EXPORT int lib3270_cmp_text_at(H3270 *h, int row, int col, const char *t
562 562 *
563 563 * @return String with the field contents (release it with lib3270_free()
564 564 */
565   -LIB3270_EXPORT char * lib3270_get_field_at(H3270 *session, int baddr)
  565 +LIB3270_EXPORT char * lib3270_get_field_text_at(H3270 *session, int baddr)
566 566 {
567 567 int first = lib3270_field_addr(session,baddr);
568 568  
... ... @@ -718,7 +718,7 @@ char * cut_text(H3270 *hSession, char tok)
718 718 text = lib3270_realloc(text,bufpos);
719 719  
720 720 // Move contents of the current field
721   - while(daddr < (maxlen-1) && !hSession->ea_buf[daddr].fa)
  721 + while(daddr < (int) (maxlen-1) && !hSession->ea_buf[daddr].fa)
722 722 {
723 723 saddr = cut_addr(hSession,daddr,saddr,maxlen,&sattr);
724 724 daddr++;
... ...