~leonerd/libtickit/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.TH TICKIT_STRINGPOS_LIMIT_BYTES 3
.SH NAME
tickit_stringpos_limit_... \- set limit fields in string position counters
.SH SYNOPSIS
.EX
.B #include <tickit.h>
.sp
.BI "void tickit_stringpos_limit_bytes(TickitStringPos *" pos ", size_t " bytes );
.BI "void tickit_stringpos_limit_codepoints(TickitStringPos *" pos ", int " codepoints );
.BI "void tickit_stringpos_limit_graphemes(TickitStringPos *" pos ", int " graphemes );
.BI "void tickit_stringpos_limit_columns(TickitStringPos *" pos ", int " columns );
.BI "void tickit_stringpos_limit_none(TickitStringPos *" pos );
.sp
.BI "#define INIT_TICKIT_STRINGPOS_LIMIT_BYTES(" bytes )
.BI "#define INIT_TICKIT_STRINGPOS_LIMIT_CODEPOINTS(" codepoints )
.BI "#define INIT_TICKIT_STRINGPOS_LIMIT_GRAPHEMES(" grahpemes )
.BI "#define INIT_TICKIT_STRINGPOS_LIMIT_COLUMNS(" columns )
.BI "#define INIT_TICKIT_STRINGPOS_LIMIT_NONE"
.EE
.sp
Link with \fI\-ltickit\fP.
.SH DESCRIPTION
The first four of these functions each set one of the counter fields in \fIpos\fP to the given value, and the other three to -1. This is useful to create a limit counter to stop \fBtickit_utf8_count\fP(3) or \fBtickit_utf8_countmore\fP(3) at the given position. The final function initialises all four fields to -1.
.PP
Each is also available as a macro which can be used to initialise a new \fBTickitStringPos\fP variable.
.PP
.EX
  TickitStringPos limit = INIT_TICKIT_STRINGPOS_LIMIT_BYTES(b);
.EE
.SH "RETURN VALUE"
The functions all return no value. The macros expand to a struct initialiser expression.
.SH "SEE ALSO"
.BR tickit_utf8_count (3),
.BR tickit_stringpos_zero (3),
.BR tickit (7)