Commit 19f35b42f089e9c7ce897d83dbfc4604a7683d40
1 parent
13276726
Exists in
master
and in
3 other branches
+ Updating win64 builds.
+ Adding structure for field information.
Showing
3 changed files
with
28 additions
and
8 deletions
Show diff stats
src/include/lib3270.h
... | ... | @@ -299,13 +299,31 @@ |
299 | 299 | */ |
300 | 300 | typedef enum lib3270_ssl_state |
301 | 301 | { |
302 | - LIB3270_SSL_UNSECURE, /**< No secure connection */ | |
303 | - LIB3270_SSL_SECURE, /**< Connection secure with CA check */ | |
304 | - LIB3270_SSL_NEGOTIATED, /**< Connection secure, no CA or self-signed */ | |
305 | - LIB3270_SSL_NEGOTIATING, /**< Negotiating SSL */ | |
306 | - LIB3270_SSL_UNDEFINED /**< Undefined */ | |
302 | + LIB3270_SSL_UNSECURE, /**< @brief No secure connection */ | |
303 | + LIB3270_SSL_SECURE, /**< @brief Connection secure with CA check */ | |
304 | + LIB3270_SSL_NEGOTIATED, /**< @brief Connection secure, no CA or self-signed */ | |
305 | + LIB3270_SSL_NEGOTIATING, /**< @brief Negotiating SSL */ | |
306 | + LIB3270_SSL_UNDEFINED /**< @brief Undefined */ | |
307 | 307 | } LIB3270_SSL_STATE; |
308 | 308 | |
309 | + | |
310 | + /** | |
311 | + * @brief Field information. | |
312 | + * | |
313 | + */ | |
314 | + typedef struct _lib3270_field { | |
315 | + | |
316 | + unsigned short baddr; /**< @brief Address of the field. */ | |
317 | + unsigned short length; /**< @brief Field length */ | |
318 | + unsigned char attribute; /**< @brief Field attribute */ | |
319 | + | |
320 | + struct { | |
321 | + unsigned char foreground; /**< @brief foreground color (0x00 or 0xf) */ | |
322 | + unsigned char bacground; /**< @brief background color (0x00 or 0xf) */ | |
323 | + } color; | |
324 | + | |
325 | + } LIB3270_FIELD; | |
326 | + | |
309 | 327 | #define LIB3270_SSL_FAILED LIB3270_SSL_UNSECURE |
310 | 328 | |
311 | 329 | #ifdef __cplusplus | ... | ... |
src/lib3270/ctlr.c
... | ... | @@ -487,10 +487,13 @@ LIB3270_EXPORT int lib3270_field_addr(H3270 *hSession, int baddr) |
487 | 487 | { |
488 | 488 | int sbaddr; |
489 | 489 | |
490 | - CHECK_SESSION_HANDLE(hSession); | |
490 | + FAIL_IF_NOT_ONLINE(hSession); | |
491 | 491 | |
492 | - if (!hSession->formatted) | |
492 | + if(!hSession->formatted) | |
493 | + { | |
494 | + errno = ENOTCONN; | |
493 | 495 | return -1; |
496 | + } | |
494 | 497 | |
495 | 498 | sbaddr = baddr; |
496 | 499 | do | ... | ... |
win/mingw64-lib3270.spec