include/SDL_ctype.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 07 Feb 2006 18:36:54 +0000
changeset 1345 7f32b9bede06
parent 1330 450721ad5436
permissions -rw-r--r--
Fixes for Visual C++ 6.0
slouken@1330
     1
/*
slouken@1330
     2
    SDL - Simple DirectMedia Layer
slouken@1330
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@1330
     4
slouken@1330
     5
    This library is free software; you can redistribute it and/or
slouken@1330
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1330
     7
    License as published by the Free Software Foundation; either
slouken@1330
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@1330
     9
slouken@1330
    10
    This library is distributed in the hope that it will be useful,
slouken@1330
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@1330
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1330
    13
    Lesser General Public License for more details.
slouken@1330
    14
slouken@1330
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1330
    16
    License along with this library; if not, write to the Free Software
slouken@1330
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1330
    18
slouken@1330
    19
    Sam Lantinga
slouken@1330
    20
    slouken@libsdl.org
slouken@1330
    21
*/
slouken@1330
    22
slouken@1330
    23
/* This file contains portable character manipulation functions for SDL */
slouken@1330
    24
slouken@1330
    25
#ifndef _SDL_CTYPE_H_
slouken@1330
    26
#define _SDL_CTYPE_H_
slouken@1330
    27
slouken@1330
    28
#include "SDL_config.h"
slouken@1330
    29
slouken@1330
    30
#ifdef HAVE_CTYPE_H
slouken@1330
    31
#include <ctype.h>
slouken@1330
    32
#else
slouken@1330
    33
#define isdigit(X)  (((X) >= '0') && ((X) <= '9'))
slouken@1330
    34
#define isspace(X)  (((X) == ' ') || ((X) == '\t') || ((X) == '\r') || ((X) == '\n'))
slouken@1330
    35
#define toupper(X)  (((X) >= 'a') && ((X) <= 'z') ? ('A'+((X)-'a')) : (X))
slouken@1330
    36
#define tolower(X)  (((X) >= 'A') && ((X) <= 'Z') ? ('a'+((X)-'A')) : (X))
slouken@1330
    37
#endif
slouken@1330
    38
slouken@1330
    39
#endif /* _SDL_CTYPE_H_ */