Last change
on this file since 4aa78b2 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
675 bytes
|
Rev | Line | |
---|
[3ae31e9] | 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 | int
|
---|
| 17 | toupper(c)
|
---|
| 18 | int c;
|
---|
| 19 | {
|
---|
| 20 | int x;
|
---|
| 21 |
|
---|
| 22 | if (isascii(c)) {
|
---|
| 23 |
|
---|
| 24 | if (islower(c))
|
---|
| 25 | x = _toupper(c);
|
---|
| 26 | else
|
---|
| 27 | x = c;
|
---|
| 28 | } else {
|
---|
| 29 |
|
---|
| 30 | x = c;
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | return(x);
|
---|
| 34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.