lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev DOS patch for LYUtils.c


From: Doug Kaufman
Subject: lynx-dev DOS patch for LYUtils.c
Date: Sat, 5 Sep 1998 00:05:03 -0700 (PDT)

A user just wrote to me off the list that some of his DOWNLOADER scripts
weren't working on the DOS port. It turns out that he was using normal
DOS programs (rather than DJGPP unix ports) which don't know how to
handle quoting. The quote_pathname function was putting " ' " around the
filename, making it impossible for the program to identify the file. I
hadn't noted the problem before since the programs that I generally use
know how to handle the quotes. The following patch seems to fix the
problem.
                                Doug

*** lynx2-8-1/src/LYUtils.c     Sat Aug 29 16:22:40 1998
--- lynx2-8-1/src/LYUtils.c.new Fri Sep  4 23:41:00 1998
***************
*** 2742,2748 ****
--- 2742,2752 ----
      if (result == NULL)
        outofmem(__FILE__, "quote_pathname");
  
+ #ifdef __DJGPP__
+     result[0] = ' ';
+ #else
      result[0] = '\'';
+ #endif /* __DJGPP__ */
      for (i = 0, n = 1; i < strlen(pathname); i++)
        if (pathname[i] == '\'') {
            result[n++] = '\'';
***************
*** 2753,2759 ****
--- 2757,2765 ----
        } else {
            result[n++] = pathname[i];
        }
+ #ifndef __DJGPP__
      result[n++] = '\'';
+ #endif /* !__DJGPP__ */
      result[n] = '\0';
      return result;
  }

__
Doug Kaufman
Internet: address@hidden (preferred)
          address@hidden

reply via email to

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