Commit 69f72a0d232dd797bf9d273b6d34c09722b16d63
1 parent
0db200c1
Exists in
master
and in
2 other branches
Cleaning up unused code.
Showing
27 changed files
with
48 additions
and
661 deletions
Show diff stats
lib3270.cbp
@@ -255,7 +255,6 @@ | @@ -255,7 +255,6 @@ | ||
255 | </Unit> | 255 | </Unit> |
256 | <Unit filename="src/include/3270ds.h" /> | 256 | <Unit filename="src/include/3270ds.h" /> |
257 | <Unit filename="src/include/X11keysym.h" /> | 257 | <Unit filename="src/include/X11keysym.h" /> |
258 | - <Unit filename="src/include/action_table.h" /> | ||
259 | <Unit filename="src/include/ansic.h" /> | 258 | <Unit filename="src/include/ansic.h" /> |
260 | <Unit filename="src/include/arpa_telnet.h" /> | 259 | <Unit filename="src/include/arpa_telnet.h" /> |
261 | <Unit filename="src/include/array.h" /> | 260 | <Unit filename="src/include/array.h" /> |
@@ -271,7 +270,6 @@ | @@ -271,7 +270,6 @@ | ||
271 | <Unit filename="src/include/hostc.h" /> | 270 | <Unit filename="src/include/hostc.h" /> |
272 | <Unit filename="src/include/internals.h" /> | 271 | <Unit filename="src/include/internals.h" /> |
273 | <Unit filename="src/include/kybdc.h" /> | 272 | <Unit filename="src/include/kybdc.h" /> |
274 | - <Unit filename="src/include/lib3270++.h" /> | ||
275 | <Unit filename="src/include/lib3270.h" /> | 273 | <Unit filename="src/include/lib3270.h" /> |
276 | <Unit filename="src/include/lib3270/actions.h" /> | 274 | <Unit filename="src/include/lib3270/actions.h" /> |
277 | <Unit filename="src/include/lib3270/charset.h" /> | 275 | <Unit filename="src/include/lib3270/charset.h" /> |
src/core/ansi.c
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | #include "screenc.h" | 59 | #include "screenc.h" |
60 | #include "telnetc.h" | 60 | #include "telnetc.h" |
61 | #include "trace_dsc.h" | 61 | #include "trace_dsc.h" |
62 | -#include "utf8c.h" | 62 | +//#include "utf8c.h" |
63 | #if defined(X3270_DBCS) /*[*/ | 63 | #if defined(X3270_DBCS) /*[*/ |
64 | #include "widec.h" | 64 | #include "widec.h" |
65 | #endif /*]*/ | 65 | #endif /*]*/ |
src/core/charset/utf8.c
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | // #include "api.h" | 39 | // #include "api.h" |
40 | 40 | ||
41 | #include "popupsc.h" | 41 | #include "popupsc.h" |
42 | -#include "utf8c.h" | 42 | +//#include "utf8c.h" |
43 | 43 | ||
44 | // char *locale_codeset = CN; | 44 | // char *locale_codeset = CN; |
45 | 45 | ||
@@ -350,6 +350,7 @@ static char *utf8_tab[U_MAX][96] = { | @@ -350,6 +350,7 @@ static char *utf8_tab[U_MAX][96] = { | ||
350 | * character set. | 350 | * character set. |
351 | * Returns 0 if the lookup fails. | 351 | * Returns 0 if the lookup fails. |
352 | */ | 352 | */ |
353 | + /* | ||
353 | unsigned char utf8_lookup(char GNUC_UNUSED(*mbs), enum ulfail *fail, int GNUC_UNUSED(*consumed)) | 354 | unsigned char utf8_lookup(char GNUC_UNUSED(*mbs), enum ulfail *fail, int GNUC_UNUSED(*consumed)) |
354 | { | 355 | { |
355 | if (fail != NULL) | 356 | if (fail != NULL) |
@@ -357,3 +358,4 @@ unsigned char utf8_lookup(char GNUC_UNUSED(*mbs), enum ulfail *fail, int GNUC_UN | @@ -357,3 +358,4 @@ unsigned char utf8_lookup(char GNUC_UNUSED(*mbs), enum ulfail *fail, int GNUC_UN | ||
357 | 358 | ||
358 | return 0; | 359 | return 0; |
359 | } | 360 | } |
361 | +*/ |
src/core/ctlr.c
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | #include <stdlib.h> | 46 | #include <stdlib.h> |
47 | #include "3270ds.h" | 47 | #include "3270ds.h" |
48 | #include "screen.h" | 48 | #include "screen.h" |
49 | -#include "resources.h" | 49 | +//#include "resources.h" |
50 | 50 | ||
51 | #include "ctlrc.h" | 51 | #include "ctlrc.h" |
52 | #include "ftc.h" | 52 | #include "ftc.h" |
src/core/host.c
src/core/keyboard/actions.c
@@ -57,7 +57,7 @@ struct ta; | @@ -57,7 +57,7 @@ struct ta; | ||
57 | 57 | ||
58 | #include <fcntl.h> | 58 | #include <fcntl.h> |
59 | #include "3270ds.h" | 59 | #include "3270ds.h" |
60 | -#include "resources.h" | 60 | +//#include "resources.h" |
61 | 61 | ||
62 | #include "ansic.h" | 62 | #include "ansic.h" |
63 | #include "ctlrc.h" | 63 | #include "ctlrc.h" |
@@ -71,7 +71,7 @@ struct ta; | @@ -71,7 +71,7 @@ struct ta; | ||
71 | #include "telnetc.h" | 71 | #include "telnetc.h" |
72 | #include "togglesc.h" | 72 | #include "togglesc.h" |
73 | #include "trace_dsc.h" | 73 | #include "trace_dsc.h" |
74 | -#include "utf8c.h" | 74 | +//#include "utf8c.h" |
75 | #include "utilc.h" | 75 | #include "utilc.h" |
76 | #if defined(X3270_DBCS) /*[*/ | 76 | #if defined(X3270_DBCS) /*[*/ |
77 | #include "widec.h" | 77 | #include "widec.h" |
src/core/keyboard/kybd.c
@@ -58,7 +58,7 @@ struct ta; | @@ -58,7 +58,7 @@ struct ta; | ||
58 | 58 | ||
59 | #include <fcntl.h> | 59 | #include <fcntl.h> |
60 | #include "3270ds.h" | 60 | #include "3270ds.h" |
61 | -#include "resources.h" | 61 | +//#include "resources.h" |
62 | 62 | ||
63 | #include "ansic.h" | 63 | #include "ansic.h" |
64 | #include "ctlrc.h" | 64 | #include "ctlrc.h" |
@@ -72,7 +72,7 @@ struct ta; | @@ -72,7 +72,7 @@ struct ta; | ||
72 | #include "telnetc.h" | 72 | #include "telnetc.h" |
73 | #include "togglesc.h" | 73 | #include "togglesc.h" |
74 | #include "trace_dsc.h" | 74 | #include "trace_dsc.h" |
75 | -#include "utf8c.h" | 75 | +//#include "utf8c.h" |
76 | #include "utilc.h" | 76 | #include "utilc.h" |
77 | #if defined(X3270_DBCS) /*[*/ | 77 | #if defined(X3270_DBCS) /*[*/ |
78 | #include "widec.h" | 78 | #include "widec.h" |
@@ -110,11 +110,13 @@ static void kybdlock_set(H3270 *session, unsigned int bits); | @@ -110,11 +110,13 @@ static void kybdlock_set(H3270 *session, unsigned int bits); | ||
110 | 110 | ||
111 | /* Composite key mappings. */ | 111 | /* Composite key mappings. */ |
112 | 112 | ||
113 | +/* | ||
113 | struct akeysym | 114 | struct akeysym |
114 | { | 115 | { |
115 | KeySym keysym; | 116 | KeySym keysym; |
116 | enum keytype keytype; | 117 | enum keytype keytype; |
117 | }; | 118 | }; |
119 | +*/ | ||
118 | 120 | ||
119 | #define ak_eq(k1, k2) (((k1).keysym == (k2).keysym) && \ | 121 | #define ak_eq(k1, k2) (((k1).keysym == (k2).keysym) && \ |
120 | ((k1).keytype == (k2).keytype)) | 122 | ((k1).keytype == (k2).keytype)) |
src/core/paste.c
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | #include <fcntl.h> | 44 | #include <fcntl.h> |
45 | 45 | ||
46 | #include "3270ds.h" | 46 | #include "3270ds.h" |
47 | -#include "resources.h" | 47 | +//#include "resources.h" |
48 | 48 | ||
49 | //#include "actionsc.h" | 49 | //#include "actionsc.h" |
50 | #include "ansic.h" | 50 | #include "ansic.h" |
@@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
69 | #include "telnetc.h" | 69 | #include "telnetc.h" |
70 | #include "togglesc.h" | 70 | #include "togglesc.h" |
71 | #include "trace_dsc.h" | 71 | #include "trace_dsc.h" |
72 | -#include "utf8c.h" | 72 | +//#include "utf8c.h" |
73 | #include "utilc.h" | 73 | #include "utilc.h" |
74 | #if defined(X3270_DBCS) /*[*/ | 74 | #if defined(X3270_DBCS) /*[*/ |
75 | #include "widec.h" | 75 | #include "widec.h" |
src/core/printer.c
@@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
58 | #include "3270ds.h" | 58 | #include "3270ds.h" |
59 | #include "appres.h" | 59 | #include "appres.h" |
60 | #include "objects.h" | 60 | #include "objects.h" |
61 | -#include "resources.h" | 61 | +//#include "resources.h" |
62 | 62 | ||
63 | #include "charsetc.h" | 63 | #include "charsetc.h" |
64 | #include "ctlrc.h" | 64 | #include "ctlrc.h" |
src/core/screen.c
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | #include <internals.h> | 37 | #include <internals.h> |
38 | #include <signal.h> | 38 | #include <signal.h> |
39 | #include "3270ds.h" | 39 | #include "3270ds.h" |
40 | -#include "resources.h" | 40 | +//#include "resources.h" |
41 | #include "ctlrc.h" | 41 | #include "ctlrc.h" |
42 | #include "hostc.h" | 42 | #include "hostc.h" |
43 | #include "kybdc.h" | 43 | #include "kybdc.h" |
src/core/see.c
@@ -47,9 +47,9 @@ | @@ -47,9 +47,9 @@ | ||
47 | #include "3270ds.h" | 47 | #include "3270ds.h" |
48 | 48 | ||
49 | // #include "tablesc.h" | 49 | // #include "tablesc.h" |
50 | -#if !defined(PR3287) /*[*/ | ||
51 | -#include "utf8c.h" | ||
52 | -#endif /*]*/ | 50 | +//#if !defined(PR3287) /*[*/ |
51 | +//#include "utf8c.h" | ||
52 | +//#endif /*]*/ | ||
53 | #include "seec.h" | 53 | #include "seec.h" |
54 | 54 | ||
55 | const char * | 55 | const char * |
src/core/telnet.c
@@ -92,8 +92,8 @@ | @@ -92,8 +92,8 @@ | ||
92 | #include "kybdc.h" | 92 | #include "kybdc.h" |
93 | // #include "macrosc.h" | 93 | // #include "macrosc.h" |
94 | #include "popupsc.h" | 94 | #include "popupsc.h" |
95 | -#include "proxyc.h" | ||
96 | -#include "resolverc.h" | 95 | +// #include "proxyc.h" |
96 | +//#include "resolverc.h" | ||
97 | #include "statusc.h" | 97 | #include "statusc.h" |
98 | // #include "tablesc.h" | 98 | // #include "tablesc.h" |
99 | #include "telnetc.h" | 99 | #include "telnetc.h" |
src/core/trace_ds.c
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | #include <stdarg.h> | 53 | #include <stdarg.h> |
54 | #include <fcntl.h> | 54 | #include <fcntl.h> |
55 | #include "3270ds.h" | 55 | #include "3270ds.h" |
56 | -#include "resources.h" | 56 | +//#include "resources.h" |
57 | 57 | ||
58 | // #include "charsetc.h" | 58 | // #include "charsetc.h" |
59 | #include "ctlrc.h" | 59 | #include "ctlrc.h" |
src/include/action_table.h
@@ -1,95 +0,0 @@ | @@ -1,95 +0,0 @@ | ||
1 | -/* | ||
2 | - * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | - * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
5 | - * | ||
6 | - * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | - * | ||
8 | - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | - * Free Software Foundation. | ||
11 | - * | ||
12 | - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | - * obter mais detalhes. | ||
16 | - * | ||
17 | - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
19 | - * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | - * | ||
21 | - * Este programa está nomeado como actions.h e possui - linhas de código. | ||
22 | - * | ||
23 | - * Contatos: | ||
24 | - * | ||
25 | - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
26 | - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | ||
27 | - * licinio@bb.com.br (Licínio Luis Branco) | ||
28 | - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) | ||
29 | - * | ||
30 | - */ | ||
31 | - | ||
32 | - #error Deprecated | ||
33 | - | ||
34 | - /* | ||
35 | - * Action call table. | ||
36 | - * | ||
37 | - * Usually this definitions are used to declare lib3270's action table but, | ||
38 | - * if you redefine the creation macros it can be used to build a callback | ||
39 | - * table for g_object_connect calls. | ||
40 | - * | ||
41 | - */ | ||
42 | - | ||
43 | - /* Keyboard actions */ | ||
44 | - DECLARE_LIB3270_KEY_ACTION( enter, "Send an \"Enter\" action." ) | ||
45 | - | ||
46 | - DECLARE_LIB3270_FKEY_ACTION( pfkey, "" ) | ||
47 | - DECLARE_LIB3270_FKEY_ACTION( pakey, "" ) | ||
48 | - | ||
49 | - /* Cursor movement */ | ||
50 | - DECLARE_LIB3270_CURSOR_ACTION( up, "Cursor up 1 position." ) | ||
51 | - DECLARE_LIB3270_CURSOR_ACTION( down, "Cursor down 1 position." ) | ||
52 | - DECLARE_LIB3270_CURSOR_ACTION( left, "Cursor left 1 position." ) | ||
53 | - DECLARE_LIB3270_CURSOR_ACTION( right, "Cursor right 1 position." ) | ||
54 | - | ||
55 | - DECLARE_LIB3270_ACTION( newline, "Cursor to first field on next line or any lines after that." ) | ||
56 | - | ||
57 | - /* Misc actions */ | ||
58 | - DECLARE_LIB3270_ACTION( kybdreset, "" ) | ||
59 | - DECLARE_LIB3270_ACTION( clear, "Clear AID key" ) | ||
60 | - DECLARE_LIB3270_ACTION( eraseinput, "" ) | ||
61 | - | ||
62 | - DECLARE_LIB3270_ACTION( select_field, "" ) | ||
63 | - DECLARE_LIB3270_ACTION( select_all, "" ) | ||
64 | - DECLARE_LIB3270_ACTION( unselect, "" ) | ||
65 | - DECLARE_LIB3270_ACTION( reselect, "" ) | ||
66 | - | ||
67 | - DECLARE_LIB3270_ACTION( eraseeof, "Erase End Of Field Key." ) | ||
68 | - DECLARE_LIB3270_ACTION( eraseeol, "Erase End Of Line Key." ) | ||
69 | - DECLARE_LIB3270_ACTION( erase, "" ) | ||
70 | - DECLARE_LIB3270_ACTION( delete, "" ) | ||
71 | - DECLARE_LIB3270_ACTION( dup, "DUP key" ) | ||
72 | - DECLARE_LIB3270_ACTION( fieldmark, "FM key" ) | ||
73 | - | ||
74 | - DECLARE_LIB3270_ACTION( backspace, "3270-style backspace." ) | ||
75 | - | ||
76 | - DECLARE_LIB3270_ACTION( previousword, "Cursor to previous word." ) | ||
77 | - DECLARE_LIB3270_ACTION( nextword, "Cursor to next unprotected word." ) | ||
78 | - DECLARE_LIB3270_ACTION( fieldend, "Move the cursor to the first blank after the last nonblank in the field." ) | ||
79 | - | ||
80 | - DECLARE_LIB3270_ACTION( firstfield, "Move to first unprotected field on screen." ) | ||
81 | - DECLARE_LIB3270_ACTION( nextfield, "" ) | ||
82 | - DECLARE_LIB3270_ACTION( previousfield, "Tab backward to previous field." ) | ||
83 | - | ||
84 | - DECLARE_LIB3270_ACTION( attn, "ATTN key, per RFC 2355. Sends IP, regardless." ) | ||
85 | - DECLARE_LIB3270_ACTION( break, "" ) | ||
86 | - DECLARE_LIB3270_ACTION( pastenext, "" ) | ||
87 | - | ||
88 | - DECLARE_LIB3270_ACTION( deleteword, "Backspaces the cursor until it hits the front of a word (does a ^W)." ) | ||
89 | - DECLARE_LIB3270_ACTION( deletefield, "Delete field key (does a ^U)." ) | ||
90 | - DECLARE_LIB3270_ACTION( sysreq, "" ) | ||
91 | - | ||
92 | - DECLARE_LIB3270_ACTION( testpattern, "" ) | ||
93 | - DECLARE_LIB3270_ACTION( charsettable, "" ) | ||
94 | - | ||
95 | - |
src/include/hostc.h
@@ -35,12 +35,7 @@ | @@ -35,12 +35,7 @@ | ||
35 | * @brief Global declarations for host.c. | 35 | * @brief Global declarations for host.c. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | -// #include "api.h" | ||
39 | - | ||
40 | - | ||
41 | -/** | ||
42 | - * @brief Signal a state change. | ||
43 | - */ | 38 | + /// @brief Signal a state change. |
44 | LIB3270_INTERNAL void lib3270_st_changed(H3270 *h, LIB3270_STATE tx, int mode); | 39 | LIB3270_INTERNAL void lib3270_st_changed(H3270 *h, LIB3270_STATE tx, int mode); |
45 | 40 | ||
46 | LIB3270_INTERNAL void host_in3270(H3270 *session, LIB3270_CSTATE); | 41 | LIB3270_INTERNAL void host_in3270(H3270 *session, LIB3270_CSTATE); |
src/include/internals.h
@@ -128,16 +128,6 @@ enum iaction { | @@ -128,16 +128,6 @@ enum iaction { | ||
128 | IA_IDLE | 128 | IA_IDLE |
129 | }; | 129 | }; |
130 | 130 | ||
131 | -// Version strings | ||
132 | -/* | ||
133 | -LIB3270_INTERNAL const char * build; | ||
134 | -LIB3270_INTERNAL const char * app_defaults_version; | ||
135 | -LIB3270_INTERNAL const char * sccsid; | ||
136 | -LIB3270_INTERNAL const char * build_rpq_timestamp; | ||
137 | -LIB3270_INTERNAL const char * build_rpq_version; | ||
138 | -LIB3270_INTERNAL const char * build_rpq_revision; | ||
139 | -*/ | ||
140 | - | ||
141 | #if defined(X3270_DBCS) /*[*/ | 131 | #if defined(X3270_DBCS) /*[*/ |
142 | LIB3270_INTERNAL Boolean dbcs; | 132 | LIB3270_INTERNAL Boolean dbcs; |
143 | #endif /*]*/ | 133 | #endif /*]*/ |
@@ -354,21 +344,20 @@ struct _h3270 | @@ -354,21 +344,20 @@ struct _h3270 | ||
354 | int onlcr : 1; | 344 | int onlcr : 1; |
355 | int bsd_tm : 1; | 345 | int bsd_tm : 1; |
356 | int syncing : 1; | 346 | int syncing : 1; |
357 | - int reverse : 1; /**< @brief reverse-input mode */ | 347 | + int reverse : 1; ///< @brief reverse-input mode |
358 | int dbcs : 1; | 348 | int dbcs : 1; |
359 | int linemode : 1; | 349 | int linemode : 1; |
360 | int trace_skipping : 1; | 350 | int trace_skipping : 1; |
361 | int need_tls_follows : 1; | 351 | int need_tls_follows : 1; |
362 | int cut_xfer_in_progress : 1; | 352 | int cut_xfer_in_progress : 1; |
363 | -// int auto_keymap : 1; | ||
364 | - int formatted : 1; /**< @brief Formatted screen flag */ | ||
365 | - int starting : 1; /**< @brief Is starting (no first screen)? */ | 353 | + int formatted : 1; ///< @brief Formatted screen flag |
354 | + int starting : 1; ///< @brief Is starting (no first screen)? | ||
366 | 355 | ||
367 | struct lib3270_toggle | 356 | struct lib3270_toggle |
368 | { | 357 | { |
369 | - char value; /**< toggle value */ | ||
370 | - void (*upcall)(H3270 *, const struct lib3270_toggle *, LIB3270_TOGGLE_TYPE); /**< change value */ | ||
371 | - } toggle[LIB3270_TOGGLE_COUNT]; | 358 | + char value; ///< toggle value |
359 | + void (*upcall)(H3270 *, const struct lib3270_toggle *, LIB3270_TOGGLE_TYPE); ///< change value | ||
360 | + } toggle[LIB3270_TOGGLE_COUNT]; | ||
372 | 361 | ||
373 | // Network & Termtype | 362 | // Network & Termtype |
374 | char * connected_type; | 363 | char * connected_type; |
src/include/kybdc.h
@@ -74,7 +74,7 @@ | @@ -74,7 +74,7 @@ | ||
74 | #define KYBDLOCK_IS_OERR(hSession) (hSession->kybdlock && !(hSession->kybdlock & ~KL_OERR_MASK)) | 74 | #define KYBDLOCK_IS_OERR(hSession) (hSession->kybdlock && !(hSession->kybdlock & ~KL_OERR_MASK)) |
75 | 75 | ||
76 | /* other functions */ | 76 | /* other functions */ |
77 | - LIB3270_INTERNAL void add_xk(KeySym key, KeySym assoc); | 77 | + //LIB3270_INTERNAL void add_xk(KeySym key, KeySym assoc); |
78 | LIB3270_INTERNAL void clear_xks(void); | 78 | LIB3270_INTERNAL void clear_xks(void); |
79 | LIB3270_INTERNAL void do_reset(H3270 *session, Boolean explicit); | 79 | LIB3270_INTERNAL void do_reset(H3270 *session, Boolean explicit); |
80 | 80 |
src/include/lib3270++.h
@@ -1,437 +0,0 @@ | @@ -1,437 +0,0 @@ | ||
1 | -/* | ||
2 | - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | - * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
5 | - * | ||
6 | - * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | - * | ||
8 | - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | - * Free Software Foundation. | ||
11 | - * | ||
12 | - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | - * obter mais detalhes. | ||
16 | - * | ||
17 | - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
19 | - * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | - * | ||
21 | - * Este programa está nomeado como lib3270++.h e possui - linhas de código. | ||
22 | - * | ||
23 | - * Contatos: | ||
24 | - * | ||
25 | - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
26 | - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
27 | - * | ||
28 | - */ | ||
29 | - | ||
30 | -#ifndef LIB3270_HPP_INCLUDED | ||
31 | - | ||
32 | - #define LIB3270_HPP_INCLUDED 1 | ||
33 | - | ||
34 | - #include <iostream> | ||
35 | - #include <cstdarg> | ||
36 | - #include <vector> | ||
37 | - #include <functional> | ||
38 | - #include <lib3270.h> | ||
39 | - | ||
40 | - #if defined(_WIN32) | ||
41 | - | ||
42 | - #define TN3270_PUBLIC __declspec (dllexport) | ||
43 | - #define TN3270_PRIVATE | ||
44 | - | ||
45 | - #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) | ||
46 | - | ||
47 | - #define TN3270_PUBLIC | ||
48 | - #define TN3270_PRIVATE | ||
49 | - | ||
50 | - #elif defined(__GNUC__) | ||
51 | - | ||
52 | - #define TN3270_PUBLIC __attribute__((visibility("default"))) | ||
53 | - #define TN3270_PRIVATE __attribute__((visibility("hidden"))) | ||
54 | - | ||
55 | - #else | ||
56 | - | ||
57 | - #error Unable to set visibility attribute | ||
58 | - | ||
59 | - #endif | ||
60 | - | ||
61 | -#ifdef __cplusplus | ||
62 | - | ||
63 | - #include <string> | ||
64 | - | ||
65 | - namespace TN3270 { | ||
66 | - | ||
67 | - class Host; | ||
68 | - class Controller; | ||
69 | - | ||
70 | - #define DEFAULT_TIMEOUT 5 | ||
71 | - | ||
72 | - class TN3270_PUBLIC Event { | ||
73 | - public: | ||
74 | - enum Type : uint8_t { | ||
75 | - All, ///< @brief All events (undefined). | ||
76 | - Popup, ///< @brief Popup message. | ||
77 | - Trace, ///< @brief Trace message. | ||
78 | - Message, ///< @brief Generic message. | ||
79 | - Connection ///< @brief Connect/Disconnect event. | ||
80 | - }; | ||
81 | - | ||
82 | - private: | ||
83 | - Type type; | ||
84 | - | ||
85 | - protected: | ||
86 | - Event(enum Type type); | ||
87 | - | ||
88 | - public: | ||
89 | - virtual ~Event(); | ||
90 | - | ||
91 | - /// @brief Check event type | ||
92 | - inline bool is(Event::Type type) const noexcept { | ||
93 | - return this->type == type; | ||
94 | - } | ||
95 | - | ||
96 | - /// @brief Check event type | ||
97 | - inline bool operator==(Event::Type type) const noexcept { | ||
98 | - return this->type == type; | ||
99 | - } | ||
100 | - | ||
101 | - inline operator Event::Type() const noexcept { | ||
102 | - return this->type; | ||
103 | - } | ||
104 | - | ||
105 | - /// @brief Get event description. | ||
106 | - virtual std::string toString() const = 0; | ||
107 | - | ||
108 | - }; | ||
109 | - | ||
110 | - enum ProgramMessage : uint8_t { | ||
111 | - MESSAGE_NONE = LIB3270_MESSAGE_NONE, ///< @brief No message | ||
112 | - MESSAGE_SYSWAIT = LIB3270_MESSAGE_SYSWAIT, ///< @brief -- | ||
113 | - MESSAGE_TWAIT = LIB3270_MESSAGE_TWAIT, ///< @brief -- | ||
114 | - MESSAGE_CONNECTED = LIB3270_MESSAGE_CONNECTED, ///< @brief Connected | ||
115 | - MESSAGE_DISCONNECTED = LIB3270_MESSAGE_DISCONNECTED, ///< @brief Disconnected from host | ||
116 | - MESSAGE_AWAITING_FIRST = LIB3270_MESSAGE_AWAITING_FIRST, ///< @brief -- | ||
117 | - MESSAGE_MINUS = LIB3270_MESSAGE_MINUS, ///< @brief -- | ||
118 | - MESSAGE_PROTECTED = LIB3270_MESSAGE_PROTECTED, ///< @brief -- | ||
119 | - MESSAGE_NUMERIC = LIB3270_MESSAGE_NUMERIC, ///< @brief -- | ||
120 | - MESSAGE_OVERFLOW = LIB3270_MESSAGE_OVERFLOW, ///< @brief -- | ||
121 | - MESSAGE_INHIBIT = LIB3270_MESSAGE_INHIBIT, ///< @brief -- | ||
122 | - MESSAGE_KYBDLOCK = LIB3270_MESSAGE_KYBDLOCK, ///< @brief Keyboard is locked | ||
123 | - | ||
124 | - MESSAGE_X = LIB3270_MESSAGE_X, ///< @brief -- | ||
125 | - MESSAGE_RESOLVING = LIB3270_MESSAGE_RESOLVING, ///< @brief Resolving hostname (running DNS query) | ||
126 | - MESSAGE_CONNECTING = LIB3270_MESSAGE_CONNECTING ///< @brief Connecting to host | ||
127 | - | ||
128 | - }; | ||
129 | - | ||
130 | - /// @brief connection state. | ||
131 | - enum ConnectionState : uint8_t { | ||
132 | - DISCONNECTED = LIB3270_NOT_CONNECTED, ///< @brief disconnected | ||
133 | - RESOLVING = LIB3270_RESOLVING, ///< @brief resolving hostname | ||
134 | - PENDING = LIB3270_PENDING, ///< @brief connection pending | ||
135 | - CONNECTED_INITIAL = LIB3270_CONNECTED_INITIAL, ///< @brief connected, no mode yet | ||
136 | - CONNECTED_ANSI = LIB3270_CONNECTED_ANSI, ///< @brief connected in NVT ANSI mode | ||
137 | - CONNECTED_3270 = LIB3270_CONNECTED_3270, ///< @brief connected in old-style 3270 mode | ||
138 | - CONNECTED_INITIAL_E = LIB3270_CONNECTED_INITIAL_E, ///< @brief connected in TN3270E mode, unnegotiated | ||
139 | - CONNECTED_NVT = LIB3270_CONNECTED_NVT, ///< @brief connected in TN3270E mode, NVT mode | ||
140 | - CONNECTED_SSCP = LIB3270_CONNECTED_SSCP, ///< @brief connected in TN3270E mode, SSCP-LU mode | ||
141 | - CONNECTED_TN3270E = LIB3270_CONNECTED_TN3270E, ///< @brief connected in TN3270E mode, 3270 mode | ||
142 | - }; | ||
143 | - | ||
144 | - /// @brief PF Keys | ||
145 | - enum PFKey : uint8_t { | ||
146 | - PF_1, | ||
147 | - PF_2, | ||
148 | - PF_3, | ||
149 | - PF_4, | ||
150 | - PF_5, | ||
151 | - PF_6, | ||
152 | - PF_7, | ||
153 | - PF_8, | ||
154 | - PF_9, | ||
155 | - PF_10, | ||
156 | - PF_11, | ||
157 | - PF_12 | ||
158 | - }; | ||
159 | - | ||
160 | - /// @brief PF Keys | ||
161 | - enum PAKey : uint8_t { | ||
162 | - PA_1, | ||
163 | - PA_2, | ||
164 | - PA_3 | ||
165 | - }; | ||
166 | - | ||
167 | - /// @brief Actions keys | ||
168 | - enum Action : uint8_t { | ||
169 | - ENTER, ///< Enter key | ||
170 | - ERASE, | ||
171 | - ERASE_EOF, | ||
172 | - ERASE_EOL, | ||
173 | - ERASE_INPUT | ||
174 | - }; | ||
175 | - | ||
176 | - /// @brief TN3270 Session. | ||
177 | - class TN3270_PUBLIC Session { | ||
178 | - protected: | ||
179 | - Session(); | ||
180 | - | ||
181 | - /// @brief Write information to log file. | ||
182 | - void info(const char *fmt, ...) const; | ||
183 | - | ||
184 | - /// @brief Write warning to log file. | ||
185 | - void warning(const char *fmt, ...) const; | ||
186 | - | ||
187 | - /// @brief Write error to log file. | ||
188 | - void error(const char *fmt, ...) const; | ||
189 | - | ||
190 | - /// @brief Fire event. | ||
191 | - void fire(const Event &event); | ||
192 | - | ||
193 | - public: | ||
194 | - | ||
195 | - /// @brief Create a tn3270 session. | ||
196 | - static Session * create(const char *id = nullptr); | ||
197 | - | ||
198 | - virtual ~Session(); | ||
199 | - | ||
200 | - // Connect/disconnect | ||
201 | - virtual void connect(const char *url) = 0; | ||
202 | - virtual void disconnect() = 0; | ||
203 | - | ||
204 | - // Wait for session state. | ||
205 | - virtual void waitForReady(time_t timeout = DEFAULT_TIMEOUT) = 0; | ||
206 | - | ||
207 | - // Gets | ||
208 | - virtual std::string toString(int baddr = 0, size_t len = -1, char lf = '\n') const = 0; | ||
209 | - virtual std::string toString(int row, int col, size_t sz, char lf = '\n') const = 0; | ||
210 | - | ||
211 | - inline operator std::string() const { | ||
212 | - return toString(); | ||
213 | - } | ||
214 | - | ||
215 | - // Get properties. | ||
216 | - virtual void getProperty(const char *name, int &value) const = 0; | ||
217 | - virtual void getProperty(const char *name, std::string &value) const = 0; | ||
218 | - virtual void getProperty(const char *name, bool &value) const = 0; | ||
219 | - | ||
220 | - virtual std::string getVersion() const = 0; | ||
221 | - virtual std::string getRevision() const = 0; | ||
222 | - | ||
223 | - virtual ProgramMessage getProgramMessage() const = 0; | ||
224 | - inline operator ProgramMessage() const { | ||
225 | - return getProgramMessage(); | ||
226 | - } | ||
227 | - | ||
228 | - virtual ConnectionState getConnectionState() const = 0; | ||
229 | - inline operator ConnectionState() const { | ||
230 | - return getConnectionState(); | ||
231 | - } | ||
232 | - | ||
233 | - inline bool operator==(ConnectionState state) const noexcept { | ||
234 | - return this->getConnectionState() == state; | ||
235 | - } | ||
236 | - | ||
237 | - // Set contents. | ||
238 | - | ||
239 | - /// @brief Set field at current posicion, jumps to next writable field. | ||
240 | - virtual Session & push(const char *text) = 0; | ||
241 | - inline Session & push(const std::string &text) { | ||
242 | - return push(text.c_str()); | ||
243 | - } | ||
244 | - | ||
245 | - /// @brief Set cursor address. | ||
246 | - virtual TN3270::Session & setCursorPosition(unsigned short addr) = 0; | ||
247 | - | ||
248 | - /// @brief Set cursor position. | ||
249 | - virtual TN3270::Session & setCursorPosition(unsigned short row, unsigned short col) = 0; | ||
250 | - | ||
251 | - virtual Session & push(int baddr, const std::string &text) = 0; | ||
252 | - virtual Session & push(int row, int col, const std::string &text) = 0; | ||
253 | - virtual Session & push(const PFKey key) = 0; | ||
254 | - virtual Session & push(const PAKey key) = 0; | ||
255 | - virtual Session & push(const Action action) = 0; | ||
256 | - | ||
257 | - // Get contents. | ||
258 | - virtual Session & pop(int baddr, std::string &text) = 0; | ||
259 | - virtual Session & pop(int row, int col, std::string &text) = 0; | ||
260 | - virtual Session & pop(std::string &text) = 0; | ||
261 | - | ||
262 | - /// @brief Insert event listener. | ||
263 | - void insert(Event::Type type, std::function <void(const Event &event)> listener); | ||
264 | - | ||
265 | - // Misc | ||
266 | - | ||
267 | - /// @brief Execute action by name. | ||
268 | - virtual Session & action(const char *action_name) = 0; | ||
269 | - | ||
270 | - }; | ||
271 | - | ||
272 | - /// @brief TN3270 Host | ||
273 | - class TN3270_PUBLIC Host : public std::basic_streambuf<char, std::char_traits<char> > { | ||
274 | - private: | ||
275 | - | ||
276 | - /// @brief Connection with the host | ||
277 | - Session *session; | ||
278 | - | ||
279 | - /// @brief How much seconds we wait for the terminal to be ready? | ||
280 | - time_t timeout; | ||
281 | - | ||
282 | - protected: | ||
283 | - | ||
284 | - /// @brief Writes characters to the associated file from the put area | ||
285 | - int sync() override; | ||
286 | - | ||
287 | - /// @brief Writes characters to the associated output sequence from the put area. | ||
288 | - int overflow(int c) override; | ||
289 | - | ||
290 | - /// @brief Write information to log file. | ||
291 | - void info(const char *fmt, ...) const; | ||
292 | - | ||
293 | - /// @brief Write warning to log file. | ||
294 | - void warning(const char *fmt, ...) const; | ||
295 | - | ||
296 | - /// @brief Write error to log file. | ||
297 | - void error(const char *fmt, ...) const; | ||
298 | - | ||
299 | - public: | ||
300 | - Host(const char *id = nullptr, const char *url = nullptr, time_t timeout = DEFAULT_TIMEOUT); | ||
301 | - ~Host(); | ||
302 | - | ||
303 | - inline bool operator==(ConnectionState state) const noexcept { | ||
304 | - return session->getConnectionState() == state; | ||
305 | - } | ||
306 | - | ||
307 | - void connect(const char *url, bool sync = true); | ||
308 | - | ||
309 | - inline ProgramMessage getProgramMessage() const { | ||
310 | - return session->getProgramMessage(); | ||
311 | - } | ||
312 | - | ||
313 | - inline operator bool() const { | ||
314 | - return isReady(); | ||
315 | - } | ||
316 | - | ||
317 | - inline operator ProgramMessage() const { | ||
318 | - return getProgramMessage(); | ||
319 | - } | ||
320 | - | ||
321 | - inline ConnectionState getConnectionState() const { | ||
322 | - return session->getConnectionState(); | ||
323 | - } | ||
324 | - | ||
325 | - bool isReady() const; | ||
326 | - bool isConnected() const; | ||
327 | - | ||
328 | - inline operator ConnectionState() const { | ||
329 | - return getConnectionState(); | ||
330 | - } | ||
331 | - | ||
332 | - /// @brief Set cursor address. | ||
333 | - inline void setCursorPosition(unsigned short addr) { | ||
334 | - session->setCursorPosition(addr); | ||
335 | - } | ||
336 | - | ||
337 | - /// @brief Set cursor position. | ||
338 | - inline void setCursorPosition(unsigned short row, unsigned short col) { | ||
339 | - session->setCursorPosition(row,col); | ||
340 | - } | ||
341 | - | ||
342 | - // Get properties | ||
343 | - | ||
344 | - /// @brief Get lib3270 version. | ||
345 | - inline std::string getVersion() const { | ||
346 | - return session->getVersion(); | ||
347 | - } | ||
348 | - | ||
349 | - /// @brief Get lib3270 revision. | ||
350 | - std::string getRevision() const { | ||
351 | - return session->getRevision(); | ||
352 | - } | ||
353 | - | ||
354 | - // Set contents. | ||
355 | - | ||
356 | - /// @brief Set field at current posicion, jumps to next writable field. | ||
357 | - inline Host & push(const char *text) { | ||
358 | - session->push(text); | ||
359 | - return *this; | ||
360 | - }; | ||
361 | - | ||
362 | - inline Host & push(const std::string &text) { | ||
363 | - session->push(text); | ||
364 | - return *this; | ||
365 | - | ||
366 | - } | ||
367 | - | ||
368 | - inline Host & push(int baddr, const std::string &text) { | ||
369 | - session->push(baddr,text); | ||
370 | - return *this; | ||
371 | - } | ||
372 | - | ||
373 | - inline Host & push(int row, int col, const std::string &text) { | ||
374 | - session->push(row,col,text); | ||
375 | - return *this; | ||
376 | - } | ||
377 | - | ||
378 | - inline Host & push(const PFKey key) { | ||
379 | - session->push(key); | ||
380 | - return *this; | ||
381 | - } | ||
382 | - | ||
383 | - inline Host & push(const PAKey key) { | ||
384 | - session->push(key); | ||
385 | - return *this; | ||
386 | - } | ||
387 | - | ||
388 | - Host & push(const Action action); | ||
389 | - | ||
390 | - // Get contents. | ||
391 | - | ||
392 | - Host & pop(int baddr, std::string &text); | ||
393 | - Host & pop(int row, int col, std::string &text); | ||
394 | - Host & pop(std::string &text); | ||
395 | - | ||
396 | - std::string toString() const; | ||
397 | - std::string toString(int baddr, size_t len = -1, char lf = '\n') const; | ||
398 | - std::string toString(int row, int col, size_t sz, char lf = '\n') const; | ||
399 | - | ||
400 | - // Event listeners | ||
401 | - inline Host & insert(Event::Type type, std::function <void(const Event &event)> listener) noexcept { | ||
402 | - session->insert(type, listener); | ||
403 | - return *this; | ||
404 | - } | ||
405 | - | ||
406 | - | ||
407 | - }; | ||
408 | - | ||
409 | - } | ||
410 | - | ||
411 | - TN3270_PUBLIC const char * toCharString(const TN3270::ProgramMessage programMessage) noexcept; | ||
412 | - TN3270_PUBLIC const char * toCharString(const TN3270::ConnectionState connectionState) noexcept; | ||
413 | - | ||
414 | - template <typename T> | ||
415 | - inline TN3270_PUBLIC TN3270::Session & operator<<(TN3270::Session& session, const T value) { | ||
416 | - return session.push(value); | ||
417 | - } | ||
418 | - | ||
419 | - template <typename T> | ||
420 | - inline TN3270_PUBLIC TN3270::Session & operator>>(TN3270::Session& session, const T value) { | ||
421 | - return session.pop(value); | ||
422 | - } | ||
423 | - | ||
424 | - template <typename T> | ||
425 | - inline TN3270_PUBLIC TN3270::Host & operator<<(TN3270::Host& host, const T value) { | ||
426 | - return host.push(value); | ||
427 | - } | ||
428 | - | ||
429 | - inline std::ostream & operator<<(std::ostream &stream, const TN3270::Host& host) { | ||
430 | - stream << host.toString(); | ||
431 | - return stream; | ||
432 | - } | ||
433 | - | ||
434 | - | ||
435 | -#endif | ||
436 | - | ||
437 | -#endif // LIB3270_H_INCLUDED |
src/include/localdefs.h
@@ -33,50 +33,23 @@ | @@ -33,50 +33,23 @@ | ||
33 | /* These first definitions were cribbed from X11 -- but no X code is used. */ | 33 | /* These first definitions were cribbed from X11 -- but no X code is used. */ |
34 | #define False 0 | 34 | #define False 0 |
35 | #define True 1 | 35 | #define True 1 |
36 | -//typedef void *XtPointer; | ||
37 | -// typedef void *Widget; | ||
38 | -// typedef void *XEvent; | 36 | + |
39 | #ifdef __APPLE__ | 37 | #ifdef __APPLE__ |
40 | typedef unsigned char Boolean; | 38 | typedef unsigned char Boolean; |
41 | #else | 39 | #else |
42 | typedef char Boolean; | 40 | typedef char Boolean; |
43 | #endif | 41 | #endif |
42 | + | ||
44 | typedef char *String; | 43 | typedef char *String; |
45 | -// typedef unsigned int Cardinal; | ||
46 | -typedef unsigned long KeySym; | 44 | +//typedef unsigned long KeySym; |
47 | #define Bool int | 45 | #define Bool int |
48 | 46 | ||
49 | -/* | ||
50 | -typedef void (*XtActionProc)( | ||
51 | - Widget // widget, | ||
52 | - XEvent* // event, | ||
53 | - String* // params, | ||
54 | - Cardinal* // num_param | ||
55 | -); | ||
56 | -*/ | ||
57 | - | ||
58 | -/* | ||
59 | -typedef struct _XtActionsRec{ | ||
60 | - String string; | ||
61 | - XtActionProc proc; | ||
62 | -} XtActionsRec; | ||
63 | -*/ | ||
64 | - | ||
65 | -#define XtNumber(n) (sizeof(n)/sizeof((n)[0])) | ||
66 | -#define NoSymbol 0L | 47 | +//#define XtNumber(n) (sizeof(n)/sizeof((n)[0])) |
48 | +//#define NoSymbol 0L | ||
67 | 49 | ||
68 | /* These are local functions with similar semantics to X functions. */ | 50 | /* These are local functions with similar semantics to X functions. */ |
69 | - | ||
70 | -// void * Malloc(size_t); | ||
71 | -// void Free(void *); | ||
72 | -// void * Calloc(size_t, size_t); | ||
73 | -// void * Realloc(void *, size_t); | ||
74 | - | ||
75 | -// #define Malloc(x) lib3270_malloc(x) | ||
76 | -// #define Free(x) lib3270_free(x) | ||
77 | #define Calloc(e,n) lib3270_calloc(e,n,NULL) | 51 | #define Calloc(e,n) lib3270_calloc(e,n,NULL) |
78 | #define Realloc(x,n) lib3270_realloc(x,n) | 52 | #define Realloc(x,n) lib3270_realloc(x,n) |
79 | 53 | ||
80 | #define NewString(x) strdup(x) | 54 | #define NewString(x) strdup(x) |
81 | -//extern char *NewString(const char *); | ||
82 | 55 |
src/include/proxyc.h
@@ -1,22 +0,0 @@ | @@ -1,22 +0,0 @@ | ||
1 | -/* | ||
2 | - * Copyright 2007 by Paul Mattes. | ||
3 | - * Permission to use, copy, modify, and distribute this software and its | ||
4 | - * documentation for any purpose and without fee is hereby granted, | ||
5 | - * provided that the above copyright notice appear in all copies and that | ||
6 | - * both that copyright notice and this permission notice appear in | ||
7 | - * supporting documentation. | ||
8 | - * | ||
9 | - * x3270, c3270, wc3270, s3270 and tcl3270 are distributed in the hope that | ||
10 | - * they will be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
11 | - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | - * file LICENSE for more details. | ||
13 | - */ | ||
14 | - | ||
15 | -/* | ||
16 | - * proxyc.h | ||
17 | - * Declarations for proxy.c. | ||
18 | - */ | ||
19 | - | ||
20 | -LIB3270_INTERNAL int proxy_setup(H3270 *session, char **phost, char **pport); | ||
21 | -LIB3270_INTERNAL int proxy_negotiate(H3270 *session, int type, int fd, char *host, unsigned short port); | ||
22 | -LIB3270_INTERNAL const char * proxy_type_name(int type); |
src/include/resolverc.h
@@ -1,22 +0,0 @@ | @@ -1,22 +0,0 @@ | ||
1 | -/* | ||
2 | - * Copyright 2007 by Paul Mattes. | ||
3 | - * Permission to use, copy, modify, and distribute this software and its | ||
4 | - * documentation for any purpose and without fee is hereby granted, | ||
5 | - * provided that the above copyright notice appear in all copies and that | ||
6 | - * both that copyright notice and this permission notice appear in | ||
7 | - * supporting documentation. | ||
8 | - * | ||
9 | - * x3270, c3270, wc3270, s3270, tcl3270, pr3287 and wpr3287 are distributed in | ||
10 | - * the hope that they will be useful, but WITHOUT ANY WARRANTY; without even | ||
11 | - * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | - * See the file LICENSE for more details. | ||
13 | - */ | ||
14 | - | ||
15 | -/* | ||
16 | - * resolverc.h | ||
17 | - * Hostname resolution. | ||
18 | - */ | ||
19 | - | ||
20 | -// LIB3270_INTERNAL int resolve_host_and_port(H3270 *session, const char *host, char *portname, unsigned short *pport,struct sockaddr *sa, socklen_t *sa_len, char *errmsg, int em_size); | ||
21 | - | ||
22 | - |
src/include/resources.h
@@ -18,6 +18,8 @@ | @@ -18,6 +18,8 @@ | ||
18 | * x3270/c3270/s3270/tcl3270 resource and option names. | 18 | * x3270/c3270/s3270/tcl3270 resource and option names. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | +#error Deprecated | ||
22 | + | ||
21 | /* Resources. */ | 23 | /* Resources. */ |
22 | #define ResActiveIcon "activeIcon" | 24 | #define ResActiveIcon "activeIcon" |
23 | #define ResAdVersion "adVersion" | 25 | #define ResAdVersion "adVersion" |
src/include/shlobj_missing.h
1 | /* IShellLinkDataList, missing from mingw's <shlobj.h>. */ | 1 | /* IShellLinkDataList, missing from mingw's <shlobj.h>. */ |
2 | 2 | ||
3 | +#error Deprecated | ||
4 | + | ||
3 | LIB3270_INTERNAL const GUID IID_IShellLinkDataList; | 5 | LIB3270_INTERNAL const GUID IID_IShellLinkDataList; |
4 | 6 | ||
5 | #define INTERFACE IShellLinkDataList | 7 | #define INTERFACE IShellLinkDataList |
src/include/statusc.h
@@ -30,9 +30,6 @@ | @@ -30,9 +30,6 @@ | ||
30 | LIB3270_INTERNAL void status_compose(int on, unsigned char c, enum keytype keytype); | 30 | LIB3270_INTERNAL void status_compose(int on, unsigned char c, enum keytype keytype); |
31 | LIB3270_INTERNAL void status_ctlr_done(H3270 *session); | 31 | LIB3270_INTERNAL void status_ctlr_done(H3270 *session); |
32 | 32 | ||
33 | -// LIB3270_INTERNAL void status_timing(H3270 *session, struct timeval *t0, struct timeval *t1); | ||
34 | -// LIB3270_INTERNAL void status_untiming(H3270 *session); | ||
35 | - | ||
36 | LIB3270_INTERNAL void status_lu(H3270 *session, const char *); | 33 | LIB3270_INTERNAL void status_lu(H3270 *session, const char *); |
37 | LIB3270_INTERNAL void status_oerr(H3270 *session, int error_type); | 34 | LIB3270_INTERNAL void status_oerr(H3270 *session, int error_type); |
38 | LIB3270_INTERNAL void status_reset(H3270 *session); | 35 | LIB3270_INTERNAL void status_reset(H3270 *session); |
src/include/telnetc.h
@@ -62,4 +62,3 @@ LIB3270_INTERNAL void space3270out(H3270 *hSession, int n); | @@ -62,4 +62,3 @@ LIB3270_INTERNAL void space3270out(H3270 *hSession, int n); | ||
62 | #define trace_netdata(direction, buf, len) /* */ | 62 | #define trace_netdata(direction, buf, len) /* */ |
63 | #endif // X3270_TRACE | 63 | #endif // X3270_TRACE |
64 | 64 | ||
65 | -// LIB3270_INTERNAL int net_getsockname(const H3270 *h3270, void *buf, int *len); |
src/include/utf8c.h
@@ -18,15 +18,17 @@ | @@ -18,15 +18,17 @@ | ||
18 | * UTF-8 conversions | 18 | * UTF-8 conversions |
19 | */ | 19 | */ |
20 | 20 | ||
21 | + /* | ||
21 | enum ulfail { | 22 | enum ulfail { |
22 | - ULFAIL_NOUTF8, /* not using UTF-8 */ | ||
23 | - ULFAIL_INCOMPLETE, /* incomplete sequence */ | ||
24 | - ULFAIL_INVALID /* invalid sequence */ | 23 | + ULFAIL_NOUTF8, // not using UTF-8 |
24 | + ULFAIL_INCOMPLETE, // incomplete sequence | ||
25 | + ULFAIL_INVALID // invalid sequence | ||
25 | }; | 26 | }; |
27 | +*/ | ||
26 | 28 | ||
27 | // LIB3270_INTERNAL char *locale_codeset; | 29 | // LIB3270_INTERNAL char *locale_codeset; |
28 | 30 | ||
29 | // LIB3270_INTERNAL void set_codeset(char *codeset_name); | 31 | // LIB3270_INTERNAL void set_codeset(char *codeset_name); |
30 | // LIB3270_INTERNAL Boolean utf8_set_display_charsets(char *cslist, char *csname); | 32 | // LIB3270_INTERNAL Boolean utf8_set_display_charsets(char *cslist, char *csname); |
31 | - LIB3270_INTERNAL char *utf8_expand(unsigned char c); | ||
32 | - LIB3270_INTERNAL unsigned char utf8_lookup(char *mbs, enum ulfail *fail, int *consumed); | 33 | +// LIB3270_INTERNAL char *utf8_expand(unsigned char c); |
34 | +// LIB3270_INTERNAL unsigned char utf8_lookup(char *mbs, enum ulfail *fail, int *consumed); |
src/include/xl.h
@@ -17,9 +17,11 @@ | @@ -17,9 +17,11 @@ | ||
17 | * DBCS translation table structure. | 17 | * DBCS translation table structure. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | + /* | ||
20 | typedef struct { | 21 | typedef struct { |
21 | unsigned n; | 22 | unsigned n; |
22 | unsigned short *data; | 23 | unsigned short *data; |
23 | } xl_t; | 24 | } xl_t; |
24 | 25 | ||
25 | #define XL_SIZE(e) ((sizeof(e)/sizeof(e[0]))/3) | 26 | #define XL_SIZE(e) ((sizeof(e)/sizeof(e[0]))/3) |
27 | +*/ |