OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [string/] [strupr.c] - Diff between revs 1010 and 1765

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;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.