epoc32/include/stdapis/ctype.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 /*
     2  * Copyright (c) 1989, 1993
     3  *	The Regents of the University of California.  All rights reserved.
     4  * (c) UNIX System Laboratories, Inc.
     5  * All or some portions of this file are derived from material licensed
     6  * to the University of California by American Telephone and Telegraph
     7  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
     8  * the permission of UNIX System Laboratories, Inc.
     9  *
    10  * This code is derived from software contributed to Berkeley by
    11  * Paul Borman at Krystal Technologies.
    12  *
    13  * Redistribution and use in source and binary forms, with or without
    14  * modification, are permitted provided that the following conditions
    15  * are met:
    16  * 1. Redistributions of source code must retain the above copyright
    17  *    notice, this list of conditions and the following disclaimer.
    18  * 2. Redistributions in binary form must reproduce the above copyright
    19  *    notice, this list of conditions and the following disclaimer in the
    20  *    documentation and/or other materials provided with the distribution.
    21  * 4. Neither the name of the University nor the names of its contributors
    22  *    may be used to endorse or promote products derived from this software
    23  *    without specific prior written permission.
    24  *
    25  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    28  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    29  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    30  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    31  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    34  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    35  * SUCH DAMAGE.
    36  *
    37  *	@(#)ctype.h	8.4 (Berkeley) 1/21/94
    38  *      $FreeBSD: src/include/ctype.h,v 1.28 2004/08/12 09:33:47 tjr Exp $
    39  *
    40  * © Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
    41  * © Portions copyright (c) 2007 Symbian Software Ltd. All rights reserved.
    42 
    43  */
    44 
    45 #ifndef _CTYPE_H_
    46 #define	_CTYPE_H_
    47 
    48 #include <sys/cdefs.h>
    49 #include <sys/_types.h>
    50 #include <_ctype.h>
    51 
    52 #ifdef __SYMBIAN32__
    53 #include <_ansi.h>
    54 
    55 #ifdef __cplusplus
    56 extern "C" {
    57 #endif
    58 #endif // __SYMBIAN32__
    59 
    60 __BEGIN_DECLS
    61 IMPORT_C int	isalnum(int);
    62 IMPORT_C int	isalpha(int);
    63 IMPORT_C int	iscntrl(int);
    64 IMPORT_C int	isdigit(int);
    65 IMPORT_C int	isgraph(int);
    66 IMPORT_C int	islower(int);
    67 IMPORT_C int	isprint(int);
    68 IMPORT_C int	ispunct(int);
    69 IMPORT_C int	isspace(int);
    70 IMPORT_C int	isupper(int);
    71 IMPORT_C int	isxdigit(int);
    72 IMPORT_C int	tolower(int);
    73 IMPORT_C int	toupper(int);
    74 
    75 #ifdef __SYMBIAN32__
    76 /* these two macros always expect that the argument sent is always in uppercase 
    77 or lowercase respectively and works only with c locale.
    78 else the behavior is undefined */
    79 #define	_tolower(c)	((c) + 0x20)
    80 #define	_toupper(c)	((c) - 0x20)
    81 #define	isascii(c)	(((c) & ~0x7F) == 0)
    82 #define	toascii(c)	((c) & 0x7F)
    83 #endif//__SYMBIAN32__
    84 __END_DECLS
    85 
    86 #ifdef __SYMBIAN32__
    87 #ifdef __cplusplus
    88 }
    89 #endif
    90 #endif //__SYMBIAN32__
    91 
    92 #endif /* !_CTYPE_H_ */