Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #604

Re: Set/get console cursor position without use ncurses

From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.os.linux.development.apps
Subject Re: Set/get console cursor position without use ncurses
Date 2013-07-11 11:08 +0100
Message-ID <871u75flxj.fsf@sapphire.mobileactivedefense.com> (permalink)
References <k8cpre$feh$1@speranza.aioe.org> <51DE2CE5.3030108@smartchat.net.au>

Show all headers | View raw


Ron House <rhouse@smartchat.net.au> writes:
> On 19/11/12 18:15, Max wrote:
>> I'm looking for a way to get and set the cursor position in a Linux
>> console application (pure console, not X11 console) but without use the
>> function move() exported by ncurses library. I want to manage the
>> cursor position directly from my C application without use any
>> additional library. Is there a way?
>>
>> Thank you for the help
>
> Having read some of the interminable discussion going on about this,
> and understanding the point that ncurses is actually the "correct" way
> to do it, if all you want to do is move the cursor, and if you are
> prepared to wear the fact that somewhere, someone _might_ have some
> whacky "terminal" that is completely nonstandard, you can't go far
> wrong by just looking up the ANSI terminal escape code and bunging it
> into your output as and when needed. Google ansi escape codes.

This includes terminal emulators. The last time this actually hurt me
was with some version of minicom some years ago whose idea of 'vt102'
emulation different from the idea of 'an ANSI-compatible terminal' the
then-current 'busybox master bullfrog' (Robert Landley) had. Of
course, the result of me pointing this out was not 'oh well, I might
have been a tad bit wrong about that' but a crescendo of "go away,
spammer!, you don't exist !!" shouts, as can be expected in such a
situation (the other common issues would be a 'dumb terminal' output
device, eg, a straight socket connection which ends up writing data to
a file).

If you have a just cause of grief regarding a specific problem of a
terminal control abstraction layer which enables supporting more than
'whatever happens to work on my present laptop' without changing the
software, trying to remedy that would be a good idea. Otherwise, this
should be framed as the philosopical stance it actually is: I'm
convinced that everyone who has a problem I presently don't care about
is a minion in the force of satans and ought to be burnt at the stake,
ie, drop the pseudo-rationalization of "it works for me and I damn
fucking sure don't care about you". That's at least honest.

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Find similar


Thread

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