diff --git a/src/include/lib3270.h b/src/include/lib3270.h index 4114cdc..39821e9 100644 --- a/src/include/lib3270.h +++ b/src/include/lib3270.h @@ -299,13 +299,31 @@ */ typedef enum lib3270_ssl_state { - LIB3270_SSL_UNSECURE, /**< No secure connection */ - LIB3270_SSL_SECURE, /**< Connection secure with CA check */ - LIB3270_SSL_NEGOTIATED, /**< Connection secure, no CA or self-signed */ - LIB3270_SSL_NEGOTIATING, /**< Negotiating SSL */ - LIB3270_SSL_UNDEFINED /**< Undefined */ + LIB3270_SSL_UNSECURE, /**< @brief No secure connection */ + LIB3270_SSL_SECURE, /**< @brief Connection secure with CA check */ + LIB3270_SSL_NEGOTIATED, /**< @brief Connection secure, no CA or self-signed */ + LIB3270_SSL_NEGOTIATING, /**< @brief Negotiating SSL */ + LIB3270_SSL_UNDEFINED /**< @brief Undefined */ } LIB3270_SSL_STATE; + + /** + * @brief Field information. + * + */ + typedef struct _lib3270_field { + + unsigned short baddr; /**< @brief Address of the field. */ + unsigned short length; /**< @brief Field length */ + unsigned char attribute; /**< @brief Field attribute */ + + struct { + unsigned char foreground; /**< @brief foreground color (0x00 or 0xf) */ + unsigned char bacground; /**< @brief background color (0x00 or 0xf) */ + } color; + + } LIB3270_FIELD; + #define LIB3270_SSL_FAILED LIB3270_SSL_UNSECURE #ifdef __cplusplus diff --git a/src/lib3270/ctlr.c b/src/lib3270/ctlr.c index 7cd3bf2..db5fe10 100644 --- a/src/lib3270/ctlr.c +++ b/src/lib3270/ctlr.c @@ -487,10 +487,13 @@ LIB3270_EXPORT int lib3270_field_addr(H3270 *hSession, int baddr) { int sbaddr; - CHECK_SESSION_HANDLE(hSession); + FAIL_IF_NOT_ONLINE(hSession); - if (!hSession->formatted) + if(!hSession->formatted) + { + errno = ENOTCONN; return -1; + } sbaddr = baddr; do diff --git a/win/mingw64-lib3270.spec b/win/mingw64-lib3270.spec index a9e6fc6..28bf202 100644 --- a/win/mingw64-lib3270.spec +++ b/win/mingw64-lib3270.spec @@ -137,4 +137,3 @@ rm -rf %{buildroot} %{_mingw64_libdir}/*.a %changelog - -- libgit2 0.21.2