[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LYNX-DEV DOS patch for development code
From: |
Doug Kaufman |
Subject: |
LYNX-DEV DOS patch for development code |
Date: |
Thu, 21 Aug 1997 23:03:42 -0700 (PDT) |
The following patch (made against ac-0.50) allowed compilation of a
functioning lynx_386 for DOS. DOS compilation with DJGPP is now in three
steps: compilation of libwww.a, compilation of the chartrans tables,
and compilation of the src directory. I haven't tried this with -O, but
Wayne has reported that this can be done. I tried this with PD Curses
2.3, patched as I outlined in a previous post. This patch primarily gets
around the chmod problem and the lack of a getbkgd.
I am making this a mime attachment so that it won't get munged by the
mailers.
Doug
__
Doug Kaufman
Internet: address@hidden (preferred)
address@hidden
*** lynx2-7-1/WWW/Library/Implementation/HTAnchor.c Sat Aug 9 08:49:00 1997
--- lynx2-7-1/WWW/Library/Implementation/HTAnchor.c.new Fri Aug 15 23:02:08 1997
***************
*** 20,25 ****
--- 20,26 ----
#include <ctype.h>
#include "HTAnchor.h"
#include "HTParse.h"
+ #include "UCAux.h"
#ifdef EXP_CHARTRANS
#include "UCMap.h"
#endif /* EXP_CHARTRANS */
*** lynx2-7-1/src/HTWriter.c Fri Aug 15 07:17:28 1997
--- lynx2-7-1/src/HTWriter.c.new Mon Aug 18 07:46:34 1997
***************
*** 585,591 ****
--- 585,593 ----
FREE(me);
return NULL;
}
+ #ifndef __DJGPP__
chmod(fnam, 0600);
+ #endif /* __DJGPP__ */
StrAllocCopy(me->viewer_command, pres->command);
/*
***************
*** 785,791 ****
--- 787,795 ----
FREE(ret_obj);
return NULL;
}
+ #ifndef __DJGPP__
chmod(fnam, 0600);
+ #endif /* __DJGPP__ */
/*
* Any "application/foo" or other non-"text/foo" types that
***************
*** 1049,1055 ****
--- 1053,1061 ----
FREE(me);
return NULL;
}
+ #ifndef __DJGPP__
chmod(fnam, 0600);
+ #endif /* __DJGPP__ */
/*
* me->viewer_command will be NULL if the converter Pres found above
*** lynx2-7-1/src/LYBookmark.c Sun Jul 20 17:09:22 1997
--- lynx2-7-1/src/LYBookmark.c.new Fri Aug 15 23:02:10 1997
***************
*** 477,483 ****
--- 477,485 ----
mode = ((stat_buf.st_mode & 0777) | 0600);
(void) fclose(nfp);
nfp = NULL;
+ #ifndef __DJGPP__
(void) chmod(newfile, mode);
+ #endif /* __DJGPP__ */
if ((nfp = fopen(newfile, "a")) == NULL) {
(void) fclose(fp);
_statusline(BOOKTEMP_REOPEN_FAIL_FOR_DEL);
*** lynx2-7-1/src/LYDownload.c Thu Aug 7 06:26:14 1997
--- lynx2-7-1/src/LYDownload.c.new Mon Aug 18 00:29:00 1997
***************
*** 385,391 ****
--- 385,393 ----
fflush(stderr);
start_curses();
#endif /* VMS */
+ #ifndef __DJGPP__
chmod(buffer, 0600);
+ #endif /* __DJGPP__ */
} else {
/*
*** lynx2-7-1/src/LYForms.c Tue Jul 22 18:01:44 1997
--- lynx2-7-1/src/LYForms.c.new Sat Aug 16 00:42:18 1997
***************
*** 679,685 ****
#endif
LYsubwindow(form_window);
#endif
! #if defined(COLOR_CURSES) /* not defined in ncurses 1.8.7 */
wbkgd(form_window, getbkgd(stdscr));
wbkgdset(form_window, getbkgd(stdscr));
#endif
--- 679,685 ----
#endif
LYsubwindow(form_window);
#endif
! #if defined(COLOR_CURSES) && defined(getbkgd) /* not defined in ncurses 1.8.7
*/
wbkgd(form_window, getbkgd(stdscr));
wbkgdset(form_window, getbkgd(stdscr));
#endif
*** lynx2-7-1/src/LYHistory.c Sun Jul 20 17:09:22 1997
--- lynx2-7-1/src/LYHistory.c.new Fri Aug 15 23:02:14 1997
***************
*** 425,431 ****
--- 425,433 ----
HTAlert(CANNOT_OPEN_TEMP);
return(-1);
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
StrAllocCopy(*newfile, hist_filename);
LYforce_HTML_mode = TRUE; /* force this file to be HTML */
***************
*** 587,593 ****
--- 589,597 ----
HTAlert(CANNOT_OPEN_TEMP);
return(-1);
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
StrAllocCopy(*newfile, vl_filename);
LYforce_HTML_mode = TRUE; /* force this file to be HTML */
*** lynx2-7-1/src/LYLeaks.c Tue Jul 8 15:36:04 1997
--- lynx2-7-1/src/LYLeaks.c.new Fri Aug 15 23:02:14 1997
***************
*** 55,61 ****
--- 55,63 ----
if(Fp_leakagesink == NULL) {
return;
}
+ #ifndef __DJGPP__
chmod(LEAKAGE_SINK, 0600);
+ #endif /* __DJGPP__ */
while(ALp_RunTimeAllocations != NULL) {
/*
*** lynx2-7-1/src/LYList.c Thu Jul 10 13:40:10 1997
--- lynx2-7-1/src/LYList.c.new Fri Aug 15 23:02:16 1997
***************
*** 89,95 ****
--- 89,97 ----
sleep(MessageSecs);
return(-1);
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
StrAllocCopy(*newfile, list_filename);
LYforce_HTML_mode = TRUE; /* force this file to be HTML */
*** lynx2-7-1/src/LYLocal.c Tue Jul 29 00:02:10 1997
--- lynx2-7-1/src/LYLocal.c.new Fri Aug 15 23:02:18 1997
***************
*** 1145,1151 ****
--- 1145,1153 ----
sleep(AlertSecs);
return(0);
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
if (first) {
/*
***************
*** 1347,1352 ****
--- 1349,1355 ----
cp = cr;
}
+ #ifndef __DJGPP__
/*
* Call chmod().
*/
***************
*** 1359,1364 ****
--- 1362,1368 ----
if (LYExecv(CHMOD_PATH, args, tmpbuf) <= 0) {
return (-1);
}
+ #endif /* __DJGPP__ */
LYforce_no_cache = TRUE; /* Force update of dired listing. */
return 1;
}
***************
*** 1701,1707 ****
--- 1705,1713 ----
sleep(AlertSecs);
return(0);
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
if (first) {
/*
*** lynx2-7-1/src/LYMail.c Mon Aug 4 08:32:40 1997
--- lynx2-7-1/src/LYMail.c.new Fri Aug 15 23:02:18 1997
***************
*** 194,200 ****
--- 194,202 ----
FREE(address);
return;
}
+ #ifndef __DJGPP__
chmod(tmpfile, 0600);
+ #endif /* __DJGPP__ */
if (*self) {
cp = self;
while (*cp == ' ' || *cp == ',')
***************
*** 389,395 ****
--- 391,399 ----
FREE(address);
return;
}
+ #ifndef __DJGPP__
chmod(tmpfile, 0600);
+ #endif /* __DJGPP__ */
#endif /* VMS */
fprintf(fd, "The link %s :?: %s \n",
***************
*** 462,468 ****
--- 466,474 ----
#endif /* SIGTSTP */
exit(-1);
}
+ #ifndef __DJGPP__
chmod(TRAVERSE_ERRORS, 0600);
+ #endif /* __DJGPP__ */
}
fprintf(ofp, "%s\t%s \tin %s\n",
***************
*** 529,535 ****
--- 535,543 ----
HTAlert(MAILTO_URL_TEMPOPEN_FAILED);
return;
}
+ #ifndef __DJGPP__
chmod(my_tempfile, 0600);
+ #endif /* __DJGPP__ */
subject[0] = '\0';
/*
*** lynx2-7-1/src/LYMain.c Thu Aug 7 06:26:14 1997
--- lynx2-7-1/src/LYMain.c.new Fri Aug 15 23:02:20 1997
***************
*** 1014,1020 ****
--- 1014,1022 ----
exit(-1);
}
#endif /* VMS */
+ #ifndef __DJGPP__
chmod(LYTraceLogPath, 0600);
+ #endif /* __DJGPP__ */
*stderr = *LYTraceLogFP;
fprintf(stderr, "\t\t%s\n\n", LYNX_TRACELOG_TITLE);
}
*** lynx2-7-1/src/LYMainLoop.c Sat Aug 9 08:49:00 1997
--- lynx2-7-1/src/LYMainLoop.c.new Fri Aug 15 23:02:22 1997
***************
*** 522,528 ****
--- 522,530 ----
#endif /* SIGTSTP */
exit(-1);
}
+ #ifndef __DJGPP__
chmod(TRAVERSE_ERRORS, 0600);
+ #endif /* __DJGPP__ */
}
fprintf(ofp, "%s %s\tin %s\n",
links[curdoc.link].lname,
***************
*** 1307,1313 ****
--- 1309,1317 ----
sprintf(cfile,"lnk%08d.dat",ccount);
ccount = ccount + 1;
if ((cfp = fopen(cfile,"w")) != NULL) {
+ #ifndef __DJGPP__
chmod(cfile, 0600);
+ #endif /* __DJGPP__ */
print_crawl_to_fd(cfp,curdoc.address,curdoc.title);
fclose(cfp);
} else {
***************
*** 4522,4528 ****
--- 4526,4534 ----
break;
}
#endif /* VMS */
+ #ifndef __DJGPP__
chmod(LYTraceLogPath, 0600);
+ #endif /* __DJGPP__ */
*stderr = *LYTraceLogFP;
fprintf(stderr, "\t\t%s\n\n", LYNX_TRACELOG_TITLE);
}
*** lynx2-7-1/src/LYNews.c Tue Jul 22 18:01:44 1997
--- lynx2-7-1/src/LYNews.c.new Fri Aug 15 23:02:24 1997
***************
*** 73,79 ****
--- 73,81 ----
HTAlert(CANNOT_OPEN_TEMP);
return(postfile);
}
+ #ifndef __DJGPP__
chmod(my_tempfile, 0600);
+ #endif /* __DJGPP__ */
/*
* If we're using a Japanese display character set,
***************
*** 94,100 ****
--- 96,104 ----
#endif /* VMS */
return(postfile);
}
+ #ifndef __DJGPP__
chmod(CJKfile, 0600);
+ #endif /* __DJGPP__ */
}
/*
*** lynx2-7-1/src/LYOptions.c Wed Jul 30 17:16:16 1997
--- lynx2-7-1/src/LYOptions.c.new Sat Aug 16 00:41:30 1997
***************
*** 2139,2145 ****
#endif
LYsubwindow(form_window);
#endif
! #if defined(COLOR_CURSES) /* not defined in ncurses 1.8.7 */
wbkgd(form_window, getbkgd(stdscr));
wbkgdset(form_window, getbkgd(stdscr));
#endif
--- 2139,2145 ----
#endif
LYsubwindow(form_window);
#endif
! #if defined(COLOR_CURSES) && defined(getbkgd) /* not defined in ncurses 1.8.7
*/
wbkgd(form_window, getbkgd(stdscr));
wbkgdset(form_window, getbkgd(stdscr));
#endif
*** lynx2-7-1/src/LYrcFile.c Sat Jul 26 01:04:16 1997
--- lynx2-7-1/src/LYrcFile.c.new Fri Aug 15 23:02:26 1997
***************
*** 532,538 ****
--- 532,540 ----
if ((fp = fopen(rcfile, "w")) == NULL) {
return FALSE;
}
+ #ifndef __DJGPP__
chmod(rcfile, 0600);
+ #endif /* __DJGPP__ */
/*
* Header.
*** lynx2-7-1/src/LYShowInfo.c Sat Aug 9 08:49:00 1997
--- lynx2-7-1/src/LYShowInfo.c.new Fri Aug 15 23:02:26 1997
***************
*** 70,76 ****
--- 70,78 ----
HTAlert(CANNOT_OPEN_TEMP);
return(0);
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
/*
* Point the address pointer at this Url
*** lynx2-7-1/src/LYTraversal.c Tue Jul 22 18:01:44 1997
--- lynx2-7-1/src/LYTraversal.c.new Fri Aug 15 23:02:28 1997
***************
*** 32,38 ****
--- 32,40 ----
exit(-1);
} else {
fclose(ifp);
+ #ifndef __DJGPP__
chmod(TRAVERSE_FILE, 0600);
+ #endif /* __DJGPP__ */
return(FALSE);
}
}
***************
*** 70,76 ****
--- 72,80 ----
#endif /* SIGTSTP */
exit(-1);
}
+ #ifndef __DJGPP__
chmod(TRAVERSE_FILE, 0600);
+ #endif /* __DJGPP__ */
fprintf(ifp,"%s\n",target);
***************
*** 97,103 ****
--- 101,109 ----
#endif /* SIGTSTP */
exit(-1);
}
+ #ifndef __DJGPP__
chmod(TRAVERSE_FOUND_FILE, 0600);
+ #endif /* __DJGPP__ */
fprintf(ifp,"%s\t%s\n",fname, prev_link_name);
***************
*** 116,122 ****
--- 122,130 ----
perror("unable to open traversal file");
return;
}
+ #ifndef __DJGPP__
chmod(TRAVERSE_FILE, 0600);
+ #endif /* __DJGPP__ */
fprintf(ifp, "\n\nTRAVERSAL WAS INTERUPTED\n\n\
\t here is a list of the history stack so that you may rebuild\n\n");
***************
*** 148,154 ****
--- 156,164 ----
#endif /* SIGTSTP */
exit(-1);
}
+ #ifndef __DJGPP__
chmod(TRAVERSE_REJECT_FILE, 0600);
+ #endif /* __DJGPP__ */
fprintf(ifp,"%s\n",target);
*** lynx2-7-1/src/LYUpload.c Mon Jul 28 02:49:36 1997
--- lynx2-7-1/src/LYUpload.c.new Sun Aug 17 23:41:44 1997
***************
*** 198,204 ****
--- 198,206 ----
system(cmd);
fflush(stdout);
start_curses();
+ #ifndef __DJGPP__
chmod(buffer, 0600);
+ #endif /* __DJGPP__ */
/* don't remove(file); */
return 1;
***************
*** 252,258 ****
--- 254,262 ----
HTAlert(CANNOT_OPEN_TEMP);
return(-1);
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
#ifdef VMS
strcpy(curloc, "/sys$login");
*** lynx2-7-1/src/makefile.dos Thu Aug 7 06:26:14 1997
--- lynx2-7-1/src/makefile.dos.new Sun Aug 17 23:13:44 1997
***************
*** 1,18 ****
! OBJS= LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \
LYMail.o HTAlert.o GridText.o LYGetFile.o \
LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \
LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \
LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \
HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \
LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
! LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o HTML.o
CFLAGS= $(MCFLAGS) -I.. $(SLANGINC)
CC = gcc
#MCFLAGS = -O -DNCURSES -DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID -DNOUSERS
-DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implementation
-I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp
-I../djgpp/pdcurses/include
! MCFLAGS = -DCOLOR_CURSES -DNCURSES -DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID
-DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implementation
-I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp
-I../djgpp/pdcurses/include
! WWWLIB = ../WWW/library/djgpp/libwww.a ../djgpp/pdcurses/lib/libcurso.a
../djgpp/tcplib/obj/libtcp.a
all: lynx
--- 1,23 ----
! OBJS=UCdomap.o UCAux.o UCAuto.o \
! LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \
LYMail.o HTAlert.o GridText.o LYGetFile.o \
LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \
LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \
LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \
HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \
LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
! LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o HTML.o \
! LYStyle.o LYHash.o
CFLAGS= $(MCFLAGS) -I.. $(SLANGINC)
CC = gcc
#MCFLAGS = -O -DNCURSES -DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID -DNOUSERS
-DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implementation
-I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp
-I../djgpp/pdcurses/include
! MCFLAGS = -DEXP_CHARTRANS -DALT_CHAR_SET -DCOLOR_CURSES -DNCURSES
-DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE
-DNO_UTMP -DUSE_EXTERNALS -DUSE_ZLIB -I../WWW/library/implementation
-I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp -I../djgpp/pdcurses
! WWWLIB = ../WWW/library/djgpp/libwww.a ../djgpp/pdcurses/lib/pdcurses.a
../djgpp/tcplib/obj/libtcp.a
! LIBS = -lz
!
! CMN=../WWW/Library/Implementation/
all: lynx
***************
*** 24,29 ****
--- 29,35 ----
message:
@echo "Compiling Lynx sources"
+
dbg: $(OBJS) $(WWWLIB)
@echo "Making Lynx code"
$(CC) -g $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)
***************
*** 51,55 ****
--- 57,67 ----
DefaultStyle.o: DefaultStyle.c ../userdefs.h
LYEditmap.o: LYEditmap.c ../userdefs.h
LYCharUtils.o: LYCharUtils.c ../userdefs.h
+ LYExtern.o: LYExtern.c ../userdefs.h
+ UCdomap.o: UCdomap.c chrtrans/UCkd.h chrtrans/makeuctb chrtrans/makeuctb.c \
+ UCdomap.h $(CMN)UCMap.h $(TABLES) ../userdefs.h
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ UCAux.o : UCAux.c $(CMN)UCAux.h $(CMN)UCDefs.h
LYExtern.o: LYExtern.c ../userdefs.h
*** lynx2-7-1/WWW/Library/djgpp/makefile Thu Aug 7 06:26:14 1997
--- lynx2-7-1/WWW/Library/djgpp/makefile.new Sun Aug 17 23:17:48 1997
***************
*** 7,18 ****
# The ASIS repository's name for the machine we are on
#ASIS_MACH = hardware/os
! CFLAGS = -O -DCOLOR_CURSES -DDOSPATH -DNOUSERS -DDEBUG
-I../../../djgpp/tcplib/include -I../../../djgpp/tcplib/include/tcp
LFLAGS =
CC = gcc
# Directory for installed binary:
! !BINDIR = /usr/local/bin
# Where is the W3 object library to be installed (not normally done)?
LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
--- 7,18 ----
# The ASIS repository's name for the machine we are on
#ASIS_MACH = hardware/os
! CFLAGS = -O -DUSE_ZLIB -DEXP_CHARTRANS -DCOLOR_CURSES -DDOSPATH -DNOUSERS
-DDEBUG -I../../../djgpp/tcplib/include -I../../../djgpp/tcplib/include/tcp
LFLAGS =
CC = gcc
# Directory for installed binary:
! #BINDIR = /usr/local/bin
# Where is the W3 object library to be installed (not normally done)?
LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- LYNX-DEV DOS patch for development code,
Doug Kaufman <=