Commit 48355f11c979eb5f8fe30874df2dc199cb574f59

Authored by Perry Werneck
1 parent 6d4cc248

Fixing API missed API call.

src/core/paste.c
... ... @@ -295,7 +295,6 @@ LIB3270_EXPORT int lib3270_set_string_at_address(H3270 *hSession, int baddr, con
295 295 return rc;
296 296 }
297 297  
298   -/// @brief Set string at cursor position.
299 298 LIB3270_EXPORT int lib3270_set_string(H3270 *hSession, const unsigned char *str, int length)
300 299 {
301 300 int rc;
... ... @@ -344,7 +343,7 @@ LIB3270_EXPORT int lib3270_paste(H3270 *h, const unsigned char *str)
344 343 lib3270_popup_dialog(h,LIB3270_NOTIFY_WARNING,
345 344 _( "Action failed" ),
346 345 _( "Unable to paste text" ),
347   - "%s", sz == -EINVAL ? _( "Keyboard is locked" ) : _( "Unexpected error" ) );
  346 + "%s", sz == -EPERM ? _( "Keyboard is locked" ) : _( "Unexpected error" ) );
348 347 return 0;
349 348 }
350 349  
... ...
src/include/lib3270.h
... ... @@ -696,16 +696,19 @@
696 696 * @brief Set string at current cursor position.
697 697 *
698 698 * Returns are ignored; newlines mean "move to beginning of next line";
699   - * tabs and formfeeds become spaces. Backslashes are not special
  699 + * tabs and formfeeds become spaces. Backslashes are not special.
700 700 *
701 701 * @param hSession Session handle.
702 702 * @param text String to input.
703 703 * @param length Length of the string (-1 for auto-detect).
704 704 *
705   - * @return Negative if error (sets errno) or number of processed characters.
  705 + * @return Negative if error or number (sets errno) of processed characters.
  706 + *
  707 + * @retval -EPERM The keyboard is locked.
  708 + * @retval -ENOTCONN Disconnected from host.
706 709 *
707 710 */
708   - LIB3270_EXPORT int lib3270_set_text(H3270 *h, const unsigned char *text, int length);
  711 + LIB3270_EXPORT int lib3270_set_string(H3270 *h, const unsigned char *text, int length);
709 712  
710 713 /**
711 714 * @brief Set string at defined row/column.
... ...
src/include/lib3270/selection.h
... ... @@ -105,7 +105,7 @@
105 105 *
106 106 * @see lib3270_pastenext.
107 107 *
108   - * @return Non 0 if there's more to paste with lib3270_pastenext
  108 + * @return Non 0 if there's more to paste with lib3270_pastenext.
109 109 *
110 110 */
111 111 LIB3270_EXPORT int lib3270_paste(H3270 *h, const unsigned char *str);
... ...