Mercurial > projects > ldc
diff dmd/utf.h @ 1:c53b6e3fe49a trunk
[svn r5] Initial commit. Most things are very rough.
author | lindquist |
---|---|
date | Sat, 01 Sep 2007 21:43:27 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dmd/utf.h Sat Sep 01 21:43:27 2007 +0200 @@ -0,0 +1,26 @@ +// Compiler implementation of the D programming language +// utf.h +// Copyright (c) 2003-2006 by Digital Mars +// All Rights Reserved +// written by Walter Bright +// http://www.digitalmars.com +// License for redistribution is by either the Artistic License +// in artistic.txt, or the GNU General Public License in gnu.txt. +// See the included readme.txt for details. + +#ifndef DMD_UTF_H +#define DMD_UTF_H + + +typedef unsigned dchar_t; + +int utf_isValidDchar(dchar_t c); + +char *utf_decodeChar(unsigned char *s, size_t len, size_t *pidx, dchar_t *presult); +char *utf_decodeWchar(unsigned short *s, size_t len, size_t *pidx, dchar_t *presult); + +char *utf_validateString(unsigned char *s, size_t len); + +extern int isUniAlpha(dchar_t); + +#endif