ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

unicode.h
Go to the documentation of this file.
00001 /*
00002  * PROJECT:    ReactOS
00003  * LICENSE:    LGPL v2.1 or any later version
00004  * PURPOSE:    Map Wine's Unicode functions to native wcs* functions wherever possible
00005  * AUTHORS:    ?
00006  */
00007 
00008 #ifndef __WINE_WINE_UNICODE_H
00009 #define __WINE_WINE_UNICODE_H
00010 
00011 #include <stdarg.h>
00012 #include <stdlib.h>
00013 #include <wchar.h>
00014 
00015 #include <windef.h>
00016 #include <winbase.h>
00017 #include <winnls.h>
00018 
00019 #ifndef WINE_UNICODE_API
00020 #define WINE_UNICODE_API
00021 #endif
00022 
00023 #ifndef WINE_UNICODE_INLINE
00024 #define WINE_UNICODE_INLINE static inline
00025 #endif
00026 
00027 #define memicmpW(s1,s2,n) _wcsnicmp((const wchar_t *)(s1),(const wchar_t *)(s2),(n))
00028 #define strlenW(s) wcslen((const wchar_t *)(s))
00029 #define strcpyW(d,s) wcscpy((wchar_t *)(d),(const wchar_t *)(s))
00030 #define strcatW(d,s) wcscat((wchar_t *)(d),(const wchar_t *)(s))
00031 #define strcspnW(d,s) wcscspn((wchar_t *)(d),(const wchar_t *)(s))
00032 #define strstrW(d,s) wcsstr((const wchar_t *)(d),(const wchar_t *)(s))
00033 #define strtolW(s,e,b) wcstol((const wchar_t *)(s),(wchar_t **)(e),(b))
00034 #define strchrW(s,c) wcschr((const wchar_t *)(s),(wchar_t)(c))
00035 #define strrchrW(s,c) wcsrchr((const wchar_t *)(s),(wchar_t)(c))
00036 #define strncmpW(s1,s2,n) wcsncmp((const wchar_t *)(s1),(const wchar_t *)(s2),(n))
00037 #define strncpyW(s1,s2,n) wcsncpy((wchar_t *)(s1),(const wchar_t *)(s2),(n))
00038 #define strcmpW(s1,s2) wcscmp((const wchar_t *)(s1),(const wchar_t *)(s2))
00039 #define strcmpiW(s1,s2) _wcsicmp((const wchar_t *)(s1),(const wchar_t *)(s2))
00040 #define strncmpiW(s1,s2,n) _wcsnicmp((const wchar_t *)(s1),(const wchar_t *)(s2),(n))
00041 #define strtoulW(s1,s2,b) wcstoul((const wchar_t *)(s1),(wchar_t **)(s2),(b))
00042 #define strspnW(str, accept) wcsspn((const wchar_t *)(str), (const wchar_t *)(accept))
00043 #define strpbrkW(str, accept) wcspbrk((const wchar_t *)(str), (const wchar_t *)(accept))
00044 #define tolowerW(n) towlower((n))
00045 #define toupperW(n) towupper((n))
00046 #define islowerW(n) iswlower((n))
00047 #define isupperW(n) iswupper((n))
00048 #define isalphaW(n) iswalpha((n))
00049 #define isalnumW(n) iswalnum((n))
00050 #define isdigitW(n) iswdigit((n))
00051 #define isxdigitW(n) iswxdigit((n))
00052 #define isspaceW(n) iswspace((n))
00053 #define iscntrlW(n) iswcntrl((n))
00054 #define atoiW(s) _wtoi((const wchar_t *)(s))
00055 #define atolW(s) _wtol((const wchar_t *)(s))
00056 #define strlwrW(s) _wcslwr((wchar_t *)(s))
00057 #define struprW(s) _wcsupr((wchar_t *)(s))
00058 #define sprintfW swprintf
00059 #define vsprintfW vswprintf
00060 #define snprintfW _snwprintf
00061 #define vsnprintfW _vsnwprintf
00062 #define isprintW iswprint
00063 
00064 static __inline unsigned short get_char_typeW( WCHAR ch )
00065 {
00066     extern const unsigned short wine_wctype_table[];
00067     return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)];
00068 }
00069 
00070 static __inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
00071 {
00072     const WCHAR *end;
00073     for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) return (WCHAR *)ptr;
00074     return NULL;
00075 }
00076 
00077 static __inline WCHAR *memrchrW( const WCHAR *ptr, WCHAR ch, size_t n )
00078 {
00079     const WCHAR *end, *ret = NULL;
00080     for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) ret = ptr;
00081     return (WCHAR *)ret;
00082 }
00083 
00084 #endif

Generated on Sat May 26 2012 04:29:25 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.