diff --git a/src/core/paste.c b/src/core/paste.c index d44e6cf..602f41d 100644 --- a/src/core/paste.c +++ b/src/core/paste.c @@ -295,7 +295,6 @@ LIB3270_EXPORT int lib3270_set_string_at_address(H3270 *hSession, int baddr, con return rc; } -/// @brief Set string at cursor position. LIB3270_EXPORT int lib3270_set_string(H3270 *hSession, const unsigned char *str, int length) { int rc; @@ -344,7 +343,7 @@ LIB3270_EXPORT int lib3270_paste(H3270 *h, const unsigned char *str) lib3270_popup_dialog(h,LIB3270_NOTIFY_WARNING, _( "Action failed" ), _( "Unable to paste text" ), - "%s", sz == -EINVAL ? _( "Keyboard is locked" ) : _( "Unexpected error" ) ); + "%s", sz == -EPERM ? _( "Keyboard is locked" ) : _( "Unexpected error" ) ); return 0; } diff --git a/src/include/lib3270.h b/src/include/lib3270.h index 3d26749..eac57e5 100644 --- a/src/include/lib3270.h +++ b/src/include/lib3270.h @@ -696,16 +696,19 @@ * @brief Set string at current cursor position. * * Returns are ignored; newlines mean "move to beginning of next line"; - * tabs and formfeeds become spaces. Backslashes are not special + * tabs and formfeeds become spaces. Backslashes are not special. * * @param hSession Session handle. * @param text String to input. * @param length Length of the string (-1 for auto-detect). * - * @return Negative if error (sets errno) or number of processed characters. + * @return Negative if error or number (sets errno) of processed characters. + * + * @retval -EPERM The keyboard is locked. + * @retval -ENOTCONN Disconnected from host. * */ - LIB3270_EXPORT int lib3270_set_text(H3270 *h, const unsigned char *text, int length); + LIB3270_EXPORT int lib3270_set_string(H3270 *h, const unsigned char *text, int length); /** * @brief Set string at defined row/column. diff --git a/src/include/lib3270/selection.h b/src/include/lib3270/selection.h index 05a1a8e..e79dd32 100644 --- a/src/include/lib3270/selection.h +++ b/src/include/lib3270/selection.h @@ -105,7 +105,7 @@ * * @see lib3270_pastenext. * - * @return Non 0 if there's more to paste with lib3270_pastenext + * @return Non 0 if there's more to paste with lib3270_pastenext. * */ LIB3270_EXPORT int lib3270_paste(H3270 *h, const unsigned char *str); -- libgit2 0.21.2