lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev DOSPATH patch


From: Leonid Pauzner
Subject: lynx-dev DOSPATH patch
Date: Wed, 4 Aug 1999 16:37:46 +0400 (MSD)

It was a long problem with cp.exe and mv.exe binaries
required for DOS port of lynx. Apparently, Hiroyuki solve this problem
by adding a variant of LYCopyFile() which does fread/fwrite in a loop -
perhaps not a good solution for UNIX (permissions...) and VMS (versions?...)
but no problem on DOSPATH systems.


* LYCopyFile(): Thanks to Hiroyuki Senshu, DOS-based systems needs no cp.exe
  binary when compiled with SH_EX.  This code now defined with DOSPATH so used
  automatically by any dos/windows port, but unused for UNIXes (permissions?)
  if occasionally built with SH_EX symbol.
* few includes labelled with _WIN_CC now tweaked with WIN_EX as should be.


diff -u old/lyutils.c ./lyutils.c
--- old/lyutils.c       Wed Aug  4 12:29:04 1999
+++ ./lyutils.c Wed Aug  4 16:07:12 1999
@@ -7053,7 +7053,7 @@
        char *,         src,
        char *,         dst)
 {
-#ifdef SH_EX
+#if defined(DOSPATH)           /* thanks to Hiroyuki Senshu */

 #define BUF_SIZE       1024

@@ -7066,8 +7066,10 @@
        return EOF;

     fout = fopen(dst, "wb");
-    if (fout == NULL)
+    if (fout == NULL) {
+       fclose(fin);    /* it was opened, yes? */
        return EOF;
+    }

     while ((len = fread(buff, 1, BUF_SIZE, fin)) > 0) {
        fwrite(buff, 1, len, fout);

diff -u old/htalert.c ./htalert.c
--- old/htalert.c       Mon Aug  2 01:22:08 1999
+++ ./htalert.c Wed Aug  4 15:36:16 1999
@@ -22,7 +22,7 @@

 #include <LYLeaks.h>

-#if _WIN_CC
+#if defined(WIN_EX) && defined(UNUSED_CODE)
 #include <HTParse.h>
 #endif

@@ -110,7 +110,7 @@
     }
 }

-#ifdef WIN_EX          /* 1997/10/28 (Tue) 17:19:43 */
+#if defined(WIN_EX) && defined(UNUSED_CODE)            /* 1997/10/28 (Tue) 
17:19:43 */

 #define MAX_LEN        512

diff -u old/htfwrite.c ./htfwrite.c
--- old/htfwrite.c      Mon Aug  2 01:22:08 1999
+++ ./htfwrite.c        Wed Aug  4 15:37:06 1999
@@ -13,8 +13,10 @@
 #include <HTFWriter.h>
 #include <HTSaveToFile.h>

-#if _WIN_CC
+#if WIN_EX
 #include <HTParse.h>
+#endif
+#if _WIN_CC
 extern int exec_command(char * cmd, int wait_flag); /* xsystem.c */
 #endif

diff -u old/lydownlo.c ./lydownlo.c
--- old/lydownlo.c      Wed Jul 14 09:25:26 1999
+++ ./lydownlo.c        Wed Aug  4 15:59:10 1999
@@ -248,7 +248,7 @@
        /*
         *  See if we can write to it.
         */
-       CTRACE(tfp, "LYDownload: filename is %s", buffer);
+       CTRACE(tfp, "LYDownload: filename is %s\n", buffer);

        if ((fp = fopen(buffer, "w")) != NULL) {
            fclose(fp);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]