source: trunk/libs/newlib/src/newlib/libc/string/strupr.c @ 577

Last change on this file since 577 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 580 bytes
Line 
1/*
2FUNCTION
3        <<strupr>>---force string to uppercase
4       
5INDEX
6        strupr
7
8SYNOPSIS
9        #include <string.h>
10        char *strupr(char *<[a]>);
11
12DESCRIPTION
13        <<strupr>> converts each character in the string at <[a]> to
14        uppercase.
15
16RETURNS
17        <<strupr>> returns its argument, <[a]>.
18
19PORTABILITY
20<<strupr>> is not widely portable.
21
22<<strupr>> requires no supporting OS subroutines.
23
24QUICKREF
25        strupr
26*/
27
28#include <string.h>
29#include <ctype.h>
30
31char *
32strupr (char *s)
33{
34  unsigned char *ucs = (unsigned char *) s;
35  for ( ; *ucs != '\0'; ucs++)
36    {
37      *ucs = toupper(*ucs);
38    }
39  return s;
40}
Note: See TracBrowser for help on using the repository browser.