From 9fac04ff1987de3246dc37d77296d094dc198d81 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Tue, 28 Jun 2016 14:06:30 -0300 Subject: [PATCH] Padronizando detecção do próximo campo desprotegido --- ctlr.c | 2 +- ctlrc.h | 2 +- kybd.c | 14 +++++++------- paste.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ctlr.c b/ctlr.c index 4605a4d..3f84178 100644 --- a/ctlr.c +++ b/ctlr.c @@ -1342,7 +1342,7 @@ enum pds ctlr_write(H3270 *hSession, unsigned char buf[], int buflen, Boolean er * Otherwise, advance to the first position of the * next unprotected field. */ - baddr = next_unprotected(hSession,hSession->buffer_addr); + baddr = lib3270_get_next_unprotected(hSession,hSession->buffer_addr); if (baddr < hSession->buffer_addr) baddr = 0; /* diff --git a/ctlrc.h b/ctlrc.h index eddd59c..a687792 100644 --- a/ctlrc.h +++ b/ctlrc.h @@ -62,7 +62,7 @@ LIB3270_INTERNAL void ctlr_write_sscp_lu(H3270 *session, unsigned char buf[], in LIB3270_INTERNAL void mdt_clear(H3270 *hSession, int baddr); LIB3270_INTERNAL void mdt_set(H3270 *hSession, int baddr); -#define next_unprotected(session, baddr0) lib3270_get_next_unprotected(session, baddr0) +// #define next_unprotected(session, baddr0) lib3270_get_next_unprotected(session, baddr0) LIB3270_INTERNAL enum pds process_ds(H3270 *hSession, unsigned char *buf, int buflen); LIB3270_INTERNAL void ps_process(H3270 *hSession); diff --git a/kybd.c b/kybd.c index 9697349..c5cf6dd 100644 --- a/kybd.c +++ b/kybd.c @@ -960,7 +960,7 @@ static Boolean key_Character(H3270 *hSession, int code, Boolean with_ge, Boolean if (skipped != NULL) *skipped = True; if (FA_IS_SKIP(hSession->ea_buf[baddr].fa)) - baddr = next_unprotected(hSession,baddr); + baddr = lib3270_get_next_unprotected(hSession,baddr); else INC_BA(baddr); } @@ -1041,7 +1041,7 @@ LIB3270_ACTION( nextfield ) return 0; } #endif /*]*/ - cursor_move(hSession,next_unprotected(hSession,hSession->cursor_addr)); + cursor_move(hSession,lib3270_get_next_unprotected(hSession,hSession->cursor_addr)); return 0; } @@ -1216,7 +1216,7 @@ LIB3270_ACTION( firstfield ) cursor_move(hSession,0); return 0; } - cursor_move(hSession,next_unprotected(hSession,hSession->rows*hSession->cols-1)); + cursor_move(hSession,lib3270_get_next_unprotected(hSession,hSession->rows*hSession->cols-1)); return 0; } @@ -1856,7 +1856,7 @@ LIB3270_CURSOR_ACTION( newline ) if (faddr != baddr && !FA_IS_PROTECTED(fa)) cursor_move(hSession,baddr); else - cursor_move(hSession,next_unprotected(hSession,baddr)); + cursor_move(hSession,lib3270_get_next_unprotected(hSession,baddr)); return 0; } @@ -1879,7 +1879,7 @@ LIB3270_ACTION( dup ) if (key_Character(hSession, EBC_dup, False, False, NULL)) { hSession->cbk.display(hSession); - cursor_move(hSession,next_unprotected(hSession,hSession->cursor_addr)); + cursor_move(hSession,lib3270_get_next_unprotected(hSession,hSession->cursor_addr)); } return 0; @@ -2466,7 +2466,7 @@ static Boolean remargin(H3270 *hSession, int lmargin) if (faddr == baddr || FA_IS_PROTECTED(fa)) { - baddr = next_unprotected(hSession,baddr); + baddr = lib3270_get_next_unprotected(hSession,baddr); if (baddr <= b0) return False; } @@ -2941,7 +2941,7 @@ int kybd_prime(H3270 *hSession) * The cursor is not in an unprotected field. Find the * next one. */ - baddr = next_unprotected(hSession,hSession->cursor_addr); + baddr = lib3270_get_next_unprotected(hSession,hSession->cursor_addr); /* If there isn't any, give up. */ if (!baddr) diff --git a/paste.c b/paste.c index 32fe51f..a5c035e 100644 --- a/paste.c +++ b/paste.c @@ -121,7 +121,7 @@ fa = hSession->ea_buf[faddr].fa; if (faddr == baddr || FA_IS_PROTECTED(fa)) { - baddr = next_unprotected(hSession,baddr); + baddr = lib3270_get_next_unprotected(hSession,baddr); if (baddr <= b0) return 0; } @@ -195,7 +195,7 @@ static int set_string(H3270 *hSession, const unsigned char *str) if (faddr != baddr && !FA_IS_PROTECTED(fa)) cursor_move(hSession,baddr); else - cursor_move(hSession,next_unprotected(hSession,baddr)); + cursor_move(hSession,lib3270_get_next_unprotected(hSession,baddr)); data.row = BA_TO_ROW(hSession->cursor_addr); } last = ' '; -- libgit2 0.21.2