Commit c03311d455f442d055afac02a26ae4e3d9de6834
1 parent
96256265
Exists in
master
and in
5 other branches
Acertando globais para multi-sessao
Showing
4 changed files
with
20 additions
and
21 deletions
Show diff stats
src/lib3270/charset.c
@@ -77,13 +77,13 @@ | @@ -77,13 +77,13 @@ | ||
77 | #define ES_SIZE (sizeof(EURO_SUFFIX) - 1) | 77 | #define ES_SIZE (sizeof(EURO_SUFFIX) - 1) |
78 | 78 | ||
79 | /* Globals. */ | 79 | /* Globals. */ |
80 | -Boolean charset_changed = False; | 80 | +// static Boolean charset_changed = False; |
81 | #define DEFAULT_CGEN 0x02b90000 | 81 | #define DEFAULT_CGEN 0x02b90000 |
82 | #define DEFAULT_CSET 0x00000025 | 82 | #define DEFAULT_CSET 0x00000025 |
83 | unsigned long cgcsgid = DEFAULT_CGEN | DEFAULT_CSET; | 83 | unsigned long cgcsgid = DEFAULT_CGEN | DEFAULT_CSET; |
84 | unsigned long cgcsgid_dbcs = 0L; | 84 | unsigned long cgcsgid_dbcs = 0L; |
85 | -char *default_display_charset = "3270cg-1a,3270cg-1,iso8859-1"; | ||
86 | -char *converter_names; | 85 | +const char *default_display_charset = "3270cg-1a,3270cg-1,iso8859-1"; |
86 | +// char *converter_names; | ||
87 | char *encoding; | 87 | char *encoding; |
88 | 88 | ||
89 | /* | 89 | /* |
src/lib3270/charsetc.h
@@ -24,14 +24,18 @@ | @@ -24,14 +24,18 @@ | ||
24 | * Global declarations for charset.c | 24 | * Global declarations for charset.c |
25 | */ | 25 | */ |
26 | 26 | ||
27 | -LIB3270_INTERNAL Boolean charset_changed; | 27 | +// LIB3270_INTERNAL Boolean charset_changed; |
28 | LIB3270_INTERNAL unsigned long cgcsgid; | 28 | LIB3270_INTERNAL unsigned long cgcsgid; |
29 | -#if defined(X3270_DBCS) /*[*/ | 29 | + |
30 | +/* | ||
31 | +#if defined(X3270_DBCS) | ||
30 | LIB3270_INTERNAL unsigned long cgcsgid_dbcs; | 32 | LIB3270_INTERNAL unsigned long cgcsgid_dbcs; |
31 | LIB3270_INTERNAL char *converter_names; | 33 | LIB3270_INTERNAL char *converter_names; |
32 | LIB3270_INTERNAL char *encoding; | 34 | LIB3270_INTERNAL char *encoding; |
33 | -#endif /*]*/ | ||
34 | -LIB3270_INTERNAL char *default_display_charset; | 35 | +#endif |
36 | +*/ | ||
37 | + | ||
38 | +// LIB3270_INTERNAL char *default_display_charset; | ||
35 | 39 | ||
36 | enum cs_result { CS_OKAY, CS_NOTFOUND, CS_BAD, CS_PREREQ, CS_ILLEGAL }; | 40 | enum cs_result { CS_OKAY, CS_NOTFOUND, CS_BAD, CS_PREREQ, CS_ILLEGAL }; |
37 | 41 |
src/lib3270/kybd.c
@@ -26,7 +26,6 @@ | @@ -26,7 +26,6 @@ | ||
26 | * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | 26 | * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) |
27 | * licinio@bb.com.br (Licínio Luis Branco) | 27 | * licinio@bb.com.br (Licínio Luis Branco) |
28 | * kraucer@bb.com.br (Kraucer Fernandes Mazuco) | 28 | * kraucer@bb.com.br (Kraucer Fernandes Mazuco) |
29 | - * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda) | ||
30 | * | 29 | * |
31 | */ | 30 | */ |
32 | 31 | ||
@@ -101,27 +100,25 @@ static const char *ia_name[] = | @@ -101,27 +100,25 @@ static const char *ia_name[] = | ||
101 | }; | 100 | }; |
102 | #endif // X3270_TRACE | 101 | #endif // X3270_TRACE |
103 | 102 | ||
104 | -static unsigned char pf_xlate[] = | 103 | +static const unsigned char pf_xlate[] = |
105 | { | 104 | { |
106 | AID_PF1, AID_PF2, AID_PF3, AID_PF4, AID_PF5, AID_PF6, | 105 | AID_PF1, AID_PF2, AID_PF3, AID_PF4, AID_PF5, AID_PF6, |
107 | AID_PF7, AID_PF8, AID_PF9, AID_PF10, AID_PF11, AID_PF12, | 106 | AID_PF7, AID_PF8, AID_PF9, AID_PF10, AID_PF11, AID_PF12, |
108 | AID_PF13, AID_PF14, AID_PF15, AID_PF16, AID_PF17, AID_PF18, | 107 | AID_PF13, AID_PF14, AID_PF15, AID_PF16, AID_PF17, AID_PF18, |
109 | AID_PF19, AID_PF20, AID_PF21, AID_PF22, AID_PF23, AID_PF24 | 108 | AID_PF19, AID_PF20, AID_PF21, AID_PF22, AID_PF23, AID_PF24 |
110 | }; | 109 | }; |
111 | -static unsigned char pa_xlate[] = | 110 | +static const unsigned char pa_xlate[] = |
112 | { | 111 | { |
113 | AID_PA1, AID_PA2, AID_PA3 | 112 | AID_PA1, AID_PA2, AID_PA3 |
114 | }; | 113 | }; |
115 | -#define PF_SZ (sizeof(pf_xlate)/sizeof(pf_xlate[0])) | ||
116 | -#define PA_SZ (sizeof(pa_xlate)/sizeof(pa_xlate[0])) | ||
117 | -// static void * unlock_id; | ||
118 | -// static time_t unlock_delay_time; | 114 | +#define PF_SZ (sizeof(pf_xlate)/sizeof(pf_xlate[0])) |
115 | +#define PA_SZ (sizeof(pa_xlate)/sizeof(pa_xlate[0])) | ||
119 | #define UNLOCK_MS 350 /* 0.35s after last unlock */ | 116 | #define UNLOCK_MS 350 /* 0.35s after last unlock */ |
120 | -static Boolean key_Character(H3270 *hSession, int code, Boolean with_ge, Boolean pasting,Boolean *skipped); | ||
121 | -static int flush_ta(H3270 *hSession); | ||
122 | -static void key_AID(H3270 *session, unsigned char aid_code); | ||
123 | -static void kybdlock_set(H3270 *session, unsigned int bits); | ||
124 | -// static KeySym MyStringToKeysym(char *s, enum keytype *keytypep); | 117 | + |
118 | +static Boolean key_Character(H3270 *hSession, int code, Boolean with_ge, Boolean pasting,Boolean *skipped); | ||
119 | +static int flush_ta(H3270 *hSession); | ||
120 | +static void key_AID(H3270 *session, unsigned char aid_code); | ||
121 | +static void kybdlock_set(H3270 *session, unsigned int bits); | ||
125 | 122 | ||
126 | /* | 123 | /* |
127 | #if defined(X3270_DBCS) | 124 | #if defined(X3270_DBCS) |
@@ -1112,7 +1109,6 @@ LIB3270_ACTION( previousfield ) | @@ -1112,7 +1109,6 @@ LIB3270_ACTION( previousfield ) | ||
1112 | return 0; | 1109 | return 0; |
1113 | } | 1110 | } |
1114 | 1111 | ||
1115 | - | ||
1116 | /* | 1112 | /* |
1117 | * Deferred keyboard unlock. | 1113 | * Deferred keyboard unlock. |
1118 | */ | 1114 | */ |
src/lib3270/session.c
@@ -26,7 +26,6 @@ | @@ -26,7 +26,6 @@ | ||
26 | * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | 26 | * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) |
27 | * licinio@bb.com.br (Licínio Luis Branco) | 27 | * licinio@bb.com.br (Licínio Luis Branco) |
28 | * kraucer@bb.com.br (Kraucer Fernandes Mazuco) | 28 | * kraucer@bb.com.br (Kraucer Fernandes Mazuco) |
29 | - * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda) | ||
30 | * | 29 | * |
31 | */ | 30 | */ |
32 | 31 |