URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 1010 |
Rev 1765 |
/*
|
/*
|
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 characters in the string at <[a]> to
|
<<strupr>> converts each characters in the string at <[a]> to
|
upper case.
|
upper case.
|
|
|
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 *
|
strupr (a)
|
strupr (a)
|
char *a;
|
char *a;
|
{
|
{
|
char *ret = a;
|
char *ret = a;
|
|
|
while (*a != '\0')
|
while (*a != '\0')
|
{
|
{
|
if (islower (*a))
|
if (islower (*a))
|
*a = toupper (*a);
|
*a = toupper (*a);
|
++a;
|
++a;
|
}
|
}
|
|
|
return ret;
|
return ret;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.