From e29f844329e1335b9870e30e3101648fe1837ba2 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Thu, 20 Aug 2015 16:37:01 +0000 Subject: [PATCH] Incluindo mecanismo para conferir se uma coordenada está protegida --- ctlr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+), 0 deletions(-) diff --git a/ctlr.c b/ctlr.c index 7a8bb07..64a6f4a 100644 --- a/ctlr.c +++ b/ctlr.c @@ -612,6 +612,19 @@ LIB3270_EXPORT int lib3270_get_next_unprotected(H3270 *hSession, int baddr0) return 0; } +LIB3270_EXPORT int lib3270_get_is_protected(H3270 *hSession, int baddr) +{ + CHECK_SESSION_HANDLE(hSession); + + if(baddr < 0) + baddr = hSession->cursor_addr; + + int faddr = find_field_attribute(hSession,baddr); + + return FA_IS_PROTECTED(hSession->ea_buf[faddr].fa); +} + + /** * Perform an erase command, which may include changing the (virtual) screen size. * -- libgit2 0.21.2