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
|
|
|
|
2018-02-12 02:53:46 +01:00
|
|
|
(c) 2000-2017 Benoît Minisini <g4mba5@gmail.com>
|
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
|
|
|
|
|
2014-08-28 15:50:09 +02:00
|
|
|
#ifdef __CYGWIN__
|
|
|
|
#include <strings.h>
|
|
|
|
#endif
|
|
|
|
|
2007-12-30 17:41:49 +01:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2015-11-02 04:24:44 +01:00
|
|
|
extern const unsigned char COMMON_tolower[];
|
|
|
|
extern const 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
|