The following problem detected when trying to compile
clean dev23 dictribution with DJGPP and PDCURSES:
LYStrings.c: In function `LYgetch_for':
LYStrings.c:1965: `MEVENT' undeclared (first use in this function)
LYStrings.c:1965: (Each undeclared identifier is reported only once
LYStrings.c:1965: for each function it appears in.)
LYStrings.c:1965: parse error before `event'
LYStrings.c:1966: `event' undeclared (first use in this function)
LYStrings.c:1966: too many arguments to function `getmouse'
LYStrings.c:1972: parse error before `event'
LYStrings.c:1978: too many arguments to function `getmouse'
LYStrings.c:1983: `levent' undeclared (first use in this function)
LYStrings.c:2016: label `re_read' used but not defined
make.exe: *** [LYStrings.o] Error 1
I think this is something from the following changes -
Any ideas?
Index: src/LYStrings.c
--- 2.8.3dev.22/src/LYStrings.c Sun Mar 12 16:38:38 2000
+++ 2.8.3dev.23/src/LYStrings.c Sun Mar 26 19:14:00 2000
@@ -15,9 +15,9 @@
#include <HTString.h>
#include <LYCharUtils.h>
#include <HTParse.h>
-#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE)
+#if defined(NCURSES_MOUSE_VERSION) || defined(PDCURSES) || defined(USE_SLANG_MOUSE)
#include <LYMainLoop.h>
-#endif /* NCURSES_MOUSE_VERSION || USE_SLANG_MOUSE */
+#endif
#ifdef DJGPP_KEYHANDLER
#include <pc.h>
@@ -37,13 +37,13 @@
extern unsigned short *LYKbLayout;
extern BOOL HTPassHighCtrlRaw;
-extern HTCJKlang HTCJK;
#ifdef SUPPORT_MULTIBYTE_EDIT
#define IS_KANA(c) (0xa0 <= c && c <= 0xdf)
#endif
#if defined(WIN_EX)
+#undef BUTTON_CTRL
#define BUTTON_CTRL 0 /* Quick hack */
#endif
@@ -74,14 +74,14 @@
static int have_levent;
-#if defined(NCURSES_MOUSE_VERSION) && !defined(WIN_EX)
+#if defined(NCURSES_MOUSE_VERSION)
static MEVENT levent;
#endif
/* Return the value of mouse_link */
PUBLIC int peek_mouse_levent NOARGS
{
-#if defined(NCURSES_MOUSE_VERSION) && !defined(WIN_EX)
+#if defined(NCURSES_MOUSE_VERSION)
if (have_levent > 0) {
ungetmouse(&levent);
have_levent--;
@@ -114,15 +114,8 @@
int *, position)
{
int cmd = LYK_DO_NOTHING;
-#if defined(NCURSES_MOUSE_VERSION)
-#ifndef getbegx
-#define getbegx(win) ((win)->_begx)
-#endif
-#ifndef getbegy
-#define getbegy(win) ((win)->_begy)
-#endif
-#if defined(WIN_EX) /* 1998/12/05 (Sat) 08:10:42 */
+#if defined(WIN_EX) && defined(PDCURSES)
request_mouse_pos();
@@ -178,6 +171,7 @@
cmd = LYK_QUIT;
}
#else
+#if defined(NCURSES_MOUSE_VERSION)
MEVENT event;
getmouse(&event);
@@ -258,8 +252,8 @@
} else if (event.bstate & (BUTTON3_CLICKED | BUTTON3_DOUBLE_CLICKED |
BUTTON3_TRIPLE_CLICKED)) {
cmd = LYK_QUIT;
}
+#endif /* defined(NCURSES_MOUSE_VERSION) */
#endif /* _WINDOWS */
-#endif
return cmd;
}
@@ -1269,7 +1263,7 @@
#endif /* USE_KEYMAPS */
-#ifdef NCURSES_MOUSE_VERSION
+#if defined(NCURSES_MOUSE_VERSION) || defined(PDCURSES)
PRIVATE int LYmouse_menu ARGS4(int, x, int, y, int, atlink, int, code)
{
static char *choices[] = {
@@ -1475,7 +1469,7 @@
#endif /* IGNORE_CTRL_C || USE_GETCHAR etc. */
#if !defined(UCX) || !defined(VAXC) /* errno not modifiable ? */
if (errno == EINTR)
- errno = 0; /* reset - kw */
+ set_errno(0); /* reset - kw */
#endif /* UCX && VAXC */
#ifndef USE_SLANG
clearerr(stdin); /* needed here for ultrix and SOCKETSHR, but why? - FM */
@@ -1561,7 +1555,7 @@
recent_sizechange));
#endif /* HAVE_SIZECHANGE || USE_SLANG */
#if !defined(UCX) || !defined(VAXC) /* errno not modifiable ? */
- errno = 0; /* reset - kw */
+ set_errno(0); /* reset - kw */
#endif /* UCX && VAXC */
return(DO_NOTHING);
}
@@ -1960,8 +1954,9 @@
c = 0x218;
break;
#endif /* PDCurses */
-#ifdef NCURSES_MOUSE_VERSION
+#if defined(NCURSES_MOUSE_VERSION) || defined(PDCURSES)
case KEY_MOUSE:
+ CTRACE((tfp, "KEY_MOUSE\n"));
if (code == FOR_CHOICE) {
c = MOUSE_KEY; /* Will be processed by the caller */
}
@@ -1973,7 +1968,7 @@
}
#endif
else {
-#if !defined(WIN_EX)
+#if !(defined(WIN_EX) && defined(PDCURSES))
MEVENT event;
int err;
int lac = LYK_UNKNOWN;
@@ -2081,7 +2076,7 @@
/* for Windows NT */
request_mouse_pos();
- if (BUTTON_STATUS(1) & BUTTON_CLICKED) {
+ if (BUTTON_STATUS(1) & BUTTON_PRESSED) {
if (MOUSE_Y_POS > (LYlines - V_CMD_AREA)) {
/* Screen BOTTOM */
if (MOUSE_X_POS < left) {