freebsd-dev/lib/libmytinfo/README.doc

126 lines
4.6 KiB
Plaintext
Raw Normal View History

1994-10-06 23:38:41 +00:00
----------------------------------------------------------------------------
tconv [-b] [-c [-OUGd]] [-i] [-B [-D dir]] [-I] [-k] [-t term] [file]
tic [file]
cap2info [-t term] [-OUGdk] [file]
-c convert from termcap
-i convert from terminfo source
-b convert from terminfo binary
-B convert to terminfo binary
-I convert to terminfo source
The following switches are available when converting from termcap:
-d don't supply any defaults for missing capabilities
-O include obsolete termcap capabilities
-G include GNU capabilities
-U include UW capabilities
-k keep comments
-D dir directory to put terminfo binaries in
-t term name of terminal to translate
file filename of termcap/terminfo database to use
If a file is specifed and no terminal is given the entire file we be translated.
If no terminal and no file is specified then the terminal name will be taken
from the environment varible TERM. Unless compiling to a terminfo binary,
output is to stdout.
----------------------------------------------------------------------------
char *tparm(char *str, ...); /* up to nine parameters */
char *tgoto(char *str, int column, int row);
tparm and tgoto support the following termcap and terminfo % codes:
Terminfo % Codes
%% output a '%'
%[[:][-+# ][width][.precision]][doxXs]
output pop according to the printf format
%c output pop as a char
%'c' push character constant c.
%{n} push decimal constant n.
%p[1-9] push paramter [1-9]
%g[a-z] push variable [a-z]
%P[a-z] put pop in variable [a-z]
%l push the length of pop (a string)
%+ add pop to pop and push the result
%- subtract pop from pop and push the result
%* multiply pop and pop and push the result
%& bitwise and pop and pop and push the result
%| bitwise or pop and pop and push the result
%^ bitwise xor pop and pop and push the result
%~ push the bitwise not of pop
%= compare if pop and pop are equal and push the result
%> compare if pop is less than pop and push the result
%< compare if pop is greater than pop and push the result
%A logical and pop and pop and push the result
%O logical or pop and pop and push the result
%! push the logical not of pop
%? condition %t if_true [%e if_false] %;
if condtion evaulates as true then evaluate if_true,
else evaluate if_false. elseif's can be done:
%? cond %t true [%e cond2 %t true2] ... [%e condN %t trueN] [%e false] %;
%i add one to parameters 1 and 2. (ANSI)
Termcap Codes
%% output a %
%. output parameter as a character
%d output parameter as a decimal number
%2 output parameter in printf format %02d
%3 output parameter in printf format %03d
%+x add the character x to parameter and output it as a character
(UW) %-x subtract parameter FROM the character x and output it as a char
(UW) %ax add the character x to parameter
(GNU) %a[+*-/=][cp]x
GNU arithmetic.
(UW) %sx subtract parameter FROM the character x
%>xy if parameter > character x then add character y to parameter
%B convert to BCD (parameter = (parameter/10)*16 + parameter%16)
%D Delta Data encode (parameter = parameter - 2*(paramter%16))
%i increment the first two parameters by one
%n xor the first two parameters by 0140
(GNU) %m xor the first two parameters by 0177
%r swap the first two parameters
(GNU) %b backup to previous parameter
(GNU) %f skip this parameter
(GNU) used by GNU Emacs termcap libraries
(UW) used by the University of Waterloo (MFCF) termcap libraries
Note the two definitions of %a, the GNU defintion is used if the characters
after the 'a' are valid for it, otherwise the UW definition is used.
----------------------------------------------------------------------------
int setupterm(char *term; int fd; int *err);
int set_curterm(TERMINAL *new);
int del_curterm(TERMINAL *old);
char *tparm(char *str, ...); /* see above */
int tputs(char *str, int count, int (*putc)());
int putp(str);
int tigetflag(char *cap);
int tigetnum(char *cap);
char *tigetstr(char *cap);
int def_prog_mode();
int def_shell_mode();
int reset_prog_mode();
int reset_shell_mode();
char *boolnames[], *boolcodes[], *boolfnames[];
char *numnames[], *numcodes[], *numfnames[];
char *strnames[], *strcodes[], *strfnames[];
These functions work just like the terminfo functions. Note restartterm(),
vidputs(), vidattr(), and mvcur() are not available.
----------------------------------------------------------------------------
int tgetent(char *buf, char *term);
int tgetflag(char *cap);
int tgetnum(char *cap);
char *tgetstr(char *cap, char **area);
char *tgoto(char *cap, int column, int row);
int tputs(char *str, int count, int (*putc)());
These functions work just like termcap functions.
----------------------------------------------------------------------------