Questions tagged [termcap]

termcap is a library and database that enables programs to use display terminals in a terminal-independent manner. It originated in Berkeley Unix.

termcap is an obsolete facility which has been superseded by the terminfo database and associated libraries.

72 questions
0
votes
1 answer

Make a layer in terminal

I'm trying to make a simple autocompletion tool for my program, and i would it look like as this picture :…
Druxtan
  • 1,311
  • 2
  • 15
  • 21
0
votes
1 answer

Error setting up ddd to debug bash scripts

I am comparatively new to Linux. I am running Fedora 64 bit at my PC. I am having difficulty setting up ddd with bashdb. I am able to install it using yum but when I run it for bashdb, the software environment for ddd comes up but it keeps on…
Hamzahfrq
  • 696
  • 1
  • 6
  • 25
0
votes
1 answer

Reading input keyboard

Im doing some test for a larger program, here im trying to move a blank inside a char array full of '*', it work fine but after sending many key the value of left and right key change, I dont get why Here is my code: include //#include…
Saxtheowl
  • 4,136
  • 5
  • 23
  • 32
0
votes
1 answer

Display output from program called between backticks

For an exercise about termcaps, I have to write a program that will display a list of items and let the user to select some of them. The program will then output the selected items separated with a space. The program can be called like this: $>…
Quentin Hayot
  • 7,786
  • 6
  • 45
  • 62
-1
votes
1 answer

Deleting output with termcaps

I'm trying to delete the characters from the cursor to the end of line, the problem is when I print a new line ('\n') after, the deleted characters reappear, I also tried to print a null character before the new line and it does the same. Minimal…
Fayeure
  • 1,181
  • 9
  • 21
-1
votes
1 answer

Why the function tgetnum("co") does not update every time I resize the terminal?

I have a global variable called g_data that holds a pointer to a structure which contains, among many, two variables to hold the height and width of the terminal. The function signalhandler below checks whether the terminal has been resized. In that…
Glitch
  • 155
  • 1
  • 9
-1
votes
1 answer

Implement overlay in terminal

I want to create an overlay in terminal This Q&D shows the time in right/bottom #include #include #include #include #include #include #include static char…
albfan
  • 12,542
  • 4
  • 61
  • 80
-1
votes
2 answers

screen size NULL when opening with backcote in term

I am coding a C program with termcaps, and I need to return a value by executing like : more `./program arg1 arg2 arg3 arg4` And my function get_winsize have a condition if my screen is too small. int *get_winsize() { struct winsize w; …
albttx
  • 3,444
  • 4
  • 23
  • 42
-1
votes
4 answers

Emacs adds something on the top of every file

When I open files with emacs it adds 12;rgb:1c1c/1c1c/1c1c on the top. How can I prevent this? I have installed emacs on a clean reinstalled debian system. Emacs: GNU Emacs 24.4.1 Terminal Emulator: MobaXterm Personal Edition v7.7 System (local):…
Evren
  • 181
  • 2
  • 11
-2
votes
1 answer

Terminal behavior within program

I'm using the termcaps library for my UI. And i wish to know if there is some way to change how the emulator behave ? eg: Enable terminal scrollback buffer (termcap flag 'da' and 'db' set to one) Thank you
Astt
  • 13
  • 3
-2
votes
1 answer

How to get the terminal type with empty env

I'ld like to know if there any way to get the type of the terminal but get env("TERM"). tgetent(NULL, getenv("TERM")); But if i execute my program with an empty env env -i ./a.out i wont be able to get the terminal type i need to use the termcap…
Mickael_42
  • 33
  • 6
-6
votes
3 answers

What is this operation in C?

I start working with the termcaps and i saw this kind of operation. term.c_lflag &= ~(ICANON); I know &= is a binary AND, and i am not very confortable with it. Why didn't simply use = or make a #define, and what the &= ~ do ?
albttx
  • 3,444
  • 4
  • 23
  • 42
1 2 3 4
5