Subject: More on Less (pardon the pun)
From: [email-masked] (Justin Smith)

30 Nov 1997 05:12:28 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

    I just started playing with GNUWin32, and ran into a problem with
Less.  I am compiling Less-332, and it compiles ok, but it gives me the
error '<filename>: No such file or directory' when attempting to view
certain files.

    I traced the execution to line 983 in filename.c, the "bad_file"
function.  Specifically, it looks like Less is calling "stat" to
determine whether the file exists.  Unfortunately, "stat" is returning
-1 and failing the program.

    I just tried an experiment:

        My current directory is "/usr/src/less-332", with
"E:\GNUWIN32\B18\ROOT" mounted as "/".

        I tried using Less to view a file by its full path name on my E:
drive ("//e/download/linux/ls-lR"):  it worked.

        I copied ls-lR to "/usr/src/less-332": Less failed.

        I called Less with "./ls-lR": it still failed.

        When I called Less with the full "Unixish" path name
("/usr/src/less-332/ls-lR"): it worked.

    So, it is a problem with "stat", the way I have my system laid out
(I moved things around to look more like a Slakware distribution of
Linux), or what?  If you need more info, just ask.

    I apologize if any of the above is incoherent, but it is 3:00am
local time, and I am very tired.  I just wanted to get this out to you
folks before I go to bed and forget everything I have done during the
past few hours.

    Thanks for your help.
--

Justin Smith,
Systems Engineer with the law office of
  Dewey, Cheetam and Howe.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".