/*
 * Find a free entry in the FILE[] array
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 1995 by Ralf Baechle
 */
#include <stand/stdio.h>

FILE *
__sfp(void)
{
    int i;

    for(i=0;i<FOPEN_MAX;i++)
    {
	if(__FILE[i].fh == -1)
	    return __FILE + i;
    }

    return NULL;
}
