summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2002-04-20 13:53:24 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2002-04-20 13:53:24 +0000
commit6ff191ecb431ae2fa0b0bd30224a626e4e10c4f8 (patch)
tree2c8de489920f3cebf0fbe1f9df8fdc4e29e6f47a
parentdbed280d211c04b35a09773cf57e8d34e7189d54 (diff)
downloadgdb-6ff191ecb431ae2fa0b0bd30224a626e4e10c4f8.tar.gz
* include/mbstring.h: New file.
* include/mbctype.h: New file. Correct some email address dyslexia.
-rw-r--r--winsup/mingw/ChangeLog25
-rw-r--r--winsup/mingw/include/mbctype.h97
-rw-r--r--winsup/mingw/include/mbstring.h132
3 files changed, 244 insertions, 10 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index e424858ccd2..344b6063d2d 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,5 +1,10 @@
2002-04-20 Danny Smith <dannysmith@users.sourceforge.net>
+ * include/mbstring.h: New file.
+ * include/mbctype.h: New file.
+
+2002-04-20 Danny Smith <dannysmith@users.sourceforge.net>
+
* include/tchar.h (__TEXT): Make same as define in
w32api/include/winnt.h.
@@ -23,7 +28,7 @@
* profile/Makefile.in (INCLUDES): Likewise.
* mingwex/Makefile.in (INCLUDES): Likewise.
* include/stdarg.h: Replace with stub that just guards the
- real gcc system header with #ifndef RCINVOKED
+ real gcc system header with #ifndef RC_INVOKED
* include/varargs.h: Likewise.
* include/stddef.h: Likewise.
* include/stdio.h: Include stdarg.h after defining
@@ -78,11 +83,11 @@
for mingw.
* profile/configure: Regenerate.
-2002-04-12 Danny Smith <dannysmith@sourceforge.users.net>
+2002-04-12 Danny Smith <dannysmith@users.sourceforge.net>
* mingwex/Makefile.in (DISTFILES): Add suffix to wcstof.c.
-2002-04-11 Danny Smith <dannysmith@sourceforge.users.net>
+2002-04-11 Danny Smith <dannysmith@users.sourceforge.net>
* include/_mingw.h: Increment version to 2.0.
* Makefile.in: Ditto.
@@ -91,7 +96,7 @@
2002-04-09 Earnie Boyd <earnie@users.sf.net>
* Makefile.in: Use bzip2 compression for Cygwin target.
-2002-04-10 Danny Smith <dannysmith@sourceforge.users.net>
+2002-04-10 Danny Smith <dannysmith@users.sourceforge.net>
* mingwex/mingw-fseek.c: New file, based on Mumit Khan
mingw-local patch to binutils.
@@ -107,7 +112,7 @@
* moldname-crtdll.def: Remove CR from end of line.
* moldname-msvcrt.def: Ditto.
-2002-04-09 Danny Smith <dannysmith@sourceforge.users.net>
+2002-04-09 Danny Smith <dannysmith@users.sourceforge.net>
* profile/configure.in (CRT0S): Configure name of gcrt?.o
based on target, building gcrt0.o for cygwin -mno-cygwin.
@@ -116,7 +121,7 @@
(gcrt0.o): New rule.
(ALL_CRT0S): New define, used to cleanup all gcrt?.o's.
-2002-04-04 Danny Smith <dannysmith@sourceforge.users.net>
+2002-04-04 Danny Smith <dannysmith@users.sourceforge.net>
* include/math.h (DOMAIN, SING, OVERFLOW, UNDERFLOW,
TLOSS, PLOSS): Move oldname defines back, following
@@ -130,7 +135,7 @@
* mingwex/_Exit.c : New file.
* mingwex/Makefile.in: Add _Exit.o to libmingwex.a.
-2002-04-04 Danny Smith <dannysmith@sourceforge.users.net>
+2002-04-04 Danny Smith <dannysmith@users.sourceforge.net>
Add libgmon.a and libmingwex.a for cygwin -mno-cygwin.
* configure.in (SUBDIRS): Add profile and mingwex to cygwin target.
@@ -150,7 +155,7 @@
(ALL_CXXFLAGS): Same.
(.c.o:): Remove ALL_CXXFLAGS.
-2002-03-29 Danny Smith <dannysmith@sourceforge.users.net>
+2002-03-29 Danny Smith <dannysmith@users.sourceforge.net>
* include/stdint.h: Add missing newline at eof.
* include/stdio.h (_snwprintf): Correct spelling.
@@ -168,7 +173,7 @@
* mingwex/snprintf.c: New file.
* mingwex/snwprintf.c: New file.
-2002-03-26 Danny Smith <dannysmith@sourceforge.users.net>
+2002-03-26 Danny Smith <dannysmith@users.sourceforge.net>
* moldname.def.in (__MSVCRT__): Replace with !(__CRTDLL__).
(wpopen): Add if !(__CRTDLL__).
@@ -185,7 +190,7 @@
(_vswnprintf): Likewise.
Tidy up whitespace.
-2002-03-22 Danny Smith <dannysmith@users.sourceforge>
+2002-03-22 Danny Smith <dannysmith@users.sourceforge.net>
* configure.in: Add mingwex as SUBDIRS and configdirs.
* configure: Regenerate.
diff --git a/winsup/mingw/include/mbctype.h b/winsup/mingw/include/mbctype.h
new file mode 100644
index 00000000000..346e6d790a9
--- /dev/null
+++ b/winsup/mingw/include/mbctype.h
@@ -0,0 +1,97 @@
+/*
+ * mbctype.h
+ *
+ * Functions for testing multibyte character types and converting 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 _MBCTYPE_H_
+#define _MBCTYPE_H_
+
+/* All the headers include this file. */
+#include <_mingw.h>
+
+/* return values for _mbsbtype and _mbbtype in mbstring.h */
+#define _MBC_SINGLE 0
+#define _MBC_LEAD 1
+#define _MBC_TRAIL 2
+#define _MBC_ILLEGAL (-1)
+
+/* args for setmbcp (in lieu of actual codepage) */
+#define _MB_CP_SBCS 0
+#define _MB_CP_OEM (-2)
+#define _MB_CP_ANSI (-3)
+#define _MB_CP_LOCALE (-4)
+
+/* TODO: bit masks */
+/*
+#define _MS
+#define _MP
+#define _M1
+#define _M2
+#define _SBUP
+#define _SBLOW
+*/
+
+#ifndef RC_INVOKED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __STRICT_ANSI__
+
+int _setmbcp (int);
+int _getmbcp (void);
+
+/* byte classification */
+/* NB: Corresponding _ismbc* functions are in mbstring.h */
+
+int _ismbbalpha (unsigned int);
+int _ismbbalnum (unsigned int);
+int _ismbbgraph (unsigned int);
+int _ismbbprint (unsigned int);
+int _ismbbpunct (unsigned int);
+
+int _ismbbkana (unsigned int);
+int _ismbbkalnum (unsigned int);
+int _ismbbkprint (unsigned int);
+int _ismbbkpunct (unsigned int);
+
+
+/* these are also in mbstring.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*);
+
+#ifdef __DECLSPEC_SUPPORTED
+__MINGW_IMPORT unsigned char _mbctype[];
+__MINGW_IMPORT unsigned char _mbcasemap[];
+#endif
+
+/* TODO : _MBCS_ mappings go in tchar.h */
+
+#endif /* Not strict ANSI */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* Not RC_INVOKED */
+
+#endif /* Not _MCTYPE_H_ */
+
diff --git a/winsup/mingw/include/mbstring.h b/winsup/mingw/include/mbstring.h
new file mode 100644
index 00000000000..d4afc1a5473
--- /dev/null
+++ b/winsup/mingw/include/mbstring.h
@@ -0,0 +1,132 @@
+/*
+ * 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*); /* also in string.h */
+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); /* also in string.h */
+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*); /* also in string.h */
+
+/* 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_ */
+
+