summaryrefslogtreecommitdiff
path: root/lib/libc/ctype/tolower.c
blob: af196d059a951499ecbcc700f0fdf8ec5b34fc4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "features.h" // for __weak

#include <ctype.h>  // for isupper, tolower, tolower_l
#include <libc.h>   // for __unused
#include <locale.h> // for locale_t

int tolower(int c)
{
	if (isupper(c))
		return c | 32;
	return c;
}

__weak int tolower_l(int c, locale_t __unused locale)
{
	return tolower(c);
}