view include/SDL_ctype.h @ 1334:37d43bd654d7

Proper credit to uClibc :)
author Sam Lantinga <slouken@libsdl.org>
date Mon, 06 Feb 2006 17:26:47 +0000
parents 450721ad5436
children
line wrap: on
line source

/*
    SDL - Simple DirectMedia Layer
    Copyright (C) 1997-2006 Sam Lantinga

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

    Sam Lantinga
    slouken@libsdl.org
*/

/* This file contains portable character manipulation functions for SDL */

#ifndef _SDL_CTYPE_H_
#define _SDL_CTYPE_H_

#include "SDL_config.h"

#ifdef HAVE_CTYPE_H
#include <ctype.h>
#else
#define isdigit(X)  (((X) >= '0') && ((X) <= '9'))
#define isspace(X)  (((X) == ' ') || ((X) == '\t') || ((X) == '\r') || ((X) == '\n'))
#define toupper(X)  (((X) >= 'a') && ((X) <= 'z') ? ('A'+((X)-'a')) : (X))
#define tolower(X)  (((X) >= 'A') && ((X) <= 'Z') ? ('a'+((X)-'A')) : (X))
#endif

#endif /* _SDL_CTYPE_H_ */