OT: console program

X

Xenos

Sorry, this is OT, but I'm not sure where I can ask this. Please response
with a more appropriate news group, web site, etc., if you can.

I am writing a C++ console app. that needs to gleen info about the windows
dimensions, manipulate the cursor position, etc. What would be the most
portable solution, so I can build if for MS-DOS, Windows, Linux, and
Solaris? ANSI (escape sequences)? Curses? What else is there? Is there a
portible curses library with a less strigent license than ncurses?

Thanks, and again: sorry about being OT.

DrX
 
T

Thomas Matthews

Xenos said:
Sorry, this is OT, but I'm not sure where I can ask this. Please response
with a more appropriate news group, web site, etc., if you can.

I am writing a C++ console app. that needs to gleen info about the windows
dimensions, manipulate the cursor position, etc. What would be the most
portable solution, so I can build if for MS-DOS, Windows, Linux, and
Solaris? ANSI (escape sequences)? Curses? What else is there? Is there a
portible curses library with a less strigent license than ncurses?

Thanks, and again: sorry about being OT.

DrX

Learn to use a web search engine. By searching this newsgroup and
you can find many suggestions for Windowing
libraries that are also portable to more than one platform.


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
C

c wood

Xenos said:
Sorry, this is OT, but I'm not sure where I can ask this. Please response
with a more appropriate news group, web site, etc., if you can.

I am writing a C++ console app. that needs to gleen info about the windows
dimensions, manipulate the cursor position, etc. What would be the most
portable solution, so I can build if for MS-DOS, Windows, Linux, and
Solaris? ANSI (escape sequences)? Curses? What else is there? Is there a
portible curses library with a less strigent license than ncurses?

Thanks, and again: sorry about being OT.

make some functions:

get_screen_dimensions();
set_cursor(x,y)
outtext(x,y,string);

Implement them for one system, for the next, and so forth. It's not
that much coding to figure it out. So long as your app uses your function
library, the real code should be compatible with each version of it.

/* OT */
Did this for DOS & win32 (wincon) myself, and it's very seamless. Just
a compile time define sets the OS, same source, and nice. Well, as nice as
a console apps with cursors & such can be these days.

/* End OT */
 
X

Xenos

Thomas Matthews said:
Learn to use a web search engine. By searching this newsgroup and
you can find many suggestions for Windowing
libraries that are also portable to more than one platform.
Learn to be a little less rude. I swear out of all the newsgroups I read,
the C & C++ ones are the only ones where every one is rude, nasty, and anal
about OT questions and replay formats. I would think that the most
intelligent amongst us with be here.

My question was geared toward getting advice from people with experience in
what I need to do; something which is hard to accomplish (and I've tried)
using a search engine. I don't think there is anything wrong with asking an
off-topic question when it is asking for pointers to resources that are
on-topic.

DrX
 
R

red floyd

Xenos said:
Learn to be a little less rude. I swear out of all the newsgroups I read,
the C & C++ ones are the only ones where every one is rude, nasty, and anal
about OT questions and replay formats. I would think that the most
intelligent amongst us with be here.

My question was geared toward getting advice from people with experience in
what I need to do; something which is hard to accomplish (and I've tried)
using a search engine. I don't think there is anything wrong with asking an
off-topic question when it is asking for pointers to resources that are
on-topic.

While some of the posters can be a bit abrupt, when the FAQ specifically states that this is a newsgroup for the STANDARD C++
LANGUAGE, and people keep posting stuff that is platform specific (n.b. maybe there should be a comp.programming.cross-platform),
how else are they to keep the signal/noise ratio down to a reasonable level? Otherwise, this ng would be nothing but, "How do I
create my Windows Dialog Box?"
 
X

Xenos

red floyd said:
While some of the posters can be a bit abrupt, when the FAQ specifically
states that this is a newsgroup for the STANDARD C++
LANGUAGE, and people keep posting stuff that is platform specific (n.b.
maybe there should be a comp.programming.cross-platform),
how else are they to keep the signal/noise ratio down to a reasonable
level? Otherwise, this ng would be nothing but, "How do I
create my Windows Dialog Box?"
Understood, but that's an extreme. I don't think its wrong to come to a
place with C++ people gather to ask for pointers to places with info on a
C++ library. Its a big difference between asking "Can anyone direct my to
info on X?" and "Can you explain X to me?" I'd have no problem asking the
guy at the gas station, "where's a good place to have my car looked at?" I
would not ask him to actually look at my car. Still, some people behavior
is childish and despicable. Its like having the big mouth behind me in line
yell out, "hey, get out of *my* gas station and drive around searching 'til
ya find someone to fix you car!" We shouldn't have to put up with that
jerk, where here or in real life.

I knew my question was off-topic. I marked the subject as such, so one
could easily ignore it or filter it out. And I apologized twice for it in
the text.

'nuff said.

DrX
 
T

Thomas Dickey

Xenos said:
Sorry, this is OT, but I'm not sure where I can ask this. Please response

it is off-topic.
with a more appropriate news group, web site, etc., if you can.
I am writing a C++ console app. that needs to gleen info about the windows
dimensions, manipulate the cursor position, etc. What would be the most
portable solution, so I can build if for MS-DOS, Windows, Linux, and
Solaris? ANSI (escape sequences)? Curses? What else is there? Is there a
portible curses library with a less strigent license than ncurses?

"stringent" would be the assumed spelling, but ncurses' license is not that.

(again, that is off-topic)
 
F

Fao, Sean

Xenos said:
states that this is a newsgroup for the STANDARD C++


maybe there should be a comp.programming.cross-platform),


level? Otherwise, this ng would be nothing but, "How do I


Understood, but that's an extreme. I don't think its wrong to come to a
place with C++ people gather to ask for pointers to places with info on a
C++ library. Its a big difference between asking "Can anyone direct my to
info on X?" and "Can you explain X to me?" I'd have no problem asking the
guy at the gas station, "where's a good place to have my car looked at?" I
would not ask him to actually look at my car. Still, some people behavior
is childish and despicable. Its like having the big mouth behind me in line
yell out, "hey, get out of *my* gas station and drive around searching 'til
ya find someone to fix you car!" We shouldn't have to put up with that
jerk, where here or in real life.

I knew my question was off-topic. I marked the subject as such, so one
could easily ignore it or filter it out. And I apologized twice for it in
the text.

I agree that a comp.programming.cross-platform newsgroup would be
beneficial to Usenet but since we don't have one, my first guess would
be to stop at comp.programming (after searching Google). Whether it is
on or off-topic for that newsgroup, I don't personally know, but I do
know that in my experience, the cross-platform questions are generally
more accepted there. Maybe somebody reading this message would like to
take on the responsibility of having a comp.programming.cross-platform
newsgroup created.

Sean
 
X

Xenos

Thomas Dickey said:
"stringent" would be the assumed spelling, but ncurses' license is not that.

(again, that is off-topic)

Yes, sorry, I posted this after reading on a site (I believe is was the GNU
homepage) that it was under the GPL license. But then I was read more
in-depth on the ncurse homepage that is incorrect. Sorry about any
continuation of that misconception.

DrX
 

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,776
Messages
2,569,603
Members
45,191
Latest member
BuyKetoBeez

Latest Threads

Top