Commit 2c71955cbe3e9a156fa5e759e471659ddf4aebaa

Authored by Perry Werneck
1 parent 2452fff8

Padronizando detecção do próximo campo desprotegido

src/java/terminal.java
... ... @@ -346,7 +346,7 @@ public class terminal
346 346 }
347 347  
348 348 /**
349   - * Get next field address.
  349 + * Get next field address from informed position.
350 350 *
351 351 * @param baddr Field address.
352 352 *
... ...
src/lib3270/ctlr.c
... ... @@ -1342,7 +1342,7 @@ enum pds ctlr_write(H3270 *hSession, unsigned char buf[], int buflen, Boolean er
1342 1342 * Otherwise, advance to the first position of the
1343 1343 * next unprotected field.
1344 1344 */
1345   - baddr = next_unprotected(hSession,hSession->buffer_addr);
  1345 + baddr = lib3270_get_next_unprotected(hSession,hSession->buffer_addr);
1346 1346 if (baddr < hSession->buffer_addr)
1347 1347 baddr = 0;
1348 1348 /*
... ...
src/lib3270/ctlrc.h
... ... @@ -62,7 +62,7 @@ LIB3270_INTERNAL void ctlr_write_sscp_lu(H3270 *session, unsigned char buf[], in
62 62 LIB3270_INTERNAL void mdt_clear(H3270 *hSession, int baddr);
63 63 LIB3270_INTERNAL void mdt_set(H3270 *hSession, int baddr);
64 64  
65   -#define next_unprotected(session, baddr0) lib3270_get_next_unprotected(session, baddr0)
  65 +// #define next_unprotected(session, baddr0) lib3270_get_next_unprotected(session, baddr0)
66 66  
67 67 LIB3270_INTERNAL enum pds process_ds(H3270 *hSession, unsigned char *buf, int buflen);
68 68 LIB3270_INTERNAL void ps_process(H3270 *hSession);
... ...
src/lib3270/kybd.c
... ... @@ -960,7 +960,7 @@ static Boolean key_Character(H3270 *hSession, int code, Boolean with_ge, Boolean
960 960 if (skipped != NULL)
961 961 *skipped = True;
962 962 if (FA_IS_SKIP(hSession->ea_buf[baddr].fa))
963   - baddr = next_unprotected(hSession,baddr);
  963 + baddr = lib3270_get_next_unprotected(hSession,baddr);
964 964 else
965 965 INC_BA(baddr);
966 966 }
... ... @@ -1041,7 +1041,7 @@ LIB3270_ACTION( nextfield )
1041 1041 return 0;
1042 1042 }
1043 1043 #endif /*]*/
1044   - cursor_move(hSession,next_unprotected(hSession,hSession->cursor_addr));
  1044 + cursor_move(hSession,lib3270_get_next_unprotected(hSession,hSession->cursor_addr));
1045 1045 return 0;
1046 1046 }
1047 1047  
... ... @@ -1216,7 +1216,7 @@ LIB3270_ACTION( firstfield )
1216 1216 cursor_move(hSession,0);
1217 1217 return 0;
1218 1218 }
1219   - cursor_move(hSession,next_unprotected(hSession,hSession->rows*hSession->cols-1));
  1219 + cursor_move(hSession,lib3270_get_next_unprotected(hSession,hSession->rows*hSession->cols-1));
1220 1220  
1221 1221 return 0;
1222 1222 }
... ... @@ -1856,7 +1856,7 @@ LIB3270_CURSOR_ACTION( newline )
1856 1856 if (faddr != baddr && !FA_IS_PROTECTED(fa))
1857 1857 cursor_move(hSession,baddr);
1858 1858 else
1859   - cursor_move(hSession,next_unprotected(hSession,baddr));
  1859 + cursor_move(hSession,lib3270_get_next_unprotected(hSession,baddr));
1860 1860  
1861 1861 return 0;
1862 1862 }
... ... @@ -1879,7 +1879,7 @@ LIB3270_ACTION( dup )
1879 1879 if (key_Character(hSession, EBC_dup, False, False, NULL))
1880 1880 {
1881 1881 hSession->cbk.display(hSession);
1882   - cursor_move(hSession,next_unprotected(hSession,hSession->cursor_addr));
  1882 + cursor_move(hSession,lib3270_get_next_unprotected(hSession,hSession->cursor_addr));
1883 1883 }
1884 1884  
1885 1885 return 0;
... ... @@ -2466,7 +2466,7 @@ static Boolean remargin(H3270 *hSession, int lmargin)
2466 2466  
2467 2467 if (faddr == baddr || FA_IS_PROTECTED(fa))
2468 2468 {
2469   - baddr = next_unprotected(hSession,baddr);
  2469 + baddr = lib3270_get_next_unprotected(hSession,baddr);
2470 2470 if (baddr <= b0)
2471 2471 return False;
2472 2472 }
... ... @@ -2941,7 +2941,7 @@ int kybd_prime(H3270 *hSession)
2941 2941 * The cursor is not in an unprotected field. Find the
2942 2942 * next one.
2943 2943 */
2944   - baddr = next_unprotected(hSession,hSession->cursor_addr);
  2944 + baddr = lib3270_get_next_unprotected(hSession,hSession->cursor_addr);
2945 2945  
2946 2946 /* If there isn't any, give up. */
2947 2947 if (!baddr)
... ...
src/lib3270/paste.c
... ... @@ -121,7 +121,7 @@
121 121 fa = hSession->ea_buf[faddr].fa;
122 122 if (faddr == baddr || FA_IS_PROTECTED(fa))
123 123 {
124   - baddr = next_unprotected(hSession,baddr);
  124 + baddr = lib3270_get_next_unprotected(hSession,baddr);
125 125 if (baddr <= b0)
126 126 return 0;
127 127 }
... ... @@ -195,7 +195,7 @@ static int set_string(H3270 *hSession, const unsigned char *str)
195 195 if (faddr != baddr && !FA_IS_PROTECTED(fa))
196 196 cursor_move(hSession,baddr);
197 197 else
198   - cursor_move(hSession,next_unprotected(hSession,baddr));
  198 + cursor_move(hSession,lib3270_get_next_unprotected(hSession,baddr));
199 199 data.row = BA_TO_ROW(hSession->cursor_addr);
200 200 }
201 201 last = ' ';
... ...