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

Install ncurses for mingw on Ubuntu

I have a project that compiles well with g++. I tried to cross-compile it with x86_64-w64-mingw32-g++ But apparently cmake cannot find ncurses for this compiler. ncurses were installed with sudo apt install libncurses5-dev (on Ubuntu 18). The output…
0
votes
0 answers

How do I get correct file names from readdir on OSX?

I'm trying to get my old filemanager program that I coded years ago with ncurses as a school project to run (the code is not great, might be a good exercise for some refactoring). I created it on Ubuntu, doesn't work on my Macbook. Can't figure out…
Vojta S.
  • 11
  • 1
0
votes
1 answer

ncurses, panel, cursor position, and polling STDIN

I'm trying to write a program using ncurses that polls various file descriptors in the main loop. I managed to trim it down to an example with a single file descriptor, and this expected behavior: There are two windows, managed by the panel…
mjm
  • 11
  • 5
0
votes
1 answer

How to print text in the middle of the screen and make a box window dissapear Ncurses

I want to print text in the middle of the screen (my window) line with line and when I choose an option I want to make that window dissapear using ncurses.h.. int height = 6; int width = 24; WINDOW* menuwin = newwin(height, width, (LINES -…
C. Cristi
  • 569
  • 1
  • 7
  • 21
0
votes
1 answer

How can I put a string with attributes on the screen with auto-wrapping and cursor advancing with ncurses?

As described here, add_wchstr functions do not advance the current cursor position or do auto-wrapping. But if I want to output text like addwstr do, but with format attributes, what should I call? If ncurses is stupidly missing such feature, I…
Alsein
  • 4,268
  • 1
  • 15
  • 35
0
votes
0 answers

How to add ACS_variables to Cygwin?

I built a game with ncurses because of pdcurses' resizing problems i switched to cygwin. Compiled the game with cygwin and it worked almost perfectly. Some acs_variables (i.e. ACS_DIAMOND) are seen as a question mark. When i ran the game the…
runoraca
  • 73
  • 1
  • 5
0
votes
1 answer

How, and whether, to colorize text without Ncurses

Ncurses can colorize text but GNU utilities like ls and diff apparently colorize text without calling Ncurses. Can I, too, portably colorize text without calling Ncurses? For example, in C: printf("the word \033[32mgreen\033[0m is printed in…
thb
  • 13,796
  • 3
  • 40
  • 68
0
votes
1 answer

Get the sign on X, Y in console

How to get the sign on X, Y in console. Example mvprintw(1,2,"H"). and SOME_FUNCTION_I_AM_LOOKING_FOR(1,2) -> return "h".
Domiik
  • 233
  • 1
  • 5
  • 14
0
votes
1 answer

ncurses: how to refresh a single panel

when using ncurses without panels, one can use wrefresh and wnoutrefresh to refresh a single window; but come with panels is another function update_panels, which seems to do the same thing as wnoutrefresh, but for all panels, and taking the stack…
Cyker
  • 9,946
  • 8
  • 65
  • 93
0
votes
1 answer

Ncurses: Read integers from user and store as variable

I am trying to implement the Game of Life using C/ncurses. One function I want my game to have is to take X, Y coordinates from the user and draw a shape on the board at these coordinates. I have a function that draws the shapes on the board and…
M Sakel
  • 23
  • 3
0
votes
1 answer

Random Number in curses C

I am doing this C program for three months in my spare time for learning and fun. I am trying to create a curses file in C for very first time, but I honestly don't even know what is the curses and ncurses because they're are same anyway...so I…
Mike ODell
  • 37
  • 9
0
votes
1 answer

Create a box in C Program with Curses

I am trying to create a box with a game inside the box, but for now I am using the text this is my box for testing. I am very confusing with curses for first time but I am trying to learn for myself in my spare time. I do not have any problems with…
Mike ODell
  • 37
  • 9
0
votes
1 answer

Undefined reference to new NCURSES 6.1 Functions (alloc_pair, reset_color_pairs)

I'm trying to use these functions in my code, but neither compile correctly. I get errors like undefined reference to 'alloc_pair' and collect2: error: ld returned 1 exit status. Other functions (newwin, printw) work fine. Both functions seem to be…
Aiden Woodruff
  • 341
  • 3
  • 9
0
votes
2 answers

How do I fix opening terminal error with c++ ncurses

I'm using CLion 2018.2.6 on MacOS. I'm trying to use ncurses but getting the error "Error opening terminal: unknown." I'm not sure how to fix this. Any help appreciated. Code below. #include #include using namespace…
0
votes
0 answers

Terminal emulator supporting MC2

The "Link MC2" hardware terminal of my client has went down. These terminals are very old. It is difficult to find one on the second hand market. The host behind the terminal is critical to my client business and it does require a MC2 terminal for…
Fizz
  • 1
  • 2