Commit d7b1aa9b8e88b286ae6e3e5ceda1abf3d9d8344b

Authored by perry.werneck@gmail.com
1 parent 806591b1

Movendo mais campos para a estrutura de controle de sessão

Showing 4 changed files with 14 additions and 11 deletions   Show diff stats
@@ -51,7 +51,7 @@ typedef struct { @@ -51,7 +51,7 @@ typedef struct {
51 51
52 /* Options (not toggles) */ 52 /* Options (not toggles) */
53 char mono; 53 char mono;
54 - char extended; 54 +// char extended;
55 // char m3279; 55 // char m3279;
56 // char modified_sel; 56 // char modified_sel;
57 // char once; 57 // char once;
@@ -167,7 +167,7 @@ typedef struct { @@ -167,7 +167,7 @@ typedef struct {
167 */ 167 */
168 168
169 #endif /*]*/ 169 #endif /*]*/
170 - char *oversize; 170 +// char *oversize;
171 #if defined(X3270_FT) /*[*/ 171 #if defined(X3270_FT) /*[*/
172 char *ft_command; 172 char *ft_command;
173 int dft_buffer_size; 173 int dft_buffer_size;
@@ -136,7 +136,7 @@ static void initialize(void) @@ -136,7 +136,7 @@ static void initialize(void)
136 136
137 /* Set the defaults. */ 137 /* Set the defaults. */
138 appres.mono = False; 138 appres.mono = False;
139 - appres.extended = True; 139 +// appres.extended = True;
140 140
141 #if defined(C3270) /*[*/ 141 #if defined(C3270) /*[*/
142 h3270.m3279 = True; 142 h3270.m3279 = True;
@@ -200,7 +200,7 @@ static void initialize(void) @@ -200,7 +200,7 @@ static void initialize(void)
200 200
201 #endif /*]*/ 201 #endif /*]*/
202 202
203 - appres.oversize = CN; 203 +// appres.oversize = CN;
204 204
205 #if defined(C3270) /*[*/ 205 #if defined(C3270) /*[*/
206 appres.meta_escape = "auto"; 206 appres.meta_escape = "auto";
@@ -324,7 +324,7 @@ static const struct lib3270_option options[] = @@ -324,7 +324,7 @@ static const struct lib3270_option options[] =
324 { OptMono, OPT_BOOLEAN, True, ResMono, offset(mono), N_( "Forces monochrome display" ) }, 324 { OptMono, OPT_BOOLEAN, True, ResMono, offset(mono), N_( "Forces monochrome display" ) },
325 #endif /*]*/ 325 #endif /*]*/
326 // { OptOnce, OPT_BOOLEAN, True, ResOnce, offset(once), NULL }, 326 // { OptOnce, OPT_BOOLEAN, True, ResOnce, offset(once), NULL },
327 - { OptOversize, OPT_STRING, False, ResOversize, offset(oversize), N_( "Sets the screen dimensions to be larger than the default for the chosen model (COLSxROWS)." ) }, 327 +// { OptOversize, OPT_STRING, False, ResOversize, offset(oversize), N_( "Sets the screen dimensions to be larger than the default for the chosen model (COLSxROWS)." ) },
328 { OptPort, OPT_STRING, False, ResPort, offset(port), N_( "The name of the default TCP port to connect" ) }, 328 { OptPort, OPT_STRING, False, ResPort, offset(port), N_( "The name of the default TCP port to connect" ) },
329 #if defined(C3270) && !defined(LIB3270) /*[*/ 329 #if defined(C3270) && !defined(LIB3270) /*[*/
330 { OptPrinterLu,OPT_STRING, False, ResPrinterLu, offset(printer_lu), NULL }, 330 { OptPrinterLu,OPT_STRING, False, ResPrinterLu, offset(printer_lu), NULL },
@@ -391,7 +391,7 @@ static struct { @@ -391,7 +391,7 @@ static struct {
391 { ResEof, offset(eof), XRM_STRING }, 391 { ResEof, offset(eof), XRM_STRING },
392 { ResErase, offset(erase), XRM_STRING }, 392 { ResErase, offset(erase), XRM_STRING },
393 #endif /*]*/ 393 #endif /*]*/
394 - { ResExtended, offset(extended), XRM_BOOLEAN }, 394 +// { ResExtended, offset(extended), XRM_BOOLEAN },
395 #if defined(X3270_FT) /*[*/ 395 #if defined(X3270_FT) /*[*/
396 { ResFtCommand, offset(ft_command), XRM_STRING }, 396 { ResFtCommand, offset(ft_command), XRM_STRING },
397 { ResDftBufferSize,offset(dft_buffer_size),XRM_INT }, 397 { ResDftBufferSize,offset(dft_buffer_size),XRM_INT },
@@ -436,7 +436,7 @@ static struct { @@ -436,7 +436,7 @@ static struct {
436 #endif /*]*/ 436 #endif /*]*/
437 { ResNumericLock, offset(numeric_lock), XRM_BOOLEAN }, 437 { ResNumericLock, offset(numeric_lock), XRM_BOOLEAN },
438 { ResOerrLock, offset(oerr_lock), XRM_BOOLEAN }, 438 { ResOerrLock, offset(oerr_lock), XRM_BOOLEAN },
439 - { ResOversize, offset(oversize), XRM_STRING }, 439 +// { ResOversize, offset(oversize), XRM_STRING },
440 { ResPort, offset(port), XRM_STRING }, 440 { ResPort, offset(port), XRM_STRING },
441 #if defined(C3270) /*[*/ 441 #if defined(C3270) /*[*/
442 { ResPrinterLu, offset(printer_lu), XRM_STRING }, 442 { ResPrinterLu, offset(printer_lu), XRM_STRING },
@@ -133,6 +133,9 @@ static void lib3270_session_init(H3270 *hSession, const char *model) @@ -133,6 +133,9 @@ static void lib3270_session_init(H3270 *hSession, const char *model)
133 memset(hSession,0,sizeof(H3270)); 133 memset(hSession,0,sizeof(H3270));
134 hSession->sz = sizeof(H3270); 134 hSession->sz = sizeof(H3270);
135 135
  136 + // Set the defaults.
  137 + hSession->extended = 1;
  138 +
136 // Initialize toggles 139 // Initialize toggles
137 initialize_toggles(hSession); 140 initialize_toggles(hSession);
138 141
@@ -188,8 +191,8 @@ static void lib3270_session_init(H3270 *hSession, const char *model) @@ -188,8 +191,8 @@ static void lib3270_session_init(H3270 *hSession, const char *model)
188 else 191 else
189 hSession->m3279 = 1; 192 hSession->m3279 = 1;
190 193
191 - if(!appres.extended)  
192 - appres.oversize = CN; 194 + if(!hSession->extended)
  195 + hSession->oversize = CN;
193 196
194 #if defined(RESTRICT_3279) 197 #if defined(RESTRICT_3279)
195 if (hSession->m3279 && model_number == 4) 198 if (hSession->m3279 && model_number == 4)
@@ -198,7 +201,7 @@ static void lib3270_session_init(H3270 *hSession, const char *model) @@ -198,7 +201,7 @@ static void lib3270_session_init(H3270 *hSession, const char *model)
198 201
199 Trace("Model_number: %d",model_number); 202 Trace("Model_number: %d",model_number);
200 203
201 - if (!appres.extended || appres.oversize == CN || sscanf(appres.oversize, "%dx%d%c", &ovc, &ovr, &junk) != 2) 204 + if (!hSession->extended || hSession->oversize == CN || sscanf(hSession->oversize, "%dx%d%c", &ovc, &ovr, &junk) != 2)
202 { 205 {
203 ovc = 0; 206 ovc = 0;
204 ovr = 0; 207 ovr = 0;
@@ -260,7 +260,7 @@ void update_model_info(H3270 *session, int model, int cols, int rows) @@ -260,7 +260,7 @@ void update_model_info(H3270 *session, int model, int cols, int rows)
260 session->model_num = model; 260 session->model_num = model;
261 261
262 /* Update the model name. */ 262 /* Update the model name. */
263 - (void) sprintf(session->model_name, "327%c-%d%s",session->m3279 ? '9' : '8',session->model_num,appres.extended ? "-E" : ""); 263 + (void) sprintf(session->model_name, "327%c-%d%s",session->m3279 ? '9' : '8',session->model_num,session->extended ? "-E" : "");
264 264
265 session->update_model(session, session->model_name,session->model_num,rows,cols); 265 session->update_model(session, session->model_name,session->model_num,rows,cols);
266 } 266 }