TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Winston Smith
from: Charles Angelich
date: 2003-07-01 14:35:06
subject: Re: dos2unix

1237c2d36401
c_echo



Hello Winston - 

RJT>> So which one of these is most commonly used in, for
RJT>> example, directory listings? 

WS>> > Well, the "default" is to list the "last
modified" time,
WS>> > since 

WS>> that is an important security feature to see how recently
WS>> the file contents had been "twiddled", and it is needed
WS>> for compiles and MAKE and code deltas and other automatic
WS>> functions that use a "last touched" time. It that it
WS>> concurs with DOS. 

CA>> > I have never before heard a *nix programmer say his code
CA>> > must 

CA>> agree with DOS defaults. 

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

Michel is very knowledgeable when he is in his element.  His
problem is that English is not his native language and he
gets frustrated.

NOTE: Your own comment from the above paragraph: "It that it
concurs with DOS." 

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

WS> Why? 

Why? To avoid being mislead by some newbie's version of a
directory listing. 

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

GNU means no more public domain source code. 

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
WS>> such as 'oldest' or 'looked-at' or anything that you like. 

CA>> Last time I wrote any C code to use/display directory
CA>> listings it seemed to me that there are no 'canned'
CA>> routines for this and I was at liberty to do whatever I
CA>> wanted to do with the raw data supplied by library
CA>> routines that read the directory in DOS. There really
CA>> isn't much there as I recall and I had to convert the data
CA>> 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
WS> use (at least for the "open", non-proprietary versions). 

I have written my own routines as a learning experience or
because the existing source code was spaghetti and it was
faster and less stress to just write my own. 

WS> As for MessyDOS and "findfirst()" ? Well, I have yet to try
WS> it under GNU GCC. Maybe the Borland C Museum site has some
WS> routines. 

It takes a bit of know-how to interepret what you get from the
existing 'dir.h' functions. 

WS> Maybe it is worth a try in Q-BASIC with an interrupt
WS> service. 

Odd thing is no BASIC seems to have a directory list function
built in. 

WS> Although the C flavors are similar, I find that they have
WS> "spaghetti" bindings to the type and code libraries that
WS> vary wildly. I tried to compile BSD 'date' source once
WS> under GCC and had to download 5 megs of header file type
WS> declarations, and the internesting type calls still gave me
WS> screens worth of mis-used and undeclared type statements.
WS> It needed 64-bit types, and Machine types, and preprocessor
WS> types. The assembler code was more portable than the C
WS> code! Spaghetti TYPEs are *WORSE* than spaghetti code!!! 

It is the result of being built by weekend-warriors one piece
at a time. 

WS> It is probably time I chuck MS-DOS all together and load
WS> minimal *NIXes on my 386's.... 

Ask about that in the LINUX echo. There are a bunch of people
there who claim to be able to install Linux on just about
anything. ;-) 

>
>        ,                          ,
>      o/      Charles.Angelich      \o       ,
>       __o/
>     / >          USA, MI           < \   __\__
 

___ * ATP/16bit 2.31 * 
... DOS the Ghost in the Machine! http://www.undercoverdesign.com/dosghost/

--- Maximus/2 3.01
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
SEEN-BY: 633/267 270
@PATH: 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™.