Commit 3b66e2056c52ddecf72e719a25b1ec995333667c

Authored by perry.werneck@gmail.com
1 parent 3a9a036b

Implementando funções na extensão LibreOffice

Showing 4 changed files with 10 additions and 3 deletions   Show diff stats
@@ -119,7 +119,7 @@ @@ -119,7 +119,7 @@
119 119
120 /** connection state */ 120 /** connection state */
121 #define cstate LIB3270_CSTATE 121 #define cstate LIB3270_CSTATE
122 - #define NOT_CONNECTED LIB3270_NOT_CONNECTED 122 +// #define NOT_CONNECTED LIB3270_NOT_CONNECTED
123 #define RESOLVING LIB3270_RESOLVING 123 #define RESOLVING LIB3270_RESOLVING
124 #define PENDING LIB3270_PENDING 124 #define PENDING LIB3270_PENDING
125 #define CONNECTED_INITIAL LIB3270_CONNECTED_INITIAL 125 #define CONNECTED_INITIAL LIB3270_CONNECTED_INITIAL
@@ -556,7 +556,7 @@ void lib3270_set_disconnected(H3270 *hSession) @@ -556,7 +556,7 @@ void lib3270_set_disconnected(H3270 *hSession)
556 { 556 {
557 CHECK_SESSION_HANDLE(hSession); 557 CHECK_SESSION_HANDLE(hSession);
558 558
559 - hSession->cstate = NOT_CONNECTED; 559 + hSession->cstate = LIB3270_NOT_CONNECTED;
560 hSession->starting = 0; 560 hSession->starting = 0;
561 561
562 set_status(hSession,OIA_FLAG_UNDERA,False); 562 set_status(hSession,OIA_FLAG_UNDERA,False);
@@ -55,6 +55,13 @@ LIB3270_EXPORT int lib3270_connected(H3270 *h) @@ -55,6 +55,13 @@ LIB3270_EXPORT int lib3270_connected(H3270 *h)
55 return ((int) h->cstate >= (int)CONNECTED_INITIAL); 55 return ((int) h->cstate >= (int)CONNECTED_INITIAL);
56 } 56 }
57 57
  58 +LIB3270_EXPORT int lib3270_disconnected(H3270 *h)
  59 +{
  60 + CHECK_SESSION_HANDLE(h);
  61 + return ((int) h->cstate == (int)LIB3270_NOT_CONNECTED);
  62 +}
  63 +
  64 +
58 LIB3270_EXPORT int lib3270_in_neither(H3270 *h) 65 LIB3270_EXPORT int lib3270_in_neither(H3270 *h)
59 { 66 {
60 CHECK_SESSION_HANDLE(h); 67 CHECK_SESSION_HANDLE(h);
@@ -2430,7 +2430,7 @@ static void do_lnext(H3270 *hSession, char c) @@ -2430,7 +2430,7 @@ static void do_lnext(H3270 *hSession, char c)
2430 */ 2430 */
2431 static void check_in3270(H3270 *hSession) 2431 static void check_in3270(H3270 *hSession)
2432 { 2432 {
2433 - LIB3270_CSTATE new_cstate = NOT_CONNECTED; 2433 + LIB3270_CSTATE new_cstate = LIB3270_NOT_CONNECTED;
2434 2434
2435 #if defined(X3270_TRACE) /*[*/ 2435 #if defined(X3270_TRACE) /*[*/
2436 static const char *state_name[] = 2436 static const char *state_name[] =