Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!virtech!dennis From: dennis@virtech.uucp (Dennis P. Bednar) Newsgroups: comp.os.minix Subject: ls -lt *.c doesn't sort files by time as I expected it would Message-ID: <1990Jan11.070247.11716@virtech.uucp> Date: 11 Jan 90 07:02:47 GMT Organization: Virtual Technologies Inc. Lines: 34 I have ported the ls.c posted to this newsgroup to Intel's iRMX286 operating system (the system I use at work). I did this because the DIR command that is stock with iRMX is pretty shabby, and doesn't have many nice features. I really wanted to be able to list files sorted by time order. When I was testing it, I discovered that if I did: ls -lt it properly sorted all of the files in the current directory, but if I tried: ls -lt *.c it didn't sort by the time. Any easy fixes to ls.c? Does ls.c have this same problem on minix (did I break something in my port)? (By the way, the port to the iRMX system involved calling unix library emulation routines for readdir() stat(), file globbing (expand *.c into many arguments) and time-related routines). At least one hour was spent tracking down some mysterious compile errors (cc286) that happened because the "entry" variable passed to various functions is apparently an undocumented reserved word to our compiler. I fixed the problem by globbally changing "entry" to "p_entry". Unfortunately, in iRMX, all arguments (argv[]) are received in upper case, so I still have to make some other changes to make it work on this Intel development system (ha ha Intel, if you can hear me). On a side topic, are there any better public domain ls.c programs available? Is the BSD ls.c public domain? -- Dennis Bednar uunet!virtech!dennis (703)760-3357(w) (703)437-4384(h) Cable & Wireless, Tysons Corner VA