B
Bill Reid
BWHAHAHAHAHAHAHAHAHA!!! Have I "used all futureFlash Gordon said:Have you used *all* current and future* implementations then? No,
thought not.
implementations"!!!! BRILLIANT!!!!
This is why you should never "argue" with a troll...insane troll logic
is impossible for a "normal" to even comprehend, let alone "disprove"...
The OP's system uses mkdir()! More brilliance! Somebody asksI might use CreateDirectory or whatever other non-standard function is
provided.
about mkdir(), therefore "I would use CreateDirectory"!!!
Nope, that's not all you said. But the take-away message hereI have not said not to use it just that it is not topical here. If you
don't like the focus of this group, tough.
is "don't ever post any C code that includes any functions not included
in the C standard, but we're a little fuzzy on which C standard because
frankly nobody really uses the most recent C standards, but in any event
<deeeeep breath>, if it doesn't appear in ANY ANSI C standard it is
'off-topic', and don't try to sneak any IEEE POSIX stuff by us, neither,
or we'll be on you like stink on a skunk <deeeeeeeeeep breath>".
But seriously, what's the REAL problem here? I mean, I couldn't
help but notice posting C code in a group called "comp.lang.c" seemed
to get some panties in a bunch...any thoughts as to why? I've got
mine...
You mean like "Rod Pemberton"? Or his revered colleague the guyNo, I mean professionals who want to provide something that will work
and do it in a predictable timescale.
with the potato chip database?
You obviously don't know how to write C properly.
Of course not, because you just said so. I'm sure "Rod Pemberton"
would agree, and the potato chip database guy, and the guy who
threatened to shoot people with a bow and arrow if they ask where
his code is...
I'll tell you what, I'm ready to learn...I'm gonna buy a big bag of
"Lay's" and start cataloging each delicious chip tomorrow, in preparation
for my new career in "professional programming"...
If you did you would
know that 90% of most projects can be written in strict C90.
Did you know that 93.4568% of all statistics are just made up?
Also, remember those <deeeeeeeep breaths> I included in your
topicality statement for the group? You might want to take one right
now, because you are already past the point where you are making
a complete fool of yourself.
WAAAAAYYYY past the point...Then, that
90% does not need to be changed when porting.
Maybe you're just another alias for "Rod Pemberton" and this is
all just another one of his "jokes"?
It always starts with an inability to THINK, doesn't it...remember, weUnless mkdir or some other non-standard code you are using behaves in s
subtly different manner so that normally it will work but in some
situations it will fail.
don't have an ANSI C STANDARD way to create a directory in the first
place.
Now, here's something really hard, but I want you to try: just keep that
FIRST thought in your head (it's your "thought" after all) even if a
SECOND thought also needs to be considered, such as, "we've got some
code that does file manipulation and we want to 'port' it to our
system rather than re-write it all from scratch to save some time".
Once you prove you can handle TWO thoughts, we'll work up to
THREE...but I'M not holding MY breath...
OK, I'm just going to go ahead and conclude from all the evidenceSo educate them.
you've presented that you've never worked a day in your life in an
actual place of business (previously, I safely concluded you've never
worked anywhere near a software house that has to deal with portability
of a massive C codebase to a wide variety of systems)...
Show me the reference in the C standard.
IEEE Standard 1003.1, Portable Operating System Interface for
Computer Environments, as tightly "bound" to the C programming
language.
comp.std.c (or whatever) is just around the corner, check it out andOh sorry said:I'll save you the trouble,
there isn't one, so it is not standard C and not topical.
cease your trolling...
You are showing your ignorance again.
I hate it when I do that! I must be because you asserted it, just
like "Rod Pemberton" asserted it takes three months print a magazine!
It's right there in Section 8.1, "Referenced C Language Routines" inThe printf standard is right there
in the C standard with clearly defined behaviour.
IEEE 1003.1 as well. So I guess it is a STANDARD library routine,
just not actually part of the C programming language per se...
Here is where you have to try really hard and keep THREE thingsThe wheel being standardised would have no impact on the development of
the jet engine. C being standardised does not prevent extensions being
provided for things not covered by the C standard, in fact the C
standard specifically allows it.
in your head at once...isn't "mkdir()" indeed just yet another of those
"extensions" SPECIFICALLY ALLOWED BY THE "C STANDARD"?
If you want to argue that the focus of this group be changed at least
first learn what the focus is
Oh, I'm not going to "argue" what the focus is, I'm just going to
post appropriate code examples written in the C language from
time to time no matter what you or "Rod Pemberton" or any
other similarly mentally-situated person feels about it. Again,
I suggest a little deep-breathing and perhaps the trick of counting
to 10 before you post...also, the basic idea of not saying anything
unless you have something constructive to contribute is good too...
and what is covered by the C standard and
then get your facts right in your post.
I did make mistakes as always...intelligent, thoughtful people learn
and grow (and in my case, re-learn what I already knew!).
For example, the OP specifically stated:
And then later I averred that:
Actually, it is PRECISELY the POSIX "Unix" argument; reading
between the coffee grounds in my salvaged copy of IEEE 1003.1
(and looking at some of my own code!), I see in Section 5.6.1.2
"<sys/stat.h> File Modes":
S_IWUSR Write permission for the file owner class.
So again, I have displayed my profound ignorance...I am deeply
shamed...
Also, I might mention that in addition to not adding that
"permissions" argument to the code I posted using "mkdir()",
the OP might also be stymied by the declaration/definition of:
unsigned dir_num=count_file_path_dirs(file_path);
Since I forgot to include:
unsigned count_file_path_dirs(char *file_path) {
unsigned num_dirs=0;
char *search_ptr=file_path;
while((search_ptr=strchr(search_ptr,'\\'))!=NULL) {
search_ptr++;
num_dirs++;
}
return num_dirs;
}
Of course, the code is bone-stock ANSI C standard, but oddly
assumes there is such a thing on a system as a "directory" but ANSI
C doesn't think directories even exist but even so you can use
ANSI C to manipulate directories <deeeeeeeeep breath> just
not create them said:You might find these links helpful
http://clc-wiki.net/wiki/C_community:comp.lang.c:Portability_attitude
http://clc-wiki.net/wiki/intro_to_clc
I generally don't click on links provided in Usenet posts as a
security precaution...there's a lot of mentally-unstable weirdos
on Usenet, doncha know ("Rod"?)...