URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 207 |
Rev 345 |
/*
|
/*
|
FUNCTION
|
FUNCTION
|
<<strupr>>---force string to uppercase
|
<<strupr>>---force string to uppercase
|
|
|
INDEX
|
INDEX
|
strupr
|
strupr
|
|
|
ANSI_SYNOPSIS
|
ANSI_SYNOPSIS
|
#include <string.h>
|
#include <string.h>
|
char *strupr(char *<[a]>);
|
char *strupr(char *<[a]>);
|
|
|
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
#include <string.h>
|
#include <string.h>
|
char *strupr(<[a]>)
|
char *strupr(<[a]>)
|
char *<[a]>;
|
char *<[a]>;
|
|
|
DESCRIPTION
|
DESCRIPTION
|
<<strupr>> converts each character in the string at <[a]> to
|
<<strupr>> converts each character in the string at <[a]> to
|
uppercase.
|
uppercase.
|
|
|
RETURNS
|
RETURNS
|
<<strupr>> returns its argument, <[a]>.
|
<<strupr>> returns its argument, <[a]>.
|
|
|
PORTABILITY
|
PORTABILITY
|
<<strupr>> is not widely portable.
|
<<strupr>> is not widely portable.
|
|
|
<<strupr>> requires no supporting OS subroutines.
|
<<strupr>> requires no supporting OS subroutines.
|
|
|
QUICKREF
|
QUICKREF
|
strupr
|
strupr
|
*/
|
*/
|
|
|
#include <string.h>
|
#include <string.h>
|
#include <ctype.h>
|
#include <ctype.h>
|
|
|
char *
|
char *
|
_DEFUN (strupr, (s),
|
_DEFUN (strupr, (s),
|
char *s)
|
char *s)
|
{
|
{
|
unsigned char *ucs = (unsigned char *) s;
|
unsigned char *ucs = (unsigned char *) s;
|
for ( ; *ucs != '\0'; ucs++)
|
for ( ; *ucs != '\0'; ucs++)
|
{
|
{
|
*ucs = toupper(*ucs);
|
*ucs = toupper(*ucs);
|
}
|
}
|
return s;
|
return s;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.