xref: /onnv-gate/usr/src/lib/libast/common/stdio/fmemopen.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 #include "stdhdr.h"
2510898Sroland.mainz@nrubsig.org 
2610898Sroland.mainz@nrubsig.org Sfio_t*
fmemopen(void * buf,size_t size,const char * mode)2710898Sroland.mainz@nrubsig.org fmemopen(void* buf, size_t size, const char* mode)
2810898Sroland.mainz@nrubsig.org {
2910898Sroland.mainz@nrubsig.org 	STDIO_PTR(0, "fmemopen", Sfio_t*, (void*, size_t, const char*), (buf, size, mode))
3010898Sroland.mainz@nrubsig.org 
3110898Sroland.mainz@nrubsig.org 	return sfnew(NiL, buf, size, -1, SF_STRING|_sftype(mode, NiL, NiL));
3210898Sroland.mainz@nrubsig.org }
33