ctlseqs/man/ctlseqs_matcher_setopt.3

64 lines
1.3 KiB
Groff

.TH CTLSEQS_MATCHER_SETOPT 3 "Sep 01, 2020" 0.1.0 "Ctlseqs Library Manual"
.
.SH NAME
ctlseqs_matcher_setopt - set control sequence matcher options
.
.SH SYNOPSYS
.nf
.B #include <ctlseqs.h>
.PP
.BI "int ctlseqs_matcher_setopt(struct ctlseqs_matcher *" matcher ,
.BI " struct ctlseqs_matcher_opts const *" options );
.fi
.
.SH DESCRIPTION
Changes the properties of the given
.IR matcher .
.PP
The
.I options
argument is a pointer to a
.BR "struct ctlseqs_matcher_opts" ,
whose definition is shown below:
.PP
.nf
.in +4n
.EX
struct ctlseqs_matcher_opts {
char const *const *patterns;
size_t npatterns;
};
.EE
.in
.fi
.PP
Field
.I patterns
is an array of pointers to NUL-terminated strings, each of which represents a pattern of control sequences.
.PP
Field
.I npatterns
is the number of strings provided in
.IR patterns .
.PP
Multiple calls on the same
.I matcher
will discard all data from previous calls.
.
.SH RETURN VALUE
.TP
.B CTLSEQS_OK
Success.
.TP
.B CTLSEQS_NOMEM
Fails to allocate sufficient memory.
.
.SH SEE ALSO
.BR ctlseqs (7)
.
.SH COPYRIGHT
Copyright (c) 2020 CismonX <admin@cismon.net>
.PP
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty, provided the copyright notice and this notice are preserved.
This file is offered as-is, without any warranty.