shithub: scc

ref: f0c283da75c8f123cfe7485828c3045f27f35802
dir: /libc/src/setlocale.c/

View raw version
/* See LICENSE file for copyright and license details. */

#include <locale.h>
#include <stddef.h>

char *
setlocale(int category, const char *locale)
{
	if (category > LC_TIME || category < LC_ALL)
		return NULL;
	if (!locale ||
	    locale[0] == '\0' ||
	    locale[0] == 'C' && locale[1] == '\0') {
		return "C";
	}
	return NULL;
}