about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2012-07-05 21:13:25 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2012-07-05 21:13:25 -0400
commit82473218a3b47d9f0f1b91cb5dc1d9f807103b9c (patch)
treeaea8c8e880fdfb770fa0e12cade5097ba14aee1a
parent033df9bda0bbbf62b5b2d55a3f638524cfdb0691 (diff)
downloadlynx-snapshots-82473218a3b47d9f0f1b91cb5dc1d9f807103b9c.tar.gz
snapshot of project "lynx", label v2-8-8dev_12c
-rw-r--r--bcblibs.bat49
-rw-r--r--makefile.bcb24
-rw-r--r--makew32.bat19
-rw-r--r--src/LYUtils.c5
4 files changed, 89 insertions, 8 deletions
diff --git a/bcblibs.bat b/bcblibs.bat
new file mode 100644
index 00000000..9db4f2a2
--- /dev/null
+++ b/bcblibs.bat
@@ -0,0 +1,49 @@
+@echo off

+rem $LynxId: bcblibs.bat,v 1.4 2012/07/05 21:13:25 tom Exp $

+rem Use this script to construct import-libraries for the Borland C compiler

+rem from the dll's in the GnuWin32 directory.

+rem

+rem The script assumes that the Borland C compiler is already in your %PATH%

+rem search-list.  It also uses the Windows 2000 command-extensions, which are

+rem provided in Windows XP and later by default.

+setlocal

+

+rem Check if GW32_ROOT is defined, and if not, fill in a default value.

+

+	if not "x%GW32_ROOT%"=="x" goto exists

+	set GW32_ROOT=c:\app\gnuwin32

+:exists

+

+	if exist "%GW32_ROOT%" goto doit

+	echo ? %GW32_ROOT% does not exist

+	goto finish

+

+:doit

+	rem do this just in case it is needed

+	set PATH=%PATH%;%GW32_ROOT\bin

+

+	set SAVE_CD="%CD%"

+	cd %GW32_ROOT%

+

+	if not exist bcblibs mkdir bcblibs

+

+	cd bin

+	if ERRORLEVEL 1 goto failed

+

+	for %%N in (*.dll) do call :implib %%~nN%

+

+	cd %CD%

+	goto finish

+

+:implib

+	echo making import-library for %1

+	set SOURCE=%1.dll

+	set TARGET=..\bcblibs\%1.lib

+	copy %1.dll ..\bcblibs

+	implib %TARGET% %1.dll

+	:goto :eof

+

+:failed

+

+:finish

+endlocal

diff --git a/makefile.bcb b/makefile.bcb
index 7c1b972d..f6f7817b 100644
--- a/makefile.bcb
+++ b/makefile.bcb
@@ -1,4 +1,4 @@
-# $LynxId: makefile.bcb,v 1.17 2012/07/05 00:57:52 tom Exp $
+# $LynxId: makefile.bcb,v 1.18 2012/07/05 09:52:45 tom Exp $
 #
 # Borland C++ / C++ builder
 # 1997/11/08 (Sat) 10:45:37
@@ -21,9 +21,11 @@ BCB = $(MAKEDIR)/..
 BCC_INC = $(BCB)/INCLUDE
 WWW_LIB = WWW/Library/Implementation
 
-ETC_INC = c:\app\GnuWin32\include
-ETC_LIB = c:\app\GnuWin32\bin-bcc
-
+# "GW32_ROOT" is the location of the GnuWin32 binaries and header files.
+# Aside from the Borland files, it holds all of the external libraries
+# needed by Lynx.  It can/should be an environment variable (see makew32.bat).
+ETC_INC = $(GW32_ROOT)\include
+ETC_LIB = $(GW32_ROOT)\bin-bcc
 
 #
 # Options
@@ -98,19 +100,22 @@ lynx : BccW32.cfg $(Dep_lynx)
 	echo MakeNode 
 
 clean :
+	-del lynx.rsp
 	-del *.tds
 	-del *.map
 	-del *.obj
 	-del BccW32.cfg 
 	-del /f/s/q *.i
 
-Dep_lynxdexe = \
+LYNX_LIBS = \
    $(ETC_LIB)/zlib1.lib\
    $(ETC_LIB)/curses2.lib\
    $(ETC_LIB)/libeay32.lib\
    $(ETC_LIB)/libssl32.lib\
    $(ETC_LIB)/libiconv2.lib\
-   $(ETC_LIB)/libintl3.lib\
+   $(ETC_LIB)/libintl3.lib
+
+LYNX_OBJS = \
    DefaultStyle.obj\
    GridText.obj\
    HTAABrow.obj\
@@ -195,8 +200,13 @@ Dep_lynxdexe = \
    UCdomap.obj\
    Xsystem.obj $(CS_OBJS)
 
+Dep_lynxdexe = $(LYNX_LIBS) $(LYNX_OBJS) $(CS_OBJS)
+
+lynx.rsp : BccW32.cfg $(LYNX_OBJS)
+	dir /b *.obj >$@
+	FOR %p IN ($(LYNX_LIBS)) DO echo %p >>$@
 
-lynx.exe : $(Dep_lynxdexe)
+lynx.exe : $(Dep_lynxdexe) lynx.rsp
 #	$(BCC32) $(DEBUG) -lOS -elynx.exe @lynx_dbg.rsp
 	$(BCC32) $(DEBUG) -lOS -elynx.exe $(CS_OBJS) -L$(ETC_LIB) @lynx.rsp
 #
diff --git a/makew32.bat b/makew32.bat
index 15a3c95a..5223c0fb 100644
--- a/makew32.bat
+++ b/makew32.bat
@@ -1,7 +1,26 @@
 @echo off

+rem $LynxId: makew32.bat,v 1.4 2012/07/05 21:11:22 tom Exp $

+setlocal

+

+rem Check if GW32_ROOT is defined, and if not, fill in a default value.

+

+	if not "x%GW32_ROOT%"=="x" goto exists

+	set GW32_ROOT=c:\app\gnuwin32

+:exists

+

+	if exist "%GW32_ROOT%" goto doit

+	echo ? %GW32_ROOT% does not exist

+	goto finish

+

+:doit

+	set PATH=%PATH%;%GW32_ROOT\bin

+

 rem Borland C

 rem    -m                Displays the date and time stamp of each file

 rem    -c                Caches auto-dependency information

 make.exe -m -c -f makefile.bcb %1 %2

 REM make.exe -m -c -f makefile.deb

 REM make.exe -f makefile.win

+

+:finish

+endlocal

diff --git a/src/LYUtils.c b/src/LYUtils.c
index 781034ad..2bc46f58 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYUtils.c,v 1.222 2012/07/05 00:56:21 tom Exp $
+ * $LynxId: LYUtils.c,v 1.223 2012/07/05 08:39:49 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTCP.h>
@@ -29,6 +29,9 @@ extern int kbhit(void);		/* FIXME: use conio.h */
 #define gettext(s) s
 #elif defined(HAVE_GETTEXT)
 #undef gettext
+#ifdef _INTL_REDIRECT_MACROS
+#define gettext libintl_gettext	/* restore definition from libintl.h */
+#endif
 #endif
 
 #if !defined(kbhit) && defined(_WCONIO_DEFINED)