diff --git a/pw3270.cbp b/pw3270.cbp
index d0c1459..9a7346a 100644
--- a/pw3270.cbp
+++ b/pw3270.cbp
@@ -68,19 +68,12 @@
-
-
-
-
-
-
-
@@ -218,14 +211,8 @@
-
-
-
-
-
-
diff --git a/src/lib3270/XtGlue.c b/src/lib3270/XtGlue.c
index 346ade5..3c44587 100644
--- a/src/lib3270/XtGlue.c
+++ b/src/lib3270/XtGlue.c
@@ -30,6 +30,8 @@
*
*/
+#error Deprecated
+
/* glue for missing Xt code */
#if defined(_WIN32)
#include
@@ -81,233 +83,6 @@
/*---[ Implement external calls ]---------------------------------------------------------------------------*/
-static struct {
- const char *name;
- KeySym keysym;
-} latin1[] = {
- { "space", XK_space },
- { "exclam", XK_exclam },
- { "quotedbl", XK_quotedbl },
- { "numbersign", XK_numbersign },
- { "dollar", XK_dollar },
- { "percent", XK_percent },
- { "ampersand", XK_ampersand },
- { "apostrophe", XK_apostrophe },
- { "quoteright", XK_quoteright },
- { "parenleft", XK_parenleft },
- { "parenright", XK_parenright },
- { "asterisk", XK_asterisk },
- { "plus", XK_plus },
- { "comma", XK_comma },
- { "minus", XK_minus },
- { "period", XK_period },
- { "slash", XK_slash },
- { "0", XK_0 },
- { "1", XK_1 },
- { "2", XK_2 },
- { "3", XK_3 },
- { "4", XK_4 },
- { "5", XK_5 },
- { "6", XK_6 },
- { "7", XK_7 },
- { "8", XK_8 },
- { "9", XK_9 },
- { "colon", XK_colon },
- { "semicolon", XK_semicolon },
- { "less", XK_less },
- { "equal", XK_equal },
- { "greater", XK_greater },
- { "question", XK_question },
- { "at", XK_at },
- { "A", XK_A },
- { "B", XK_B },
- { "C", XK_C },
- { "D", XK_D },
- { "E", XK_E },
- { "F", XK_F },
- { "G", XK_G },
- { "H", XK_H },
- { "I", XK_I },
- { "J", XK_J },
- { "K", XK_K },
- { "L", XK_L },
- { "M", XK_M },
- { "N", XK_N },
- { "O", XK_O },
- { "P", XK_P },
- { "Q", XK_Q },
- { "R", XK_R },
- { "S", XK_S },
- { "T", XK_T },
- { "U", XK_U },
- { "V", XK_V },
- { "W", XK_W },
- { "X", XK_X },
- { "Y", XK_Y },
- { "Z", XK_Z },
- { "bracketleft", XK_bracketleft },
- { "backslash", XK_backslash },
- { "bracketright", XK_bracketright },
- { "asciicircum", XK_asciicircum },
- { "underscore", XK_underscore },
- { "grave", XK_grave },
- { "quoteleft", XK_quoteleft },
- { "a", XK_a },
- { "b", XK_b },
- { "c", XK_c },
- { "d", XK_d },
- { "e", XK_e },
- { "f", XK_f },
- { "g", XK_g },
- { "h", XK_h },
- { "i", XK_i },
- { "j", XK_j },
- { "k", XK_k },
- { "l", XK_l },
- { "m", XK_m },
- { "n", XK_n },
- { "o", XK_o },
- { "p", XK_p },
- { "q", XK_q },
- { "r", XK_r },
- { "s", XK_s },
- { "t", XK_t },
- { "u", XK_u },
- { "v", XK_v },
- { "w", XK_w },
- { "x", XK_x },
- { "y", XK_y },
- { "z", XK_z },
- { "braceleft", XK_braceleft },
- { "bar", XK_bar },
- { "braceright", XK_braceright },
- { "asciitilde", XK_asciitilde },
- { "nobreakspace", XK_nobreakspace },
- { "exclamdown", XK_exclamdown },
- { "cent", XK_cent },
- { "sterling", XK_sterling },
- { "currency", XK_currency },
- { "yen", XK_yen },
- { "brokenbar", XK_brokenbar },
- { "section", XK_section },
- { "diaeresis", XK_diaeresis },
- { "copyright", XK_copyright },
- { "ordfeminine", XK_ordfeminine },
- { "guillemotleft", XK_guillemotleft },
- { "notsign", XK_notsign },
- { "hyphen", XK_hyphen },
- { "registered", XK_registered },
- { "macron", XK_macron },
- { "degree", XK_degree },
- { "plusminus", XK_plusminus },
- { "twosuperior", XK_twosuperior },
- { "threesuperior", XK_threesuperior },
- { "acute", XK_acute },
- { "mu", XK_mu },
- { "paragraph", XK_paragraph },
- { "periodcentered", XK_periodcentered },
- { "cedilla", XK_cedilla },
- { "onesuperior", XK_onesuperior },
- { "masculine", XK_masculine },
- { "guillemotright", XK_guillemotright },
- { "onequarter", XK_onequarter },
- { "onehalf", XK_onehalf },
- { "threequarters", XK_threequarters },
- { "questiondown", XK_questiondown },
- { "Agrave", XK_Agrave },
- { "Aacute", XK_Aacute },
- { "Acircumflex", XK_Acircumflex },
- { "Atilde", XK_Atilde },
- { "Adiaeresis", XK_Adiaeresis },
- { "Aring", XK_Aring },
- { "AE", XK_AE },
- { "Ccedilla", XK_Ccedilla },
- { "Egrave", XK_Egrave },
- { "Eacute", XK_Eacute },
- { "Ecircumflex", XK_Ecircumflex },
- { "Ediaeresis", XK_Ediaeresis },
- { "Igrave", XK_Igrave },
- { "Iacute", XK_Iacute },
- { "Icircumflex", XK_Icircumflex },
- { "Idiaeresis", XK_Idiaeresis },
- { "ETH", XK_ETH },
- { "Eth", XK_Eth },
- { "Ntilde", XK_Ntilde },
- { "Ograve", XK_Ograve },
- { "Oacute", XK_Oacute },
- { "Ocircumflex", XK_Ocircumflex },
- { "Otilde", XK_Otilde },
- { "Odiaeresis", XK_Odiaeresis },
- { "multiply", XK_multiply },
- { "Ooblique", XK_Ooblique },
- { "Ugrave", XK_Ugrave },
- { "Uacute", XK_Uacute },
- { "Ucircumflex", XK_Ucircumflex },
- { "Udiaeresis", XK_Udiaeresis },
- { "Yacute", XK_Yacute },
- { "THORN", XK_THORN },
- { "Thorn", XK_Thorn },
- { "ssharp", XK_ssharp },
- { "agrave", XK_agrave },
- { "aacute", XK_aacute },
- { "acircumflex", XK_acircumflex },
- { "atilde", XK_atilde },
- { "adiaeresis", XK_adiaeresis },
- { "aring", XK_aring },
- { "ae", XK_ae },
- { "ccedilla", XK_ccedilla },
- { "egrave", XK_egrave },
- { "eacute", XK_eacute },
- { "ecircumflex", XK_ecircumflex },
- { "ediaeresis", XK_ediaeresis },
- { "igrave", XK_igrave },
- { "iacute", XK_iacute },
- { "icircumflex", XK_icircumflex },
- { "idiaeresis", XK_idiaeresis },
- { "eth", XK_eth },
- { "ntilde", XK_ntilde },
- { "ograve", XK_ograve },
- { "oacute", XK_oacute },
- { "ocircumflex", XK_ocircumflex },
- { "otilde", XK_otilde },
- { "odiaeresis", XK_odiaeresis },
- { "division", XK_division },
- { "oslash", XK_oslash },
- { "ugrave", XK_ugrave },
- { "uacute", XK_uacute },
- { "ucircumflex", XK_ucircumflex },
- { "udiaeresis", XK_udiaeresis },
- { "yacute", XK_yacute },
- { "thorn", XK_thorn },
- { "ydiaeresis", XK_ydiaeresis },
-
- // The following are, umm, hacks to allow symbolic names for
- // control codes.
-#if !defined(_WIN32)
- { "BackSpace", 0x08 },
- { "Tab", 0x09 },
- { "Linefeed", 0x0a },
- { "Return", 0x0d },
- { "Escape", 0x1b },
- { "Delete", 0x7f },
-#endif
-
- { (char *)NULL, NoSymbol }
-};
-
-KeySym StringToKeysym(char *s)
-{
- int i;
-
- if (strlen(s) == 1 && (*(unsigned char *)s & 0x7f) > ' ')
- return (KeySym)*(unsigned char *)s;
- for (i = 0; latin1[i].name != (char *)NULL; i++) {
- if (!strcmp(s, latin1[i].name))
- return latin1[i].keysym;
- }
- return NoSymbol;
-}
-
/*
const char * KeysymToString(KeySym k)
{
diff --git a/src/lib3270/aplc.h b/src/lib3270/aplc.h
index 5f0af37..1d31177 100644
--- a/src/lib3270/aplc.h
+++ b/src/lib3270/aplc.h
@@ -17,4 +17,6 @@
* Global declarations for apl.c.
*/
+#error Deprecated
+
LIB3270_INTERNAL KeySym APLStringToKeysym(char *s, int *is_gep);
diff --git a/src/lib3270/charset.c b/src/lib3270/charset.c
index 62e8464..1fb353a 100644
--- a/src/lib3270/charset.c
+++ b/src/lib3270/charset.c
@@ -55,6 +55,7 @@
#include "utf8c.h"
#include "utilc.h"
#include "widec.h"
+#include "X11keysym.h"
#include
@@ -103,6 +104,8 @@ static char *char_if_ascii7(unsigned long l);
static void set_cgcsgids(const char *spec);
static int set_cgcsgid(char *spec, unsigned long *idp);
+static KeySym StringToKeysym(char *s);
+
// static void set_charset_name(char *csname);
// static char *charset_name = CN;
@@ -748,3 +751,232 @@ LIB3270_EXPORT const char * lib3270_get_charset(H3270 *session)
CHECK_SESSION_HANDLE(session);
return session->charset ? session->charset : "ISO-8859-1";
}
+
+static KeySym StringToKeysym(char *s)
+{
+ static struct
+ {
+ const char *name;
+ KeySym keysym;
+ } latin1[] =
+ {
+ { "space", XK_space },
+ { "exclam", XK_exclam },
+ { "quotedbl", XK_quotedbl },
+ { "numbersign", XK_numbersign },
+ { "dollar", XK_dollar },
+ { "percent", XK_percent },
+ { "ampersand", XK_ampersand },
+ { "apostrophe", XK_apostrophe },
+ { "quoteright", XK_quoteright },
+ { "parenleft", XK_parenleft },
+ { "parenright", XK_parenright },
+ { "asterisk", XK_asterisk },
+ { "plus", XK_plus },
+ { "comma", XK_comma },
+ { "minus", XK_minus },
+ { "period", XK_period },
+ { "slash", XK_slash },
+ { "0", XK_0 },
+ { "1", XK_1 },
+ { "2", XK_2 },
+ { "3", XK_3 },
+ { "4", XK_4 },
+ { "5", XK_5 },
+ { "6", XK_6 },
+ { "7", XK_7 },
+ { "8", XK_8 },
+ { "9", XK_9 },
+ { "colon", XK_colon },
+ { "semicolon", XK_semicolon },
+ { "less", XK_less },
+ { "equal", XK_equal },
+ { "greater", XK_greater },
+ { "question", XK_question },
+ { "at", XK_at },
+ { "A", XK_A },
+ { "B", XK_B },
+ { "C", XK_C },
+ { "D", XK_D },
+ { "E", XK_E },
+ { "F", XK_F },
+ { "G", XK_G },
+ { "H", XK_H },
+ { "I", XK_I },
+ { "J", XK_J },
+ { "K", XK_K },
+ { "L", XK_L },
+ { "M", XK_M },
+ { "N", XK_N },
+ { "O", XK_O },
+ { "P", XK_P },
+ { "Q", XK_Q },
+ { "R", XK_R },
+ { "S", XK_S },
+ { "T", XK_T },
+ { "U", XK_U },
+ { "V", XK_V },
+ { "W", XK_W },
+ { "X", XK_X },
+ { "Y", XK_Y },
+ { "Z", XK_Z },
+ { "bracketleft", XK_bracketleft },
+ { "backslash", XK_backslash },
+ { "bracketright", XK_bracketright },
+ { "asciicircum", XK_asciicircum },
+ { "underscore", XK_underscore },
+ { "grave", XK_grave },
+ { "quoteleft", XK_quoteleft },
+ { "a", XK_a },
+ { "b", XK_b },
+ { "c", XK_c },
+ { "d", XK_d },
+ { "e", XK_e },
+ { "f", XK_f },
+ { "g", XK_g },
+ { "h", XK_h },
+ { "i", XK_i },
+ { "j", XK_j },
+ { "k", XK_k },
+ { "l", XK_l },
+ { "m", XK_m },
+ { "n", XK_n },
+ { "o", XK_o },
+ { "p", XK_p },
+ { "q", XK_q },
+ { "r", XK_r },
+ { "s", XK_s },
+ { "t", XK_t },
+ { "u", XK_u },
+ { "v", XK_v },
+ { "w", XK_w },
+ { "x", XK_x },
+ { "y", XK_y },
+ { "z", XK_z },
+ { "braceleft", XK_braceleft },
+ { "bar", XK_bar },
+ { "braceright", XK_braceright },
+ { "asciitilde", XK_asciitilde },
+ { "nobreakspace", XK_nobreakspace },
+ { "exclamdown", XK_exclamdown },
+ { "cent", XK_cent },
+ { "sterling", XK_sterling },
+ { "currency", XK_currency },
+ { "yen", XK_yen },
+ { "brokenbar", XK_brokenbar },
+ { "section", XK_section },
+ { "diaeresis", XK_diaeresis },
+ { "copyright", XK_copyright },
+ { "ordfeminine", XK_ordfeminine },
+ { "guillemotleft", XK_guillemotleft },
+ { "notsign", XK_notsign },
+ { "hyphen", XK_hyphen },
+ { "registered", XK_registered },
+ { "macron", XK_macron },
+ { "degree", XK_degree },
+ { "plusminus", XK_plusminus },
+ { "twosuperior", XK_twosuperior },
+ { "threesuperior", XK_threesuperior },
+ { "acute", XK_acute },
+ { "mu", XK_mu },
+ { "paragraph", XK_paragraph },
+ { "periodcentered", XK_periodcentered },
+ { "cedilla", XK_cedilla },
+ { "onesuperior", XK_onesuperior },
+ { "masculine", XK_masculine },
+ { "guillemotright", XK_guillemotright },
+ { "onequarter", XK_onequarter },
+ { "onehalf", XK_onehalf },
+ { "threequarters", XK_threequarters },
+ { "questiondown", XK_questiondown },
+ { "Agrave", XK_Agrave },
+ { "Aacute", XK_Aacute },
+ { "Acircumflex", XK_Acircumflex },
+ { "Atilde", XK_Atilde },
+ { "Adiaeresis", XK_Adiaeresis },
+ { "Aring", XK_Aring },
+ { "AE", XK_AE },
+ { "Ccedilla", XK_Ccedilla },
+ { "Egrave", XK_Egrave },
+ { "Eacute", XK_Eacute },
+ { "Ecircumflex", XK_Ecircumflex },
+ { "Ediaeresis", XK_Ediaeresis },
+ { "Igrave", XK_Igrave },
+ { "Iacute", XK_Iacute },
+ { "Icircumflex", XK_Icircumflex },
+ { "Idiaeresis", XK_Idiaeresis },
+ { "ETH", XK_ETH },
+ { "Eth", XK_Eth },
+ { "Ntilde", XK_Ntilde },
+ { "Ograve", XK_Ograve },
+ { "Oacute", XK_Oacute },
+ { "Ocircumflex", XK_Ocircumflex },
+ { "Otilde", XK_Otilde },
+ { "Odiaeresis", XK_Odiaeresis },
+ { "multiply", XK_multiply },
+ { "Ooblique", XK_Ooblique },
+ { "Ugrave", XK_Ugrave },
+ { "Uacute", XK_Uacute },
+ { "Ucircumflex", XK_Ucircumflex },
+ { "Udiaeresis", XK_Udiaeresis },
+ { "Yacute", XK_Yacute },
+ { "THORN", XK_THORN },
+ { "Thorn", XK_Thorn },
+ { "ssharp", XK_ssharp },
+ { "agrave", XK_agrave },
+ { "aacute", XK_aacute },
+ { "acircumflex", XK_acircumflex },
+ { "atilde", XK_atilde },
+ { "adiaeresis", XK_adiaeresis },
+ { "aring", XK_aring },
+ { "ae", XK_ae },
+ { "ccedilla", XK_ccedilla },
+ { "egrave", XK_egrave },
+ { "eacute", XK_eacute },
+ { "ecircumflex", XK_ecircumflex },
+ { "ediaeresis", XK_ediaeresis },
+ { "igrave", XK_igrave },
+ { "iacute", XK_iacute },
+ { "icircumflex", XK_icircumflex },
+ { "idiaeresis", XK_idiaeresis },
+ { "eth", XK_eth },
+ { "ntilde", XK_ntilde },
+ { "ograve", XK_ograve },
+ { "oacute", XK_oacute },
+ { "ocircumflex", XK_ocircumflex },
+ { "otilde", XK_otilde },
+ { "odiaeresis", XK_odiaeresis },
+ { "division", XK_division },
+ { "oslash", XK_oslash },
+ { "ugrave", XK_ugrave },
+ { "uacute", XK_uacute },
+ { "ucircumflex", XK_ucircumflex },
+ { "udiaeresis", XK_udiaeresis },
+ { "yacute", XK_yacute },
+ { "thorn", XK_thorn },
+ { "ydiaeresis", XK_ydiaeresis },
+
+ // The following are, umm, hacks to allow symbolic names for
+ // control codes.
+ #if !defined(_WIN32)
+ { "BackSpace", 0x08 },
+ { "Tab", 0x09 },
+ { "Linefeed", 0x0a },
+ { "Return", 0x0d },
+ { "Escape", 0x1b },
+ { "Delete", 0x7f },
+ #endif
+
+ { (char *)NULL, NoSymbol }
+ };
+
+ int i;
+
+ if (strlen(s) == 1 && (*(unsigned char *)s & 0x7f) > ' ')
+ return (KeySym)*(unsigned char *)s;
+ for (i = 0; latin1[i].name != (char *)NULL; i++) {
+ if (!strcmp(s, latin1[i].name))
+ return latin1[i].keysym;
+ }
+ return NoSymbol;
+}
diff --git a/src/lib3270/kybd.c b/src/lib3270/kybd.c
index 54383d1..ab61e2e 100644
--- a/src/lib3270/kybd.c
+++ b/src/lib3270/kybd.c
@@ -54,7 +54,7 @@
#include "actionsc.h"
#include "ansic.h"
-#include "aplc.h"
+//#include "aplc.h"
#include "ctlrc.h"
#include "ftc.h"
#include "hostc.h"
diff --git a/src/lib3270/paste.c b/src/lib3270/paste.c
index c689e49..3b74c11 100644
--- a/src/lib3270/paste.c
+++ b/src/lib3270/paste.c
@@ -53,7 +53,7 @@
#include "actionsc.h"
#include "ansic.h"
-#include "aplc.h"
+//#include "aplc.h"
#include "ctlrc.h"
#include "ftc.h"
#include "hostc.h"
diff --git a/src/lib3270/sources.mak b/src/lib3270/sources.mak
index 751bc92..d401163 100644
--- a/src/lib3270/sources.mak
+++ b/src/lib3270/sources.mak
@@ -25,7 +25,7 @@
#
# Terminal only sources
-TERMINAL_SOURCES = bounds.c XtGlue.c ctlr.c util.c toggles.c screen.c selection.c kybd.c telnet.c \
+TERMINAL_SOURCES = bounds.c ctlr.c util.c toggles.c screen.c selection.c kybd.c telnet.c \
host.c sf.c ansi.c resolver.c tables.c utf8.c charset.c \
version.c session.c state.c html.c
diff --git a/src/lib3270/trace_ds.c b/src/lib3270/trace_ds.c
index 1309b19..397643d 100644
--- a/src/lib3270/trace_ds.c
+++ b/src/lib3270/trace_ds.c
@@ -110,7 +110,7 @@
static void __vwtrace(H3270 *session, const char *fmt, va_list args);
static void wtrace(const char *fmt, ...);
// static char *create_tracefile_header(const char *mode);
-static void stop_tracing(void);
+// static void stop_tracing(void);
/* Globals */
struct timeval ds_ts;
diff --git a/src/lib3270/utilc.h b/src/lib3270/utilc.h
index 8cb453a..14187b2 100644
--- a/src/lib3270/utilc.h
+++ b/src/lib3270/utilc.h
@@ -44,7 +44,6 @@ LIB3270_INTERNAL void * AddTimeOut(unsigned long msec, H3270 *session, void (*fn
LIB3270_INTERNAL void RemoveTimeOut(void *cookie);
LIB3270_INTERNAL const char * KeysymToString(KeySym k);
-LIB3270_INTERNAL KeySym StringToKeysym(char *s);
// LIB3270_INTERNAL int read_resource_file(const char *filename, Boolean fatal);
LIB3270_INTERNAL Boolean split_hier(char *label, char **base, char ***parents);
diff --git a/src/lib3270/w3misc.c b/src/lib3270/w3misc.c
index 17e0798..b4598e6 100644
--- a/src/lib3270/w3misc.c
+++ b/src/lib3270/w3misc.c
@@ -30,6 +30,7 @@
*
*/
+#error Deprecated
/*
* w3misc.c
diff --git a/src/lib3270/winvers.c b/src/lib3270/winvers.c
index 34b3a04..9d557d6 100644
--- a/src/lib3270/winvers.c
+++ b/src/lib3270/winvers.c
@@ -30,6 +30,7 @@
*
*/
+#error Deprecated
/*
* winvers.c
diff --git a/src/pw3270/print.c b/src/pw3270/print.c
index 72e2b21..05dc998 100644
--- a/src/pw3270/print.c
+++ b/src/pw3270/print.c
@@ -544,11 +544,26 @@ static gchar * enum_to_string(GType type, guint enum_value)
static void draw_text(GtkPrintOperation *prt, GtkPrintContext *context, gint pg, PRINT_INFO *info)
{
- cairo_t * cr = gtk_print_context_get_cairo_context(context);
+ cairo_t * cr = gtk_print_context_get_cairo_context(context);
+ GdkRectangle rect;
+ int row = pg*info->lpp;
+ int l;
cairo_set_scaled_font(cr,info->font_scaled);
+ memset(&rect,0,sizeof(rect));
+ rect.y = 2;
+ rect.height = (info->extents.height + info->extents.descent)+1;
+ rect.width = info->extents.max_x_advance+1;
+ for(l=0;llpp && row < info->rows;l++)
+ {
+ cairo_move_to(cr,2,rect.y+rect.height);
+ cairo_show_text(cr, info->text[row]);
+ cairo_stroke(cr);
+ row++;
+ rect.y += (rect.height-1);
+ }
}
--
libgit2 0.21.2