getline.3 (6a068746777241722b2b32c5d0bc443a2a64d80b) | getline.3 (8c039ae1549bf4c7529709ab4d474e08ac92b232) |
---|---|
1.\" Copyright (c) 2009 David Schultz <das@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" | 1.\" Copyright (c) 2009 David Schultz <das@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" |
27.Dd November 30, 2010 | 27.Dd November 30, 2012 |
28.Dt GETLINE 3 29.Os 30.Sh NAME 31.Nm getdelim , 32.Nm getline 33.Nd get a line from a stream 34.Sh LIBRARY 35.Lb libc --- 35 unchanged lines hidden (view full) --- 71and 72.Fa *linecapp 73will be updated accordingly. 74.Sh RETURN VALUES 75The 76.Fn getdelim 77and 78.Fn getline | 28.Dt GETLINE 3 29.Os 30.Sh NAME 31.Nm getdelim , 32.Nm getline 33.Nd get a line from a stream 34.Sh LIBRARY 35.Lb libc --- 35 unchanged lines hidden (view full) --- 71and 72.Fa *linecapp 73will be updated accordingly. 74.Sh RETURN VALUES 75The 76.Fn getdelim 77and 78.Fn getline |
79functions return the number of characters written, excluding the | 79functions return the number of characters stored in the buffer, excluding the |
80terminating 81.Dv NUL 82character. 83The value \-1 is returned if an error occurs, or if end-of-file is reached. 84.Sh EXAMPLES 85The following code fragment reads lines from a file and 86writes them to standard output. 87The --- 78 unchanged lines hidden --- | 80terminating 81.Dv NUL 82character. 83The value \-1 is returned if an error occurs, or if end-of-file is reached. 84.Sh EXAMPLES 85The following code fragment reads lines from a file and 86writes them to standard output. 87The --- 78 unchanged lines hidden --- |