/*
 * |-----------------------------------------------------------|
 * | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
 * | All Rights Reserved                                       |
 * |-----------------------------------------------------------|
 * |          Restricted Rights Legend                         |
 * | Use, duplication, or disclosure by the Government is      |
 * | subject to restrictions as set forth in                   |
 * | subparagraph (c)(1)(ii) of the Rights in Technical        |
 * | Data and Computer Software Clause of DFARS 252.227-7013.  |
 * |         MIPS Computer Systems, Inc.                       |
 * |         950 DeGuigne Avenue                               |
 * |         Sunnyvale, California 94088-3650, USA             |
 * |-----------------------------------------------------------|
 */
#ident	"$Header: _init_locale.c,v 1.2.2.1 92/06/24 14:01:02 marker Exp $"

/*	Copyright (c) 1988 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.	*/


/*	This module is modified for MNLS no Jan 13 1989	*/	/*MNLS*/

/*
* _init_locale - initialize to native locale == setlocale(LC_ALL, "")
*/
#include <locale.h>
#include "_locale.h"
#include <string.h>

/*	start for MNLS by Unix Pacific on Jan 13 1989 	*/ 
extern 	int errno;
/*	end for MNLS 3.2	*/
void
_init_locale()
{
	register int cat = LC_CTYPE;
	register char *loc;
	do
	{
		loc = _nativeloc(cat);
		if (cat <= LC_NUMERIC) {
			if(loc[0] != 'C' || loc[1] != '\0')
				(void)_set_tab(loc, cat);
		}
		(void)strcpy(_cur_locale[cat], loc);
	} while (++cat < LC_MAX);
/*	start for MNLS  3.2 by Unix Pacific on Jan 13 1989	*/	/*MNLS*/
errno = 0;	/* errno should be set by initial value ZERO	*/
		/* If _set_tab() is failed by locale processing,
		 * errno is set to non-zero value.
		 */
/*	end for MNLS 3.2	*/
}
