unibi_from_mem(3)

unibi_from_mem3

Construct a terminal object from a compiled terminfo entry

Usage

 #include <unibilium.h>
 
 unibi_term *unibi_from_mem(const char *p, size_t n);

Overview

This function parses a compiled terminfo entry that starts at p and is n bytes long, and constructs a "unibi_term" object from it. When you're done with this object, you should call "unibi_destroy" to free it.

"unibi_from_mem" parses both the traditional ncurses terminfo format (starting with the bytes "1A 01") and the newer "wide integer" format (starting with the bytes "1E 02").

Return value

A pointer to a new "unibi_term". In case of failure, "NULL" is returned and "errno" is set.

Errors

"EINVAL"

The bytes p points at don't look like a valid terminfo entry.

"EFAULT"

n is too small for a valid terminfo entry.

Releases

6 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11–12
  4. 13
  5. Arch

From unibilium 2.1.4-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.