| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | tic |
PE> */ /* trav - traverse a directory
PE> */ /*
PE> */ /* This function is designed to be highly machine-specific. It
PE> */ /* is to get all the machine-specific directory processing into a
PE> */ /* single function.
PE> */ /*
PE> */ /* The first parameter is a filename. This can be a simple
PE> */ /* filename such as "temp.c", or one that contains
wildcards such
PE> */ /* as "temp.*" or "temp.c(*)".
PE> */ /*
PE> */ /* The second parameter is a pointer to a control block. This
PE> */ /* control block's structure is machine-specific, and contains
PE> */ /* information that trav will use such as whether or not to
PE> */ /* search subdirectories as well.
PE> */ /*
PE> */ /* The third parameter is a pointer to a function which will get
PE> */ /* called for every file found.
PE> */ /*
PE> */ /* The fourth parameter is a pointer to a control block which will
PE> */ /* get passed to the function you specified as parameter 3.
PE> */ /*
PE> */ /* The function that trav calls takes two parameters:
PE> */ /* The first is a filename that trav has found.
PE> */ /* The second is the fourth parameter you passed to trav.
PE> */ /*
PE> */ /* example of use:
PE> */ /*
PE> */ /* int myfunc(char *fnm, void *ucb)
PE> */ /* {
PE> */ /* printf("fnm is %s\n",fnm);
PE> */ /* return (1);
PE> */ /* }
PE> */ /*
PE> */ /* main()
PE> */ /* {
PE> */ /* trav("dd:input(*)",NULL,myfunc,NULL);
PE> */ /* return (0);
PE> */ /* }
PE> */ /*
This is as clear as mud. I think I understand what you want to do,
but how? Or what?
1. What the fuck does "dd:input(*)" mean? It's a great wank and it
must make you feel really clever to know the secret, but what the
fuck is it? My guess is something like..."C:\*.*"
2. in mydefunct() what the fuck is uch? I assume that fnm is a file
name but what is the form of uch? I assume it's a struct with the
file data in it but I could be wrong.
PE> /* tcb of 1 means that the user wants the TTR */
This gets my nomination for "misdirection of the Century" award. Are
you kidding?
Paul... trav() is so obscure that it is totally USELESS!
I admit that I am not a patient man but I am incredibly persistent.
If I can see a point in something I can worry at it for years until
I finally understand it... but trav()! You've gotta be kidding.
I'll tell you what you need to make C work. It's fucking useless on
files and directories... exactly the same as Pascal but Pascal gives
up and just makes it work in DOS and Windows.
trav() *could* have been made to work, but not the way you did it.
You need a findfirst() fndnext() wrapper approach that uses a struct
to return the file data... in DOS format so you can use the rest of it
to turn date/time into strings... not something that does whatever the
fuck trav() does.
No one is going to bother to learn a whole new appraoch to
directories... and especially when you have made it so obscure no one
can!
And at the same time, you need a way to copy(), erase(), and move()
files and directories that works across the various O/S staying inside
ansi functions. You need to write a little LIBRARY, using names and
actions similar to existing functions, so everyone can use them the
way they're used to using them, across the O/S barrier in ansi C. And
for Christ's sake, don't try to be clever. Try to think like child
who knows fuck all about anything. Any fool can make it complicated.
Only a genius can make it simple. Be a genius and do it simple.
But right now you've lost me. I can't make head nor fucking tail of
what you've done and I can't see any value in trying to find out.
Regards,
Bob
___ Blue Wave/QWK v2.12
@EOT:
---
* Origin: Precision Nonsense, Sydney (3:711/934.12)SEEN-BY: 711/934 712/610 @PATH: 711/934 |
|
| 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™.