. The output is
written to I, which must have room for at least I bytes.
=head1 RETURN VALUE
C returns the number of bytes required to store the terminfo data.
If this exceeds I, nothing is written to I. If the terminal object can't
be represented in terminfo format (e.g. because the string table would be too
large), the return value is C.
=head1 ERRORS
=over
=item C
I can't be converted to terminfo format.
=item C
The resulting terminfo entry would be longer than I bytes.
=back
=head1 SEE ALSO
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_format.pod 0000664 0000000 0000000 00000004440 12563450535 0017450 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_format, unibi_run - interpret a terminfo format string
=head1 SYNOPSIS
#include
void unibi_format(
unibi_var_t var_dyn[26],
unibi_var_t var_static[26],
const char *fmt,
unibi_var_t param[9],
void (*out)(void *, const char *, size_t),
void *ctx1,
void (*pad)(void *, size_t, int, int),
void *ctx2
);
size_t unibi_run(const char *fmt, unibi_var_t param[9], char *p, size_t n);
=head1 DESCRIPTION
C takes a format string I and executes it. All output is
done by (possibly repeated) calls to I. In the calls to I the first
argument is always I, the second argument is a pointer to a chunk of
data, and the third argument is a count specifying the size of the chunk in
bytes.
I is used when the format string contains C<< $<...> >> padding
instructions. In the calls to I the first argument is always I, the
second argument is the delay in tenths of milliseconds, the third argument is a
boolean flag indicating whether C<*> (proportional delay) was specified in the
format string, and the fourth argument is a boolean flag indicating whether
C> (forced padding) was specified in the format string. Thus a format string
of C<< $<5/> >> would translate into C. You may pass a
null pointer for I; in that case padding instructions are silently
skipped.
The values of I are used for the format codes C<%p1> .. C<%p9>; the
values of I and I are used for the so-called
dynamic/static variables C<%Pa> .. C<%Pz> and C<%PA> .. C<%PZ>, respectively.
C is a wrapper around C. It passes two arrays (each
initialized to 26 zeroes) as I and I. I and I
are passed on unchanged. It ignores padding and places all normal output in the
buffer pointed to by I. I is the size of the buffer; at most I bytes
will be written to I.
=head1 RETURN VALUE
C returns the number of bytes that would have been written if the
buffer was big enough. Thus the number of valid bytes in I after a call to
C is the minimum of I and the return value of C.
=head1 SEE ALSO
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_from_env.pod 0000664 0000000 0000000 00000000624 12563450535 0017773 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_from_env - read the terminfo entry specified by TERM
=head1 SYNOPSIS
#include
unibi_term *unibi_from_env(void);
=head1 DESCRIPTION
This function calls C with the value of the environment
variable C.
=head1 RETURN VALUE
See L.
=head1 SEE ALSO
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_from_fd.pod 0000664 0000000 0000000 00000000611 12563450535 0017570 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_from_fd - read a terminfo entry from a file descriptor
=head1 SYNOPSIS
#include
unibi_term *unibi_from_fd(int fd);
=head1 DESCRIPTION
This function reads up to 4096 bytes from I, then calls C.
=head1 RETURN VALUE
See L.
=head1 SEE ALSO
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_from_file.pod 0000664 0000000 0000000 00000000565 12563450535 0020126 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_from_file - read a terminfo entry from a file
=head1 SYNOPSIS
#include
unibi_term *unibi_from_file(const char *file);
=head1 DESCRIPTION
This function opens I, then calls C.
=head1 RETURN VALUE
See L.
=head1 SEE ALSO
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_from_fp.pod 0000664 0000000 0000000 00000000602 12563450535 0017604 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_from_fp - read a terminfo entry from a FILE *
=head1 SYNOPSIS
#include
unibi_term *unibi_from_fp(FILE *fp);
=head1 DESCRIPTION
This function reads up to 4096 bytes from I, then calls C.
=head1 RETURN VALUE
See L.
=head1 SEE ALSO
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_from_mem.pod 0000664 0000000 0000000 00000001602 12563450535 0017756 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_from_mem - construct a terminal object from a compiled terminfo entry
=head1 SYNOPSIS
#include
unibi_term *unibi_from_mem(const char *p, size_t n);
=head1 DESCRIPTION
This function parses a compiled terminfo entry that starts at I and is I
bytes long and constructs a C object from it. When you're done with
it, you should call C to free it.
=head1 RETURN VALUE
A pointer to a new C. In case of failure, C is returned and
C is set.
=head1 ERRORS
=over
=item C
The passed bytes don't look like a valid terminfo entry.
=item C
I is too small for a valid terminfo entry.
=back
=head1 SEE ALSO
L,
L,
L,
L,
L,
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_from_term.pod 0000664 0000000 0000000 00000001641 12563450535 0020152 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_from_term - read a terminfo entry for a named terminal
=head1 SYNOPSIS
#include
unibi_term *unibi_from_term(const char *name);
=head1 DESCRIPTION
This function locates the terminfo file for I, then calls C.
It looks in the following places:
=over
=item 1.
If the environment variable C is set, it is interpreted as the name
of the directory to search. No other directory is used.
=item 2.
Otherwise, C<$HOME/.terminfo> is tried.
=item 3.
If that was not successful and C is set, it is interpreted as a
colon-separated list of directories to search.
=item 4.
If C is not set, a compiled-in fallback (C)
is used instead.
=back
=head1 RETURN VALUE
See L.
=head1 SEE ALSO
L,
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_get_aliases.pod 0000664 0000000 0000000 00000002200 12563450535 0020430 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_aliases, unibi_set_aliases - access the aliases of a terminal object
=head1 SYNOPSIS
#include
const char **unibi_get_aliases(const unibi_term *ut);
void unibi_set_aliases(unibi_term *ut, const char **v);
=head1 DESCRIPTION
C returns the list of aliases from I;
C sets it to I. The format of this list is like C:
a null-terminated vector of strings.
The contents of this list come from the ('|'-separated) name section in
terminfo entries. It's supposed to be a list of lowercase words or
abbreviations that refer to this terminal, the first one being the most
common name. The last part of the name section can be more verbose and is not
stored in the aliases list; it can be accessed with C.
Note that C simply stores the pointer it is given; it will not
free I or make a copy of it (or any of the strings it points to).
=head1 RETURN VALUE
C returns a pointer to a null-terminated vector of strings.
=head1 SEE ALSO
L,
L,
L
=cut
unibilium-1.2.0/doc/unibi_get_bool.pod 0000664 0000000 0000000 00000001655 12563450535 0017757 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_bool, unibi_set_bool, unibi_get_num, unibi_set_num, unibi_get_str,
unibi_set_str - access the capabilities of a terminal object
=head1 SYNOPSIS
#include
int unibi_get_bool(const unibi_term *ut, enum unibi_boolean b);
void unibi_set_bool(unibi_term *ut, enum unibi_boolean b, int x);
short unibi_get_num(const unibi_term *ut, enum unibi_numeric n);
void unibi_set_num(unibi_term *ut, enum unibi_numeric n, short x);
const char *unibi_get_str(const unibi_term *ut, enum unibi_string s);
void unibi_set_str(unibi_term *ut, enum unibi_string s, const char *x);
=head1 DESCRIPTION
Get/set boolean, numeric, and string capabilities. Absent numeric capabilities
are represented as C<-1>, absent string capabilities as C.
Note that C simply stores the pointer it is given; it will not
free I or make a copy of the string.
=head1 SEE ALSO
L
=cut
unibilium-1.2.0/doc/unibi_get_ext_bool.pod 0000664 0000000 0000000 00000002000 12563450535 0020620 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_ext_bool, unibi_set_ext_bool, unibi_get_ext_num, unibi_set_ext_num, unibi_get_ext_str, unibi_set_ext_str - access the extended capabilities of a terminal object
=head1 SYNOPSIS
#include
int unibi_get_ext_bool(const unibi_term *ut, size_t i);
short unibi_get_ext_num(const unibi_term *ut, size_t i);
const char *unibi_get_ext_str(const unibi_term *ut, size_t i);
void unibi_set_ext_bool(unibi_term *ut, size_t i, int b);
void unibi_set_ext_num(unibi_term *ut, size_t i, short v);
void unibi_set_ext_str(unibi_term *ut, size_t i, const char *s);
=head1 DESCRIPTION
Get/set extended boolean, numeric, and string capabilities.
I is the index of the extended capability to act on; it must be less than
C, C, or
C, respectively.
Note that C simply stores the pointer it is given; it will
not free I or make a copy of the string.
=head1 SEE ALSO
L
=cut
unibilium-1.2.0/doc/unibi_get_ext_bool_name.pod 0000664 0000000 0000000 00000002262 12563450535 0021632 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_ext_bool_name, unibi_set_ext_bool_name, unibi_get_ext_num_name, unibi_set_ext_num_name, unibi_get_ext_str_name, unibi_set_ext_str_name - access the names of extended capabilities of a terminal object
=head1 SYNOPSIS
#include
const char *unibi_get_ext_bool_name(const unibi_term *ut, size_t i);
const char *unibi_get_ext_num_name(const unibi_term *ut, size_t i);
const char *unibi_get_ext_str_name(const unibi_term *ut, size_t i);
void unibi_set_ext_bool_name(unibi_term *ut, size_t i, const char *s);
void unibi_set_ext_num_name(unibi_term *ut, size_t i, const char *s);
void unibi_set_ext_str_name(unibi_term *ut, size_t i, const char *s);
=head1 DESCRIPTION
Get/set the names of extended boolean, numeric, and string capabilities.
I is the index of the extended capability to act on; it must be less than
C, C, or
C, respectively.
Note that C, C, and
C simply store the pointer they are given; they will
not free I or make a copy of the string.
=head1 SEE ALSO
L
=cut
unibilium-1.2.0/doc/unibi_get_ext_num.pod 0000664 0000000 0000000 00000002000 12563450535 0020464 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_ext_bool, unibi_set_ext_bool, unibi_get_ext_num, unibi_set_ext_num, unibi_get_ext_str, unibi_set_ext_str - access the extended capabilities of a terminal object
=head1 SYNOPSIS
#include
int unibi_get_ext_bool(const unibi_term *ut, size_t i);
short unibi_get_ext_num(const unibi_term *ut, size_t i);
const char *unibi_get_ext_str(const unibi_term *ut, size_t i);
void unibi_set_ext_bool(unibi_term *ut, size_t i, int b);
void unibi_set_ext_num(unibi_term *ut, size_t i, short v);
void unibi_set_ext_str(unibi_term *ut, size_t i, const char *s);
=head1 DESCRIPTION
Get/set extended boolean, numeric, and string capabilities.
I is the index of the extended capability to act on; it must be less than
C, C, or
C, respectively.
Note that C simply stores the pointer it is given; it will
not free I or make a copy of the string.
=head1 SEE ALSO
L
=cut
unibilium-1.2.0/doc/unibi_get_ext_num_name.pod 0000664 0000000 0000000 00000002262 12563450535 0021476 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_ext_bool_name, unibi_set_ext_bool_name, unibi_get_ext_num_name, unibi_set_ext_num_name, unibi_get_ext_str_name, unibi_set_ext_str_name - access the names of extended capabilities of a terminal object
=head1 SYNOPSIS
#include
const char *unibi_get_ext_bool_name(const unibi_term *ut, size_t i);
const char *unibi_get_ext_num_name(const unibi_term *ut, size_t i);
const char *unibi_get_ext_str_name(const unibi_term *ut, size_t i);
void unibi_set_ext_bool_name(unibi_term *ut, size_t i, const char *s);
void unibi_set_ext_num_name(unibi_term *ut, size_t i, const char *s);
void unibi_set_ext_str_name(unibi_term *ut, size_t i, const char *s);
=head1 DESCRIPTION
Get/set the names of extended boolean, numeric, and string capabilities.
I is the index of the extended capability to act on; it must be less than
C, C, or
C, respectively.
Note that C, C, and
C simply store the pointer they are given; they will
not free I or make a copy of the string.
=head1 SEE ALSO
L
=cut
unibilium-1.2.0/doc/unibi_get_ext_str.pod 0000664 0000000 0000000 00000002000 12563450535 0020475 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_ext_bool, unibi_set_ext_bool, unibi_get_ext_num, unibi_set_ext_num, unibi_get_ext_str, unibi_set_ext_str - access the extended capabilities of a terminal object
=head1 SYNOPSIS
#include
int unibi_get_ext_bool(const unibi_term *ut, size_t i);
short unibi_get_ext_num(const unibi_term *ut, size_t i);
const char *unibi_get_ext_str(const unibi_term *ut, size_t i);
void unibi_set_ext_bool(unibi_term *ut, size_t i, int b);
void unibi_set_ext_num(unibi_term *ut, size_t i, short v);
void unibi_set_ext_str(unibi_term *ut, size_t i, const char *s);
=head1 DESCRIPTION
Get/set extended boolean, numeric, and string capabilities.
I is the index of the extended capability to act on; it must be less than
C, C, or
C, respectively.
Note that C simply stores the pointer it is given; it will
not free I or make a copy of the string.
=head1 SEE ALSO
L
=cut
unibilium-1.2.0/doc/unibi_get_ext_str_name.pod 0000664 0000000 0000000 00000002262 12563450535 0021507 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_ext_bool_name, unibi_set_ext_bool_name, unibi_get_ext_num_name, unibi_set_ext_num_name, unibi_get_ext_str_name, unibi_set_ext_str_name - access the names of extended capabilities of a terminal object
=head1 SYNOPSIS
#include
const char *unibi_get_ext_bool_name(const unibi_term *ut, size_t i);
const char *unibi_get_ext_num_name(const unibi_term *ut, size_t i);
const char *unibi_get_ext_str_name(const unibi_term *ut, size_t i);
void unibi_set_ext_bool_name(unibi_term *ut, size_t i, const char *s);
void unibi_set_ext_num_name(unibi_term *ut, size_t i, const char *s);
void unibi_set_ext_str_name(unibi_term *ut, size_t i, const char *s);
=head1 DESCRIPTION
Get/set the names of extended boolean, numeric, and string capabilities.
I is the index of the extended capability to act on; it must be less than
C, C, or
C, respectively.
Note that C, C, and
C simply store the pointer they are given; they will
not free I or make a copy of the string.
=head1 SEE ALSO
L
=cut
unibilium-1.2.0/doc/unibi_get_name.pod 0000664 0000000 0000000 00000001375 12563450535 0017743 0 ustar 00root root 0000000 0000000 =pod
=head1 NAME
unibi_get_name, unibi_set_name - access the name of a terminal object
=head1 SYNOPSIS
#include
const char *unibi_get_name(const unibi_term *ut);
void unibi_set_name(unibi_term *ut, const char *s);
=head1 DESCRIPTION
C gets the name from I; C sets the name to
I.
Note that C