1*46445Storek /* 2*46445Storek * Copyright (c) 1991 The Regents of the University of California. 3*46445Storek * All rights reserved. 4*46445Storek * 5*46445Storek * %sccs.include.redist.c% 6*46445Storek */ 7*46445Storek 8*46445Storek #if defined(LIBC_SCCS) && !defined(lint) 9*46445Storek static char sccsid[] = "@(#)setlocale.c 5.1 (Berkeley) 02/18/91"; 10*46445Storek #endif /* LIBC_SCCS and not lint */ 11*46445Storek 12*46445Storek #include <locale.h> 13*46445Storek 14*46445Storek static char C[] = "C"; 15*46445Storek 16*46445Storek /* 17*46445Storek * The setlocale function. 18*46445Storek * 19*46445Storek * Sorry, for now we only accept the C locale. 20*46445Storek */ 21*46445Storek char * 22*46445Storek setlocale(category, locale) 23*46445Storek int category; 24*46445Storek char *locale; 25*46445Storek { 26*46445Storek 27*46445Storek if ((unsigned)category >= _LC_LAST) 28*46445Storek return (NULL); 29*46445Storek if (locale == NULL) 30*46445Storek return (C); 31*46445Storek if (strcmp(locale, C) == 0) 32*46445Storek return (C); 33*46445Storek return (NULL); 34*46445Storek } 35