1TS_ERROR_FN(3) tslib TS_ERROR_FN(3)
2
3
4
6 ts_error_fn - use a custom error function for libts library errors
7
9 #include <tslib.h>
10
11 int (*ts_error_fn)(const char *fmt, va_list ap);
12
13
14
16 ts_error_fn() is by default implemented similar like this:
17
18 static int errfn(const char *fmt, va_list ap)
19 {
20 return vfprintf(stderr, fmt, ap);
21 }
22
23 inside the library. It is exposed to the user and can be replaced by a
24 custom error function. Simply assign your custom implementation to
25 ts_error_fn like
26
27 ts_error_fn = my_custom_errfn;
28
29 It can be used to write the system log files, for example. The
30 ts_print_mt test program has an example.
31
33 user defined.
34
35
37 ts_read(3), ts_open(3), ts_setup(3), ts_close(3), ts.conf(5)
38
39
40
41 TS_ERROR_FN(3)