Commit e93dc0f12ed5a248078b7c9170478c1430ef53da
1 parent
0990cbdb
Exists in
master
and in
5 other branches
Movendo mais campos para a estrutura de controle de sessão
Showing
5 changed files
with
16 additions
and
11 deletions
Show diff stats
src/include/lib3270/session.h
src/lib3270/appres.h
| ... | ... | @@ -51,7 +51,7 @@ typedef struct { |
| 51 | 51 | |
| 52 | 52 | /* Options (not toggles) */ |
| 53 | 53 | char mono; |
| 54 | - char extended; | |
| 54 | +// char extended; | |
| 55 | 55 | // char m3279; |
| 56 | 56 | // char modified_sel; |
| 57 | 57 | // char once; |
| ... | ... | @@ -167,7 +167,7 @@ typedef struct { |
| 167 | 167 | */ |
| 168 | 168 | |
| 169 | 169 | #endif /*]*/ |
| 170 | - char *oversize; | |
| 170 | +// char *oversize; | |
| 171 | 171 | #if defined(X3270_FT) /*[*/ |
| 172 | 172 | char *ft_command; |
| 173 | 173 | int dft_buffer_size; | ... | ... |
src/lib3270/glue.c
| ... | ... | @@ -136,7 +136,7 @@ static void initialize(void) |
| 136 | 136 | |
| 137 | 137 | /* Set the defaults. */ |
| 138 | 138 | appres.mono = False; |
| 139 | - appres.extended = True; | |
| 139 | +// appres.extended = True; | |
| 140 | 140 | |
| 141 | 141 | #if defined(C3270) /*[*/ |
| 142 | 142 | h3270.m3279 = True; |
| ... | ... | @@ -200,7 +200,7 @@ static void initialize(void) |
| 200 | 200 | |
| 201 | 201 | #endif /*]*/ |
| 202 | 202 | |
| 203 | - appres.oversize = CN; | |
| 203 | +// appres.oversize = CN; | |
| 204 | 204 | |
| 205 | 205 | #if defined(C3270) /*[*/ |
| 206 | 206 | appres.meta_escape = "auto"; |
| ... | ... | @@ -324,7 +324,7 @@ static const struct lib3270_option options[] = |
| 324 | 324 | { OptMono, OPT_BOOLEAN, True, ResMono, offset(mono), N_( "Forces monochrome display" ) }, |
| 325 | 325 | #endif /*]*/ |
| 326 | 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 | 328 | { OptPort, OPT_STRING, False, ResPort, offset(port), N_( "The name of the default TCP port to connect" ) }, |
| 329 | 329 | #if defined(C3270) && !defined(LIB3270) /*[*/ |
| 330 | 330 | { OptPrinterLu,OPT_STRING, False, ResPrinterLu, offset(printer_lu), NULL }, |
| ... | ... | @@ -391,7 +391,7 @@ static struct { |
| 391 | 391 | { ResEof, offset(eof), XRM_STRING }, |
| 392 | 392 | { ResErase, offset(erase), XRM_STRING }, |
| 393 | 393 | #endif /*]*/ |
| 394 | - { ResExtended, offset(extended), XRM_BOOLEAN }, | |
| 394 | +// { ResExtended, offset(extended), XRM_BOOLEAN }, | |
| 395 | 395 | #if defined(X3270_FT) /*[*/ |
| 396 | 396 | { ResFtCommand, offset(ft_command), XRM_STRING }, |
| 397 | 397 | { ResDftBufferSize,offset(dft_buffer_size),XRM_INT }, |
| ... | ... | @@ -436,7 +436,7 @@ static struct { |
| 436 | 436 | #endif /*]*/ |
| 437 | 437 | { ResNumericLock, offset(numeric_lock), XRM_BOOLEAN }, |
| 438 | 438 | { ResOerrLock, offset(oerr_lock), XRM_BOOLEAN }, |
| 439 | - { ResOversize, offset(oversize), XRM_STRING }, | |
| 439 | +// { ResOversize, offset(oversize), XRM_STRING }, | |
| 440 | 440 | { ResPort, offset(port), XRM_STRING }, |
| 441 | 441 | #if defined(C3270) /*[*/ |
| 442 | 442 | { ResPrinterLu, offset(printer_lu), XRM_STRING }, | ... | ... |
src/lib3270/init.c
| ... | ... | @@ -133,6 +133,9 @@ static void lib3270_session_init(H3270 *hSession, const char *model) |
| 133 | 133 | memset(hSession,0,sizeof(H3270)); |
| 134 | 134 | hSession->sz = sizeof(H3270); |
| 135 | 135 | |
| 136 | + // Set the defaults. | |
| 137 | + hSession->extended = 1; | |
| 138 | + | |
| 136 | 139 | // Initialize toggles |
| 137 | 140 | initialize_toggles(hSession); |
| 138 | 141 | |
| ... | ... | @@ -188,8 +191,8 @@ static void lib3270_session_init(H3270 *hSession, const char *model) |
| 188 | 191 | else |
| 189 | 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 | 197 | #if defined(RESTRICT_3279) |
| 195 | 198 | if (hSession->m3279 && model_number == 4) |
| ... | ... | @@ -198,7 +201,7 @@ static void lib3270_session_init(H3270 *hSession, const char *model) |
| 198 | 201 | |
| 199 | 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 | 206 | ovc = 0; |
| 204 | 207 | ovr = 0; | ... | ... |
src/lib3270/screen.c
| ... | ... | @@ -260,7 +260,7 @@ void update_model_info(H3270 *session, int model, int cols, int rows) |
| 260 | 260 | session->model_num = model; |
| 261 | 261 | |
| 262 | 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 | 265 | session->update_model(session, session->model_name,session->model_num,rows,cols); |
| 266 | 266 | } | ... | ... |