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
3
votes
1 answer

list of capability codes for Informix 4GL termcap

Is there a reference document that lists all the capability codes actually used by 4GL (and, ideally, all those appearing in the termcap supplied with 4GL RDS)? for example: gs - start graphics mode (box-drawing characters) GS - start graphics…
RedGrittyBrick
  • 3,827
  • 1
  • 30
  • 51
2
votes
1 answer

Term::Cap: "key up" doesn't work

#!/usr/bin/env perl use warnings; use 5.014; use Term::Cap; use POSIX; my $termios = new POSIX::Termios; $termios->getattr; my $ospeed = $termios->getospeed; my $terminal = Tgetent Term::Cap { TERM => undef, OSPEED => $ospeed…
sid_com
  • 24,137
  • 26
  • 96
  • 187
2
votes
1 answer

Non canonical terminal mode buffer stdout in c program

I am working a school project (building a very basic shell). The idea is to be able to do line edition like in bash. For this, I change the terminal mode to non canonical and I stop echo. I made a very simple code to expose my issue (please note, I…
Bstorm
  • 247
  • 1
  • 10
2
votes
1 answer

`%l` encoding in terminfo parameterized strings

I am implementing a parser in C++ for parameterized strings(which are used for specifying some terminal capabilities for a terminal). Then I came across this % encoding on the man page of terminfo: %l push…
tkhurana96
  • 919
  • 7
  • 25
2
votes
1 answer

Display inverse video text with python on terminal

Python has a curses module. Is there a simple way to use this module to display inverse video text? I don't want to do the full-blown curses application, just want the text to bring inverse (or in color).
vy32
  • 28,461
  • 37
  • 122
  • 246
2
votes
1 answer

How can I script an env-var containing ansi escapes without mucking up env terminal output?

Consider the following env exports from my .bashrc: LESS_TERMCAP_mb=$(printf "\e[1;31m") LESS_TERMCAP_md=$(printf "\e[1;31m") LESS_TERMCAP_me=$(printf "\e[0m") LESS_TERMCAP_se=$(printf "\e[0m") LESS_TERMCAP_so=$(printf…
Jake H
  • 1,720
  • 1
  • 12
  • 13
1
vote
3 answers

Unable to turn off automatic margins by termcap in Mac

I need to turn automatic margins off according the following statement from Screen's manual in my Mac If your terminal is a "true" auto-margin terminal (it doesn't allow the last position on the screen to be updated without scrolling…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
1
vote
1 answer

What is the termcap code for the caret (aka circumflex) (^) key?

I want to remap the ^ key to in VIM since it is easier to reach on a german keyboard. As far as I understand there is no keycode for the ^ key and I have to use the termcap notation: inoremap " remap ^ to ESC inoremap
Juve
  • 10,584
  • 14
  • 63
  • 90
1
vote
0 answers

How to debug in Clion using Cmake if project needs libraries

I'm new in C. My code uses termcap library. And I'm trying to debug my code using Clion through Cmake Application. But it can't be compiled because functions that i use from a library are undefined. What should i add to CMakeLists.txt to debug my…
Smoooky
  • 11
  • 2
1
vote
0 answers

How to reset $(tput bold) only?

I’m making some post-formatting of a log for better readability. Using regular expressions, my script recognizes some patterns in the stream and makes the correspondent text bold by inserting the $(tput bold) and $(tput sgr0) values at the beginning…
oneastok
  • 323
  • 1
  • 11
1
vote
0 answers

Cross compile from Linux to Windows using mingw

I'm trying to compile a application developed under Linux Debian for Windows 10 using the mingw compiler and cmake. I configured a toolchain file according to the tutorial from kitware . This works great as long as I have no dependencies to…
B-S-E
  • 28
  • 6
1
vote
1 answer

Spliting a terminal like GNU screen, programatically

According to this (@ Programs using ncurses): http://en.wikipedia.org/wiki/Ncurses and this: http://aperiodic.net/screen/faq#when_i_split_the_display_and_then_detach_screen_forgets_the_split Screen handles the window splitting using termcap (which I…
1
vote
1 answer

How can I send clear or reset with Term::Cap?

When I output tput clear | hexdump -c I get different results if I'm on kitty or xterm. How can I use Term::Cap to generate these terminal signals on the respective terminal? What I've tried is a direct-copy-paste from the docs with setup, use…
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
1
vote
1 answer

Hot to set termcap capability 'bw' flag?

I'm studying termcap library. And I'm trying to do a line editor in the terminal. I have a cursor that can move on the line. Everything works great with one line. But if my line is bigger than terminal width, I can't return my cursor from the second…
1
vote
1 answer

How to display a statement at a specfic row and column using Term::Cap module in perl

I writing a code which will display a statement at 2 nd row and 10th column using Term::Cap module in perl . I have tried the below code #!/apps/perl/5.8.9/bin/perl # use strict; use warnings; require POSIX; use Term::Cap; my $termios =new …
varun kumar
  • 133
  • 2
  • 8