diff --git a/lib3270.cbp b/lib3270.cbp
index 656195e..46ec40b 100644
--- a/lib3270.cbp
+++ b/lib3270.cbp
@@ -255,7 +255,6 @@
-
@@ -271,7 +270,6 @@
-
diff --git a/src/core/ansi.c b/src/core/ansi.c
index 5c90bd6..90d687f 100644
--- a/src/core/ansi.c
+++ b/src/core/ansi.c
@@ -59,7 +59,7 @@
#include "screenc.h"
#include "telnetc.h"
#include "trace_dsc.h"
-#include "utf8c.h"
+//#include "utf8c.h"
#if defined(X3270_DBCS) /*[*/
#include "widec.h"
#endif /*]*/
diff --git a/src/core/charset/utf8.c b/src/core/charset/utf8.c
index ec1339b..7edbea4 100644
--- a/src/core/charset/utf8.c
+++ b/src/core/charset/utf8.c
@@ -39,7 +39,7 @@
// #include "api.h"
#include "popupsc.h"
-#include "utf8c.h"
+//#include "utf8c.h"
// char *locale_codeset = CN;
@@ -350,6 +350,7 @@ static char *utf8_tab[U_MAX][96] = {
* character set.
* Returns 0 if the lookup fails.
*/
+ /*
unsigned char utf8_lookup(char GNUC_UNUSED(*mbs), enum ulfail *fail, int GNUC_UNUSED(*consumed))
{
if (fail != NULL)
@@ -357,3 +358,4 @@ unsigned char utf8_lookup(char GNUC_UNUSED(*mbs), enum ulfail *fail, int GNUC_UN
return 0;
}
+*/
diff --git a/src/core/ctlr.c b/src/core/ctlr.c
index ed6ad6a..f703290 100644
--- a/src/core/ctlr.c
+++ b/src/core/ctlr.c
@@ -46,7 +46,7 @@
#include
#include "3270ds.h"
#include "screen.h"
-#include "resources.h"
+//#include "resources.h"
#include "ctlrc.h"
#include "ftc.h"
diff --git a/src/core/host.c b/src/core/host.c
index 6a75da9..5293319 100644
--- a/src/core/host.c
+++ b/src/core/host.c
@@ -43,7 +43,7 @@
#include
#include
-#include "resources.h"
+//#include "resources.h"
#include "hostc.h"
#include "statusc.h"
diff --git a/src/core/keyboard/actions.c b/src/core/keyboard/actions.c
index cb18be1..59247b4 100644
--- a/src/core/keyboard/actions.c
+++ b/src/core/keyboard/actions.c
@@ -57,7 +57,7 @@ struct ta;
#include
#include "3270ds.h"
-#include "resources.h"
+//#include "resources.h"
#include "ansic.h"
#include "ctlrc.h"
@@ -71,7 +71,7 @@ struct ta;
#include "telnetc.h"
#include "togglesc.h"
#include "trace_dsc.h"
-#include "utf8c.h"
+//#include "utf8c.h"
#include "utilc.h"
#if defined(X3270_DBCS) /*[*/
#include "widec.h"
diff --git a/src/core/keyboard/kybd.c b/src/core/keyboard/kybd.c
index 78dbd06..7227462 100644
--- a/src/core/keyboard/kybd.c
+++ b/src/core/keyboard/kybd.c
@@ -58,7 +58,7 @@ struct ta;
#include
#include "3270ds.h"
-#include "resources.h"
+//#include "resources.h"
#include "ansic.h"
#include "ctlrc.h"
@@ -72,7 +72,7 @@ struct ta;
#include "telnetc.h"
#include "togglesc.h"
#include "trace_dsc.h"
-#include "utf8c.h"
+//#include "utf8c.h"
#include "utilc.h"
#if defined(X3270_DBCS) /*[*/
#include "widec.h"
@@ -110,11 +110,13 @@ static void kybdlock_set(H3270 *session, unsigned int bits);
/* Composite key mappings. */
+/*
struct akeysym
{
KeySym keysym;
enum keytype keytype;
};
+*/
#define ak_eq(k1, k2) (((k1).keysym == (k2).keysym) && \
((k1).keytype == (k2).keytype))
diff --git a/src/core/paste.c b/src/core/paste.c
index bf91d73..cce7ff8 100644
--- a/src/core/paste.c
+++ b/src/core/paste.c
@@ -44,7 +44,7 @@
#include
#include "3270ds.h"
-#include "resources.h"
+//#include "resources.h"
//#include "actionsc.h"
#include "ansic.h"
@@ -69,7 +69,7 @@
#include "telnetc.h"
#include "togglesc.h"
#include "trace_dsc.h"
-#include "utf8c.h"
+//#include "utf8c.h"
#include "utilc.h"
#if defined(X3270_DBCS) /*[*/
#include "widec.h"
diff --git a/src/core/printer.c b/src/core/printer.c
index 0f086d5..d9909db 100644
--- a/src/core/printer.c
+++ b/src/core/printer.c
@@ -58,7 +58,7 @@
#include "3270ds.h"
#include "appres.h"
#include "objects.h"
-#include "resources.h"
+//#include "resources.h"
#include "charsetc.h"
#include "ctlrc.h"
diff --git a/src/core/screen.c b/src/core/screen.c
index 7357ff4..fcdc3ad 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -37,7 +37,7 @@
#include
#include
#include "3270ds.h"
-#include "resources.h"
+//#include "resources.h"
#include "ctlrc.h"
#include "hostc.h"
#include "kybdc.h"
diff --git a/src/core/see.c b/src/core/see.c
index cb7a8ac..d4102bb 100644
--- a/src/core/see.c
+++ b/src/core/see.c
@@ -47,9 +47,9 @@
#include "3270ds.h"
// #include "tablesc.h"
-#if !defined(PR3287) /*[*/
-#include "utf8c.h"
-#endif /*]*/
+//#if !defined(PR3287) /*[*/
+//#include "utf8c.h"
+//#endif /*]*/
#include "seec.h"
const char *
diff --git a/src/core/telnet.c b/src/core/telnet.c
index 5ef36dc..55c4df0 100644
--- a/src/core/telnet.c
+++ b/src/core/telnet.c
@@ -92,8 +92,8 @@
#include "kybdc.h"
// #include "macrosc.h"
#include "popupsc.h"
-#include "proxyc.h"
-#include "resolverc.h"
+// #include "proxyc.h"
+//#include "resolverc.h"
#include "statusc.h"
// #include "tablesc.h"
#include "telnetc.h"
diff --git a/src/core/trace_ds.c b/src/core/trace_ds.c
index ed32185..3709870 100644
--- a/src/core/trace_ds.c
+++ b/src/core/trace_ds.c
@@ -53,7 +53,7 @@
#include
#include
#include "3270ds.h"
-#include "resources.h"
+//#include "resources.h"
// #include "charsetc.h"
#include "ctlrc.h"
diff --git a/src/include/action_table.h b/src/include/action_table.h
deleted file mode 100644
index d303c32..0000000
--- a/src/include/action_table.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
- * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
- * aplicativos mainframe. Registro no INPI sob o nome G3270.
- *
- * Copyright (C) <2008>
- *
- * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
- * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
- * Free Software Foundation.
- *
- * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
- * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
- * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
- * obter mais detalhes.
- *
- * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
- * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
- * St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Este programa está nomeado como actions.h e possui - linhas de código.
- *
- * Contatos:
- *
- * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
- * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
- * licinio@bb.com.br (Licínio Luis Branco)
- * kraucer@bb.com.br (Kraucer Fernandes Mazuco)
- *
- */
-
- #error Deprecated
-
- /*
- * Action call table.
- *
- * Usually this definitions are used to declare lib3270's action table but,
- * if you redefine the creation macros it can be used to build a callback
- * table for g_object_connect calls.
- *
- */
-
- /* Keyboard actions */
- DECLARE_LIB3270_KEY_ACTION( enter, "Send an \"Enter\" action." )
-
- DECLARE_LIB3270_FKEY_ACTION( pfkey, "" )
- DECLARE_LIB3270_FKEY_ACTION( pakey, "" )
-
- /* Cursor movement */
- DECLARE_LIB3270_CURSOR_ACTION( up, "Cursor up 1 position." )
- DECLARE_LIB3270_CURSOR_ACTION( down, "Cursor down 1 position." )
- DECLARE_LIB3270_CURSOR_ACTION( left, "Cursor left 1 position." )
- DECLARE_LIB3270_CURSOR_ACTION( right, "Cursor right 1 position." )
-
- DECLARE_LIB3270_ACTION( newline, "Cursor to first field on next line or any lines after that." )
-
- /* Misc actions */
- DECLARE_LIB3270_ACTION( kybdreset, "" )
- DECLARE_LIB3270_ACTION( clear, "Clear AID key" )
- DECLARE_LIB3270_ACTION( eraseinput, "" )
-
- DECLARE_LIB3270_ACTION( select_field, "" )
- DECLARE_LIB3270_ACTION( select_all, "" )
- DECLARE_LIB3270_ACTION( unselect, "" )
- DECLARE_LIB3270_ACTION( reselect, "" )
-
- DECLARE_LIB3270_ACTION( eraseeof, "Erase End Of Field Key." )
- DECLARE_LIB3270_ACTION( eraseeol, "Erase End Of Line Key." )
- DECLARE_LIB3270_ACTION( erase, "" )
- DECLARE_LIB3270_ACTION( delete, "" )
- DECLARE_LIB3270_ACTION( dup, "DUP key" )
- DECLARE_LIB3270_ACTION( fieldmark, "FM key" )
-
- DECLARE_LIB3270_ACTION( backspace, "3270-style backspace." )
-
- DECLARE_LIB3270_ACTION( previousword, "Cursor to previous word." )
- DECLARE_LIB3270_ACTION( nextword, "Cursor to next unprotected word." )
- DECLARE_LIB3270_ACTION( fieldend, "Move the cursor to the first blank after the last nonblank in the field." )
-
- DECLARE_LIB3270_ACTION( firstfield, "Move to first unprotected field on screen." )
- DECLARE_LIB3270_ACTION( nextfield, "" )
- DECLARE_LIB3270_ACTION( previousfield, "Tab backward to previous field." )
-
- DECLARE_LIB3270_ACTION( attn, "ATTN key, per RFC 2355. Sends IP, regardless." )
- DECLARE_LIB3270_ACTION( break, "" )
- DECLARE_LIB3270_ACTION( pastenext, "" )
-
- DECLARE_LIB3270_ACTION( deleteword, "Backspaces the cursor until it hits the front of a word (does a ^W)." )
- DECLARE_LIB3270_ACTION( deletefield, "Delete field key (does a ^U)." )
- DECLARE_LIB3270_ACTION( sysreq, "" )
-
- DECLARE_LIB3270_ACTION( testpattern, "" )
- DECLARE_LIB3270_ACTION( charsettable, "" )
-
-
diff --git a/src/include/hostc.h b/src/include/hostc.h
index 875757a..7fe4b70 100644
--- a/src/include/hostc.h
+++ b/src/include/hostc.h
@@ -35,12 +35,7 @@
* @brief Global declarations for host.c.
*/
-// #include "api.h"
-
-
-/**
- * @brief Signal a state change.
- */
+ /// @brief Signal a state change.
LIB3270_INTERNAL void lib3270_st_changed(H3270 *h, LIB3270_STATE tx, int mode);
LIB3270_INTERNAL void host_in3270(H3270 *session, LIB3270_CSTATE);
diff --git a/src/include/internals.h b/src/include/internals.h
index 61266e6..e484505 100644
--- a/src/include/internals.h
+++ b/src/include/internals.h
@@ -128,16 +128,6 @@ enum iaction {
IA_IDLE
};
-// Version strings
-/*
-LIB3270_INTERNAL const char * build;
-LIB3270_INTERNAL const char * app_defaults_version;
-LIB3270_INTERNAL const char * sccsid;
-LIB3270_INTERNAL const char * build_rpq_timestamp;
-LIB3270_INTERNAL const char * build_rpq_version;
-LIB3270_INTERNAL const char * build_rpq_revision;
-*/
-
#if defined(X3270_DBCS) /*[*/
LIB3270_INTERNAL Boolean dbcs;
#endif /*]*/
@@ -354,21 +344,20 @@ struct _h3270
int onlcr : 1;
int bsd_tm : 1;
int syncing : 1;
- int reverse : 1; /**< @brief reverse-input mode */
+ int reverse : 1; ///< @brief reverse-input mode
int dbcs : 1;
int linemode : 1;
int trace_skipping : 1;
int need_tls_follows : 1;
int cut_xfer_in_progress : 1;
-// int auto_keymap : 1;
- int formatted : 1; /**< @brief Formatted screen flag */
- int starting : 1; /**< @brief Is starting (no first screen)? */
+ int formatted : 1; ///< @brief Formatted screen flag
+ int starting : 1; ///< @brief Is starting (no first screen)?
struct lib3270_toggle
{
- char value; /**< toggle value */
- void (*upcall)(H3270 *, const struct lib3270_toggle *, LIB3270_TOGGLE_TYPE); /**< change value */
- } toggle[LIB3270_TOGGLE_COUNT];
+ char value; ///< toggle value
+ void (*upcall)(H3270 *, const struct lib3270_toggle *, LIB3270_TOGGLE_TYPE); ///< change value
+ } toggle[LIB3270_TOGGLE_COUNT];
// Network & Termtype
char * connected_type;
diff --git a/src/include/kybdc.h b/src/include/kybdc.h
index be75838..96d9d43 100644
--- a/src/include/kybdc.h
+++ b/src/include/kybdc.h
@@ -74,7 +74,7 @@
#define KYBDLOCK_IS_OERR(hSession) (hSession->kybdlock && !(hSession->kybdlock & ~KL_OERR_MASK))
/* other functions */
- LIB3270_INTERNAL void add_xk(KeySym key, KeySym assoc);
+ //LIB3270_INTERNAL void add_xk(KeySym key, KeySym assoc);
LIB3270_INTERNAL void clear_xks(void);
LIB3270_INTERNAL void do_reset(H3270 *session, Boolean explicit);
diff --git a/src/include/lib3270++.h b/src/include/lib3270++.h
deleted file mode 100644
index 27f4447..0000000
--- a/src/include/lib3270++.h
+++ /dev/null
@@ -1,437 +0,0 @@
-/*
- * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
- * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
- * aplicativos mainframe. Registro no INPI sob o nome G3270.
- *
- * Copyright (C) <2008>
- *
- * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
- * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
- * Free Software Foundation.
- *
- * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
- * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
- * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
- * obter mais detalhes.
- *
- * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
- * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
- * St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Este programa está nomeado como lib3270++.h e possui - linhas de código.
- *
- * Contatos:
- *
- * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
- * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
- *
- */
-
-#ifndef LIB3270_HPP_INCLUDED
-
- #define LIB3270_HPP_INCLUDED 1
-
- #include
- #include
- #include
- #include
- #include
-
- #if defined(_WIN32)
-
- #define TN3270_PUBLIC __declspec (dllexport)
- #define TN3270_PRIVATE
-
- #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
-
- #define TN3270_PUBLIC
- #define TN3270_PRIVATE
-
- #elif defined(__GNUC__)
-
- #define TN3270_PUBLIC __attribute__((visibility("default")))
- #define TN3270_PRIVATE __attribute__((visibility("hidden")))
-
- #else
-
- #error Unable to set visibility attribute
-
- #endif
-
-#ifdef __cplusplus
-
- #include
-
- namespace TN3270 {
-
- class Host;
- class Controller;
-
- #define DEFAULT_TIMEOUT 5
-
- class TN3270_PUBLIC Event {
- public:
- enum Type : uint8_t {
- All, ///< @brief All events (undefined).
- Popup, ///< @brief Popup message.
- Trace, ///< @brief Trace message.
- Message, ///< @brief Generic message.
- Connection ///< @brief Connect/Disconnect event.
- };
-
- private:
- Type type;
-
- protected:
- Event(enum Type type);
-
- public:
- virtual ~Event();
-
- /// @brief Check event type
- inline bool is(Event::Type type) const noexcept {
- return this->type == type;
- }
-
- /// @brief Check event type
- inline bool operator==(Event::Type type) const noexcept {
- return this->type == type;
- }
-
- inline operator Event::Type() const noexcept {
- return this->type;
- }
-
- /// @brief Get event description.
- virtual std::string toString() const = 0;
-
- };
-
- enum ProgramMessage : uint8_t {
- MESSAGE_NONE = LIB3270_MESSAGE_NONE, ///< @brief No message
- MESSAGE_SYSWAIT = LIB3270_MESSAGE_SYSWAIT, ///< @brief --
- MESSAGE_TWAIT = LIB3270_MESSAGE_TWAIT, ///< @brief --
- MESSAGE_CONNECTED = LIB3270_MESSAGE_CONNECTED, ///< @brief Connected
- MESSAGE_DISCONNECTED = LIB3270_MESSAGE_DISCONNECTED, ///< @brief Disconnected from host
- MESSAGE_AWAITING_FIRST = LIB3270_MESSAGE_AWAITING_FIRST, ///< @brief --
- MESSAGE_MINUS = LIB3270_MESSAGE_MINUS, ///< @brief --
- MESSAGE_PROTECTED = LIB3270_MESSAGE_PROTECTED, ///< @brief --
- MESSAGE_NUMERIC = LIB3270_MESSAGE_NUMERIC, ///< @brief --
- MESSAGE_OVERFLOW = LIB3270_MESSAGE_OVERFLOW, ///< @brief --
- MESSAGE_INHIBIT = LIB3270_MESSAGE_INHIBIT, ///< @brief --
- MESSAGE_KYBDLOCK = LIB3270_MESSAGE_KYBDLOCK, ///< @brief Keyboard is locked
-
- MESSAGE_X = LIB3270_MESSAGE_X, ///< @brief --
- MESSAGE_RESOLVING = LIB3270_MESSAGE_RESOLVING, ///< @brief Resolving hostname (running DNS query)
- MESSAGE_CONNECTING = LIB3270_MESSAGE_CONNECTING ///< @brief Connecting to host
-
- };
-
- /// @brief connection state.
- enum ConnectionState : uint8_t {
- DISCONNECTED = LIB3270_NOT_CONNECTED, ///< @brief disconnected
- RESOLVING = LIB3270_RESOLVING, ///< @brief resolving hostname
- PENDING = LIB3270_PENDING, ///< @brief connection pending
- CONNECTED_INITIAL = LIB3270_CONNECTED_INITIAL, ///< @brief connected, no mode yet
- CONNECTED_ANSI = LIB3270_CONNECTED_ANSI, ///< @brief connected in NVT ANSI mode
- CONNECTED_3270 = LIB3270_CONNECTED_3270, ///< @brief connected in old-style 3270 mode
- CONNECTED_INITIAL_E = LIB3270_CONNECTED_INITIAL_E, ///< @brief connected in TN3270E mode, unnegotiated
- CONNECTED_NVT = LIB3270_CONNECTED_NVT, ///< @brief connected in TN3270E mode, NVT mode
- CONNECTED_SSCP = LIB3270_CONNECTED_SSCP, ///< @brief connected in TN3270E mode, SSCP-LU mode
- CONNECTED_TN3270E = LIB3270_CONNECTED_TN3270E, ///< @brief connected in TN3270E mode, 3270 mode
- };
-
- /// @brief PF Keys
- enum PFKey : uint8_t {
- PF_1,
- PF_2,
- PF_3,
- PF_4,
- PF_5,
- PF_6,
- PF_7,
- PF_8,
- PF_9,
- PF_10,
- PF_11,
- PF_12
- };
-
- /// @brief PF Keys
- enum PAKey : uint8_t {
- PA_1,
- PA_2,
- PA_3
- };
-
- /// @brief Actions keys
- enum Action : uint8_t {
- ENTER, ///< Enter key
- ERASE,
- ERASE_EOF,
- ERASE_EOL,
- ERASE_INPUT
- };
-
- /// @brief TN3270 Session.
- class TN3270_PUBLIC Session {
- protected:
- Session();
-
- /// @brief Write information to log file.
- void info(const char *fmt, ...) const;
-
- /// @brief Write warning to log file.
- void warning(const char *fmt, ...) const;
-
- /// @brief Write error to log file.
- void error(const char *fmt, ...) const;
-
- /// @brief Fire event.
- void fire(const Event &event);
-
- public:
-
- /// @brief Create a tn3270 session.
- static Session * create(const char *id = nullptr);
-
- virtual ~Session();
-
- // Connect/disconnect
- virtual void connect(const char *url) = 0;
- virtual void disconnect() = 0;
-
- // Wait for session state.
- virtual void waitForReady(time_t timeout = DEFAULT_TIMEOUT) = 0;
-
- // Gets
- virtual std::string toString(int baddr = 0, size_t len = -1, char lf = '\n') const = 0;
- virtual std::string toString(int row, int col, size_t sz, char lf = '\n') const = 0;
-
- inline operator std::string() const {
- return toString();
- }
-
- // Get properties.
- virtual void getProperty(const char *name, int &value) const = 0;
- virtual void getProperty(const char *name, std::string &value) const = 0;
- virtual void getProperty(const char *name, bool &value) const = 0;
-
- virtual std::string getVersion() const = 0;
- virtual std::string getRevision() const = 0;
-
- virtual ProgramMessage getProgramMessage() const = 0;
- inline operator ProgramMessage() const {
- return getProgramMessage();
- }
-
- virtual ConnectionState getConnectionState() const = 0;
- inline operator ConnectionState() const {
- return getConnectionState();
- }
-
- inline bool operator==(ConnectionState state) const noexcept {
- return this->getConnectionState() == state;
- }
-
- // Set contents.
-
- /// @brief Set field at current posicion, jumps to next writable field.
- virtual Session & push(const char *text) = 0;
- inline Session & push(const std::string &text) {
- return push(text.c_str());
- }
-
- /// @brief Set cursor address.
- virtual TN3270::Session & setCursorPosition(unsigned short addr) = 0;
-
- /// @brief Set cursor position.
- virtual TN3270::Session & setCursorPosition(unsigned short row, unsigned short col) = 0;
-
- virtual Session & push(int baddr, const std::string &text) = 0;
- virtual Session & push(int row, int col, const std::string &text) = 0;
- virtual Session & push(const PFKey key) = 0;
- virtual Session & push(const PAKey key) = 0;
- virtual Session & push(const Action action) = 0;
-
- // Get contents.
- virtual Session & pop(int baddr, std::string &text) = 0;
- virtual Session & pop(int row, int col, std::string &text) = 0;
- virtual Session & pop(std::string &text) = 0;
-
- /// @brief Insert event listener.
- void insert(Event::Type type, std::function listener);
-
- // Misc
-
- /// @brief Execute action by name.
- virtual Session & action(const char *action_name) = 0;
-
- };
-
- /// @brief TN3270 Host
- class TN3270_PUBLIC Host : public std::basic_streambuf > {
- private:
-
- /// @brief Connection with the host
- Session *session;
-
- /// @brief How much seconds we wait for the terminal to be ready?
- time_t timeout;
-
- protected:
-
- /// @brief Writes characters to the associated file from the put area
- int sync() override;
-
- /// @brief Writes characters to the associated output sequence from the put area.
- int overflow(int c) override;
-
- /// @brief Write information to log file.
- void info(const char *fmt, ...) const;
-
- /// @brief Write warning to log file.
- void warning(const char *fmt, ...) const;
-
- /// @brief Write error to log file.
- void error(const char *fmt, ...) const;
-
- public:
- Host(const char *id = nullptr, const char *url = nullptr, time_t timeout = DEFAULT_TIMEOUT);
- ~Host();
-
- inline bool operator==(ConnectionState state) const noexcept {
- return session->getConnectionState() == state;
- }
-
- void connect(const char *url, bool sync = true);
-
- inline ProgramMessage getProgramMessage() const {
- return session->getProgramMessage();
- }
-
- inline operator bool() const {
- return isReady();
- }
-
- inline operator ProgramMessage() const {
- return getProgramMessage();
- }
-
- inline ConnectionState getConnectionState() const {
- return session->getConnectionState();
- }
-
- bool isReady() const;
- bool isConnected() const;
-
- inline operator ConnectionState() const {
- return getConnectionState();
- }
-
- /// @brief Set cursor address.
- inline void setCursorPosition(unsigned short addr) {
- session->setCursorPosition(addr);
- }
-
- /// @brief Set cursor position.
- inline void setCursorPosition(unsigned short row, unsigned short col) {
- session->setCursorPosition(row,col);
- }
-
- // Get properties
-
- /// @brief Get lib3270 version.
- inline std::string getVersion() const {
- return session->getVersion();
- }
-
- /// @brief Get lib3270 revision.
- std::string getRevision() const {
- return session->getRevision();
- }
-
- // Set contents.
-
- /// @brief Set field at current posicion, jumps to next writable field.
- inline Host & push(const char *text) {
- session->push(text);
- return *this;
- };
-
- inline Host & push(const std::string &text) {
- session->push(text);
- return *this;
-
- }
-
- inline Host & push(int baddr, const std::string &text) {
- session->push(baddr,text);
- return *this;
- }
-
- inline Host & push(int row, int col, const std::string &text) {
- session->push(row,col,text);
- return *this;
- }
-
- inline Host & push(const PFKey key) {
- session->push(key);
- return *this;
- }
-
- inline Host & push(const PAKey key) {
- session->push(key);
- return *this;
- }
-
- Host & push(const Action action);
-
- // Get contents.
-
- Host & pop(int baddr, std::string &text);
- Host & pop(int row, int col, std::string &text);
- Host & pop(std::string &text);
-
- std::string toString() const;
- std::string toString(int baddr, size_t len = -1, char lf = '\n') const;
- std::string toString(int row, int col, size_t sz, char lf = '\n') const;
-
- // Event listeners
- inline Host & insert(Event::Type type, std::function listener) noexcept {
- session->insert(type, listener);
- return *this;
- }
-
-
- };
-
- }
-
- TN3270_PUBLIC const char * toCharString(const TN3270::ProgramMessage programMessage) noexcept;
- TN3270_PUBLIC const char * toCharString(const TN3270::ConnectionState connectionState) noexcept;
-
- template
- inline TN3270_PUBLIC TN3270::Session & operator<<(TN3270::Session& session, const T value) {
- return session.push(value);
- }
-
- template
- inline TN3270_PUBLIC TN3270::Session & operator>>(TN3270::Session& session, const T value) {
- return session.pop(value);
- }
-
- template
- inline TN3270_PUBLIC TN3270::Host & operator<<(TN3270::Host& host, const T value) {
- return host.push(value);
- }
-
- inline std::ostream & operator<<(std::ostream &stream, const TN3270::Host& host) {
- stream << host.toString();
- return stream;
- }
-
-
-#endif
-
-#endif // LIB3270_H_INCLUDED
diff --git a/src/include/localdefs.h b/src/include/localdefs.h
index 4e13d5b..145fc13 100644
--- a/src/include/localdefs.h
+++ b/src/include/localdefs.h
@@ -33,50 +33,23 @@
/* These first definitions were cribbed from X11 -- but no X code is used. */
#define False 0
#define True 1
-//typedef void *XtPointer;
-// typedef void *Widget;
-// typedef void *XEvent;
+
#ifdef __APPLE__
typedef unsigned char Boolean;
#else
typedef char Boolean;
#endif
+
typedef char *String;
-// typedef unsigned int Cardinal;
-typedef unsigned long KeySym;
+//typedef unsigned long KeySym;
#define Bool int
-/*
-typedef void (*XtActionProc)(
- Widget // widget,
- XEvent* // event,
- String* // params,
- Cardinal* // num_param
-);
-*/
-
-/*
-typedef struct _XtActionsRec{
- String string;
- XtActionProc proc;
-} XtActionsRec;
-*/
-
-#define XtNumber(n) (sizeof(n)/sizeof((n)[0]))
-#define NoSymbol 0L
+//#define XtNumber(n) (sizeof(n)/sizeof((n)[0]))
+//#define NoSymbol 0L
/* These are local functions with similar semantics to X functions. */
-
-// void * Malloc(size_t);
-// void Free(void *);
-// void * Calloc(size_t, size_t);
-// void * Realloc(void *, size_t);
-
-// #define Malloc(x) lib3270_malloc(x)
-// #define Free(x) lib3270_free(x)
#define Calloc(e,n) lib3270_calloc(e,n,NULL)
#define Realloc(x,n) lib3270_realloc(x,n)
#define NewString(x) strdup(x)
-//extern char *NewString(const char *);
diff --git a/src/include/proxyc.h b/src/include/proxyc.h
deleted file mode 100644
index 605983c..0000000
--- a/src/include/proxyc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2007 by Paul Mattes.
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * x3270, c3270, wc3270, s3270 and tcl3270 are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * file LICENSE for more details.
- */
-
-/*
- * proxyc.h
- * Declarations for proxy.c.
- */
-
-LIB3270_INTERNAL int proxy_setup(H3270 *session, char **phost, char **pport);
-LIB3270_INTERNAL int proxy_negotiate(H3270 *session, int type, int fd, char *host, unsigned short port);
-LIB3270_INTERNAL const char * proxy_type_name(int type);
diff --git a/src/include/resolverc.h b/src/include/resolverc.h
deleted file mode 100644
index ac76720..0000000
--- a/src/include/resolverc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2007 by Paul Mattes.
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * x3270, c3270, wc3270, s3270, tcl3270, pr3287 and wpr3287 are distributed in
- * the hope that they will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the file LICENSE for more details.
- */
-
-/*
- * resolverc.h
- * Hostname resolution.
- */
-
-// 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);
-
-
diff --git a/src/include/resources.h b/src/include/resources.h
index 9c77575..76cfe7e 100644
--- a/src/include/resources.h
+++ b/src/include/resources.h
@@ -18,6 +18,8 @@
* x3270/c3270/s3270/tcl3270 resource and option names.
*/
+#error Deprecated
+
/* Resources. */
#define ResActiveIcon "activeIcon"
#define ResAdVersion "adVersion"
diff --git a/src/include/shlobj_missing.h b/src/include/shlobj_missing.h
index c7c777a..7bc9f50 100644
--- a/src/include/shlobj_missing.h
+++ b/src/include/shlobj_missing.h
@@ -1,5 +1,7 @@
/* IShellLinkDataList, missing from mingw's . */
+#error Deprecated
+
LIB3270_INTERNAL const GUID IID_IShellLinkDataList;
#define INTERFACE IShellLinkDataList
diff --git a/src/include/statusc.h b/src/include/statusc.h
index 5a06d1b..6d13dc0 100644
--- a/src/include/statusc.h
+++ b/src/include/statusc.h
@@ -30,9 +30,6 @@
LIB3270_INTERNAL void status_compose(int on, unsigned char c, enum keytype keytype);
LIB3270_INTERNAL void status_ctlr_done(H3270 *session);
-// LIB3270_INTERNAL void status_timing(H3270 *session, struct timeval *t0, struct timeval *t1);
-// LIB3270_INTERNAL void status_untiming(H3270 *session);
-
LIB3270_INTERNAL void status_lu(H3270 *session, const char *);
LIB3270_INTERNAL void status_oerr(H3270 *session, int error_type);
LIB3270_INTERNAL void status_reset(H3270 *session);
diff --git a/src/include/telnetc.h b/src/include/telnetc.h
index 689570a..9a6ddb0 100644
--- a/src/include/telnetc.h
+++ b/src/include/telnetc.h
@@ -62,4 +62,3 @@ LIB3270_INTERNAL void space3270out(H3270 *hSession, int n);
#define trace_netdata(direction, buf, len) /* */
#endif // X3270_TRACE
-// LIB3270_INTERNAL int net_getsockname(const H3270 *h3270, void *buf, int *len);
diff --git a/src/include/utf8c.h b/src/include/utf8c.h
index 7f810fb..d0ca5fc 100644
--- a/src/include/utf8c.h
+++ b/src/include/utf8c.h
@@ -18,15 +18,17 @@
* UTF-8 conversions
*/
+ /*
enum ulfail {
- ULFAIL_NOUTF8, /* not using UTF-8 */
- ULFAIL_INCOMPLETE, /* incomplete sequence */
- ULFAIL_INVALID /* invalid sequence */
+ ULFAIL_NOUTF8, // not using UTF-8
+ ULFAIL_INCOMPLETE, // incomplete sequence
+ ULFAIL_INVALID // invalid sequence
};
+*/
// LIB3270_INTERNAL char *locale_codeset;
// LIB3270_INTERNAL void set_codeset(char *codeset_name);
// LIB3270_INTERNAL Boolean utf8_set_display_charsets(char *cslist, char *csname);
- LIB3270_INTERNAL char *utf8_expand(unsigned char c);
- LIB3270_INTERNAL unsigned char utf8_lookup(char *mbs, enum ulfail *fail, int *consumed);
+// LIB3270_INTERNAL char *utf8_expand(unsigned char c);
+// LIB3270_INTERNAL unsigned char utf8_lookup(char *mbs, enum ulfail *fail, int *consumed);
diff --git a/src/include/xl.h b/src/include/xl.h
index 90d0aa6..fb20380 100644
--- a/src/include/xl.h
+++ b/src/include/xl.h
@@ -17,9 +17,11 @@
* DBCS translation table structure.
*/
+ /*
typedef struct {
unsigned n;
unsigned short *data;
} xl_t;
#define XL_SIZE(e) ((sizeof(e)/sizeof(e[0]))/3)
+*/
--
libgit2 0.21.2