Flash Gordon said:
Bill Reid wrote, On 09/03/08 01:32:
It is documented on some systems I've use a lot as a standard way of
exiting at any point.
<snip>
Any software written for general consumption should deal with unexpected
keystrokes for the simple reason that, in the real world, they are very
common.
OK, I'll just go over this for about the FOURTH time:
MY software is not written for "general consumption", only for ME.
Also, I as a computer user don't generally spastically start computer
programs, only to abort them using the wrong character sequence for
that system when confronted by a simple yes/no prompt. I will admit
that I have used CNTRL-z (or less frequently CNTRL-c) in the past
when dealing with software that I didn't understand that seemed
to be running on forever in a seemingly endless loop, but AGAIN,
I DID THAT BECAUSE I JUST WANTED THE PROGRAM TO
DISAPPEAR, REGARDLESS OF THE CONSEQUENCES.
I have not and do not do it a lot because quite simply I was not
dropped on my head as a baby so I have at least decent computer
user skills if not endless programming skills...
AGAIN, you have been explicitly offered multiple chances to
make the simple correction to the code in question to accomodate
YOUR idiotic computer usage style, but as a Usenet troll in good
standing you continue to just abusively GRIPE ABOUT OTHER
PEOPLE'S WORK AND ARGUE without doing anything even
remotely CONSTRUCTIVE, which I am sure must be a "lifestyle"
for you and not just a mere temporary Usenet persona...
As far as my own system goes, pressing CNTRL-z DELIBERATELY
will indeed sort of mess up the library function and particularly the
"user experience", though not always fatally. CNTRL-c actually
kills the program with a SIGINT no matter what (I know not and care
little how "gracefully" the default handler does this, for the reasons
above). Any other CNTRL-key combination (except CNTRL-ALT-DELETE)
results in extended characters being displayed and consumed and
the routine deals with them as with any other incorrect input.
I can mash my hands down on the keyboard clumsily, all over the
keyboard, no problem. I can put my feet on the keyboard, no problem.
I can put the keyboard upside-down on the floor and step on it, no
problem.
So to sum up, there actually IS such a thing as "user error", which
is a user that is so insanely stupid and deliberately malicious they
should be prevented from even touching a computer, and YOU'RE
THAT USER, and I'm not writing software for somebody as stupid
as you...sorry, maybe PlaySkool(TM) has some applications that
would be more appropriate for your intellectual and emotional age...
Well, at least this example of "troll zero"'s NON-CONSTRUCTIVE and
POINTLESS personal attacks made it through the "snip factory"...
The point is that you claim that fflush(stdin) just works is wrong.
I works for me. That's MY real life. Just because it doesn't work
for you doesn't impact MY real life. This is particularly true because
even if it DID work for you, as a troll in good standing you'd be
duty-bound to point out that it MIGHT not work for some people,
EVEN AFTER BEING TOLD REPEATEDLY THAT NOT EVERYTHING
IN THE CODE WAS "PORTABLE". This is the same insane troll
logic that caused you to find the single idiotic key sequence that
MIGHT cause an unintended result (sort of) in a user input routine.
The
documentation would not have proved it as it does not mention flushing
input streams, so I tested to enable me to state with certainty that it
does not work.
Well, yeah, my "documentation" for fflush() actually does NOT
mention anything about input streams, and in fact is the usual
mush-mouthed bad tech writing that is found for almost all the
"man pages". But buried in an obscure and almost inaccessible
section of the documentation called something like "Special
Extensions", they let slip the "secret" that fflush(stdin) can be
used to clear the input stream...so my theory is a guy (or gal)
MUCH smarter and more productive than you wrote the
documentation, because it merely sucks, but unlike your
contributions to the planet, it does EXIST...
So you "REASONABLE man's method" fails on a very common
system, namely Linux on an x86. I would say that a "solution" that does
not work on a very common platform is NOT a reasonable solution.
Hey, you can make a good argument that a REASONABLE man
does not run Linux on an x86 in the first place! But congratulations,
calling it a "very common platform" should further up your status as
an insane useless troll...this is almost as good as "troll zero" saying
that fgets() on the standard input will "very likely fail under some
circumstances", which as you've so ably demonstrated, "very likely"
is about 0.000000000000001% probable unless due to deliberate
insane troll misuse of the computer!
OK, so you are a troll by your definition. That clears that up.
Wrong. "Troll zero" did NOT post well-meaning information, but
several insults based on what you have now proven are statistical
and technical lies. But that's just what insane trolls do, and when
somebody points out that they're insane trolls, they acheive the
ultimate troll "victory" by screaming "I am rubber, you are glue!"
like a toddler with a dirty bottom...
So in your opinion any criticism of your posts is not constuctive,
That's just a lie from an insane troll. I've stated my "opinion" (it's
written in plain English above), and that was not it. AGAIN (this is
pointless, because insane trolls NEVER give up), "troll zero" engaged
in a series of ad hominen attacks based on statistical and technical lies,
for no other purpose than being a "troll" in the full meaning of that term.
You engage in the same behavior. How's that working out for you?
but
posting bad advice is a good thing.
"Bad advice" can always be corrected and/or qualified without
provocative ad hominen attacks. In this case, and in so many
of the cases in this particular group that is apparently run by
insane trolls, it doesn't matter if it is "good advice" or "bad advice"
or "mediocre advice", every well-meaning informational post
with functioning practical code is just a target for the insane
trolls...however, the actual quality of the advice DOES ratchet
up the hysterical lengths that the insane trolls will go to
attack it...
Well, since you meet your definition
of a troll this is not surprising.
AGAIN, my definition of a troll can be found in your mirror...
So you want your software to rely on undefined behaviour that does not
do what you expect on common platforms.
What'd I say about insane trolls? THEY NEVER GIVE UP!!! They
live in their own little insane troll world where x86 Linux is a "common
platform" and practical working code on the most common platform
of all is "undefined behavio(u)r"!!! WHAT A "LIFESTYLE"!!!
The simple solution is to keep
such software to yourself since it is not suitable for posting as advice
and when you post it people will keep pointing out the problems with it.
Hey, somebody's gotta write some code in this world, since your
only contribution to the planet is to be an insane troll, so I'll just keep
writing it and posting it and you can keep acting like a troll and that's
apparently just "the way things are"...good luck!