2007-12-30 17:41:49 +01:00
|
|
|
/***************************************************************************
|
|
|
|
|
2009-08-17 12:41:51 +02:00
|
|
|
gb_common_case.h
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2011-12-31 03:39:20 +01:00
|
|
|
(c) 2000-2012 Benoît Minisini <gambas@users.sourceforge.net>
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2009-08-17 12:41:51 +02:00
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
2007-12-30 17:41:49 +01:00
|
|
|
any later version.
|
|
|
|
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2011-06-03 02:51:09 +02:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
2011-12-31 03:39:20 +01:00
|
|
|
MA 02110-1301, USA.
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __GB_COMMON_CASE_H
|
|
|
|
#define __GB_COMMON_CASE_H
|
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2010-05-27 00:01:28 +02:00
|
|
|
extern unsigned char COMMON_tolower[];
|
|
|
|
extern unsigned char COMMON_toupper[];
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
int COMMON_strcasecmp(const char *s1, const char *s2);
|
2008-01-05 15:07:21 +01:00
|
|
|
int COMMON_strncasecmp(const char *s1, const char *s2, size_t n);
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
#ifdef tolower
|
|
|
|
#undef tolower
|
|
|
|
#endif
|
|
|
|
#ifdef toupper
|
|
|
|
#undef toupper
|
|
|
|
#endif
|
|
|
|
#ifdef strcasecmp
|
|
|
|
#undef strcasecmp
|
|
|
|
#endif
|
|
|
|
#ifdef strncasecmp
|
|
|
|
#undef strncasecmp
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define tolower(_c) (COMMON_tolower[(unsigned char)(_c)])
|
|
|
|
#define toupper(_c) (COMMON_toupper[(unsigned char)(_c)])
|
|
|
|
#define strcasecmp(_s1, _s2) (COMMON_strcasecmp((_s1), (_s2)))
|
|
|
|
#define strncasecmp(_s1, _s2, _n) (COMMON_strncasecmp((_s1), (_s2), (_n)))
|
|
|
|
|
|
|
|
#define NO_GAMBAS_CASE_REPLACEMENT
|
|
|
|
|
|
|
|
#endif
|