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

Ncurses form.h, but how to actually use the input?

So, I've been messing around with form.h from ncurses, this is great, the menu appears to work. But, there's just something missing. What exactly do I do with the data that has been inputted? I have scoured the Internet looking for some form of…
Bez
  • 51
  • 1
0
votes
1 answer

COLS vs getmaxx in ncurses

Tinkering with ncurses; can't seem to find why I would want to use getmaxyx() instead of LINES and COLS, or vice-versa. It seems to me that LINES and COLS is already initialized by initscr(), so why would I want to go through the additional step of…
0
votes
0 answers

C++ ncurses: printw with special characters yeilds '�~T~B'

I'm trying to print box drawing characters with ncurses in C++, as shown below. #include #include int main() { initscr(); addstr("│"); getch(); endwin(); } When I use printw or addstr to print…
k-a-v
  • 326
  • 5
  • 22
0
votes
0 answers

Ncurses, unicode: problems on some terminals

I'm trying to make ncurses work with unicodes. I found a nice tutorial here. However I'm having troubles with the following code: #include #include #include int main (int argc, char *argv[]) { setlocale(LC_ALL,…
MaPo
  • 613
  • 4
  • 9
0
votes
2 answers

Why is ncurses not displaying text?

ncurses_init(); ncurses_addstr(0, 0, "test"); ncurses_refresh(); ncurses_getch(); ncurses_end(); This should be displaying "test" at the top left, but it isn't. Any idea why? PHP 5.1.6 CentOS 5.5 Got ncurses through yum install ncurses it…
Rob
  • 7,980
  • 30
  • 75
  • 115
0
votes
1 answer

cmake bootstrapping doesn't find ncurses

I am building cmake on RHEL with gcc and ncurses placed in a custom location /path/to/gcc/and/ncurses which contains the standard /usr structure i.e. /path/to/gcc/and/ncurses bin include include/ncurses lib lib64 Both my CPATH…
0
votes
0 answers

How compiling -static ncursesw in Fedora

My program compiles on Debian, but Fedora has another package named ncurses-static. I compile: $gcc -std=c99 -static moje.o pliki.o -o static_file -lncursesw -ltinfo I get 2…
Eliasz Łukasz
  • 478
  • 1
  • 3
  • 17
0
votes
1 answer

Deleting previously printed character

I want to write a program that let's you move a character on the screen, basically, I will improve on this to hopefully make a sort of game. One problem I'm having trouble deleting the previously printed character, it just leaves a trail behind…
alpkaan35
  • 23
  • 5
0
votes
1 answer

NCurses extra spacing between characters on Windows command prompt

I just started using the ncurses library that came with my MinGW64, gcc 5.3.0 on a Windows 7 machine. With the following code: initscr(); noecho(); raw(); keypad(stdscr, TRUE); printw("Hello there."); getmaxyx(stdscr, row, col); printw("\nRow:…
Blerg
  • 163
  • 9
0
votes
0 answers

Type conversion `operator` function returning pointer to function

I wanted a means of allowing terminfo escape sequences (esp. resulting from calls to tparm()) to be stored in strings, so I wrote this wrapper class. class tputs_wrapper { private: static string *current; public: using…
Paulo1205
  • 918
  • 4
  • 9
0
votes
1 answer

Invalid content when nCurses app comes from background

I have observed odd behavior with my nCurses app when putting it to background/foreground. After a couple of times my window shows invalid content. I suspect that when sending SIGSTOP/SIGCONT signals to my app I need to be handle those and refresh…
Mateusz Wojtczak
  • 1,621
  • 1
  • 12
  • 28
0
votes
1 answer

Why can't I provide a string argument to printw in ncurses?

For an application that I'm writing, I have a string type variable that I want to display within an ncurses window: #include #include #include int main(){ std::string mystring = "A sample string\n"; // Entering…
Karthik
  • 29
  • 4
0
votes
0 answers

printw overlapping on main window

I'm trying to print the current input on my console window, using printw and ncurses, but the first input doesn't give any problem, while the next inputs make the printw overlapping with the other text, as you can see in this image:…
Scienziatogm
  • 53
  • 1
  • 6
0
votes
1 answer

How to set fixed size of a terminal window?

I am writing a program, using ncurses, that outputs a very wide table. I would not like to cut off or wrap the table when the terminal window is to small. Is there any possibility to force the scroll bars to appear when the window is to small, or…
quark
  • 70
  • 9
0
votes
0 answers

How to draw line from bottom to top and not top to bottom using nurses in C

Using mvvline I can draw vertical line from top to bottom. I need to draw line from bottom to top. How can it be done?