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


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

Re: Set/get console cursor position without use ncurses

From "Max" <noname@noreply.com>
Newsgroups comp.os.linux.development.apps
Subject Re: Set/get console cursor position without use ncurses
Date 2012-11-20 09:21 +0000
Organization Aioe.org NNTP Server
Message-ID <k8fi39$e4j$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>

Show all headers | View raw


Tauno Voipio wrote:

> On 19.11.12 6:04 , Max wrote:
> > Tauno Voipio wrote:
> > 
> > > Please think twice: You're saying 'I need the services of ncurses,
> > > but do not want to use it'. You need to code much of the
> > > functionality of ncurses.
> > 
> > Since looking around it seem no one thought to find a way to move
> > the cursor without the help of ncourses move() function I used this
> > "standard call" as an example I need to get. ncurses have a lot of
> > code involving a large number af features I don't need at the
> > moment. I tried to check the code inside ncurses for move the
> > cursor but it seem really complicated (at least for me that I'm not
> > expert in Linux programming).
> > 
> > > Basically, you have to pick the terminal capabilities, get the
> > > cursor control codes, and using them to emit suitable control
> > > sequences.
> > 
> > This is the way I'm trying to follow at the moment but how is
> > possible to send control codes and get the reply directly to the
> > console from C code without have an echo in the screen? Do you know
> > where is possible to find an example code about?
> > 
> > Thank you
> 
> Why is it undesirable to have ncurses?
> 
> It is usually a shared library, which is not too large, and
> pretty probably already mapped to some process in the system
> (132772 bytes in Ubuntu 12.04).
> 
> Please remember that in a demand-paged virtual memory system,
> the memory allocation is in the address space of the process
> only. The real RAM chips get only used when a page is accessed.
> The extra functions do not load the memory capacity, except
> in the file system.

Hi

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%
is a wrapper around the specific calls of each different OS. Using this
way I can easily recompile the app just using different compiler with
properly define settings. In case of Linux this same app must be
distributed in binary format compiled for x86 and arm version. Since
the app must run in a lot of different embedded Linux distrubition
where is not possible to know if all the required shared libraries will
be present I compile tha app statically linking all the library needed
(currently only libc). The Linux native system where I work is x86
based and for make the arm version I'm currently using a toolchain. I
would like to avoid use additional libraries function, like ncurses in
this case, because, as explained, I want to have all the library
statically linked. I suppose I can get the static version of ncurses in
x86 system but this same static library compiled for arm is not present
in the toolchain. Than, suppose there is no other easy way to move
cursor out from ncurses I have two possibilities:

- Integrate the ncourses source code into my project so it will be
possible to recompile all the app and library using the compiler to x86
or arm
- Find the ncurses static library in binary format of both x86 and arm
version and integrate them in the project

Maybe I'm doing something wrong in my reasoning?

Anyway thank you again for the help

-- 

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next 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