146445Storek /* 246445Storek * Copyright (c) 1991 The Regents of the University of California. 346445Storek * All rights reserved. 446445Storek * 546445Storek * %sccs.include.redist.c% 646445Storek */ 746445Storek 846445Storek #if defined(LIBC_SCCS) && !defined(lint) 9*46603Sbostic static char sccsid[] = "@(#)setlocale.c 5.2 (Berkeley) 02/24/91"; 1046445Storek #endif /* LIBC_SCCS and not lint */ 1146445Storek 1246445Storek #include <locale.h> 13*46603Sbostic #include <string.h> 1446445Storek 1546445Storek static char C[] = "C"; 1646445Storek 1746445Storek /* 1846445Storek * The setlocale function. 1946445Storek * 2046445Storek * Sorry, for now we only accept the C locale. 2146445Storek */ 2246445Storek char * 2346445Storek setlocale(category, locale) 2446445Storek int category; 25*46603Sbostic const char *locale; 2646445Storek { 27*46603Sbostic if ((unsigned int)category >= _LC_LAST) 2846445Storek return (NULL); 2946445Storek if (locale == NULL) 3046445Storek return (C); 31*46603Sbostic return(strcmp(locale, C) ? NULL : C); 3246445Storek } 33