fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / string / strupr.c
blobd7f7c129d55e7d5dcfc353f881bd6e639e9238d4
1 /*
2 FUNCTION
3 <<strupr>>---force string to uppercase
5 INDEX
6 strupr
8 ANSI_SYNOPSIS
9 #include <string.h>
10 char *strupr(char *<[a]>);
12 TRAD_SYNOPSIS
13 #include <string.h>
14 char *strupr(<[a]>)
15 char *<[a]>;
17 DESCRIPTION
18 <<strupr>> converts each characters in the string at <[a]> to
19 upper case.
21 RETURNS
22 <<strupr>> returns its argument, <[a]>.
24 PORTABILITY
25 <<strupr>> is not widely portable.
27 <<strupr>> requires no supporting OS subroutines.
29 QUICKREF
30 strupr */
32 #include <string.h>
33 #include <ctype.h>
35 char *
36 strupr (a)
37 char *a;
39 char *ret = a;
41 while (*a != '\0')
43 if (islower (*a))
44 *a = toupper (*a);
45 ++a;
48 return ret;