Questions tagged [ncurses]

The ncurses package is a subroutine library for terminal-independent screen-painting and input-event handling.

The Ncurses (new curses) library is a free software emulation of curses portable to most terminal systems. It uses Terminfo format, supports pads, color, multiple highlights, forms, characters and function-key mapping, and has all the other SYSV-curses enhancements over BSD Curses.

See also: -

1850 questions
0
votes
1 answer

Terminal emulator scroll buffer doesn't keep ncurses screens

A system using the default curses library from AIX had the following behavior: Each time the screen was cleaned and rewritten, the old screen was kept by the terminal emulator in its scroll buffer, so you could scroll back, each screen just before…
Luciano
  • 2,695
  • 6
  • 38
  • 53
0
votes
1 answer

How can I calculate optimal column widths?

I have a small set of column data values that I want to display in a variable-width display. One column has a small range of plausible sizes (say, 8-10 characters), one displays a UUID (always 36 chars), and the others are variable-length…
Chris R
  • 17,546
  • 23
  • 105
  • 172
0
votes
1 answer

Trouble opening Ncurses Examples in OS X

I recently downloaded ncurses from here and have compiled it using ./configure and make As it is recommended in the README, I compiled the example programs that come bundled with the package. The programs compiled without any issue, but every time…
Ricardo Iglesias
  • 595
  • 2
  • 6
  • 16
0
votes
1 answer

Get rid of space when printing a new line using standard output in c++ and ncurses

Hello I'd like to know how to get rid of the space created when printing a new line in c++ using ncurses library. #include #include using namespace std; int main(){ initscr(); noecho(); cout << "Hello" <<…
0
votes
1 answer

Porting an old DOS TUI to ncurses

I would like to have some advice about how to port an old C++ program written for MS-DOS in the early 90s. This program implements a quite complex text-user interface. The interface code is well separated from the logic, and I don't think it would…
Maurizio Tomasi
  • 474
  • 4
  • 11
0
votes
2 answers

How to correctly read stdin in C?

I want to write a app like sgtpep/pmenu in C. Then I start to look at the ncurses library. My first try is able to select the menu. Such as when I do ls | ./a.out, it should be able to show all the files, and highlight the first one, when I press UP…
delta
  • 3,778
  • 15
  • 22
0
votes
2 answers

Linux terminal print weird characters when using curses library

When trying to run stuff like https://github.com/asciimoo/drawille/blob/master/examples/rotating_cube.py Using my normal user I always get weird characters like M-bM- ~@M-bM- ~@M-bM- ~@M-bM- ~@M-bM- ~@M-bM- ~@M-bM- ~@M-bM- ~@M-bM- ~@M-bM-…
snebel29
  • 179
  • 2
  • 6
0
votes
1 answer

PDCurses window doesn't print letters in some areas

I have encountered a strange behaviour while attempting to write a roguelike. I've made a simple loop printing letters in a filled rectangle shape. With normal (stdscr) window, or newly initialised window from derwin() all works fine. Loop within…
user7678846
0
votes
1 answer

Building weechat from source does not find ncurses.h even when location specified explicitly

I am trying to build weechat IRC client on server (which I do not have sudo control). While configuration, even after explicitly providing the location for ncurses files, cmake is failing to take them into account and thus is not able to locate…
Koustuv Sinha
  • 1,640
  • 19
  • 34
0
votes
2 answers

Program won't pause at getch()

I am writing code for a roguelike game, and this portion of the code uses getch() to take a user input to direct the character as to where to move next. It is my understanding that getch() will pause the program until it receives an input from the…
Zebs
  • 27
  • 1
  • 1
  • 10
0
votes
1 answer

ncurses not deleting character

Alright, I'm working on a (supposed-to-be) simple counting script using ncurses. Everytime it increments the number, I need it to delete the previous number before adding another number, so that it updates rather than appends. Here is my…
Rob
  • 7,980
  • 30
  • 75
  • 115
0
votes
1 answer

How can I make a portable curses interface?

I'm trying to make an interface in Curses in Python, but I was wondering how could I make it more portable when the window's terminal increases while the script is being executed. For example, this code in a window…
0
votes
2 answers

How to stop white cursor from moving in curses console in c++

I'm am currently trying to develop a simple rpg using the curses library that I installed on my Ubuntu distribution. The problem I am running into is that I still have a white cursor blinking on my screen even though the lib is initialized. And when…
mindoo
  • 1
  • 6
0
votes
1 answer

Ncurses erasing window when I don't want it to

I have two windows, one at the top, and one at the bottom (and I will be adding a third window later that will be between those two windows). I draw a horizontal line for the bottom window and then I start drawing the top window, and the bottom…
user3273814
  • 198
  • 3
  • 16
0
votes
1 answer

How to implement a scrolling using ncurses?

There are many questions about how to make a scrolling in ncurses, but I didn't found any clear answer on them. So, here is my case. I have two WINDOW* objects that bisects the screen on two parts, like a split-screen. Now I'm implementing the part…
yutsura
  • 71
  • 2
  • 12