about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-05-14 12:06:00 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1998-05-14 12:06:00 -0400
commitd2bc002de2501d28459b43ced36eaaaa001b59c4 (patch)
tree7f2289a2ad9120dcf4b8c592dd1cb6ff1212d4d9 /src
parent116ac6932821c4a82256313792b26ab28259e8f0 (diff)
downloadlynx-snapshots-d2bc002de2501d28459b43ced36eaaaa001b59c4.tar.gz
snapshot of project "lynx", label v2-8-1dev_11
Diffstat (limited to 'src')
-rw-r--r--src/LYCurses.c13
-rw-r--r--src/LYMain.c4
-rw-r--r--src/LYStrings.c39
-rw-r--r--src/makefile.dsl23
-rw-r--r--src/makefile.wsl4
5 files changed, 54 insertions, 29 deletions
diff --git a/src/LYCurses.c b/src/LYCurses.c
index 3bc76490..42c2fc5b 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -466,17 +466,14 @@ PRIVATE void LYsetWAttr ARGS1(WINDOW *, win)
 	int code = 0;
 	int attr = A_NORMAL;
 	int offs = 1;
-
-#ifdef UNIX
 	static int NoColorVideo = -1;
 
+#ifdef UNIX
 	if (NoColorVideo < 0) {
 		NoColorVideo = tigetnum("ncv");
 	}
 	if (NoColorVideo < 0)
 		NoColorVideo = 0;
-#else /* PDCurses */
-	static int NoColorVideo = 0;
 #endif /* UNIX */
 
 	if (Current_Attr & A_BOLD)
