[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with NCurses

From: Thomas Dickey
Subject: Re: Problem with NCurses
Date: Tue, 13 Mar 2012 19:23:15 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Mar 13, 2012 at 01:25:45PM -0700, mickalin wrote:
> Hi,
> I have installed ncurses 5.8. I have a written a ncurse app program which I
> put on device.
> I connect to the device using ckermit from linux server... using CONNECT cmd
> etc which sort of opens a terminal...

ckermit is kind of large, but I'm reading the source (from the most recent
Debian package).

I do see that it's able to use curses functions when built properly.
ckermit also has its own functions to replace curses if not built properly ;-)
> I have two problems.
> (1)It is not able to display the ncurse "gui" because the screen size is too
> small. It always says this even though I resize the window manually of the
> terminal running the ckermit ...I then created a small version of the
> program which prints a smaller gui and it works fine (so I know that It will
> work if the size of window it sees changes...). How can I get it to work so
> that it will use the full screen size when window is resized? Is this some
> setting in ckermit? any help much appreciated.

ckermit catches SIGWINCH (the signal that's used to notify programs that
the window size changes).  So does ncurses.  But ckermit gets there first,
so ncurses' signal handler isn't the one that is used.

It would help to know the actual message that ckermit prints - to see what
part of the program is relevant.
> (2) The second problem is that my program is printing borders around each
> window. However it borders appear as garbage with something like a series
> '?' instead of what should be a line. Do I need to include a setting when I
> am compiling the ncurses lib.

Reading the source, I don't see that ckermit is using curses to draw the
boxes.  There's a chunk of code in ckcuni.c for various Unicode values.
(I may be missing something - there's 291,044 lines of code - but grep helps).
Building it with "make linux", there are only a few entrypoints from ncurses:


But reading through those, nothing is apparent.

The usual problem with line-drawing as related to your report is that
both the character encoding (such as UTF-8) and the terminal itself
(Linux is not the same as vt100 or xterm) have to be set right.  But '?'
doesn't sound familiar either...

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]