/*
 * $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred."
 *
 */
/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ident	"@(#)libc-port:stdio/data.c	2.9"
/*LINTLIBRARY*/
#include <stdio.h>

#if !u370

/* some slop is allowed at the end of the buffers in case an upset in
 * the synchronization of _cnt and _ptr (caused by an interrupt or other
 * signal) is not immediately detected.
 */
unsigned char _sibuf[BUFSIZ+8], _sobuf[BUFSIZ+8];
/*
 * Ptrs to start of preallocated buffers for stdin, stdout.
 */
#endif

FILE _iob[_NFILE] = {
#if vax || u3b || M32 || i386
	{ 0, NULL, NULL, NULL, _IOREAD, 0, },
	{ 0, NULL, NULL, NULL, _IOWRT, 1, },
	{ 0, _iob[2]._smbuf, _iob[2]._smbuf, _iob[2]._smbuf+_SBFSIZ, _IOWRT+_IONBF, 2, },
#endif
#if pdp11
	{ NULL, 0, NULL, _IOREAD, 0},
	{ NULL, 0, NULL, _IOWRT, 1},
	{ iob[2]._smbuf, 0, iob[2]._smbuf, _IOWRT+_IONBF, 2},
#endif
#if u370
	{ NULL, 0, NULL, _IOREAD, 0},
	{ NULL, 0, NULL, _IOWRT, 1},
	{ NULL, 0, NULL, _IOWRT+_IONBF, 2},
#endif
};

FILE *_iobdynamic[_NFILE] = {
	&_iob[0],
	&_iob[1],
	&_iob[2],
	&_iob[3],
	&_iob[4],
	&_iob[5],
	&_iob[6],
	&_iob[7],
	&_iob[8],
	&_iob[9],
	&_iob[10],
	&_iob[11],
	&_iob[12],
	&_iob[13],
	&_iob[14],
	&_iob[15],
	&_iob[16],
	&_iob[17],
	&_iob[18],
	&_iob[19]
};

FILE **_iobstart = &_iobdynamic[0];
FILE **_iobend = &_iobdynamic[19] + 1;

