Commit 135681d7ccee15fcdebe901a5c8358f5d5c8f3f4

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

Implementando options na caixa de diálogo de host

Showing 4 changed files with 18 additions and 4 deletions   Show diff stats
@@ -299,7 +299,8 @@ @@ -299,7 +299,8 @@
299 299
300 #define CHAR_ATTR_UNCONVERTED LIB3270_ATTR_CG 300 #define CHAR_ATTR_UNCONVERTED LIB3270_ATTR_CG
301 301
302 - struct lib3270_option 302 +/*
  303 + struct _lib3270_option
303 { 304 {
304 const char *name; 305 const char *name;
305 enum 306 enum
@@ -320,7 +321,8 @@ @@ -320,7 +321,8 @@
320 321
321 #define new_3270_session(m) lib3270_session_new(m) 322 #define new_3270_session(m) lib3270_session_new(m)
322 323
323 - LOCAL_EXTERN const struct lib3270_option * get_3270_option_table(int sz); 324 + LOCAL_EXTERN const struct _lib3270_option * get_3270_option_table(int sz);
  325 +*/
324 326
325 327
326 /* Set/Get screen contents */ 328 /* Set/Get screen contents */
@@ -607,7 +607,7 @@ static int do_connect(H3270 *hSession, const char *n) @@ -607,7 +607,7 @@ static int do_connect(H3270 *hSession, const char *n)
607 */ 607 */
608 int lib3270_connect(H3270 *hSession, const char *n, int wait) 608 int lib3270_connect(H3270 *hSession, const char *n, int wait)
609 { 609 {
610 - int rc; 610 + int rc;
611 611
612 CHECK_SESSION_HANDLE(hSession); 612 CHECK_SESSION_HANDLE(hSession);
613 613
@@ -453,3 +453,15 @@ LIB3270_EXPORT void * lib3270_get_widget(H3270 *h) @@ -453,3 +453,15 @@ LIB3270_EXPORT void * lib3270_get_widget(H3270 *h)
453 CHECK_SESSION_HANDLE(h); 453 CHECK_SESSION_HANDLE(h);
454 return h->widget; 454 return h->widget;
455 } 455 }
  456 +
  457 +LIB3270_EXPORT LIB3270_OPTION lib3270_get_options(H3270 *hSession)
  458 +{
  459 + CHECK_SESSION_HANDLE(hSession);
  460 + return hSession->options;
  461 +}
  462 +
  463 +LIB3270_EXPORT void lib3270_set_options(H3270 *hSession, LIB3270_OPTION opt)
  464 +{
  465 + CHECK_SESSION_HANDLE(hSession);
  466 + hSession->options = opt;
  467 +}
@@ -820,7 +820,7 @@ static void do_qr_color(H3270 *hSession) @@ -820,7 +820,7 @@ static void do_qr_color(H3270 *hSession)
820 820
821 trace_ds(hSession,"> QueryReply(Color)\n"); 821 trace_ds(hSession,"> QueryReply(Color)\n");
822 822
823 - color_max = hSession->color8 ? 8: 16; /* report on 8 or 16 colors */ 823 + color_max = (hSession->options & LIB3270_OPTION_COLOR8) ? 8: 16; /* report on 8 or 16 colors */
824 824
825 space3270out(hSession,4 + 2*15); 825 space3270out(hSession,4 + 2*15);
826 *hSession->obptr++ = 0x00; /* no options */ 826 *hSession->obptr++ = 0x00; /* no options */