Re: Patch: compilation on 64-bit systems
Marco Pinelli <[email protected]>
| Newsgroups | gmane.comp.emulators.tn5250 |
|---|---|
| Message-ID | <[email protected]> |
Sorry for replying to my own post: I just realized that the attachment didn't make it thru. Anyway, here is the patch:
Index: curses/cursesterm.c
===================================================================
RCS file: /cvsroot/tn5250/tn5250/curses/cursesterm.c,v
retrieving revision 1.3
diff -u -r1.3 cursesterm.c
--- curses/cursesterm.c 21 Nov 2008 08:12:20 -0000 1.3
+++ curses/cursesterm.c 23 May 2010 09:54:15 -0000
@@ -21,10 +21,12 @@
*/
#define _TN5250_TERMINAL_PRIVATE_DEFINED
#include "tn5250-private.h"
-#include "cursesterm.h"
#ifdef USE_CURSES
+#include "cursesterm.h"
+#include <term.h>
+
/* Some versions of ncurses don't have this defined. */
#ifndef A_VERTICAL
#define A_VERTICAL ((1UL) << ((22) + 8))
@@ -325,7 +327,7 @@
raw();
#ifdef USE_OWN_KEY_PARSING
- if ((str = (unsigned char *)tgetstr ("ks", NULL)) != NULL)
+ if ((str = tgetstr ("ks", NULL)) != NULL)
tputs (str, 1, putchar);
fflush (stdout);
#else
@@ -400,7 +402,7 @@
/* Determine if the terminal supports underlining. */
if (This->data->have_underscores == 0) {
- if ((unsigned char *)tgetstr ("us", NULL) == NULL)
+ if (tgetstr ("us", NULL) == NULL)
This->data->underscores = 1;
else
This->data->underscores = 0;
@@ -417,7 +419,7 @@
s = sizeof (curses_vt100) / sizeof (Key);
for (i = 0; i < c; i++) {
This->data->k_map[i].k_code = curses_caps[i].k_code;
- if ((str = (unsigned char *)tgetstr (curses_caps[i].k_str, NULL)) != NULL) {
+ if ((str = tgetstr (curses_caps[i].k_str, NULL)) != NULL) {
TN5250_LOG(("Found string for cap '%s': '%s'.\n",
curses_caps[i].k_str, str));
strcpy (This->data->k_map[i].k_str, str);
@@ -442,7 +444,7 @@
/* Damn the exceptions to the rules. (ESC + DEL) */
This->data->k_map[This->data->k_map_len-1].k_code = K_INSERT;
This->data->k_map[This->data->k_map_len-s-1].k_code = K_INSERT;
- if ((str = (unsigned char *)tgetstr ("kD", NULL)) != NULL) {
+ if ((str = tgetstr ("kD", NULL)) != NULL) {
This->data->k_map[This->data->k_map_len-1].k_str[0] = '\033';
This->data->k_map[This->data->k_map_len-s-1].k_str[0] = K_CTRL('G');
strcpy (This->data->k_map[This->data->k_map_len-1].k_str + 1, str);
Index: curses/tn5250.c
===================================================================
RCS file: /cvsroot/tn5250/tn5250/curses/tn5250.c,v
retrieving revision 1.2
diff -u -r1.2 tn5250.c
--- curses/tn5250.c 21 Nov 2008 08:12:21 -0000 1.2
+++ curses/tn5250.c 23 May 2010 09:54:15 -0000
@@ -19,6 +19,7 @@
*/
#include "tn5250-private.h"
+#include "cursesterm.h"
Tn5250Session *sess = NULL;
Tn5250Stream *stream = NULL;
--
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.