Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.development.apps > #524
| From | Chris Cox <chrisncoxn@endlessnow.com> |
|---|---|
| Newsgroups | comp.os.linux.development.apps |
| Subject | Re: Set/get console cursor position without use ncurses |
| Date | 2012-11-20 09:35 -0600 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <k8g7v5$5g5$1@speranza.aioe.org> (permalink) |
| References | <k8cpre$feh$1@speranza.aioe.org> <k8d2f1$nf8$1@dont-email.me> <k8dlao$ju1$1@speranza.aioe.org> <k8dth1$4bp$1@dont-email.me> <k8fi39$e4j$1@speranza.aioe.org> |
On 11/20/2012 03:21 AM, Max wrote: ...snip... > > Thank you to all the the replies. I'll try to explain my requirements. > I'm developing a console application that must run under Linux, Windows > and MS-DOS. The 90% of the code is OS indipendant and the remaining 10% The Windows "terminal" is cmd... which is a weird animal. DOS is DOS. In neither case are there multi-terminal handling, neither Windows or DOS understand the idea of terminal devices. So.. you do have to understand the limitations of the platform you are running on. My comments about terminfo apply to true multi-user OS's like Unix/Linux and not to DOS/Windows. So... IMHO, you can make assumptions about end terminal devices and assume an ANSI terminal (for example, and that's fairly safe)... and then you can use Linux to query terminfo for all of the escape codes you will need in order to hard code what you are wanting to do in the app. Best assumption on the Linux side would be to run the program from a non-qui direct connected terminal (e.g. the "head" of the system).... in 99% of the cases, this will be an "Linux" terminal type, which is mostly ANSI. If you're assuming a "console" X Windows client app.. then all bets are off and you're better off making the dynamic queries of terminal capabilities (through ncurses) to find those "escape sequences" so that things are done right. Again, to use "escape sequences" does NOT require making curses calls... on Linux however, the querying of terminfo capabilities databases is done through low level calls current in the ncurses library. So getting the right "escape sequences" for use on any X Windows terminal emulator client on Linux really requires getting them from the terminfo database. Back to "DOS" for a second. I have used many DOS applications that used the full SCO-ANSI set (with every shift, alt, ctrl sequence imaginable).... and let me just say that the terminfo database ones in Linux are NOT complete. So I had to create my own (because we were running this "portable" app inside of Linux). In my case, we were using the PuTTY terminal emulator ssh client from Windows, so I needed a full SCO-ANSI terminfo db on the Linux side where the ported DOS application was run from. Again, the app need to see the full gambit of all possible key combinations (input is just as important as output in my case). On a Linux system (with ncurses infocmp installed) take a look at (from bash or something not csh): TERM=linux infocmp TERM=ansi infocmp TERM=scoansi infocmp Then you can see the differences (well, at least for what is recorded in the terminfo databases) for these terminal types. So.. you have to know your terminal in order to know everything you can or cannot do. Assuming ANSI may be a "safe" answer, all depends on how much you need to do.
Back to comp.os.linux.development.apps | Previous | Next — Previous in thread | Next in thread | Find similar
Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-19 08:15 +0000
Re: Set/get console cursor position without use ncurses Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2012-11-19 12:42 +0200
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-19 16:04 +0000
Re: Set/get console cursor position without use ncurses Grant Edwards <invalid@invalid.invalid> - 2012-11-19 16:13 +0000
Re: Set/get console cursor position without use ncurses Chris Cox <chrisncoxn@endlessnow.com> - 2012-11-19 15:41 -0600
Re: Set/get console cursor position without use ncurses Grant Edwards <invalid@invalid.invalid> - 2012-11-19 22:43 +0000
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-20 09:28 +0000
Re: Set/get console cursor position without use ncurses Chris Cox <chrisncoxn@endlessnow.com> - 2012-11-20 09:14 -0600
Re: Set/get console cursor position without use ncurses Brian Bebeau <bbebeau@computer.org> - 2012-11-21 15:56 -0500
Re: Set/get console cursor position without use ncurses Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-11-19 09:55 -0700
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-20 09:31 +0000
Re: Set/get console cursor position without use ncurses Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2012-11-20 15:17 +0200
Re: Set/get console cursor position without use ncurses Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2012-11-19 20:24 +0200
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-20 09:21 +0000
Re: Set/get console cursor position without use ncurses Chris Cox <chrisncoxn@endlessnow.com> - 2012-11-20 09:35 -0600
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-20 15:52 +0000
Re: Set/get console cursor position without use ncurses Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-11-20 11:35 -0700
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-21 09:19 +0000
Re: Set/get console cursor position without use ncurses Jan Panteltje <pNaonStpealmtje@yahoo.com> - 2012-11-21 09:34 +0000
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-21 10:59 +0000
Re: Set/get console cursor position without use ncurses Jan Panteltje <pNaonStpealmtje@yahoo.com> - 2012-11-21 11:54 +0000
Re: Set/get console cursor position without use ncurses Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-11-21 16:43 +0000
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-22 08:30 +0000
Re: Set/get console cursor position without use ncurses Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-11-22 13:14 +0000
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-22 14:08 +0000
Re: Set/get console cursor position without use ncurses John Hasler <jhasler@newsguy.com> - 2012-11-22 10:06 -0600
Re: Set/get console cursor position without use ncurses Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-11-22 16:31 +0000
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-23 09:11 +0000
Re: Set/get console cursor position without use ncurses Jan Panteltje <pNaonStpealmtje@yahoo.com> - 2012-11-23 09:36 +0000
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-23 16:27 +0000
Re: Set/get console cursor position without use ncurses Jan Panteltje <pNaonStpealmtje@yahoo.com> - 2012-11-23 20:13 +0000
Re: Set/get console cursor position without use ncurses Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-11-23 14:54 +0000
Re: Set/get console cursor position without use ncurses John Hasler <jhasler@newsguy.com> - 2012-11-22 08:03 -0600
Re: Set/get console cursor position without use ncurses morey4857@gmail.com - 2016-08-18 22:48 -0700
Re: Set/get console cursor position without use ncurses GangGreene <GangGreene@example.com> - 2012-11-21 07:48 -0500
Re: Set/get console cursor position without use ncurses John Hasler <jhasler@newsguy.com> - 2012-11-21 08:24 -0600
Re: Set/get console cursor position without use ncurses "Max" <noname@noreply.com> - 2012-11-21 14:45 +0000
Re: Set/get console cursor position without use ncurses John Hasler <jhasler@newsguy.com> - 2012-11-21 11:11 -0600
Re: Set/get console cursor position without use ncurses Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-11-21 10:20 -0700
Re: Set/get console cursor position without use ncurses Grant Edwards <invalid@invalid.invalid> - 2012-11-21 17:23 +0000
Re: Set/get console cursor position without use ncurses Grant Edwards <invalid@invalid.invalid> - 2012-11-19 15:38 +0000
Re: Set/get console cursor position without use ncurses Joe Beanfish <joebeanfish@nospam.duh> - 2012-11-20 14:05 +0000
Re: Set/get console cursor position without use ncurses Richard Kettlewell <rjk@greenend.org.uk> - 2012-11-21 11:30 +0000
Re: Set/get console cursor position without use ncurses Ron House <rhouse@smartchat.net.au> - 2013-07-11 13:56 +1000
Re: Set/get console cursor position without use ncurses Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 11:08 +0100
csiph-web