TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Bob Lawrence
from: Paul Edwards
date: 1996-11-23 14:28:42
subject: TIC

PE> That is not C's efforts to do files, that is "C's" effort to do
PE> directories. C does not do directories. BFN. Paul. 

PE> But POSIX does. Like I said, opendir() and readdir() are posix.
PE> I'll have to check on fstat(), I think it also is. BFN. Paul. 

BL> Yair.. but opendir() is not ansi. Great language, C is.

Better than ANY other language, yes.

BL> char lne[128], LIST[128][80];

BL> load it like this...

BL> n = 0;
BL> while (!feof(bak)) {
BL> fgets(lne, 80, bak);
BL> if (lne[0] > 32) strcpy(LIST[n++], lne);
BL> }

BL> and sort it like this...

BL> qsort(*LIST, n, sizeof(LIST[0], sort);

BL> Terrific! Why do I put *LIST? What the hell does *that* mean?  LIST

That doesn't mean anything that I am aware of.  Just "LIST" by
itself is what you want in that code.  &LIST would probaly also work,
but only because the "&" should be ignored.  I suspect that
the "*" is being ignored by your compiler.  I would have expected
a syntax error.

BL> And work out a way to copy/move/erase files in UNIX. Or not. I
BL> suppose UNIX does files?

Posix does directories, yes.  BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

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™.