1e0f95098SPeter Avalos /*-
2e0f95098SPeter Avalos * Copyright (c) 2009 David Schultz <das@FreeBSD.org>
3e0f95098SPeter Avalos * All rights reserved.
4e0f95098SPeter Avalos *
5e0f95098SPeter Avalos * Redistribution and use in source and binary forms, with or without
6e0f95098SPeter Avalos * modification, are permitted provided that the following conditions
7e0f95098SPeter Avalos * are met:
8e0f95098SPeter Avalos * 1. Redistributions of source code must retain the above copyright
9e0f95098SPeter Avalos * notice, this list of conditions and the following disclaimer.
10e0f95098SPeter Avalos * 2. Redistributions in binary form must reproduce the above copyright
11e0f95098SPeter Avalos * notice, this list of conditions and the following disclaimer in the
12e0f95098SPeter Avalos * documentation and/or other materials provided with the distribution.
13e0f95098SPeter Avalos *
14e0f95098SPeter Avalos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15e0f95098SPeter Avalos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16e0f95098SPeter Avalos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17e0f95098SPeter Avalos * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18e0f95098SPeter Avalos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19e0f95098SPeter Avalos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20e0f95098SPeter Avalos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21e0f95098SPeter Avalos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22e0f95098SPeter Avalos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23e0f95098SPeter Avalos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24e0f95098SPeter Avalos * SUCH DAMAGE.
25e0f95098SPeter Avalos *
26*f2a91d31Szrj * $FreeBSD: head/lib/libc/stdio/getline.c 303528 2016-07-30 01:13:54Z bapt $
27e0f95098SPeter Avalos */
28e0f95098SPeter Avalos
29e0f95098SPeter Avalos #include <stdio.h>
30e0f95098SPeter Avalos
31e0f95098SPeter Avalos ssize_t
getline(char ** __restrict linep,size_t * __restrict linecapp,FILE * __restrict fp)32e0f95098SPeter Avalos getline(char ** __restrict linep, size_t * __restrict linecapp,
33e0f95098SPeter Avalos FILE * __restrict fp)
34e0f95098SPeter Avalos {
35e0f95098SPeter Avalos return (getdelim(linep, linecapp, '\n', fp));
36e0f95098SPeter Avalos }
37