e0c8aa0112d9b4f6790b741210e8a6f00434acda
[reactos.git] / reactos / lib / crtdll / ctype / toupper.c
1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2 #include <crtdll/ctype.h>
3 #include <crtdll/wchar.h>
4
5 #undef toupper
6 int toupper(int c)
7 {
8 if (_isctype (c, _LOWER))
9 return (c + ('A' - 'a'));
10 return(c);
11 }
12
13 #undef towupper
14 wchar_t towupper(wchar_t c)
15 {
16 if (iswctype (c, _LOWER))
17 return (c + (L'A' - L'a'));
18 return(c);
19 }
20
21 int _toupper(int c)
22 {
23 if (_isctype (c, _LOWER))
24 return (c + ('A' - 'a'));
25 return(c);
26 }
27
28 wchar_t _towupper(wchar_t c)
29 {
30 if (iswctype (c, _LOWER))
31 return (c + (L'A' - L'a'));
32 return(c);
33 }