TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Winston Smith
from: Jasen Betts
date: 2003-07-04 19:44:36
subject: Re: dos2unix

Hi Winston.

01-Jul-03 03:30:47, Winston Smith wrote to Charles Angelich


 CA>> So which one of these is most commonly used in, for example,
 CA>> directory listings?
 WS> >
 WS>> Well, the "default" is to list the "last
modified" time, since
 WS>> that is an important security feature to see how recently the
 WS>> file contents had been "twiddled", and it is needed
for compiles
 WS>> and MAKE and code deltas and other automatic functions that use a
 WS>> "last touched" time. It that it concurs with DOS.
 WS> >
 CA>> I have never before heard a *nix programmer say his code must
 CA>> agree with DOS defaults.

 WS> Of course not!  Since UNIX predates MS-DOS by almost a decade!
 WS> Either you are being deliberately disingenuous or just plain
 WS> silly! I am *NOT* Michel Samson, so please stop it....  Thanks.

 CA>> I would hazard the guess that the 'MAKE' app would read the
 CA>> information using it's own internal code and not rely on some
 CA>> utilities directory listings displays?

 WS> Why?  UNIX is famous for using interchangable parts.  REGEXP is
 WS> used all over the place and so are the FILESTATs.  Why reinvent
 WS> the wheel?  The GNU way is *NOT* the UNIX way.  "GNU"
means "Gnu
 WS> Not Unix", after all!

 WS>> However, as this is UNIX, you can set the flags to show or
 WS>> exclude any fields that you like, to create alias commands such
 WS>> as 'oldest' or 'looked-at' or anything that you like.
 WS> >
 CA>> Last time I wrote any C code to use/display directory listings it
 CA>> seemed to me that there are no 'canned' routines for this and I
 CA>> was at liberty to do whatever I wanted to do with the raw data
 CA>> supplied by library routines that read the directory in DOS.
 CA>> There really isn't much there as I recall and I had to convert
 CA>> the data to be able to display human readable information on my
 CA>> own. :-\

 WS> Huh?  Why write C code for UNIX when you have source you can use
 WS> (at least for the "open", non-proprietary versions).  As for
 WS> MessyDOS and "findfirst()" ?  Well, I have yet to try it under GNU
 WS> GCC.

DJGPP ( = GCC for dos) has findfirst and also emulates the unix directory
reading API.

there may be findfirst emulations available for porting dos apps to unix.

there is some portable directory reading code in snippets.

 -=> Bye <=-

---
* Origin: I'm pink, therefore I'm SPAM. (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.