Last change
on this file since 411371e was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Use standard integer types.
|
-
Property mode
set to
100644
|
File size:
650 bytes
|
Line | |
---|
1 | /*
|
---|
2 | ============================================================================
|
---|
3 | toupper.c -- convert character to upper case ASCII
|
---|
4 | Version 1 -- 1987-06-11 -- D.N. Lynx Crowe
|
---|
5 | ============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "ctype.h"
|
---|
9 |
|
---|
10 | /*
|
---|
11 | ============================================================================
|
---|
12 | toupper(c) -- convert c to upper case ASCII
|
---|
13 | ============================================================================
|
---|
14 | */
|
---|
15 |
|
---|
16 | int16_t toupper(int16_t c)
|
---|
17 | {
|
---|
18 | int16_t x;
|
---|
19 |
|
---|
20 | if (isascii(c)) {
|
---|
21 |
|
---|
22 | if (islower(c))
|
---|
23 | x = _toupper(c);
|
---|
24 | else
|
---|
25 | x = c;
|
---|
26 | } else {
|
---|
27 |
|
---|
28 | x = c;
|
---|
29 | }
|
---|
30 |
|
---|
31 | return(x);
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.