How to read arrow key input in the ANSI way?

M

Mabden

Walter Roberson said:
[OT]
Well, I at least directed him to look to another newsgroup about his OS,
which no one else has done.

- You -were- the first to to have mentioned other newsgroups, 2 hours
42 minutes after the original posting. At that time you said, "I am
surprised no one has said this yet". Personally, I would not have been
surprised that there were few postings in the middle of the night North
American time.

Really? I thought this was an international newsgroup... I seem to have
been critized about that before. Or are you saying that the only posts
worth reading come from here? I'm not sure what you are saying here...
- If you review the questions asked by the OP, you will see that the OP
already knew about non-standard methods, and was asking about
standard methods. It wasn't a more open "How can I do this in the X, Y,
and Z OSs", it was a specific "Is there a standard C method", so
the three posters before you were answering the question that was
asked.

OK, my bad. Sorry OP :-(
- I think that if you re-examine your posting alluding to other
newsgroups, that you will find that your posting did not clearly
answer the question of whether a standards-based method was available.
(Saying that OS-specific ways are available is not quite the same as
saying that standards-compliant ways are -not- available.)

Well, IIRC, you just said that numerous other people said there wasn't
"a standards-based method was available". According to you, others
pointed out there was no way to do it in Standard C. They did so without
mentioning other newsgroups, which I then pointed out, and mentioned I
was surprized that the other posters hadn't done so.

So make up your mind what you are angry about. Was I up too late, being
too helpful, or missing the point because I'm too stupid?
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers

Great sig for this post BTW.
 
W

Walter Roberson

Really? I thought this was an international newsgroup... I seem to have
been critized about that before. Or are you saying that the only posts
worth reading come from here? I'm not sure what you are saying here...

Around midnight north american time corresponds to just before
traditional working hours in Western European time zones. Historically,
we see very few posters from Africa or Russia or parts of Europe
sufficiently far east to be in noticably later time zones. We do see
some postings from India and Asia, but those are mostly asking
questions... and historically, the people there who have been answering
questions have tended to answer with fflush(stdin) :(
 
M

Mark McIntyre

Hey Mabden,
Your post indicates that you dont want to help others.
Was your comment really necessary?

Ignore Mabden, he's virtually a troll in CLC.

His point about "doubt" vs "question" was valid though - colloquial
international english generally uses "question" for something you're
asking about and "doubt" about something you are stating as a
disbelief.
 
D

Default User

Mark McIntyre wrote:

His point about "doubt" vs "question" was valid though - colloquial
international english generally uses "question" for something you're
asking about and "doubt" about something you are stating as a
disbelief.


Seems to be Indian English dialect. It happens too frequently and
consistently for it to be mere error.



Brian
 
P

pete

Default said:
Seems to be Indian English dialect. It happens too frequently and
consistently for it to be mere error.

It's going to be difficult for us to change that.
Maybe we should just accept it.
 
M

Mark McIntyre

It's going to be difficult for us to change that.
Maybe we should just accept it.

Personally, I find that helping people communicate more effectively is
rarely a bad thing, even if it is difficult. Lets remember that the
Indian students of today are tomorrows outsourced support and
programming staff working for US and EU companies. If dialiectical
differences cause confusion, thats a bad thing.
 
P

Paramesh

Thank You all for your Help.

Sorry for my "doubt".
I'll change that to "question".

:)
Paramesh.
 
R

Richard Bos

True, but others use it, too, not just Indians. I've seen it in
USAnians, too, and in others whose native language isn't English either.
It's going to be difficult for us to change that.
Maybe we should just accept it.

The same argument could be made concerning gets().

IOW: No.

Richard
 
P

pete

Richard said:
The same argument could be made concerning gets().

IOW: No.

My position is especially pointless in view of the fact
that Paramesh now has questions instead of doubts.
 
M

Michael Wojcik

iirc he said he was already using curses anyway, in which case it hardly
makes sense _not_ to use curses for handling input.

Moot; I was responding to your mistaken supposition that terminfo
is built on curses.
how do you propose to use terminfo without curses to recognize arrow
keys? build your own state machine from it on the fly?

If by "on the fly" you mean "after reading the terminfo entry", then
yes, I suppose that's a reasonable description of how I've implemented
this functionality in the past. I imagine vi does something similar,
but I don't recall looking at the code for any of the vi implemen-
tations.

Recognizing sequences in input is hardly a mysterious or difficult
problem.
 
D

Default User

Richard said:
True, but others use it, too, not just Indians. I've seen it in
USAnians, too, and in others whose native language isn't English
either.


I'd be interested in seeing some examples of the sort of thing we're
talking about from US native speakers. To be clear, it's, "I have a
doubt about my car, how do I open the hood?"



Brian
 
P

pete

Default User wrote:
I'd be interested in seeing some examples of the sort of thing we're
talking about from US native speakers. To be clear, it's, "I have a
doubt about my car, how do I open the hood?"

I was born in the USA, been here all my life,
except for some travel time totaling less than a year,
and I've never heard "doubt" used that way,
not even from my Indian grocer nor any of my Indian professors.

On USENET though, "doubt" used as "question",
suggests to me that it's someone in India.
 
K

Keith Thompson

pete said:
I was born in the USA, been here all my life,
except for some travel time totaling less than a year,
and I've never heard "doubt" used that way,
not even from my Indian grocer nor any of my Indian professors.

On USENET though, "doubt" used as "question",
suggests to me that it's someone in India.

Same here (apart from the Indian grocer).

BTW, the quote "I have a doubt about my car, how do I open the hood?"
seems ambiguous. Presumably "doubt" is meant to be synonymous with
"question", but it could also be taken to mean something like "I doubt
that my car is working properly; how do I open the hood so I can check
it?"

As for how to deal with this, I suspect there are always going to be
people showing here and using "doubt" to mean "question" (India isn't
going to run out of newbies any time soon). It's not worth getting
upset about, but a gentle mention in passing that using "doubt" to
mean "question" is likely to cause confusion would be appropriate.
 
B

Ben Pfaff

pete said:
I was born in the USA, been here all my life,
except for some travel time totaling less than a year,
and I've never heard "doubt" used that way,
not even from my Indian grocer nor any of my Indian professors.

I have heard "doubt as question" from a number of Indian grad
students both at Stanford and Michigan State University.
 
J

Jordan Abel

Moot; I was responding to your mistaken supposition that terminfo
is built on curses.

No, I was pointing out that terminfo is part of the XCURSES
specification, and is in -lcurses [-lncurses] on many systems. My words
were, IIRC, "terminfo is part of curses". That its historical origins
are separate matters little [and in any case, i'm not sure it's true.
termcap existed independently of curses, but i think terminfo was
developed as part of curses as a replacement for termcap]
If by "on the fly" you mean "after reading the terminfo entry",

I mean "at runtime".
 
D

Default User

Ben said:
we're >> talking about from US native speakers. To be clear, it's, "I
have a >> doubt about my car, how do I open the hood?"

I have heard "doubt as question" from a number of Indian grad
students both at Stanford and Michigan State University.

I think it's common enough that we have to classify it as a dialect
difference. Whether we should encourage those users to change to
facilitate communication in an international forum is another question.
I've decided to not do so. I've can understand well enough, so I leave
it alone.


Brian
 
D

Dik T. Winter

> My words
> were, IIRC, "terminfo is part of curses". That its historical origins
> are separate matters little [and in any case, i'm not sure it's true.
> termcap existed independently of curses, but i think terminfo was
> developed as part of curses as a replacement for termcap]

Eh, no. If I remember right, termcap was first developed at Berkeley
for use with the editor vi and for release in BSD Unix. A later
development was curses, built on top of termcap, also for BSD Unix,
most games used it... AT&T took curses and expanded it, but at the
same time developed terminfo as a replacement for termcap, it was
released in System V (or was it already in System III?).
 
J

Jordan Abel

My words were, IIRC, "terminfo is part of curses". That its
historical origins are separate matters little [and in any case,
i'm not sure it's true. termcap existed independently of curses,
but i think terminfo was developed as part of curses as a
replacement for termcap]

Eh, no. If I remember right, termcap was first developed at Berkeley
for use with the editor vi and for release in BSD Unix. A later
development was curses, built on top of termcap, also for BSD Unix,
most games used it... AT&T took curses and expanded it, but at the
same time developed terminfo as a replacement for termcap, it was
released in System V (or was it already in System III?).

Eh? What did i say that this contradicts?
 
K

Keith Thompson

Jordan Abel said:
My words were, IIRC, "terminfo is part of curses". That its
historical origins are separate matters little [and in any case,
i'm not sure it's true. termcap existed independently of curses,
but i think terminfo was developed as part of curses as a
replacement for termcap]

Eh, no. If I remember right, termcap was first developed at Berkeley
for use with the editor vi and for release in BSD Unix. A later
development was curses, built on top of termcap, also for BSD Unix,
most games used it... AT&T took curses and expanded it, but at the
same time developed terminfo as a replacement for termcap, it was
released in System V (or was it already in System III?).

Eh? What did i say that this contradicts?

"terminfo was developed *as part of curses*" is not necessarily
contradicted, but it's certainly not supported by what Dik wrote.
 
J

Jordan Abel

Jordan Abel said:
My words were, IIRC, "terminfo is part of curses". That its
historical origins are separate matters little [and in any case,
i'm not sure it's true. termcap existed independently of curses,
but i think terminfo was developed as part of curses as a
replacement for termcap]

Eh, no. If I remember right, termcap was first developed at Berkeley
for use with the editor vi and for release in BSD Unix. A later
development was curses, built on top of termcap, also for BSD Unix,
most games used it... AT&T took curses and expanded it, but at the
same time developed terminfo as a replacement for termcap, it was
released in System V (or was it already in System III?).

Eh? What did i say that this contradicts?

"terminfo was developed *as part of curses*" is not necessarily
contradicted, but it's certainly not supported by what Dik wrote.

It might not have been one of the _original_ parts of curses, but...

You know - my argument sounds weak even to me. Anyway, the fact is,
_now_ it's in the curses library, and in the XCURSES specification,
regardless of its historical origins.
 

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

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top