Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!pur-ee!ea.ecn.purdue.edu!housel From: housel@en.ecn.purdue.edu (Peter S. Housel) Newsgroups: comp.os.minix Subject: Re: New, featureful ls(1) for Minix Message-ID: <13705@ea.ecn.purdue.edu> Date: 26 Jul 89 00:52:26 GMT References: <13398@ea.ecn.purdue.edu> <812@eutrc3.urc.tue.nl> Sender: housel@ea.ecn.purdue.edu Reply-To: housel@en.ecn.purdue.edu (Peter S. Housel) Organization: Purdue University Engineering Computer Network Lines: 40 In article <812@eutrc3.urc.tue.nl>, wsincc@eutrc3 (Wim van Dorst) writes: >When there are old files in a directory it should give as >response to ls -l the year of creation instead if the time. Using >for that localtime() it gives the year 3882 instead of 1982. My >localtime() returns the year in 19xx format, but ls.c assumes it >to be in a xx format and adds 1900. Easily fixed though. Your localtime() is broken. My Unix documentation says that tm_year contains (year - 1900). >The other flaw is that when doing a ls (with or without options) >_without_ arguments (like *.c or whatever) on a directory with quite >some entries it just does nothing. No error and no result. When >doing ls (with or without options, with or without arguments) on >a directory with 1 to 40 entries it works perfect. I have no idea >why. Who does? This is likely a problem with the directory library. There should be a line in which looks like: #define DIRBLKSIZ 512 If you don't, add it and recompile the library, and see if this fixes it. If this line isn't present, some buffer in the ndir library overflows and it gives up. >Probably not a flaw but I noticed: When doing ls -l on an empty >directory, shouldn't ls print something like total 0? Yes, you're right. >Problably not a flaw either: when doing ls -lF should the -F >option be ignored? No. The BSD and SysV versions don't. >Hoping for some response, met vriendelijke groeten, >Wim van Dorst (wsincc@tuerc3.urc.tue.nl) -Peter S. Housel- housel@ecn.purdue.edu ...!pur-ee!housel