156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/*----------------------------------------------------------------------------
256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * File:
456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * eas_ctype.h
556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Contents and purpose:
756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * This is a replacement for the CRT ctype.h functions. These
856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * functions are currently ASCII only, but eventually, we will want
956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * to support wide-characters for localization.
1056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
1156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Copyright (c) 2005 Sonic Network Inc.
127df30109963092559d3760c0661a020f9daf1030The Android Open Source Project
137df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License");
147df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * you may not use this file except in compliance with the License.
157df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * You may obtain a copy of the License at
167df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
177df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *      http://www.apache.org/licenses/LICENSE-2.0
187df30109963092559d3760c0661a020f9daf1030The Android Open Source Project *
197df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Unless required by applicable law or agreed to in writing, software
207df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS,
217df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
227df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * See the License for the specific language governing permissions and
237df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * limitations under the License.
2456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *
2556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *----------------------------------------------------------------------------
2656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Revision Control:
2756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *   $Revision: 429 $
2856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *   $Date: 2006-10-19 23:50:15 -0700 (Thu, 19 Oct 2006) $
2956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *----------------------------------------------------------------------------
3056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks*/
3156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
3256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#ifndef _EAS_CTYPE_H
3356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define _EAS_CTYPE_H
3456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
3556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave SparksEAS_INLINE EAS_I8 IsDigit (EAS_I8 c) { return ((c >= '0') && (c <= '9')); }
3656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave SparksEAS_INLINE EAS_I8 IsSpace (EAS_I8 c) { return (((c >= 9) && (c <= 13)) || (c == ' ')); }
3756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave SparksEAS_INLINE EAS_I8 ToUpper (EAS_I8 c) { if ((c >= 'a') && (c <= 'z')) return c & ~0x20; else return c; }
3856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave SparksEAS_INLINE EAS_I8 ToLower (EAS_I8 c) { if ((c >= 'A') && (c <= 'Z')) return c |= 0x20; else return c; }
3956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
4056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#endif
4156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks
42