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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [include/] [ctype.h] - Diff between revs 39 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 39 Rev 56
Line 4... Line 4...
#endif
#endif
#define _CTYPE_H_
#define _CTYPE_H_
 
 
#include "_ansi.h"
#include "_ansi.h"
 
 
int _EXFUN(isalnum, (int c));
int _EXFUN(isalnum, (int __c));
int _EXFUN(isalpha, (int c));
int _EXFUN(isalpha, (int __c));
int _EXFUN(iscntrl, (int c));
int _EXFUN(iscntrl, (int __c));
int _EXFUN(isdigit, (int c));
int _EXFUN(isdigit, (int __c));
int _EXFUN(isgraph, (int c));
int _EXFUN(isgraph, (int __c));
int _EXFUN(islower, (int c));
int _EXFUN(islower, (int __c));
int _EXFUN(isprint, (int c));
int _EXFUN(isprint, (int __c));
int _EXFUN(ispunct, (int c));
int _EXFUN(ispunct, (int __c));
int _EXFUN(isspace, (int c));
int _EXFUN(isspace, (int __c));
int _EXFUN(isupper, (int c));
int _EXFUN(isupper, (int __c));
int _EXFUN(isxdigit,(int c));
int _EXFUN(isxdigit,(int __c));
int _EXFUN(tolower, (int c));
int _EXFUN(tolower, (int __c));
int _EXFUN(toupper, (int c));
int _EXFUN(toupper, (int __c));
 
 
#ifndef _STRICT_ANSI
#ifndef __STRICT_ANSI__
int _EXFUN(isascii, (int c));
int _EXFUN(isascii, (int __c));
int _EXFUN(toascii, (int c));
int _EXFUN(toascii, (int __c));
int _EXFUN(_tolower, (int c));
int _EXFUN(_tolower, (int __c));
int _EXFUN(_toupper, (int c));
int _EXFUN(_toupper, (int __c));
#endif
#endif
 
 
#define _U      01
#define _U      01
#define _L      02
#define _L      02
#define _N      04
#define _N      04
Line 34... Line 34...
#define _P      020
#define _P      020
#define _C      040
#define _C      040
#define _X      0100
#define _X      0100
#define _B      0200
#define _B      0200
 
 
 
#if !defined(__CYGWIN32__) || defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
extern  _CONST char     _ctype_[];
extern  _CONST char     _ctype_[];
 
#else
 
extern  _CONST char     _ctype_[] __declspec(dllimport);
 
#endif
 
 
#define isalpha(c)      ((_ctype_+1)[c]&(_U|_L))
#define isalpha(c)      ((_ctype_+1)[(unsigned)(c)]&(_U|_L))
#define isupper(c)      ((_ctype_+1)[c]&_U)
#define isupper(c)      ((_ctype_+1)[(unsigned)(c)]&_U)
#define islower(c)      ((_ctype_+1)[c]&_L)
#define islower(c)      ((_ctype_+1)[(unsigned)(c)]&_L)
#define isdigit(c)      ((_ctype_+1)[c]&_N)
#define isdigit(c)      ((_ctype_+1)[(unsigned)(c)]&_N)
#define isxdigit(c)     ((_ctype_+1)[c]&(_X|_N))
#define isxdigit(c)     ((_ctype_+1)[(unsigned)(c)]&(_X|_N))
#define isspace(c)      ((_ctype_+1)[c]&_S)
#define isspace(c)      ((_ctype_+1)[(unsigned)(c)]&_S)
#define ispunct(c)      ((_ctype_+1)[c]&_P)
#define ispunct(c)      ((_ctype_+1)[(unsigned)(c)]&_P)
#define isalnum(c)      ((_ctype_+1)[c]&(_U|_L|_N))
#define isalnum(c)      ((_ctype_+1)[(unsigned)(c)]&(_U|_L|_N))
#define isprint(c)      ((_ctype_+1)[c]&(_P|_U|_L|_N|_B))
#define isprint(c)      ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N|_B))
#define isgraph(c)      ((_ctype_+1)[c]&(_P|_U|_L|_N))
#define isgraph(c)      ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N))
#define iscntrl(c)      ((_ctype_+1)[c]&_C)
#define iscntrl(c)      ((_ctype_+1)[(unsigned)(c)]&_C)
/* Non-gcc versions will get the library versions, and will be
/* Non-gcc versions will get the library versions, and will be
   slightly slower */
   slightly slower */
#ifdef __GNUC__
#ifdef __GNUC__
# define toupper(c) \
# define toupper(c) \
        ({ int __x = (c); islower(__x) ? (__x - 'a' + 'A') : __x;})
        ({ int __x = (c); islower(__x) ? (__x - 'a' + 'A') : __x;})
# define tolower(c) \
# define tolower(c) \
        ({ int __x = (c); isupper(__x) ? (__x - 'A' + 'a') : __x;})
        ({ int __x = (c); isupper(__x) ? (__x - 'A' + 'a') : __x;})
#endif
#endif
 
 
#ifndef _STRICT_ANSI
#ifndef __STRICT_ANSI__
#define isascii(c)      ((unsigned)(c)<=0177)
#define isascii(c)      ((unsigned)(c)<=0177)
#define toascii(c)      ((c)&0177)
#define toascii(c)      ((c)&0177)
#endif
#endif
 
 
#ifdef __cplusplus
#ifdef __cplusplus

powered by: WebSVN 2.1.0

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