stdin help

P

Pedro Graca

Can any one direct me to a group or discussion forum where the topic
could be "relevant". I am using linux as my platform.

Please provide context to your post.
To me this looks like you're asking about "stdin" (in the subject of the
post) which, I believe, is relevant in comp.lang.c.

What I see is available for the next 30 days (~ to 2005-02-03) at
http://www.pixpond.com/1/os4mn.png
 
F

Flash Gordon

<snip off topic answer.
It is not an answer (a 5 lines program can not be), it is a pointer.

Which, as you don't know the OPs platform (it was not specified) could
be pointing in COMPLETELY the wrong direction.
It is the OP who must decide if follow it and collect more information
about, if applicable, ... . In this way, and together with the groups
that has been pointed there are a starting point. Can be in this group
there are not BSD/POSIX/... specialist, but at least there are enough
knowledgment to point a few of posible continuation lines that unblocks
a situation and helps a colleague.

Had you specified that it was a POSIX/BSD/whatever solution and pointed
the OP to an appropriate group then it would not have been so bad.
However, there are systems with select etc. where they ONLY work on
sockets, not on the standard input stream. Did you give any indication
that it might compile and appear to work until the critical moment that
the OP shows it to his/her boss? No. You gave an off topic response with
absolutely NO indication it was off topic, or that there are better
places to discus the best solution, or that it might compile but do
completely the wrong thing. That can not only be not helpful, it can
also be counter-productive both for this group (by encouraging
discussion of things that are off topic) and for the OP (by making the
OP try it, have problems getting it to work, and spend ages trying to
find out what is going with you giving POSIX answers when for all you
know the OP is using CPM.
 
M

Mark McIntyre

What!??!!

What do you mean "what"? Its pretty clear what Chuck said.
you're above comments are just not required here - please do not reply
unless you have somthing useful to add.

He added something very useful indeed - the information that the OP
should regard your post with suspicion since you might be talking
complete nonsense, but theres nobody here who can contradict you with
confidence.

Mark McIntyre
 
M

Mark McIntyre

anyway a request for - please stop attacking me

This will happen when you respect the rules of this group, and stop
posting offtopic responses.
As it happens, I don't think your original post was too wildly
offtopic but you've simply made matters worse by complaining.
and apply your efforts on helping answer the query...

This has already been done - just because you don't like or don't
understand the answer, doesn't mean its not right.
Mark McIntyre
 
J

Joe Wright

Mark said:
This will happen when you respect the rules of this group, and stop
posting offtopic responses.
As it happens, I don't think your original post was too wildly
offtopic but you've simply made matters worse by complaining.




This has already been done - just because you don't like or don't
understand the answer, doesn't mean its not right.
Mark McIntyre

I love that signoff line,

"Just because you don't like or don't understand the answer, doesn't
mean its not right."

Can I use in a sig, please?
 
K

Kenny McCormack

Robert Gamble said:
It's pretty easy to say, "you can't do that in Standard C, check your
implementation's documentation for details" without going through the
completely-offtopic "illustration" you provided.

But it is much more straightforward and less condescending to say:

Not portable. Can't discuss it here. Blah, blah, blah.

Says exactly the same thing as yours, but in a more pleasant manner.
 
K

Kenny McCormack

Mark McIntyre said:
He added something very useful indeed - the information that the OP
should regard your post with suspicion since you might be talking
complete nonsense, but theres nobody here who can contradict you with
confidence.

Nonsense. In fact, all you are demonstrating is your upbringing - your
mother obviously never taught you that if you don't have anything nice to
say, say nothing at all.

For many reasons, most of the newbies posting here would be better off if
the so-called "regulars" kept their comments to themselves.
 
H

Herbert Rosenau

i need to check the stdin, repeatedly for an input form the keyboard,
with out prompting the user to press a key or without returning pressed
key on screen..

now the problem is that if i use getc() the program execution stpos at
this line and waits for the user to press a key. cant use getchar
because the key pressed appears on the screen and moreover it is
buffered.

what i need is a small technique whereby which I can check the stdin
for an input, without prompting the user(the user will enter a key as
and when he wishes, not depending on the program) AND without halting
the execution (as getc() does) AND without displaying the key on the
screen AND should store the pressed key to variable
Impossible mission with standard C. stdin is a stream assigned to
something nobody knows at runtime what it can be like a keyboard, a
file or something else.

Whenever you needs the behavior you descreibes you should ask the
system the program should run under. It may (or may even not) serve
you with an API thad does exactly that.

--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2 Deutsch ist da!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top