newlib/winsup/mingw/include/mbstring.h
Danny Smith 9fe2a2157b 2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
	defining.
	* include/excpt.h (): Include windef.h not windows.h.
	* include/fcntl.h (_O_SHORT_LIVED): Add define.
	(_chmod): Add prototype.
        (_creat): Correct prototype.
	(SH_DENY*): Rename defines to _SH_DENY*.
	(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
	include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
	_IOAPPEND): Add defines.
	(_wfindfirst): Correct prototype.
	(_wfdopen): Add prototype.
	* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
	prototypes.
	* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
	 prototypes.
	(_wcsdup): Correct prototype.
	* include/mbstring.h: Remove comments about _mbschr, _mbstok,
	 _mbsncat being in string.h.
	* include/wchar.h (_wfindfirst): Correct prototype.
	* include/tchar.h (_tfdopen): Add _UNICODE mappings.
2002-06-18 04:13:18 +00:00

133 lines
4.5 KiB
C

/*
* mbstring.h
*
* Protototypes for string functions supporting multibyte characters.
*
* This file is part of the Mingw32 package.
*
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _MBSTRING_H_
#define _MBSTRING_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#define __need_size_t
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __STRICT_ANSI__
/* character classification */
int _ismbcalnum (unsigned int);
int _ismbcalpha (unsigned int);
int _ismbcdigit (unsigned int);
int _ismbcgraph (unsigned int);
int _ismbcprint (unsigned int);
int _ismbcpunct (unsigned int);
int _ismbcspace (unsigned int);
int _ismbclower (unsigned int);
int _ismbcupper (unsigned int);
int _ismbclegal (unsigned int);
int _ismbcsymbol (unsigned int);
/* also in mbctype.h */
int _ismbblead (unsigned int );
int _ismbbtrail (unsigned int );
int _ismbslead ( const unsigned char*, const unsigned char*);
int _ismbstrail ( const unsigned char*, const unsigned char*);
unsigned int _mbctolower (unsigned int);
unsigned int _mbctoupper (unsigned int);
void _mbccpy (unsigned char*, const unsigned char*);
size_t _mbclen (const unsigned char*);
unsigned int _mbbtombc (unsigned int);
unsigned int _mbctombb (unsigned int);
/* Return value constants for these are defined in mbctype.h. */
int _mbbtype (unsigned char, int);
int _mbsbtype (const unsigned char*, size_t);
unsigned char* _mbscpy (unsigned char*, const unsigned char*);
unsigned char* _mbsncpy (unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsnbcpy (unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsset (unsigned char*, unsigned int);
unsigned char* _mbsnset (unsigned char*, unsigned int, size_t);
unsigned char* _mbsnbset (unsigned char*, unsigned int, size_t);
unsigned char* _mbsdup (const unsigned char*);
unsigned char* _mbsrev (unsigned char*);
unsigned char* _mbscat (unsigned char*, const unsigned char*);
unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsnbcat (unsigned char*, const unsigned char*, size_t);
size_t _mbslen (const unsigned char*);
size_t _mbsnbcnt (const unsigned char*, size_t);
size_t _mbsnccnt (const unsigned char*, size_t);
unsigned char* _mbschr (const unsigned char*, unsigned int);
unsigned char* _mbsrchr (const unsigned char*, unsigned int);
size_t _mbsspn (const unsigned char*, const unsigned char*);
size_t _mbscspn (const unsigned char*, const unsigned char*);
unsigned char* _mbsspnp (const unsigned char*, const unsigned char*);
unsigned char* _mbspbrk (const unsigned char*, const unsigned char*);
int _mbscmp (const unsigned char*, const unsigned char*);
int _mbsicmp (const unsigned char*, const unsigned char*);
int _mbsncmp (const unsigned char*, const unsigned char*, size_t);
int _mbsnicmp (const unsigned char*, const unsigned char*, size_t);
int _mbsnbcmp (const unsigned char*, const unsigned char*, size_t);
int _mbsnbicmp (const unsigned char*, const unsigned char*, size_t);
int _mbscoll (const unsigned char*, const unsigned char*);
int _mbsicoll (const unsigned char*, const unsigned char*);
int _mbsncoll (const unsigned char*, const unsigned char*, size_t);
int _mbsnicoll (const unsigned char*, const unsigned char*, size_t);
int _mbsnbcoll (const unsigned char*, const unsigned char*, size_t);
int _mbsnbicoll (const unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsinc (const unsigned char*);
unsigned char* _mbsninc (const unsigned char*, size_t);
unsigned char* _mbsdec (const unsigned char*, const unsigned char*);
unsigned int _mbsnextc (const unsigned char*);
unsigned char* _mbslwr (unsigned char*);
unsigned char* _mbsupr (unsigned char*);
unsigned char* _mbstok (unsigned char*, const unsigned char*);
/* Kanji */
int _ismbchira (unsigned int);
int _ismbckata (unsigned int);
int _ismbcl0 (unsigned int);
int _ismbcl1 (unsigned int);
int _ismbcl2 (unsigned int);
unsigned int _mbcjistojms (unsigned int);
unsigned int _mbcjmstojis (unsigned int);
unsigned int _mbctohira (unsigned int);
unsigned int _mbctokata (unsigned int);
#endif /* Not strict ANSI */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _MBSTRING_H_ */