@@ -650,9 +647,9 @@ PUBLIC void start_curses NOARGS
 
     if (slinit == 0) {
 	SLtt_get_terminfo();
-#ifdef __DJGPP__
+#if defined(__DJGPP__) && !defined(DJGPP_KEYHANDLER) 
 	SLkp_init ();
-#endif /* __DJGPP__ */
+#endif /* __DJGPP__ && !DJGPP_KEYHANDLER */ 
 
 #ifdef UNIX
 #if SLANG_VERSION >= 9935
@@ -724,9 +721,7 @@ PUBLIC void start_curses NOARGS
     scrollok(0,0);
     SLsmg_Backspace_Moves = 1;
 #ifndef VMS
-#if defined(_WINDOWS) || defined(__DJGPP__)
-    /* SLgetkey_map_to_ansi (1); -- FIXME: is this needed? */
-#else
+#if !defined(_WINDOWS) && !defined(__DJGPP__) 
     SLtty_set_suspend_state(1);
 #endif /* !_WINDOWS */
 #ifdef SIGTSTP
diff --git a/src/LYMain.c b/src/LYMain.c
index 449b8931..9a588f6a 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -35,9 +35,7 @@
 #endif
 
 #ifdef __DJGPP__
-#ifdef USE_SLANG
 #include <dos.h>
-#endif /* USE_SLANG */
 #endif /* __DJGPP__ */
 
 #ifndef VMS
@@ -2889,7 +2887,7 @@ treated '>' as a co-terminator for double-quotes and tags"
 #ifndef VMS
 #ifdef SYSLOG_REQUESTED_URLS
    PARSE_STR(
-      "syslog", 	NEED_LYSTRING_ARG, 	syslog_txt,
+      "syslog", 	NEED_LYSTRING_ARG, 	&syslog_txt,
       "=text\ninformation for syslog call"
    ),
 #endif
diff --git a/src/LYStrings.c b/src/LYStrings.c
index b39603fa..1f4253ec 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -15,6 +15,11 @@
 #include <LYCharSets.h>
 #include <HTString.h>
 
+#ifdef DJGPP_KEYHANDLER
+#include <pc.h>
+#include <keys.h>
+#endif /* DJGPP_KEYHANDLER */
+
 #include <ctype.h>
 
 #include <LYLeaks.h>
@@ -233,7 +238,11 @@ PUBLIC int LYmbcsstrlen ARGS2(
 #define GetChar() ttgetc()
 #else
 #ifdef __DJGPP__
+#ifdef DJGPP_KEYHANDLER
+#define GetChar getxkey
+#else
 #define GetChar SLkp_getkey
+#endif /* DJGPP_KEYHANDLER */
 #else
 #define GetChar (int)SLang_getkey
 #endif /* __DJGPP__ */
@@ -783,7 +792,31 @@ re_read:
 	    d = GetChar();
     }
 #if defined(__DJGPP__) && defined(USE_SLANG)
-    else { /* SLang keypad interface */
+#ifdef DJGPP_KEYHANDLER
+    else { /* DJGPP keypad interface (see file "keys.h" for definitions) */
+	switch (c) {
+	    case K_Up:		c = UPARROW;	break; /* up arrow */
+	    case K_EUp: 	c = UPARROW;	break; /* up arrow */
+	    case K_Down:	c = DNARROW;	break; /* down arrow */
+	    case K_EDown:	c = DNARROW;	break; /* down arrow */
+	    case K_Right:	c = RTARROW;	break; /* right arrow */
+	    case K_ERight:	c = RTARROW;	break; /* right arrow */
+	    case K_Left:	c = LTARROW;	break; /* left arrow */
+	    case K_ELeft:	c = LTARROW;	break; /* left arrow */
+	    case K_PageDown:	c = PGDOWN;	break; /* page down */
+	    case K_EPageDown:	c = PGDOWN;	break; /* page down */
+	    case K_PageUp:	c = PGUP;	break; /* page up */
+	    case K_EPageUp:	c = PGUP;	break; /* page up */
+	    case K_Home:	c = HOME;	break; /* HOME */
+	    case K_EHome:	c = HOME;	break; /* HOME */
+	    case K_End: 	c = END_KEY;	break; /* END */
+	    case K_EEnd:	c = END_KEY;	break; /* END */
+	    case K_F1:		c = F1; 	break; /* F1 */
+	    case K_Alt_X:	c = 4;		break; /* alt x */
+	}
+    }
+#else
+    else { /* SLang keypad interface (see file "slang.h" for definitions) */
 	switch (c) {
 	case SL_KEY_UP:
 	    c = UPARROW;
@@ -824,7 +857,8 @@ re_read:
 	    break;
 	}
     }
-#endif
+#endif /* DJGPP_KEYHANDLER */
+#endif /* __DJGPP__ && USE_SLANG */
 #if HAVE_KEYPAD
     else {
 	/*
@@ -1974,6 +2008,7 @@ PUBLIC char * SNACat ARGS3(
     return *dest;
 }
 
+
 /*
 **   UPPER8 ?
 **   it was "TOUPPER(a) - TOUPPER(b)" in its previous life...
diff --git a/src/makefile.dsl b/src/makefile.dsl
index 5623bc65..956b0b01 100644
--- a/src/makefile.dsl
+++ b/src/makefile.dsl
@@ -9,14 +9,16 @@ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
 LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \

 LYStyle.o LYHash.o

 

-SLANGINC = -I/slang/src

-SLANGLIB = /slang/src/djgobjs/libslang.a

 CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)

 

 CC = gcc

-MCFLAGS = -O3 -DRAWDOSKEYHACK -DUSE_ZLIB -DUSE_EXTERNALS -DUSE_SLANG -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -Ichrtrans -I../WWW/library/implementation   -I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp

-WWWLIB = ../WWW/library/djgpp/libwww.a  ../djgpp/tcplib/obj/libtcp.a

-LIBS=-lz -lwmemu

+MCFLAGS = -O3 -DUSE_ZLIB -DUSE_EXTERNALS \

+-DUSE_SLANG -DDJGPP_KEYHANDLER -DACCESS_AUTH -DNO_CUSERID \

+-DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implement -I../djgpp/tcplib/include \

+-I./chrtrans -I../djgpp/tcplib/include/tcp

+WWWLIB = ../WWW/library/djgpp/libwww.a ../djgpp/tcplib/obj/libtcp.a

+LIBS= -lslang -lz

+CHRTR= ./chrtrans/

 

 all: lynx.exe

 

@@ -28,9 +30,9 @@ lynx.exe:   message $(OBJS) $(WWWLIB)
 message:

 	@echo "Compiling Lynx sources"

 

-dbg:	$(OBJS) $(WWWLIB)

+dbg:    $(OBJS) $(WWWLIB)

 	@echo "Making Lynx code"

-	$(CC) -g $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)

+	$(CC) $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)

 

 lint:

 	lint *.c  > ../lint.out

@@ -56,10 +58,5 @@ DefaultStyle.o: DefaultStyle.c ../userdefs.h
 LYEditmap.o: LYEditmap.c ../userdefs.h

 LYCharUtils.o: LYCharUtils.c ../userdefs.h

 LYExtern.o: LYExtern.c ../userdefs.h

+LyUtils.o: LYUtils.c ../userdefs.h

 LYCookie.o: ../userdefs.h

-

-#UCdomap.o: UCdomap.c ../userdefs.h lycharsets.h

-#UCdomap.o: UCdomap.c chrtrans/UCkd.h chrtrans/makeuctb chrtrans/makeuctb.c \

-#                UCdomap.h UCMap.h ../userdefs.h

-#UCAux.o : UCAux.c $(CMN)UCAux.h $(CMN)UCDefs.h

-

diff --git a/src/makefile.wsl b/src/makefile.wsl
index cabfe3c5..ff7d3813 100644
--- a/src/makefile.wsl
+++ b/src/makefile.wsl
@@ -9,7 +9,6 @@ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
 LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \

 LYStyle.o LYHash.o

 

-SLANGINC=-If:/slang/src

 CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)

 

 CC = gcc

@@ -18,7 +17,7 @@ MCFLAGS = -O3 -DUSE_ZLIB -DUSE_EXTERNALS \
 -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implement -I../djgpp/tcplib/include \

 -I./chrtrans -I../djgpp/tcplib/include/tcp

 WWWLIB = ../WWW/library/djgpp/libwww.a ../djgpp/tcplib/obj/libtcp.a

-LIBS=-Lf:/slang/src/djgobjs -lslang -lz

+LIBS= -lslang -lz

 CHRTR= ./chrtrans/

 

 all: lynx.exe

@@ -59,4 +58,5 @@ DefaultStyle.o: DefaultStyle.c ../userdefs.h
 LYEditmap.o: LYEditmap.c ../userdefs.h

 LYCharUtils.o: LYCharUtils.c ../userdefs.h

 LYExtern.o: LYExtern.c ../userdefs.h

+LyUtils.o: LYUtils.c ../userdefs.h

 LYCookie.o: ../userdefs.h