Commit 5caddf2dc59bbed4ec401b36d6266ff93f6ddc25

Authored by perry.werneck@gmail.com
1 parent a90902b0

Pequenos ajustes na estrutura de sessao

Showing 1 changed file with 12 additions and 12 deletions   Show diff stats
@@ -134,18 +134,18 @@ void ctlr_reinit(H3270 *session, unsigned cmask) @@ -134,18 +134,18 @@ void ctlr_reinit(H3270 *session, unsigned cmask)
134 if (cmask & MODEL_CHANGE) 134 if (cmask & MODEL_CHANGE)
135 { 135 {
136 /* Allocate buffers */ 136 /* Allocate buffers */
137 - struct ea *tmp; 137 + struct lib3270_ea *tmp;
138 size_t sz = (session->maxROWS * session->maxCOLS); 138 size_t sz = (session->maxROWS * session->maxCOLS);
139 139
140 - session->buffer[0] = tmp = lib3270_calloc(sizeof(struct ea), sz+1, session->buffer[0]); 140 + session->buffer[0] = tmp = lib3270_calloc(sizeof(struct lib3270_ea), sz+1, session->buffer[0]);
141 session->ea_buf = tmp + 1; 141 session->ea_buf = tmp + 1;
142 142
143 - session->buffer[1] = tmp = lib3270_calloc(sizeof(struct ea),sz+1,session->buffer[1]); 143 + session->buffer[1] = tmp = lib3270_calloc(sizeof(struct lib3270_ea),sz+1,session->buffer[1]);
144 session->aea_buf = tmp + 1; 144 session->aea_buf = tmp + 1;
145 145
146 session->text = lib3270_calloc(sizeof(struct lib3270_text),sz,session->text); 146 session->text = lib3270_calloc(sizeof(struct lib3270_text),sz,session->text);
147 147
148 - Replace(session->zero_buf, (unsigned char *)Calloc(sizeof(struct ea),sz)); 148 + Replace(session->zero_buf, (unsigned char *)Calloc(sizeof(struct lib3270_ea),sz));
149 149
150 session->cursor_addr = 0; 150 session->cursor_addr = 0;
151 session->buffer_addr = 0; 151 session->buffer_addr = 0;
@@ -2270,7 +2270,7 @@ ctlr_clear(H3270 *session, Boolean can_snap) @@ -2270,7 +2270,7 @@ ctlr_clear(H3270 *session, Boolean can_snap)
2270 #endif /*]*/ 2270 #endif /*]*/
2271 2271
2272 /* Clear the screen. */ 2272 /* Clear the screen. */
2273 - (void) memset((char *)session->ea_buf, 0, session->rows*session->cols*sizeof(struct ea)); 2273 + (void) memset((char *)session->ea_buf, 0, session->rows*session->cols*sizeof(struct lib3270_ea));
2274 cursor_move(session,0); 2274 cursor_move(session,0);
2275 session->buffer_addr = 0; 2275 session->buffer_addr = 0;
2276 lib3270_unselect(session); 2276 lib3270_unselect(session);
@@ -2469,9 +2469,9 @@ ctlr_bcopy(int baddr_from, int baddr_to, int count, int move_ea) @@ -2469,9 +2469,9 @@ ctlr_bcopy(int baddr_from, int baddr_to, int count, int move_ea)
2469 /* Move the characters. */ 2469 /* Move the characters. */
2470 if (memcmp((char *) &h3270.ea_buf[baddr_from], 2470 if (memcmp((char *) &h3270.ea_buf[baddr_from],
2471 (char *) &h3270.ea_buf[baddr_to], 2471 (char *) &h3270.ea_buf[baddr_to],
2472 - count * sizeof(struct ea))) { 2472 + count * sizeof(struct lib3270_ea))) {
2473 (void) memmove(&h3270.ea_buf[baddr_to], &h3270.ea_buf[baddr_from], 2473 (void) memmove(&h3270.ea_buf[baddr_to], &h3270.ea_buf[baddr_from],
2474 - count * sizeof(struct ea)); 2474 + count * sizeof(struct lib3270_ea));
2475 REGION_CHANGED(&h3270,baddr_to, baddr_to + count); 2475 REGION_CHANGED(&h3270,baddr_to, baddr_to + count);
2476 } 2476 }
2477 /* XXX: What about move_ea? */ 2477 /* XXX: What about move_ea? */
@@ -2485,9 +2485,9 @@ ctlr_bcopy(int baddr_from, int baddr_to, int count, int move_ea) @@ -2485,9 +2485,9 @@ ctlr_bcopy(int baddr_from, int baddr_to, int count, int move_ea)
2485 void ctlr_aclear(H3270 *session, int baddr, int count, int clear_ea) 2485 void ctlr_aclear(H3270 *session, int baddr, int count, int clear_ea)
2486 { 2486 {
2487 if (memcmp((char *) &session->ea_buf[baddr], (char *) session->zero_buf, 2487 if (memcmp((char *) &session->ea_buf[baddr], (char *) session->zero_buf,
2488 - count * sizeof(struct ea))) { 2488 + count * sizeof(struct lib3270_ea))) {
2489 (void) memset((char *) &session->ea_buf[baddr], 0, 2489 (void) memset((char *) &session->ea_buf[baddr], 0,
2490 - count * sizeof(struct ea)); 2490 + count * sizeof(struct lib3270_ea));
2491 REGION_CHANGED(session,baddr, baddr + count); 2491 REGION_CHANGED(session,baddr, baddr + count);
2492 } 2492 }
2493 /* XXX: What about clear_ea? */ 2493 /* XXX: What about clear_ea? */
@@ -2509,10 +2509,10 @@ void ctlr_scroll(H3270 *hSession) @@ -2509,10 +2509,10 @@ void ctlr_scroll(H3270 *hSession)
2509 /* Synchronize pending changes prior to this. */ 2509 /* Synchronize pending changes prior to this. */
2510 2510
2511 /* Move ea_buf. */ 2511 /* Move ea_buf. */
2512 - (void) memmove(&hSession->ea_buf[0], &hSession->ea_buf[h3270.cols],qty * sizeof(struct ea)); 2512 + (void) memmove(&hSession->ea_buf[0], &hSession->ea_buf[h3270.cols],qty * sizeof(struct lib3270_ea));
2513 2513
2514 /* Clear the last line. */ 2514 /* Clear the last line. */
2515 - (void) memset((char *) &hSession->ea_buf[qty], 0, hSession->cols * sizeof(struct ea)); 2515 + (void) memset((char *) &hSession->ea_buf[qty], 0, hSession->cols * sizeof(struct lib3270_ea));
2516 2516
2517 hSession->display(hSession); 2517 hSession->display(hSession);
2518 2518
@@ -2549,7 +2549,7 @@ void ctlr_altbuffer(H3270 *session, int alt) @@ -2549,7 +2549,7 @@ void ctlr_altbuffer(H3270 *session, int alt)
2549 2549
2550 if (alt != session->is_altbuffer) 2550 if (alt != session->is_altbuffer)
2551 { 2551 {
2552 - struct ea *etmp; 2552 + struct lib3270_ea *etmp;
2553 2553
2554 etmp = session->ea_buf; 2554 etmp = session->ea_buf;
2555 session->ea_buf = session->aea_buf; 2555 session->ea_buf = session->aea_buf;