epoc32/include/stdapis/ctype.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100 (2010-03-31)
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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-2007 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
    41 
    42  */
    43 
    44 #ifndef _CTYPE_H_
    45 #define	_CTYPE_H_
    46 
    47 #include <sys/cdefs.h>
    48 #include <sys/_types.h>
    49 #include <_ctype.h>
    50 
    51 #ifdef __SYMBIAN32__
    52 #include <_ansi.h>
    53 
    54 #ifdef __cplusplus
    55 extern "C" {
    56 #endif
    57 #endif // __SYMBIAN32__
    58 
    59 __BEGIN_DECLS
    60 IMPORT_C int	isalnum(int);
    61 IMPORT_C int	isalpha(int);
    62 IMPORT_C int	iscntrl(int);
    63 IMPORT_C int	isdigit(int);
    64 IMPORT_C int	isgraph(int);
    65 IMPORT_C int	islower(int);
    66 IMPORT_C int	isprint(int);
    67 IMPORT_C int	ispunct(int);
    68 IMPORT_C int	isspace(int);
    69 IMPORT_C int	isupper(int);
    70 IMPORT_C int	isxdigit(int);
    71 IMPORT_C int	tolower(int);
    72 IMPORT_C int	toupper(int);
    73 
    74 #ifdef __SYMBIAN32__
    75 /* these two macros always expect that the argument sent is always in uppercase 
    76 or lowercase respectively and works only with c locale.
    77 else the behavior is undefined */
    78 #define	_tolower(c)	((c) + 0x20)
    79 #define	_toupper(c)	((c) - 0x20)
    80 #define	isascii(c)	(((c) & ~0x7F) == 0)
    81 #define	toascii(c)	((c) & 0x7F)
    82 #endif//__SYMBIAN32__
    83 __END_DECLS
    84 
    85 #ifdef __SYMBIAN32__
    86 #ifdef __cplusplus
    87 }
    88 #endif
    89 #endif //__SYMBIAN32__
    90 
    91 #endif /* !_CTYPE_H_ */