diff --git a/options.c b/options.c index 8aca9f0..588b62e 100644 --- a/options.c +++ b/options.c @@ -77,6 +77,16 @@ LIB3270_EXPORT void lib3270_set_options(H3270 *hSession, LIB3270_OPTION opt) hSession->options = opt; } +LIB3270_EXPORT unsigned short lib3270_get_color_type(H3270 *hSession) +{ + CHECK_SESSION_HANDLE(hSession); + + trace("******************* %d",hSession->colors); + + return hSession->mono ? 2 : hSession->colors; +} + + LIB3270_EXPORT int lib3270_set_color_type(H3270 *hSession, unsigned short colortype) { CHECK_SESSION_HANDLE(hSession); diff --git a/session.c b/session.c index ec16fdd..7ddde39 100644 --- a/session.c +++ b/session.c @@ -303,6 +303,9 @@ static void lib3270_session_init(H3270 *hSession, const char *model, const char hSession->saved_wraparound_mode = 1; hSession->once_cset = -1; hSession->state = LIB3270_ANSI_STATE_DATA; + hSession->options = LIB3270_OPTION_DEFAULTS; + hSession->colors = 16; + hSession->m3279 = 1; for(f=0;f<4;f++) hSession->csd[f] = hSession->saved_csd[f] = LIB3270_ANSI_CSD_US; -- libgit2 0.21.2