ts_error_fn(3)

ts_error_fn3

Use a custom error function for libts library errors

Usage

#include <tslib.h>

int (*ts_error_fn)(const char *fmt, va_list ap);

Overview

ts_error_fn() is by default implemented similar like this:

static int errfn(const char *fmt, va_list ap)
{
        return vfprintf(stderr, fmt, ap);
}       

inside the library. It is exposed to the user and can be replaced by a custom error function. Simply assign your custom implementation to ts_error_fn like

ts_error_fn = my_custom_errfn;

It can be used to write the system log files, for example. The ts_print_mt test program has an example.

Return value

user defined.

Releases

Unchanged in 5 releases since Debian 10 (Buster).

  1. 10–Arch

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