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

Why can't I retrieve my program that was suspended from inside backticks?

I created a program that takes a list of arguments and put them in a grid on a new tty where I can move around and select from it what I want. When I run the program without backticks like this... $> ./ft_select arg_1 arg_2 ... arg_N A new tty is…
Glitch
  • 155
  • 1
  • 9
0
votes
1 answer

Termcap tgetstr getting arrow keys

I'm trying to get the string representing the arrow key up from the termcap database. Using the following: char *buffer = malloc(2048); tgetent(buffer, getenv("TERM")); //TERM = xterm-256color char *key_up = tgetstr("ku", &buffer); // gives me…
varnaud
  • 237
  • 3
  • 12
0
votes
1 answer

Delay in terminfo parameterized strings

In the manpage of terminfo, it is mentioned that $<> in the encoding for specifying delay in ms, and within it's angular brackets is the a number with at most one decimal place of precision. And with the following python script I confirmed that $<…
tkhurana96
  • 919
  • 7
  • 25
0
votes
1 answer

termcap of program executed between backticks

I'm trying to make a C program to select options. It works if I run it this way: ./select choice{1..5} ☐ choice1 ☐ choice3 ☐ choice5 ☐ choice2 ☐ choice4 # outputs "choice1 choice2" on stdout But if I run it between backticks, it's a…
0
votes
1 answer

Is it possible to save several cursor positions using termcaps, to be able to restore them later?

I would like to know if it is possible to save several cursor positions using termcaps, to be able to restore them later ? For example : char *c_pos_1 = tgetstr("sc", NULL); //save cursor position at position 1 later in the code char *c_pos_2 =…
MIG-23
  • 511
  • 3
  • 11
0
votes
2 answers

May I set TERM environment variable safely?

I'm writing a program that uses termcaps and I need to know which kind of terminal I am using. I am aware I can get TERM variable via getenv("TERM"), but I can launch my program with "$ env -i ./myprog" and TERM will not be set. So how can I…
LotoLo
  • 327
  • 4
  • 17
0
votes
1 answer

Catch arrow keys using TermCaps

I am currently working on a complete shell built in C. I want to implement a bash history and navigation using arrows keys through my double linked list but I am having some troubles with TermCaps and properly setting up read() function. Here is…
rak007
  • 973
  • 12
  • 26
0
votes
1 answer

How do you change terminal settings on Fedora 20 with no termcap file only terminfo

set and tset do not change terminal type from xterm-256 color to linux any ideas/
0
votes
1 answer

If I login linux using serial port console, does it using the terminfo or termcap?

linux console implemented by the VT subsystem of the linux kernel, when I login in form the serial port console, does it using the terminfo or termcap?
dudengke
  • 489
  • 2
  • 6
  • 18
0
votes
1 answer

Questions about display with Perform screens

Questions 1 and 2 are specific to INFORMIX-SQL 4.10.DD6 (DOS) Perform screens. Question 3 applies to any version of INFORMIX-SQL in any environment. I would like to be able to display more than 80 columns on my perform screens to fit more stuff in…
Joe R.
  • 2,032
  • 4
  • 36
  • 72
0
votes
0 answers

Does any terminal support \r (carriage return) and \b (backspace)?

I wrote nice PS1 formatter: PS1='\n===============================================\r$?|\u@\h \w \nbash# ' which shown prompt like: 0|user@desktop ~/devel/emacs =================================== bash# I use trick with \r to return cursor to the…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
0
votes
1 answer

Termcaps underlining change character

I am currently learning the Termcaps Library and i want to underline a line. My problem, when i do it, my character becomes a C . Does someone have an idea why ? I compiled with -lcurses This is how I initialized my termcaps : void …
albttx
  • 3,444
  • 4
  • 23
  • 42
0
votes
1 answer

os x screen command,'.screenrc', termcap

I need help in the conceptual area surrounding: /usr/bin/screen, ~/.screenrc, termcap My Goal: is to create a 'correctly' formatted log file via 'screen'. Symptom: The log file contains hundreds of carriage-return bytes [i.e. (\015) or (\r) ]. …
0
votes
2 answers

Color termcaps Konsole?

I've got a problem with ANSI escape codes in my terminal on OpenSuse 13.2. My Makefile use to display pretty colors on OSX at work but at home when I use it I get the litteral termcaps such as \033[1;30m ... \033[0m I know close to nothing about…
cfz42
  • 384
  • 1
  • 14
0
votes
2 answers

TUI using slang with pure ascii (7 bit) characters via termcap

I am using newt/snack (a TUI graphical Widgit library for Python based on slang) to have some interactive scripts. However for some target terminals the output of those screens are not very nice. I can change the look of them by changing the $TERM…
Chen Levy
  • 15,438
  • 17
  • 74
  • 92