tchar.h revision 3194da424708abdd288b28d96892b3a5f3f7df0b
/*
* Copyright (C) 1998 Francois Gouget
*
* 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
*/
#ifndef __WINE_TCHAR_H
#define __WINE_TCHAR_H
#ifdef __WINESRC__
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************
* tchar routines
*/
/*****************************************************************************
* tchar mappings
*/
#ifndef _UNICODE
# ifndef _MBCS
# include <string.h>
# else
# include <mbstring.h>
# endif
#else /* _UNICODE */
# include <wchar.h>
#endif
#define WINE_tchar_true(a) (1)
#define WINE_tchar_false(a) (0)
#define WINE_tchar_tclen(a) (1)
#define WINE_tchar_tccpy(a,b) do { *(a)=*(b); } while (0)
#ifdef _UNICODE
#if !defined(_WINT_T_DEFINED) && !defined(__WINT_TYPE__)
typedef unsigned short wint_t;
#endif
#ifndef _WCTYPE_T_DEFINED
typedef unsigned short wctype_t;
#define _WCTYPE_T_DEFINED
#endif
#ifndef __TCHAR_DEFINED
#ifdef WINE_UNICODE_NATIVE
#else
typedef unsigned short _TCHAR;
#endif
#define __TCHAR_DEFINED
#endif
#else /* _UNICODE */
#ifndef __TCHAR_DEFINED
typedef char _TCHAR;
typedef unsigned char _TUCHAR;
typedef signed char _TSCHAR;
#ifndef _MBCS
typedef unsigned char _TXCHAR;
typedef int _TINT;
#else
typedef char _TXCHAR;
typedef unsigned int _TINT;
#endif
#endif
#endif
#ifndef _TCHAR_DEFINED
#define _TCHAR_DEFINED
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* __WINE_TCHAR_H */