xref: /titanic_51/usr/src/lib/libast/common/stdio/getline.c (revision 3e14f97f673e8a630f076077de35afdd43dc1587)
134f9b3eeSRoland Mainz /***********************************************************************
234f9b3eeSRoland Mainz *                                                                      *
334f9b3eeSRoland Mainz *               This software is part of the ast package               *
4*3e14f97fSRoger A. Faulkner *          Copyright (c) 1985-2010 AT&T Intellectual Property          *
534f9b3eeSRoland Mainz *                      and is licensed under the                       *
634f9b3eeSRoland Mainz *                  Common Public License, Version 1.0                  *
734f9b3eeSRoland Mainz *                    by AT&T Intellectual Property                     *
834f9b3eeSRoland Mainz *                                                                      *
934f9b3eeSRoland Mainz *                A copy of the License is available at                 *
1034f9b3eeSRoland Mainz *            http://www.opensource.org/licenses/cpl1.0.txt             *
1134f9b3eeSRoland Mainz *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
1234f9b3eeSRoland Mainz *                                                                      *
1334f9b3eeSRoland Mainz *              Information and Software Systems Research               *
1434f9b3eeSRoland Mainz *                            AT&T Research                             *
1534f9b3eeSRoland Mainz *                           Florham Park NJ                            *
1634f9b3eeSRoland Mainz *                                                                      *
1734f9b3eeSRoland Mainz *                 Glenn Fowler <gsf@research.att.com>                  *
1834f9b3eeSRoland Mainz *                  David Korn <dgk@research.att.com>                   *
1934f9b3eeSRoland Mainz *                   Phong Vo <kpv@research.att.com>                    *
2034f9b3eeSRoland Mainz *                                                                      *
2134f9b3eeSRoland Mainz ***********************************************************************/
2234f9b3eeSRoland Mainz #pragma prototyped
2334f9b3eeSRoland Mainz 
2434f9b3eeSRoland Mainz #ifndef _USE_GNU
2534f9b3eeSRoland Mainz #define _USE_GNU
2634f9b3eeSRoland Mainz #endif
2734f9b3eeSRoland Mainz 
2834f9b3eeSRoland Mainz #include "stdhdr.h"
2934f9b3eeSRoland Mainz 
3034f9b3eeSRoland Mainz ssize_t
getline(char ** sp,size_t * np,Sfio_t * f)3134f9b3eeSRoland Mainz getline(char** sp, size_t* np, Sfio_t* f)
3234f9b3eeSRoland Mainz {
3334f9b3eeSRoland Mainz 	STDIO_INT(f, "getline", ssize_t, (char**, size_t*, Sfio_t*), (sp, np, f))
3434f9b3eeSRoland Mainz 
3534f9b3eeSRoland Mainz 	return getdelim(sp, np, '\n', f);
3634f9b3eeSRoland Mainz }
37