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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [ctype/] [isspace.c] - Diff between revs 1005 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 1005 Rev 1765
 
 
/*
/*
FUNCTION
FUNCTION
        <<isspace>>---whitespace character predicate
        <<isspace>>---whitespace character predicate
 
 
INDEX
INDEX
        isspace
        isspace
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <ctype.h>
        #include <ctype.h>
        int isspace(int <[c]>);
        int isspace(int <[c]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        #include <ctype.h>
        #include <ctype.h>
        int isspace(<[c]>);
        int isspace(<[c]>);
 
 
DESCRIPTION
DESCRIPTION
<<isspace>> is a macro which classifies ASCII integer values by table
<<isspace>> is a macro which classifies ASCII integer values by table
lookup.  It is a predicate returning non-zero for whitespace
lookup.  It is a predicate returning non-zero for whitespace
characters, and 0 for other characters.  It is defined only when <<isascii>>(<[c]>) is true or <[c]> is EOF.
characters, and 0 for other characters.  It is defined only when <<isascii>>(<[c]>) is true or <[c]> is EOF.
 
 
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 the macro using `<<#undef isspace>>'.
undefining the macro using `<<#undef isspace>>'.
 
 
RETURNS
RETURNS
<<isspace>> returns non-zero if <[c]> is a space, tab, carriage return, new
<<isspace>> returns non-zero if <[c]> is a space, tab, carriage return, new
line, vertical tab, or formfeed (<<0x09>>--<<0x0D>>, <<0x20>>).
line, vertical tab, or formfeed (<<0x09>>--<<0x0D>>, <<0x20>>).
 
 
PORTABILITY
PORTABILITY
<<isspace>> is ANSI C.
<<isspace>> is 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 isspace
#undef isspace
int
int
_DEFUN(isspace,(c),int c)
_DEFUN(isspace,(c),int c)
{
{
        return((_ctype_ + 1)[c] & _S);
        return((_ctype_ + 1)[c] & _S);
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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