xref: /dflybsd-src/contrib/cvs-1.12/lib/getline.c (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino /* getline.c --- Implementation of replacement getline function.
2*86d7f5d3SJohn Marino    Copyright (C) 2005 Free Software Foundation, Inc.
3*86d7f5d3SJohn Marino 
4*86d7f5d3SJohn Marino    This program is free software; you can redistribute it and/or
5*86d7f5d3SJohn Marino    modify it under the terms of the GNU General Public License as
6*86d7f5d3SJohn Marino    published by the Free Software Foundation; either version 2, or (at
7*86d7f5d3SJohn Marino    your option) any later version.
8*86d7f5d3SJohn Marino 
9*86d7f5d3SJohn Marino    This program is distributed in the hope that it will be useful, but
10*86d7f5d3SJohn Marino    WITHOUT ANY WARRANTY; without even the implied warranty of
11*86d7f5d3SJohn Marino    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12*86d7f5d3SJohn Marino    General Public License for more details.
13*86d7f5d3SJohn Marino 
14*86d7f5d3SJohn Marino    You should have received a copy of the GNU General Public License
15*86d7f5d3SJohn Marino    along with this program; if not, write to the Free Software
16*86d7f5d3SJohn Marino    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17*86d7f5d3SJohn Marino    02110-1301, USA.  */
18*86d7f5d3SJohn Marino 
19*86d7f5d3SJohn Marino /* Written by Simon Josefsson. */
20*86d7f5d3SJohn Marino 
21*86d7f5d3SJohn Marino #ifdef HAVE_CONFIG_H
22*86d7f5d3SJohn Marino # include <config.h>
23*86d7f5d3SJohn Marino #endif
24*86d7f5d3SJohn Marino 
25*86d7f5d3SJohn Marino #include "getdelim.h"
26*86d7f5d3SJohn Marino #include "getline.h"
27*86d7f5d3SJohn Marino 
28*86d7f5d3SJohn Marino ssize_t
getline(char ** lineptr,size_t * n,FILE * stream)29*86d7f5d3SJohn Marino getline (char **lineptr, size_t *n, FILE *stream)
30*86d7f5d3SJohn Marino {
31*86d7f5d3SJohn Marino   return getdelim (lineptr, n, '\n', stream);
32*86d7f5d3SJohn Marino }
33