xref: /onnv-gate/usr/src/lib/libast/common/stdio/getline.c (revision 12068:08a39a083754)
110898Sroland.mainz@nrubsig.org /***********************************************************************
210898Sroland.mainz@nrubsig.org *                                                                      *
310898Sroland.mainz@nrubsig.org *               This software is part of the ast package               *
4*12068SRoger.Faulkner@Oracle.COM *          Copyright (c) 1985-2010 AT&T Intellectual Property          *
510898Sroland.mainz@nrubsig.org *                      and is licensed under the                       *
610898Sroland.mainz@nrubsig.org *                  Common Public License, Version 1.0                  *
710898Sroland.mainz@nrubsig.org *                    by AT&T Intellectual Property                     *
810898Sroland.mainz@nrubsig.org *                                                                      *
910898Sroland.mainz@nrubsig.org *                A copy of the License is available at                 *
1010898Sroland.mainz@nrubsig.org *            http://www.opensource.org/licenses/cpl1.0.txt             *
1110898Sroland.mainz@nrubsig.org *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
1210898Sroland.mainz@nrubsig.org *                                                                      *
1310898Sroland.mainz@nrubsig.org *              Information and Software Systems Research               *
1410898Sroland.mainz@nrubsig.org *                            AT&T Research                             *
1510898Sroland.mainz@nrubsig.org *                           Florham Park NJ                            *
1610898Sroland.mainz@nrubsig.org *                                                                      *
1710898Sroland.mainz@nrubsig.org *                 Glenn Fowler <gsf@research.att.com>                  *
1810898Sroland.mainz@nrubsig.org *                  David Korn <dgk@research.att.com>                   *
1910898Sroland.mainz@nrubsig.org *                   Phong Vo <kpv@research.att.com>                    *
2010898Sroland.mainz@nrubsig.org *                                                                      *
2110898Sroland.mainz@nrubsig.org ***********************************************************************/
2210898Sroland.mainz@nrubsig.org #pragma prototyped
2310898Sroland.mainz@nrubsig.org 
2410898Sroland.mainz@nrubsig.org #ifndef _USE_GNU
2510898Sroland.mainz@nrubsig.org #define _USE_GNU
2610898Sroland.mainz@nrubsig.org #endif
2710898Sroland.mainz@nrubsig.org 
2810898Sroland.mainz@nrubsig.org #include "stdhdr.h"
2910898Sroland.mainz@nrubsig.org 
3010898Sroland.mainz@nrubsig.org ssize_t
getline(char ** sp,size_t * np,Sfio_t * f)3110898Sroland.mainz@nrubsig.org getline(char** sp, size_t* np, Sfio_t* f)
3210898Sroland.mainz@nrubsig.org {
3310898Sroland.mainz@nrubsig.org 	STDIO_INT(f, "getline", ssize_t, (char**, size_t*, Sfio_t*), (sp, np, f))
3410898Sroland.mainz@nrubsig.org 
3510898Sroland.mainz@nrubsig.org 	return getdelim(sp, np, '\n', f);
3610898Sroland.mainz@nrubsig.org }
37