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
2 answers

Set terminal width in Python for the current process

I'd like to do a console progress-bar in Python using \r to clear the display. To support multi-line progress-bars (for several parallel tasks) I am wondering if one can set terminal width for the current process so that long lines would wrap? For…
Vadim Kantorov
  • 930
  • 1
  • 10
  • 28
0
votes
1 answer

ncurses Segmentation Fault

I was modifying code from a project someone had finished with an ASCII art torus, known as donut.c. I felt compelled to draw other three dimensional shapes with the code from this program in an object-oriented paradigm, but also wanted to modify it…
astrogeek14
  • 234
  • 1
  • 14
0
votes
3 answers

system() output in ncurses

Sorry if this is a very noob question, but i'm just starting with ncurses (and C++). I'm trying to call a system command inside a ncurses code (for the example, anything will work) and to store the output in a variable, not displaying it until i…
Ghost
  • 1,426
  • 5
  • 19
  • 38
0
votes
1 answer

Changing ncurses 6 "terminfo-dirs" after compilation/installation

There is a ncurses6 originally installed in a user home dir, let's say "/home/test", so a test environment was built over this ncurses path, a lot of (in development) apps were compiled and is working now, depending only of the current HOME env…
Luciano
  • 2,695
  • 6
  • 38
  • 53
0
votes
2 answers

Finally Block for Segmentation Faults (C++)

I'm using ncurses and whenever I get a segfault, ncurses doesn't properly release control of the terminal (because endwin() was never called). I set up a signal handler: void handler(int signum) { endwin(); exit(EXIT_FAILURE); } but the…
Nick
  • 2,821
  • 5
  • 30
  • 35
0
votes
2 answers

mvwaddstr() causes false positive with McAfee

I've been writing a C Curses application with PDCurses. It was compiling and running fine, but when I added some code to draw a string in a window, McAfee quarantines my compiled .exe as a trojan. Here is the line that causes the false…
Lucas Baizer
  • 305
  • 2
  • 5
  • 13
0
votes
1 answer

NCURSES keyboard input while calling sleep

I'm trying to use ncurses to create a game. I set it so that the character moves by arrow key input, but if I hold the arrow key for a while and then let go the character will keep moving for a while before stopping. These are my…
yman
  • 41
  • 4
0
votes
1 answer

Basic Ncurses Menu

Im trying to do a basic menu in C. I'm supposed to do this with ncurses lib. I was working with this tutorial: Video On YouTube But mine version has some problems: 1)The menu will not print properly, it will reveal only while choosing menu items.…
Jacek
  • 171
  • 2
  • 12
0
votes
2 answers

Using in multiple classes

I have three different classes. Each class is responsible for drawing a specific thing using ncurses. I must draw all the three things at once. One of the classes is responsible for a board, and the other two classes draws something inside the…
mySelf
  • 3
  • 2
0
votes
1 answer

Run bash command asynch with ncurses in c

I wanted to create a simple program to get the connected clients each moment on my wireless network. For that purposes I use nmap to find the appropriate addresses (MAC of the client, IP) and ncurses library in C. The bash script that do my job is…
user4108694
0
votes
1 answer

Function is being called four times per loop when there are only two calls to it

I'm very new to programming in C, and have pretty rusty programming skills overall. In order to learn C and re-orient myself with programming in general, I'm challenging myself to try and make a simple rougelike using ncurses. I've set up a "log",…
Hstuart
  • 55
  • 8
0
votes
1 answer

When using NCurses CDK matrix is it possible to update matrix after call to activateCDKMatrix?

I'd like to have a background thread update certain fields and as a result have the matrix periodically redraw/refresh. My problem is that if ActivateCDKMatrix has been called this seems to block any updates to the matrix until a user hits Enter or…
jterm
  • 973
  • 1
  • 12
  • 32
0
votes
1 answer

Is it possible to get an NCurses CDK Matrix to dynamically resize to the terminal window?

I have a bunch of items I want to display in a grid. I'd like the grid to dynamically resize based on the terminal window size. Basically I'd like it to fit as many columns as possible before adding another row. How should I go about this? Is the…
jterm
  • 973
  • 1
  • 12
  • 32
0
votes
1 answer

How to get Player to interact with Monster using ncurses library?

I've been trying to create my roguelike type of game for C++ using the ncurses library. After following many different tutorials, I am able to create the Player character, the map, the code to prevent the Player from going through walls and the…
RyAaren
  • 1
  • 1
0
votes
2 answers

C ncurses getnstr length

I'm making a simple 'game' with ncurses in C, and for name input I use getnstr. I have the following code: printw("What is your name? "); char name[10]; int namelen = getnstr(name, 10); Now, I want to allow max 10 characters, and I want to use the…
Joshua Bakker
  • 2,288
  • 3
  • 30
  • 63
1 2 3
99
100