debian/rules: Use `git' potty wrapper.
[qmail] / getln.3
CommitLineData
2117e02e
MW
1.TH getln 3
2.SH NAME
3getln \- read one line of data
4.SH SYNTAX
5.B #include <getln.h>
6
7int \fBgetln\fP(&\fIss\fR,&\fIsa\fR,&\fImatch\fR,\fIsep\fR);
8
9substdio \fIss\fR;
10.br
11stralloc \fIsa\fR;
12.br
13int \fImatch\fR;
14.br
15int \fIsep\fR;
16.SH DESCRIPTION
17.B getln
18reads a line of characters, terminated by a
19.I sep
20character,
21from
22.IR ss .
23It returns the line in
24.I sa
25and sets
26.I match
27to 1.
28
29If
30.B getln
31sees end-of-input before it sees
32.IR sep ,
33it returns the partial line in
34.I sa
35and sets
36.I match
37to 0.
38
39.B getln
40normally returns 0.
41If it runs out of memory,
42or encounters an error from
43.IR ss ,
44it returns -1,
45setting
46.B errno
47appropriately.
48.SH "SEE ALSO"
49stralloc(3),
50substdio(3),
51getln2(3)