OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [newlib/] [libc/] [ctype/] [toascii.c] - Diff between revs 207 and 345

Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 345
/*
/*
FUNCTION
FUNCTION
        <<toascii>>---force integers to ASCII range
        <<toascii>>---force integers to ASCII range
 
 
INDEX
INDEX
        toascii
        toascii
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <ctype.h>
        #include <ctype.h>
        int toascii(int <[c]>);
        int toascii(int <[c]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        #include <ctype.h>
        #include <ctype.h>
        int toascii(<[c]>);
        int toascii(<[c]>);
        int (<[c]>);
        int (<[c]>);
 
 
DESCRIPTION
DESCRIPTION
<<toascii>> is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits.
<<toascii>> is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits.
 
 
You can use a compiled subroutine instead of the macro definition by
You can use a compiled subroutine instead of the macro definition by
undefining this macro using `<<#undef toascii>>'.
undefining this macro using `<<#undef toascii>>'.
 
 
RETURNS
RETURNS
<<toascii>> returns integers between 0 and 127.
<<toascii>> returns integers between 0 and 127.
 
 
PORTABILITY
PORTABILITY
<<toascii>> is not ANSI C.
<<toascii>> is not ANSI C.
 
 
No supporting OS subroutines are required.
No supporting OS subroutines are required.
*/
*/
 
 
#include <_ansi.h>
#include <_ansi.h>
#include <ctype.h>
#include <ctype.h>
#undef toascii
#undef toascii
 
 
int
int
_DEFUN(toascii,(c),int c)
_DEFUN(toascii,(c),int c)
{
{
  return (c)&0177;
  return (c)&0177;
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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