ReactOS  0.4.15-dev-425-gc40b086
unicode.h File Reference
#include <ctype.h>
#include <stdarg.h>
#include <string.h>
#include <typedefs.h>
Include dependency graph for unicode.h:

Go to the source code of this file.

Classes

struct  cp_info
 
struct  sbcs_table
 
struct  dbcs_table
 
union  cptable
 

Macros

#define C1_UPPER   1
 
#define C1_LOWER   2
 
#define C1_DIGIT   4
 
#define C1_SPACE   8
 
#define C1_PUNCT   16
 
#define C1_CNTRL   32
 
#define C1_BLANK   64
 
#define C1_XDIGIT   128
 
#define C1_ALPHA   256
 
#define MB_COMPOSITE   2
 
#define MB_ERR_INVALID_CHARS   8
 
#define MB_USEGLYPHCHARS   0x04
 
#define WC_COMPOSITECHECK   512
 
#define WC_DISCARDNS   16
 
#define WC_DEFAULTCHAR   64
 
#define WC_NO_BEST_FIT_CHARS   1024
 
#define WC_ERR_INVALID_CHARS   0x0080
 
#define WINE_UNICODE_API
 
#define WINE_UNICODE_INLINE   static inline
 
#define strncpyW(d, s, n)   error do_not_use_strncpyW_use_lstrcpynW_or_memcpy_instead
 

Functions

const union cptablewine_cp_get_table (unsigned int codepage)
 
const union cptablewine_cp_enum_table (unsigned int index)
 
int wine_cp_mbstowcs (const union cptable *table, int flags, const char *src, int srclen, WCHAR *dst, int dstlen)
 
int wine_cp_wcstombs (const union cptable *table, int flags, const WCHAR *src, int srclen, char *dst, int dstlen, const char *defchar, int *used)
 
int wine_cpsymbol_mbstowcs (const char *src, int srclen, WCHAR *dst, int dstlen)
 
int wine_cpsymbol_wcstombs (const WCHAR *src, int srclen, char *dst, int dstlen)
 
int wine_utf8_mbstowcs (int flags, const char *src, int srclen, WCHAR *dst, int dstlen)
 
int wine_utf8_wcstombs (int flags, const WCHAR *src, int srclen, char *dst, int dstlen)
 
int wine_compare_string (int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
 
int wine_get_sortkey (int flags, const WCHAR *src, int srclen, char *dst, int dstlen)
 
int wine_fold_string (int flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
 
int strcmpiW (const WCHAR *str1, const WCHAR *str2)
 
int strncmpiW (const WCHAR *str1, const WCHAR *str2, int n)
 
int memicmpW (const WCHAR *str1, const WCHAR *str2, int n)
 
WCHARstrstrW (const WCHAR *str, const WCHAR *sub)
 
long int strtolW (const WCHAR *nptr, WCHAR **endptr, int base)
 
unsigned long int strtoulW (const WCHAR *nptr, WCHAR **endptr, int base)
 
int sprintfW (WCHAR *str, const WCHAR *format,...)
 
int snprintfW (WCHAR *str, size_t len, const WCHAR *format,...)
 
int vsprintfW (WCHAR *str, const WCHAR *format, va_list valist)
 
int vsnprintfW (WCHAR *str, size_t len, const WCHAR *format, va_list valist)
 
WINE_UNICODE_INLINE int wine_is_dbcs_leadbyte (const union cptable *table, unsigned char ch)
 
WINE_UNICODE_INLINE WCHAR tolowerW (WCHAR ch)
 
WINE_UNICODE_INLINE WCHAR toupperW (WCHAR ch)
 
WINE_UNICODE_INLINE unsigned short get_char_typeW (WCHAR ch)
 
WINE_UNICODE_INLINE int iscntrlW (WCHAR wc)
 
WINE_UNICODE_INLINE int ispunctW (WCHAR wc)
 
WINE_UNICODE_INLINE int isspaceW (WCHAR wc)
 
WINE_UNICODE_INLINE int isdigitW (WCHAR wc)
 
WINE_UNICODE_INLINE int isxdigitW (WCHAR wc)
 
WINE_UNICODE_INLINE int islowerW (WCHAR wc)
 
WINE_UNICODE_INLINE int isupperW (WCHAR wc)
 
WINE_UNICODE_INLINE int isalnumW (WCHAR wc)
 
WINE_UNICODE_INLINE int isalphaW (WCHAR wc)
 
WINE_UNICODE_INLINE int isgraphW (WCHAR wc)
 
WINE_UNICODE_INLINE int isprintW (WCHAR wc)
 
WINE_UNICODE_INLINE unsigned int strlenW (const WCHAR *str)
 
WINE_UNICODE_INLINE WCHARstrcpyW (WCHAR *dst, const WCHAR *src)
 
WINE_UNICODE_INLINE int strcmpW (const WCHAR *str1, const WCHAR *str2)
 
WINE_UNICODE_INLINE int strncmpW (const WCHAR *str1, const WCHAR *str2, int n)
 
WINE_UNICODE_INLINE WCHARstrcatW (WCHAR *dst, const WCHAR *src)
 
WINE_UNICODE_INLINE WCHARstrchrW (const WCHAR *str, WCHAR ch)
 
WINE_UNICODE_INLINE WCHARstrrchrW (const WCHAR *str, WCHAR ch)
 
WINE_UNICODE_INLINE WCHARstrpbrkW (const WCHAR *str, const WCHAR *accept)
 
WINE_UNICODE_INLINE size_t strspnW (const WCHAR *str, const WCHAR *accept)
 
WINE_UNICODE_INLINE size_t strcspnW (const WCHAR *str, const WCHAR *reject)
 
WINE_UNICODE_INLINE WCHARstrlwrW (WCHAR *str)
 
WINE_UNICODE_INLINE WCHARstruprW (WCHAR *str)
 
WINE_UNICODE_INLINE WCHARmemchrW (const WCHAR *ptr, WCHAR ch, size_t n)
 
WINE_UNICODE_INLINE WCHARmemrchrW (const WCHAR *ptr, WCHAR ch, size_t n)
 
WINE_UNICODE_INLINE long int atolW (const WCHAR *str)
 
WINE_UNICODE_INLINE int atoiW (const WCHAR *str)
 

Macro Definition Documentation

◆ C1_ALPHA

#define C1_ALPHA   256

Definition at line 39 of file unicode.h.

◆ C1_BLANK

#define C1_BLANK   64

Definition at line 37 of file unicode.h.

◆ C1_CNTRL

#define C1_CNTRL   32

Definition at line 36 of file unicode.h.

◆ C1_DIGIT

#define C1_DIGIT   4

Definition at line 33 of file unicode.h.

◆ C1_LOWER

#define C1_LOWER   2

Definition at line 32 of file unicode.h.

◆ C1_PUNCT

#define C1_PUNCT   16

Definition at line 35 of file unicode.h.

◆ C1_SPACE

#define C1_SPACE   8

Definition at line 34 of file unicode.h.

◆ C1_UPPER

#define C1_UPPER   1

Definition at line 31 of file unicode.h.

◆ C1_XDIGIT

#define C1_XDIGIT   128

Definition at line 38 of file unicode.h.

◆ MB_COMPOSITE

#define MB_COMPOSITE   2

Definition at line 40 of file unicode.h.

◆ MB_ERR_INVALID_CHARS

#define MB_ERR_INVALID_CHARS   8

Definition at line 41 of file unicode.h.

◆ MB_USEGLYPHCHARS

#define MB_USEGLYPHCHARS   0x04

Definition at line 42 of file unicode.h.

◆ strncpyW

#define strncpyW (   d,
  s,
  n 
)    error do_not_use_strncpyW_use_lstrcpynW_or_memcpy_instead

Definition at line 227 of file unicode.h.

◆ WC_COMPOSITECHECK

#define WC_COMPOSITECHECK   512

Definition at line 43 of file unicode.h.

◆ WC_DEFAULTCHAR

#define WC_DEFAULTCHAR   64

Definition at line 45 of file unicode.h.

◆ WC_DISCARDNS

#define WC_DISCARDNS   16

Definition at line 44 of file unicode.h.

◆ WC_ERR_INVALID_CHARS

#define WC_ERR_INVALID_CHARS   0x0080

Definition at line 47 of file unicode.h.

◆ WC_NO_BEST_FIT_CHARS

#define WC_NO_BEST_FIT_CHARS   1024

Definition at line 46 of file unicode.h.

◆ WINE_UNICODE_API

#define WINE_UNICODE_API

Definition at line 58 of file unicode.h.

◆ WINE_UNICODE_INLINE

#define WINE_UNICODE_INLINE   static inline

Definition at line 62 of file unicode.h.

Function Documentation

◆ atoiW()

◆ atolW()

Definition at line 310 of file unicode.h.

311 {
312  return strtolW( str, (WCHAR **)0, 10 );
313 }
long int strtolW(const WCHAR *nptr, WCHAR **endptr, int base)
Definition: string.c:74
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by atoiW(), event_set_install_level(), IPADDRESS_GetAddress(), msi_build_createsql_columns(), msi_dialog_edit_control(), msi_dialog_vcl_add_columns(), and MsiSourceListEnumMediaDisksW().

◆ get_char_typeW()

WINE_UNICODE_INLINE unsigned short get_char_typeW ( WCHAR  ch)

Definition at line 149 of file unicode.h.

150 {
151  extern WINE_UNICODE_API const unsigned short wine_wctype_table[];
152  return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)];
153 }
#define WINE_UNICODE_API
Definition: unicode.h:58
const unsigned short wine_wctype_table[]
Definition: wctype.c:6

Referenced by compare_case_weights(), compare_diacritic_weights(), compare_unicode_weights(), compare_weights(), GetStringTypeW(), isalnumW(), isalphaW(), iscntrlW(), isdigitW(), isgraphW(), islowerW(), isprintW(), ispunctW(), isspaceW(), isupperW(), isxdigitW(), LCMapStringEx(), and wine_get_sortkey().

◆ isalnumW()

WINE_UNICODE_INLINE int isalnumW ( WCHAR  wc)

Definition at line 190 of file unicode.h.

191 {
193 }
#define C1_LOWER
Definition: unicode.h:32
#define C1_ALPHA
Definition: unicode.h:39
#define C1_DIGIT
Definition: unicode.h:33
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149
#define C1_UPPER
Definition: unicode.h:31

Referenced by InternetCrackUrlW(), isprintableW(), parse_event_str(), ParseURLW(), script_parse_event(), update_filter(), URL_NeedEscapeW(), URL_ScanID(), UrlCanonicalizeW(), and UrlCombineW().

◆ isalphaW()

WINE_UNICODE_INLINE int isalphaW ( WCHAR  wc)

Definition at line 195 of file unicode.h.

196 {
197  return get_char_typeW(wc) & (C1_ALPHA|C1_LOWER|C1_UPPER);
198 }
#define C1_LOWER
Definition: unicode.h:32
#define C1_ALPHA
Definition: unicode.h:39
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149
#define C1_UPPER
Definition: unicode.h:31

Referenced by InternetTimeToSystemTimeW(), PathCreateFromUrlW(), CNtObjectFolder::ResolveSymLink(), strtolW(), strtoulW(), URL_CreateFromPath(), URL_ScanID(), and WinHttpTimeToSystemTime().

◆ iscntrlW()

WINE_UNICODE_INLINE int iscntrlW ( WCHAR  wc)

Definition at line 155 of file unicode.h.

156 {
157  return get_char_typeW(wc) & C1_CNTRL;
158 }
#define C1_CNTRL
Definition: unicode.h:36
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149

◆ isdigitW()

◆ isgraphW()

WINE_UNICODE_INLINE int isgraphW ( WCHAR  wc)

Definition at line 200 of file unicode.h.

201 {
203 }
#define C1_LOWER
Definition: unicode.h:32
#define C1_ALPHA
Definition: unicode.h:39
#define C1_DIGIT
Definition: unicode.h:33
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149
#define C1_PUNCT
Definition: unicode.h:35
#define C1_UPPER
Definition: unicode.h:31

◆ islowerW()

WINE_UNICODE_INLINE int islowerW ( WCHAR  wc)

Definition at line 180 of file unicode.h.

181 {
182  return get_char_typeW(wc) & C1_LOWER;
183 }
#define C1_LOWER
Definition: unicode.h:32
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149

Referenced by PathMakePrettyW(), and URL_ScanID().

◆ isprintW()

WINE_UNICODE_INLINE int isprintW ( WCHAR  wc)

Definition at line 205 of file unicode.h.

206 {
208 }
#define C1_BLANK
Definition: unicode.h:37
#define C1_LOWER
Definition: unicode.h:32
#define C1_ALPHA
Definition: unicode.h:39
#define C1_DIGIT
Definition: unicode.h:33
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149
#define C1_PUNCT
Definition: unicode.h:35
#define C1_UPPER
Definition: unicode.h:31

Referenced by gdip_format_string(), and STATUSBAR_SetTextT().

◆ ispunctW()

WINE_UNICODE_INLINE int ispunctW ( WCHAR  wc)

Definition at line 160 of file unicode.h.

161 {
162  return get_char_typeW(wc) & C1_PUNCT;
163 }
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149
#define C1_PUNCT
Definition: unicode.h:35

◆ isspaceW()

◆ isupperW()

WINE_UNICODE_INLINE int isupperW ( WCHAR  wc)

Definition at line 185 of file unicode.h.

186 {
187  return get_char_typeW(wc) & C1_UPPER;
188 }
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149
#define C1_UPPER
Definition: unicode.h:31

◆ isxdigitW()

WINE_UNICODE_INLINE int isxdigitW ( WCHAR  wc)

Definition at line 175 of file unicode.h.

176 {
177  return get_char_typeW(wc) & C1_XDIGIT;
178 }
#define C1_XDIGIT
Definition: unicode.h:38
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149

Referenced by decode_url(), GetPrivateProfileStructW(), process_pattern_string(), SetupGetBinaryField(), StrToInt64ExW(), URL_ScanID(), and UrlUnescapeW().

◆ memchrW()

WINE_UNICODE_INLINE WCHAR* memchrW ( const WCHAR ptr,
WCHAR  ch,
size_t  n 
)

Definition at line 295 of file unicode.h.

296 {
297  const WCHAR *end;
298  for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) return (WCHAR *)(ULONG_PTR)ptr;
299  return NULL;
300 }
GLdouble n
Definition: glext.h:7729
GLuint GLuint end
Definition: gl.h:1545
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define ULONG_PTR
Definition: config.h:101

Referenced by get_token(), InternetCrackUrlW(), is_domain_legal_for_cookie(), map_W_to_A(), match_common_name(), next_xml_attr(), next_xml_elem(), parse_text_content(), PROFILE_Load(), set_cookie(), and WinHttpCrackUrl().

◆ memicmpW()

int memicmpW ( const WCHAR str1,
const WCHAR str2,
int  n 
)

Definition at line 51 of file string.c.

52 {
53  int ret = 0;
54  for ( ; n > 0; n--, str1++, str2++)
55  if ((ret = tolowerW(*str1) - tolowerW(*str2))) break;
56  return ret;
57 }
GLdouble n
Definition: glext.h:7729
WINE_UNICODE_INLINE WCHAR tolowerW(WCHAR ch)
Definition: unicode.h:135
int ret

◆ memrchrW()

WINE_UNICODE_INLINE WCHAR* memrchrW ( const WCHAR ptr,
WCHAR  ch,
size_t  n 
)

Definition at line 302 of file unicode.h.

303 {
304  const WCHAR *end;
305  WCHAR *ret = NULL;
306  for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) ret = (WCHAR *)(ULONG_PTR)ptr;
307  return ret;
308 }
GLdouble n
Definition: glext.h:7729
GLuint GLuint end
Definition: gl.h:1545
uint32_t ULONG_PTR
Definition: typedefs.h:64
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret

Referenced by PROFILE_Load().

◆ snprintfW()

int snprintfW ( WCHAR str,
size_t  len,
const WCHAR format,
  ... 
)

Definition at line 520 of file string.c.

521 {
522  int retval;
523  va_list valist;
525  retval = vsnprintfW(str, len, format, valist);
526  va_end(valist);
527  return retval;
528 }
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define va_end(ap)
Definition: acmsvcex.h:90
const WCHAR * str
char * va_list
Definition: acmsvcex.h:78
GLenum GLsizei len
Definition: glext.h:6722
#define va_start(ap, A)
Definition: acmsvcex.h:91
static __ms_va_list valist
Definition: printf.c:64
int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist)
Definition: string.c:363

Referenced by FormatDouble(), and StrFormatByteSizeW().

◆ sprintfW()

int sprintfW ( WCHAR str,
const WCHAR format,
  ... 
)

Definition at line 530 of file string.c.

531 {
532  int retval;
533  va_list valist;
535  retval = vsnprintfW(str, INT_MAX, format, valist);
536  va_end(valist);
537  return retval;
538 }
#define INT_MAX
Definition: limits.h:40
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define va_end(ap)
Definition: acmsvcex.h:90
const WCHAR * str
char * va_list
Definition: acmsvcex.h:78
#define va_start(ap, A)
Definition: acmsvcex.h:91
static __ms_va_list valist
Definition: printf.c:64
int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist)
Definition: string.c:363

◆ strcatW()

WINE_UNICODE_INLINE WCHAR* strcatW ( WCHAR dst,
const WCHAR src 
)

Definition at line 242 of file unicode.h.

243 {
244  strcpyW( dst + strlenW(dst), src );
245  return dst;
246 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLenum src
Definition: glext.h:6340
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
GLenum GLenum dst
Definition: glext.h:6340

Referenced by _SHGetUserShellFolderPath(), _SHRegisterFolders(), _SHRegisterUserShellFolders(), AboutProtocol_Start(), ACTION_AppSearchDr(), ACTION_PublishFeatures(), ACTION_RegisterExtensionInfo(), ACTION_RegisterMIMEInfo(), ACTION_UnregisterClassInfo(), ACTION_UnregisterExtensionInfo(), ACTION_UnregisterMIMEInfo(), append_productcode(), append_string(), build_assembly_dir(), build_default_format(), build_full_keypath(), build_proxy_connect_string(), build_request_string(), build_wndclass_section(), cache_container_open_index(), check_version(), create_profile_directory(), create_system_dirid(), DATETIME_GetText(), fetch_user_component(), fetch_user_product(), FilterMapper3_CreateCategory(), FilterMapper3_UnregisterFilter(), FilterMapper_RegisterFilter(), FilterMapper_RegisterPin(), FilterMapper_RegisterPinType(), FilterMapper_UnregisterFilter(), FilterMapper_UnregisterPin(), find_mono_dll(), find_runtimes(), font_name_from_file(), get_assembly_display_name(), get_cabinet_filename(), get_fusion_filename(), get_key_name_for_target(), get_manifest_in_associated_manifest(), get_mono_path(), get_mono_path_from_folder(), get_runtime_info(), get_unknown_dirid(), get_wine_loader_name(), CQueryAssociations::GetString(), handle_redirect(), HTTP_build_req(), HTTP_DealWithProxy(), InfIsFromOEMLocation(), IPADDRESS_UpdateText(), ITERATE_InstallService(), ITERATE_PublishComponent(), ITERATE_RemoveRegistryValuesOnInstall(), ITERATE_RemoveRegistryValuesOnUninstall(), ITERATE_UnpublishComponent(), ITERATE_WriteRegistryValues(), LISTBOX_Directory(), load_mono(), load_xul(), LoadLibraryShim(), MDI_UpdateFrameText(), msi_build_directory_name(), msi_create_empty_local_file(), MSI_ProcessMessage(), MsiConfigureProductExW(), MSIREG_DeleteUninstallKey(), MSIREG_DeleteUserFeaturesKey(), MSIREG_DeleteUserProductKey(), MSIREG_DeleteUserUpgradeCodesKey(), MSIREG_OpenClassesUpgradeCodesKey(), MSIREG_OpenFeaturesKey(), MSIREG_OpenInstallerFeaturesKey(), MSIREG_OpenProductKey(), MSIREG_OpenUninstallKey(), MSIREG_OpenUpgradeCodesKey(), MSIREG_OpenUserComponentsKey(), MSIREG_OpenUserPatchesKey(), MSIREG_OpenUserUpgradeCodesKey(), MsiReinstallFeatureW(), open_package(), OpenColorProfileW(), parser_add_table(), PathCombineW(), PathRelativePathToW(), PathUnExpandEnvStringsW(), PROFILE_Open(), query_prop(), register_verb(), registry_callback(), RunDlg_GetParentDir(), set_installer_properties(), SETUP_CreateDevicesListFromEnumerator(), SetupCopyOEMInfW(), SetupDiBuildDriverInfoList(), SetupDiInstallDeviceInterfaces(), SetupGetInfFileListW(), SetupOpenInfFileW(), SetupOpenMasterInf(), SetupQueueCopySectionW(), SetupUninstallOEMInfW(), SHELL_execute(), SHELL_execute_class(), SHELL_execute_url(), SHELL_quote_and_execute(), SHGetFileInfoW(), SHGetFolderPathAndSubDirW(), SHLWAPI_WriteTimeClass(), StrCatW(), URL_ApplyDefault(), URL_CreateFromPath(), URL_GuessScheme(), and UrlCombineW().

◆ strchrW()

WINE_UNICODE_INLINE WCHAR* strchrW ( const WCHAR str,
WCHAR  ch 
)

Definition at line 248 of file unicode.h.

249 {
250  do { if (*str == ch) return (WCHAR *)(ULONG_PTR)str; } while (*str++);
251  return NULL;
252 }
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define ULONG_PTR
Definition: config.h:101

Referenced by ACTION_AppSearchGetSignature(), ACTION_AppSearchReg(), ACTION_ExpandAnyPath(), ACTION_RegisterClassInfo(), AddMRUData(), build_properties(), build_wire_path(), BuildCommDCBAndTimeoutsW(), check_transform_applicable(), COND_GetOne(), create_cache_entry(), CredWriteW(), dde_connect(), DIALOG_DlgDirListW(), DIALOG_DlgDirSelect(), DIALOG_IsAccelerator(), do_authorization(), domain_matches(), DRIVER_TryOpenDriver32(), EDIT_WM_Paste(), exec_composesettings(), execute_command(), FILEDLG95_OnOpen(), fix_url_value(), folder_split_path(), FTP_Connect(), get_ini_field(), get_ini_file_name(), CQueryAssociations::GetExecutable(), GetFunctionPointer(), GetVersionInformationFromInfFile(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_get_backgroundPositionY(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTTP_DoAuthorization(), HTTP_DomainMatches(), HTTP_GetResponseHeaders(), HTTP_InterpretHttpHeader(), HTTP_ParseDate(), HTTP_ParseRfc1123Date(), HTTP_ParseRfc850Date(), HTTP_ProcessCookies(), HTTP_ProcessExpires(), HTTP_ShouldBypassProxy(), hyperlink_dlgproc(), InstallHinfSectionW(), INTERNET_FindProxyForProtocol(), INTERNET_LoadProxySettings(), InternetSetCookieExW(), is_basic_auth_value(), ITERATE_CreateShortcuts(), ITERATE_MoveFiles(), ITERATE_RemoveEnvironmentString(), ITERATE_WriteEnvironmentString(), lookup_manifest_file(), match_dns_to_subject_alt_name(), match_dns_to_subject_dn(), MCI_GetString(), MCI_Open(), mciSendStringW(), msi_dialog_edit_control(), msi_dialog_get_style(), msi_dialog_parse_groups(), msi_dialog_set_property_event(), msi_dialog_vcl_add_columns(), msi_font_version_from_file(), MSI_OpenDatabaseW(), msi_parse_command_line(), msi_parse_patch_summary(), msi_parse_version_string(), msi_publish_product_properties(), msi_reduce_to_long_filename(), msi_split_string(), msi_version_str_to_dword(), MsiDecomposeDescriptorW(), MsiSourceListEnumMediaDisksW(), MSSTYLES_OpenThemeClass(), MSSTYLES_ParseIniSectionName(), msvcrt_get_flags(), nsChannelBSC_on_response(), nsstyle_to_bstr(), nsURI_GetHostPort(), nsURI_SetUserPass(), ntlm_GetCachedCredential(), ntlm_InitializeSecurityContextW(), open_key(), parse_content_type(), parse_cookie(), parse_header(), parse_languages(), parse_suminfo(), parse_transform_desc(), path_find_symbol_file(), PathIsUNCServerW(), process_pattern_string(), process_response_status_text(), process_state_property(), processRegLinesW(), PROFILE_Open(), query_http_info(), range_to_string(), registry_credential_matches_filter(), RegpCreateOrOpenKey(), remove_quotes(), ResProtocol_Start(), ResProtocolInfo_ParseUrl(), rfc822_name_matches(), RtlIsTextUnicode(), set_deferred_action_props(), set_installer_properties(), set_server_for_hostname(), SETUP_GetClassIconInfo(), SetupCopyOEMInfW(), SetupOpenInfFileW(), SHELL_ArgifyW(), SHELL_execute_url(), SHLoadIndirectString(), should_bypass_proxy(), StrChrW(), strcspnW(), strpbrkW(), strspnW(), sym_enum(), SymFindFileInPathW(), TOOLBAR_AddStringW(), TOOLTIPS_GetTipText(), update_filter(), update_ini_callback(), url_matches(), URL_ParseUrl(), UrlCanonicalizeW(), UrlCombineW(), UrlGetLocationW(), UrlGetPartW(), wcstok_s(), WHERE_CreateView(), WinHttpCrackUrl(), WININET_GetAuthRealm(), WININET_GetSetPassword(), and WritePrivateProfileSectionW().

◆ strcmpiW()

int strcmpiW ( const WCHAR str1,
const WCHAR str2 
)

Definition at line 32 of file string.c.

33 {
34  for (;;)
35  {
36  int ret = tolowerW(*str1) - tolowerW(*str2);
37  if (ret || !*str1) return ret;
38  str1++;
39  str2++;
40  }
41 }
WINE_UNICODE_INLINE WCHAR tolowerW(WCHAR ch)
Definition: unicode.h:135
int ret

◆ strcmpW()

WINE_UNICODE_INLINE int strcmpW ( const WCHAR str1,
const WCHAR str2 
)

Definition at line 229 of file unicode.h.

230 {
231  while (*str1 && (*str1 == *str2)) { str1++; str2++; }
232  return *str1 - *str2;
233 }

Referenced by CFileSysEnum::_AddFindResult(), _SHExpandEnvironmentStrings(), AboutProtocol_Start(), ACTION_CustomAction(), ACTION_ExecuteAction(), ACTION_HandleStandardAction(), ACTION_RecurseSearchDirectory(), ACTION_UnpublishProduct(), ActiveScriptSite_GetItemInfo(), add_wildcard(), append_productcode(), AsyncReader_FindPin(), attr_to_eid(), BCryptOpenAlgorithmProvider(), build_response_header(), cache_basic_authorization(), check_columns(), check_style_attr_value(), check_transform_applicable(), compare_string(), CreateDebuggingInterfaceFromVersion(), declare_prefix(), dialog_event_handler(), dialog_handle_event(), DispatchEx_GetDispID(), dispid_from_elem_name(), do_searchW(), DoesStringRoundTripW(), domain_match(), drain_content(), env_parse_flags(), event_add_local(), event_add_source(), event_cleanup_subscriptions(), event_end_dialog(), event_remove(), fetch_machine_product(), fetch_user_component(), fetch_user_product(), FilterGraph2_AddFilter(), FilterGraph2_FindFilterByName(), find_cached_table(), find_cookie(), find_event_target(), find_filepatch(), find_item(), finished_reading(), generic_alg_property(), get_alg_property(), get_builtin_id(), get_clr_version(), get_declared_prefix_uri(), get_defaulttablecolumns(), get_dynamic_prop(), get_key_value(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_table(), get_tag_desc(), get_temp_binary(), get_uri_from_prefix(), get_wine_loader_name(), GetClassMediaFile(), handle_redirect(), HTMLBodyElement_get_scroll(), HTMLBodyElement_put_scroll(), HTMLDocument_open(), HTMLInputElement_is_text_edit(), HTMLWindow2_open(), HTTP_HttpEndRequestW(), HTTP_HttpSendRequestW(), HTTP_InsertAuthorization(), HTTP_ParseDate(), HTTP_ParseDateAsAsctime(), HTTP_ParseRfc1123Date(), HTTP_ParseRfc850Date(), hyperlink_dlgproc(), is_elem_id(), is_local_machineW(), is_matching_identity(), iterate_all_classes(), iterate_appsearch(), ITERATE_PublishComponent(), ITERATE_WriteEnvironmentString(), LISTBOX_Directory(), load_folder(), lookup_style_tbl(), MCI_GetDriverFromString(), mciSendStringW(), merge_type_match(), merge_verify_colnames(), merge_verify_primary_keys(), MIDIMAP_FindPort(), msi_action_is_unique(), MSI_ApplicablePatchXML(), msi_arrange_record(), msi_check_patch_applicable(), msi_columns_in_order(), MSI_DatabaseExport(), MSI_DatabaseImport(), msi_dialog_add_control(), msi_dialog_combobox_update(), msi_dialog_create_radiobutton(), msi_dialog_find_control(), msi_dialog_find_control_by_type(), msi_dialog_find_font(), msi_dialog_set_control_condition(), msi_dialog_set_property(), msi_dialog_set_property_event(), msi_dialog_update_controls(), msi_dialog_update_directory_list(), msi_dialog_vcl_add_columns(), msi_get_loaded_component(), msi_get_loaded_feature(), msi_get_loaded_file(), msi_get_loaded_folder(), msi_get_property_row(), msi_get_target_folder(), MSI_GetProductInfo(), msi_package_add_info(), msi_parse_command_line(), msi_publish_sourcelist(), msi_resolve_source_folder(), msi_resolve_target_folder(), msi_seltree_add_child_features(), MSI_SetFeatureStateW(), msi_table_apply_transform(), msi_table_load_transform(), MsiActiveScriptSite_GetItemInfo(), MsiEnumPatchesExW(), MsiGetPatchInfoExW(), MsiGetPatchInfoW(), MsiGetProductInfoExW(), MsiSetFeatureAttributesW(), MsiSetPropertyW(), MsiSourceListGetInfoW(), MsiSourceListSetInfoW(), namespacemanager_declarePrefix(), NLS_GetFormats(), nsChannelBSC_beginning_transaction(), nsURI_SchemeIs(), open_connection(), parse_column(), parse_platform(), PathFindSuffixArrayW(), PathMakeSystemFolderW(), process_arguments(), process_state_property(), PROFILE_SetString(), remove_duplicate_values(), request_receive(), request_send(), retrieve_cached_basic_authorization(), search_window_props(), send_request(), set_content_length(), set_target_path(), SETUP_CreateInterfaceList(), SetupDiSetSelectedDriverW(), SetupOpenInfFileW(), SHGetObjectCompatFlags(), SPY_DumpStructure(), SQL_MarkPrimaryKeys(), start_params(), str_to_eid(), STRCMP_Evaluate(), TABLE_add_column(), TABLE_CreateView(), TABLE_Exists(), translate_url(), TREEVIEW_EndEditLabelNow(), UrlCompareW(), VIEW_find_column(), wcscoll(), and xslprocessor_addParameter().

◆ strcpyW()

WINE_UNICODE_INLINE WCHAR* strcpyW ( WCHAR dst,
const WCHAR src 
)

Definition at line 219 of file unicode.h.

220 {
221  WCHAR *p = dst;
222  while ((*p++ = *src++));
223  return dst;
224 }
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by _SHExpandEnvironmentStrings(), _SHGetDefaultValue(), _SHGetUserShellFolderPath(), _SHRegisterUserShellFolders(), _wmakepath(), ACTION_AppSearchDr(), ACTION_ConvertRegValue(), ACTION_PublishFeatures(), ACTION_RegisterExtensionInfo(), ACTION_RegisterMIMEInfo(), ACTION_UnregisterClassInfo(), ACTION_UnregisterExtensionInfo(), ACTION_UnregisterMIMEInfo(), add_cookie_headers(), append_productcode(), append_string(), APPINFO_QueryOption(), BaseFilterImpl_JoinFilterGraph(), BaseFilterImpl_QueryFilterInfo(), BasePinImpl_QueryId(), BinaryToBase64W(), BrsFolder_Treeview_Rename(), build_absolute_request_path(), build_assembly_dir(), build_assembly_id(), build_full_keypath(), build_proxy_connect_string(), build_proxy_path_url(), build_request_string(), build_wpad_url(), cache_container_delete_dir(), cache_container_open_index(), cache_container_set_size(), cache_containers_init(), check_version(), CLRRuntimeInfo_GetRuntimeDirectory(), COMBOEX_InsertItemW(), COMBOEX_SetItemW(), CommandLineToArgvW(), compose_request_url(), concat_W(), container_matches_cert(), Copy_PinInfo(), copy_propbag2(), create_full_pathW(), create_monodata(), create_target_directory(), CreateDeviceInfo(), CreateDeviceInterface(), CreateInfFileDetails(), CreateMRUListLazyW(), CRYPT_FormatAltNameEntry(), CRYPT_FormatAltNameInfo(), CRYPT_FormatAuthorityInfoAccess(), CRYPT_FormatAuthorityKeyId2(), CRYPT_FormatBasicConstraints2(), CRYPT_FormatBits(), CRYPT_FormatCertIssuer(), CRYPT_FormatCRLDistPoints(), CRYPT_FormatEnhancedKeyUsage(), CRYPT_FormatHexStringWithPrefix(), CRYPT_FormatKeyUsage(), CRYPT_FormatNetscapeCertType(), CRYPT_FormatReason(), CRYPT_FormatSpcFinancialCriteria(), CRYPT_FormatUnicodeString(), CRYPT_GetProvKeyName(), CRYPT_GetTypeKeyName(), CryptAcquireContextW(), D3DXCreateFontW(), dde_connect(), decompress_or_copy_callback(), dialog_create(), dialog_create_window(), do_searchW(), EDIT_EM_ReplaceSel(), EDIT_EM_Undo(), encodeBase64W(), EnumDirTreeW(), execute_command(), execute_from_key(), fetch_user_component(), fetch_user_product(), FileAsyncReader_Construct(), FILEDLG95_OnOpen(), FileMenu_AppendItemW(), FileSource_GetCurFile(), FileSource_Load(), FilterMapper3_CreateCategory(), FilterMapper3_RegisterFilter(), FilterMapper3_UnregisterFilter(), FilterMapper_RegisterFilter(), FilterMapper_RegisterPin(), FilterMapper_RegisterPinType(), FilterMapper_UnregisterFilter(), FilterMapper_UnregisterPin(), find_installed_font(), find_mono_dll(), find_published_source(), find_runtimes(), FindExecutableW(), fix_px_value(), flatten_multi_string_values(), font_name_from_file(), format_insert(), FormatMessageW(), FTP_Connect(), GdipGetLogFontW(), get_assembly_name_attribute(), get_cabinet_filename(), get_drive_type(), get_duplicate_filename(), get_extrac_args(), get_font_size(), get_fusion_filename(), get_key_name_for_target(), get_log_fontW(), get_manifest_in_associated_manifest(), get_mono_path(), get_mono_path_from_folder(), get_registered_local_package(), get_request_path(), get_root_key(), get_runtime_info(), get_string_subst(), get_wine_loader_name(), GetCalendarInfoW(), GetSectionCallback(), CQueryAssociations::GetString(), HANDLE_CustomType23(), handle_redirect(), heap_strdupW(), HTTP_DealWithProxy(), HTTP_FixURL(), HTTP_HandleRedirect(), HTTP_HttpOpenRequestW(), ICONTITLE_SetTitlePos(), InfpAddFieldToLine(), InfpAddKeyToLine(), InfpAddSection(), InfpGetMultiSzField(), InfWriteFile(), init_function_pointers(), init_xpcom(), IPADDRESS_Create(), ITERATE_InstallService(), ITERATE_PublishComponent(), ITERATE_RemoveRegistryValuesOnInstall(), ITERATE_RemoveRegistryValuesOnUninstall(), ITERATE_UnpublishComponent(), ITERATE_WriteEnvironmentString(), ITERATE_WriteRegistryValues(), LISTBOX_Directory(), LISTBOX_GetText(), LISTBOX_InsertString(), load_mono(), load_xul(), lookup_assembly(), lookup_winsxs(), MCI_FinishOpen(), MCI_Open(), MCI_WriteString(), mciSendStringW(), MDI_UpdateFrameText(), MIDIMAP_drvOpen(), MLLoadLibraryW(), module_fill_module(), module_find_cb(), msi_add_cabinet_stream(), msi_create_full_path(), msi_dialog_add_font(), msi_dialog_get_sans_serif_height(), msi_dialog_hyperlink(), msi_dialog_line_control(), msi_dialog_set_property_event(), MSI_GetFeatureInfo(), MSI_ProcessMessage(), msi_set_property(), MsiGetFileVersionW(), MSIREG_DeleteUninstallKey(), MSIREG_DeleteUserFeaturesKey(), MSIREG_DeleteUserProductKey(), MSIREG_DeleteUserUpgradeCodesKey(), MSIREG_OpenClassesUpgradeCodesKey(), MSIREG_OpenFeaturesKey(), MSIREG_OpenInstallerFeaturesKey(), MSIREG_OpenProductKey(), MSIREG_OpenUninstallKey(), MSIREG_OpenUpgradeCodesKey(), MSIREG_OpenUserComponentsKey(), MSIREG_OpenUserPatchesKey(), MSIREG_OpenUserUpgradeCodesKey(), MsiViewGetErrorW(), namespacemanager_getDeclaredPrefix(), namespacemanager_getPrefix(), namespacemanager_getURI(), nsDirectoryServiceProvider2_GetFiles(), open_package(), parser_add_table(), path_find_symbol_file(), PathAddExtensionW(), PathCompactPathExW(), PathCompactPathW(), PathFindOnPathExW(), PathIsDirectoryEmptyW(), PathProcessCommandW(), PathRelativePathToW(), PathRenameExtensionW(), PathUnExpandEnvStringsW(), PathYetAnotherMakeUniqueName(), pe_load_native_module(), PROFILE_Find(), PROFILE_Open(), PROFILE_Save(), PROFILE_SetString(), promptdisk_browse(), promptdisk_ok(), pSetupDuplicateString(), push_string(), query_headers(), query_prop(), ready_media(), register_dlls_callback(), register_verb(), registry_callback(), RenderHDROP(), sc_FNNOTIFY_W(), SearchTreeForFileW(), set_cookies(), set_environment(), SetupCopyOEMInfW(), SETUPDI_CreateDrvKey(), SetupDiBuildDriverInfoList(), SetupDiCreateDeviceInfoListExW(), SetupDiGetActualSectionToInstallExW(), SetupDiGetDeviceInfoListDetailW(), SetupDiGetDeviceInterfaceDetailW(), SetupDiGetDeviceRegistryPropertyW(), SetupDiInstallDevice(), SetupGetInfFileListW(), SetupInstallFileW(), SetupIterateCabinetW(), SetupOpenInfFileW(), SetupPromptForDiskW(), SetupQueryInfOriginalFileInformationW(), SetupQueueCopySectionW(), SHELL_execute(), SHELL_execute_class(), SHELL_quote_and_execute(), SHELL_translate_idlist(), SHGetFileInfoW(), SHGetFolderPathAndSubDirW(), SHGetIniStringW(), SHGetWebFolderFilePathW(), SHLWAPI_PathFindInOtherDirs(), SHRegGetCLSIDKeyW(), source_matches_volume(), SPY_GetClassName(), STATUSBAR_GetTextW(), STATUSBAR_SetTextT(), STATUSBAR_WMCreate(), STATUSBAR_WMGetText(), STATUSBAR_WMSetText(), Str_SetPtrW(), str_to_buffer(), strcatW(), StrCpyW(), strdupW(), StrToOleStrW(), SymFindFileInPathW(), SymGetModuleInfoW(), SysMouseWImpl_GetObjectInfo(), TOOLBAR_GetButtonText(), TOOLTIPS_AddToolT(), TOOLTIPS_CopyInfoT(), TOOLTIPS_SetToolInfoT(), TOOLTIPS_UpdateTipTextT(), TREEVIEW_EndEditLabelNow(), TREEVIEW_UpdateDispInfo(), update_ini_callback(), URL_ApplyDefault(), URL_CreateFromPath(), URL_GuessScheme(), urlcache_entry_create(), UrlCombineW(), UrlCreateFromPathW(), widGetDevCaps(), wined3d_adapter_init(), wined3d_adapter_init_nogl(), WININET_GetAuthRealm(), and WritePrivateProfileSectionW().

◆ strcspnW()

WINE_UNICODE_INLINE size_t strcspnW ( const WCHAR str,
const WCHAR reject 
)

Definition at line 274 of file unicode.h.

275 {
276  const WCHAR *ptr;
277  for (ptr = str; *ptr; ptr++) if (strchrW( reject, *ptr )) break;
278  return ptr - str;
279 }
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
static PVOID ptr
Definition: dispmode.c:27
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by StrCSpnW().

◆ strlenW()

Definition at line 212 of file unicode.h.

213 {
214  const WCHAR *s = str;
215  while (*s) s++;
216  return (unsigned int)(s - str);
217 }
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLdouble s
Definition: gl.h:2039

Referenced by __FindExecutableImageExW(), __WideCharToMultiByte(), _putws(), _SHExpandEnvironmentStrings(), _SHGetCurrentVersionPath(), _SHGetProfilesValue(), _SHGetUserShellFolderPath(), _SHRegisterFolders(), _wcsdup(), _wcsrev(), _wmakepath(), _wmakepath_s(), AboutProtocol_Start(), AboutProtocolInfo_ParseUrl(), ACTION_AppSearchGetSignature(), ACTION_ExecuteAction(), ACTION_ExpandAnyPath(), ACTION_PublishFeatures(), ACTION_RecurseSearchDirectory(), ACTION_RegisterClassInfo(), ACTION_RegisterExtensionInfo(), ACTION_RegisterMIMEInfo(), ACTION_UnregisterClassInfo(), ACTION_UnregisterExtensionInfo(), ACTION_UnregisterMIMEInfo(), add_comserver_record(), add_cookie_headers(), add_host_header(), add_ifaceps_record(), add_request_headers(), AddKnownDriverToList(), AddMRUStringW(), alloc_child_window(), AMGetErrorTextW(), append_multi_sz_value(), append_productcode(), append_string(), APPINFO_QueryOption(), AssocFindByBuiltinExtension(), Base64WithHeaderAndTrailerToBinaryW(), BasePinImpl_QueryId(), BinaryToBase64W(), BrsFolder_NewFolder(), build_absolute_request_path(), build_assembly_dir(), build_assembly_id(), build_clr_surrogate_section(), build_dllredirect_section(), build_filepathsW(), build_full_keypath(), build_local_assembly_path(), build_proxy_connect_string(), build_proxy_path_url(), build_request_string(), build_tlib_section(), build_wire_path(), build_wndclass_section(), build_wpad_url(), cabinet_copy_file(), cache_container_delete_dir(), cache_container_set_size(), cache_containers_init(), calc_url_length(), cert_name_to_str_with_indent(), CertGetNameStringW(), CheckSectionValid(), COMBOEX_DrawItem(), COMBOEX_InsertItemW(), COMBOEX_SetItemW(), CommandLineToArgvW(), commit_cache_entry(), compare_substring(), CompareStringEx(), compose_request_url(), concat_W(), container_matches_cert(), Control_DoWindow(), ConvertSecurityDescriptorToStringSecurityDescriptorW(), ConvertTimeString(), cookie_set_to_string(), copy_install_file(), copy_propbag2(), create_cache_entry(), create_full_pathW(), create_monodata(), create_system_dirid(), create_taskdialog_template(), create_temp_dir(), CreateDeviceInfo(), CreateDeviceInterface(), CreateInfFileDetails(), CreateMRUListLazyW(), CredIsMarshaledCredentialW(), CredMarshalCredentialW(), CredUnmarshalCredentialW(), CRYPT_AddPrefixW(), CRYPT_AsnEncodeIA5String(), CRYPT_AsnEncodeNumericString(), CRYPT_AsnEncodePrintableString(), CRYPT_AsnEncodeUnicodeStringCoerce(), CRYPT_AsnEncodeUniversalString(), CRYPT_AsnEncodeUTF8String(), CRYPT_FormatAltNameEntry(), CRYPT_FormatAltNameInfo(), CRYPT_FormatAuthorityInfoAccess(), CRYPT_FormatAuthorityKeyId2(), CRYPT_FormatBasicConstraints2(), CRYPT_FormatBits(), CRYPT_FormatCertIssuer(), CRYPT_FormatCRLDistPoints(), CRYPT_FormatEnhancedKeyUsage(), CRYPT_FormatHexStringWithPrefix(), CRYPT_FormatKeyUsage(), CRYPT_FormatNetscapeCertType(), CRYPT_FormatReason(), CRYPT_FormatSpcFinancialCriteria(), CRYPT_GetProvKeyName(), CRYPT_GetTypeKeyName(), CryptAcquireContextW(), CryptEnumProviderTypesW(), CryptSetProviderExW(), CryptStringToBinaryW(), D3DXCreateTextW(), DATETIME_GetText(), DATETIME_Refresh(), DATETIME_ReturnFieldWidth(), DATETIME_UseFormat(), dde_connect(), deformat_component(), deformat_file(), del_mapping_key(), delete_multi_sz_value(), dialog_create(), dialog_create_window(), DIALOG_DlgDirSelect(), DIALOG_GetControl32(), DIALOG_ParseTemplate32(), do_authorization(), do_register_dll(), do_searchW(), domain_matches(), DragQueryFileW(), draw_driver_string(), DrawTextExWorker(), DumpString(), EDIT_BuildLineDefs_ML(), EDIT_EM_CanUndo(), EDIT_EM_ReplaceSel(), EDIT_EM_Undo(), EDIT_WindowProc(), EDIT_WM_Create(), EDIT_WM_GetText(), EDIT_WM_Paste(), EDIT_WM_SetText(), encode_auth_data(), encodeBase64W(), EnumerateSectionsStartingWith(), execute_command(), export_hkey(), extract_cabinet_file(), file_nameW(), file_pathW(), FILEDLG95_OnOpen(), FileMenu_AppendItemW(), FileSource_GetCurFile(), FileSource_Load(), FilterGraph2_AddFilter(), FilterMapper3_CreateCategory(), FilterMapper3_RegisterFilter(), FilterMapper_EnumMatchingFilters(), FilterMapper_RegisterFilter(), FilterMapper_RegisterPin(), FilterMapper_RegisterPinType(), FilterMapper_UnregisterPin(), find_cert_by_name_str_w(), find_cookie(), find_published_source(), fix_px_value(), FixupServiceBinaryPath(), flatten_multi_string_values(), font_name_from_file(), format_insert(), format_string(), FormatMessageW(), fputws(), FreeUrlCacheSpaceW(), FTP_Connect(), GdipMeasureDriverString(), generic_alg_property(), get_assembly_display_name(), get_assembly_name_attribute(), get_cabinet_filename(), get_channel_http_header(), get_comp_length(), get_comserver_datalen(), get_cookie(), get_csidl_dir(), get_dirid_subst(), get_duplicate_filename(), get_extrac_args(), get_file_version(), get_filename(), get_fusion_filename(), get_ifaceps_datalen(), get_key_name_for_target(), get_link_file(), get_manifest_in_associated_manifest(), get_mapping_key(), get_progid_datalen(), get_request_path(), get_scheme_code(), get_server(), get_src_file_info(), get_string_subst(), get_text_length(), get_unknown_dirid(), get_url_length(), get_wine_loader_name(), GetCalendarInfoW(), GetClassNameA(), GetCurrencyFormatW(), GetExpandedNameW(), GetGeoInfoW(), GetMenuItemInfo_common(), GetMenuStringW(), GetMIMETypeSubKeyW(), GetNumberFormatW(), GetPrivateProfileStringW(), GetPrivateProfileStructW(), CQueryAssociations::GetString(), GetStringTypeW(), GetVersionInformationFromInfFile(), HANDLE_CustomType23(), handle_insert_comment(), handle_passport_redirect(), handle_redirect(), heap_strdupW(), HTMLFrameBase_get_marginHeight(), HTMLFrameBase_get_marginWidth(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTTP_build_req(), HTTP_DealWithProxy(), HTTP_DoAuthorization(), HTTP_DomainMatches(), HTTP_FixURL(), HTTP_HandleRedirect(), HTTP_HttpAddRequestHeadersW(), HTTP_HttpOpenRequestW(), HTTP_HttpQueryInfoW(), HTTP_HttpSendRequestW(), HTTP_InsertCookies(), HTTP_InterpretHttpHeader(), HTTP_ProcessExpires(), HTTP_ProcessHeader(), HTTP_ResolveName(), HTTP_ShouldBypassProxy(), HttpNegotiate_BeginningTransaction(), HttpSendRequestExW(), HttpSendRequestW(), hyperlink_dlgproc(), ICONTITLE_SetTitlePos(), IdnToNameprepUnicode(), IEnumRegFiltersImpl_Construct(), IEnumRegFiltersImpl_Next(), InfIsFromOEMLocation(), InfpAddFieldToLine(), InfpAddKeyToLine(), InfpAddSection(), InfpGetMultiSzField(), InfpGetSubstitutionString(), InstallHinfSectionW(), INTERNET_FindProxyForProtocol(), INTERNET_InternetOpenUrlW(), InternetCrackUrlW(), InternetCreateUrlW(), InternetSetCookieExW(), is_gecko_path(), IsDialogMessageW(), ITERATE_InstallService(), ITERATE_PublishComponent(), ITERATE_RemoveEnvironmentString(), ITERATE_RemoveExistingProducts(), ITERATE_RemoveODBCDataSource(), ITERATE_RemoveRegistryValuesOnInstall(), ITERATE_RemoveRegistryValuesOnUninstall(), ITERATE_WriteEnvironmentString(), ITERATE_WriteRegistryValues(), LCMapStringEx(), LISTBOX_FindString(), LISTBOX_GetText(), LISTBOX_InsertString(), LISTBOX_PaintItem(), LISTBOX_WindowProc(), ListBoxWndProc_common(), CExeDropHandler::Load(), load_class(), load_message(), load_progid(), load_string(), lookup_assembly(), lookup_manifest_file(), lookup_winsxs(), loose_hex_to_rgb(), match_common_name(), match_dns_to_subject_dn(), match_ext(), MCI_DumpCommandTable(), MCI_FinishOpen(), MCI_GetMessage(), MCI_GetReturnType(), MCI_GetString(), MCI_IsCommandTableValid(), MCI_ParseOptArgs(), MCI_SetCommandTable(), MCI_SysInfo(), MCI_WriteString(), mciSendStringW(), MDI_MoreWindowsDlgProc(), MDI_UpdateFrameText(), MENU_ParseResource(), MENUEX_ParseResource(), MessageBoxTextToClipboard(), MIME_GetExtensionW(), MLBuildResURLW(), module_fill_module(), module_get_type_by_name(), module_is_container_loaded(), MONTHCAL_PaintCalendar(), MONTHCAL_PaintTitle(), MONTHCAL_SetFirstDayOfWeek(), MRU_SaveChanged(), MsgiAnsiToUnicodeReply(), msi_add_cabinet_stream(), msi_add_string(), msi_apply_transforms(), MSI_ApplyPatchW(), msi_build_directory_name(), msi_copy_outval(), msi_create_component_advertise_string(), msi_create_empty_local_file(), msi_create_full_path(), msi_create_temp_file(), msi_dialog_add_font(), msi_dialog_hyperlink(), msi_dialog_hyperlink_handler(), msi_dialog_line_control(), msi_dialog_set_property_event(), msi_font_version_from_file(), MSI_GetFeatureInfo(), MSI_GetProductInfo(), msi_maskedit_set_text(), msi_normalize_path(), msi_parse_command_line(), MSI_ProcessMessage(), MSI_ProvideQualifiedComponentEx(), msi_publish_patches(), msi_record_set_string(), msi_reduce_to_long_filename(), msi_set_property(), msi_strcpy_to_awstring(), msi_string2id(), MsiGetFileVersionW(), MsiReinstallFeatureW(), MsiSourceListGetInfoW(), MsiViewGetErrorW(), NLS_GetDateTimeFormatW(), NLS_GetGeoFriendlyName(), NLS_GetLocaleString(), nsChannelBSC_beginning_transaction(), nsTooltipTextProvider_GetNodeText(), nsUploadChannel_SetUploadStream(), ntlm_GetCachedCredential(), open_connection(), OpenColorProfileW(), Output(), parse_classid(), parse_content_type(), parse_cookie(), parse_extern_script(), parse_header(), parse_value(), ParseAceStringFlags(), ParseAceStringRights(), ParseAceStringType(), parser_add_table(), ParseURLW(), PathAddBackslashW(), PathAddExtensionW(), PathCleanupSpec(), PathCombineW(), PathCompactPathExW(), PathCompactPathW(), PathFindNextComponentW(), PathFindSuffixArrayW(), PathIsDirectoryEmptyW(), PathIsPrefixW(), PathProcessCommandW(), PathQuoteSpacesW(), PathRelativePathToW(), PathRemoveBackslashW(), PathRenameExtensionW(), PathStripPathW(), PathUnExpandEnvStringsW(), PathUnquoteSpacesW(), process_header(), process_host_port(), process_state_property(), processRegLinesW(), processSetValue(), PROFILE_CopyEntry(), PROFILE_Find(), PROFILE_GetSection(), PROFILE_GetSectionNames(), PROFILE_GetString(), PROFILE_Open(), PROFILE_Save(), PROFILE_SetString(), promptdisk_ok(), PROPSHEET_SetTitleW(), push_string(), query_feature_state(), query_headers(), query_prop(), range_to_string(), RealGetWindowClassA(), register_dll(), register_dlls_callback(), register_verb(), RegisterMIMETypeForExtensionW(), registry_callback(), registry_write_credential(), remove_quotes(), RenderFILENAMEW(), RenderHDROP(), request_get_codepage(), request_send(), resolve_keypath(), ResProtocol_Start(), ResProtocolInfo_ParseUrl(), RtlCreateActivationContext(), RtlInitUnicodeString(), RtlQueryInformationActivationContext(), RunDlg_GetParentDir(), sc_FNNOTIFY_W(), set_channel_http_header(), set_cookies(), set_environment(), set_print_template(), SetActivePwrScheme(), SetLastID(), SetLocaleInfoW(), SetMenuItemInfoW(), SETUP_CreateDevicesListFromEnumerator(), SetupCopyOEMInfW(), SETUPDI_CreateDrvKey(), SetupDiBuildDriverInfoList(), SetupDiCallClassInstaller(), SetupDiCreateDeviceInfoListExW(), SetupDiGetActualSectionToInstallExW(), SetupDiGetDeviceRegistryPropertyW(), SetupDiInstallClassExW(), SetupDiInstallDevice(), SetupDiInstallDeviceInterfaces(), SetupDiInstallDriverFiles(), SetupDiRegisterCoDeviceInstallers(), SetupEnumInfSectionsW(), SetupGetInfFileListW(), SetupGetTargetPathW(), SetupInstallFileW(), SetupInstallServicesFromInfSectionExW(), SetupOpenInfFileW(), SetupPromptForDiskW(), SetupQueueCopySectionW(), SetupSetDirectoryIdW(), SetUserGeoID(), SHAboutInfoW(), SHELL_execute(), SHELL_execute_url(), SHELL_translate_idlist(), SHGetIniStringW(), SHGetNewLinkInfoW(), SHGetWebFolderFilePathW(), SHStringFromGUIDW(), SHStripMneumonicW(), SHUnicodeToAnsiCP(), source_matches_volume(), split_multi_string_values(), STATUSBAR_GetTextLength(), STATUSBAR_GetTextW(), STATUSBAR_SetTextT(), STATUSBAR_WMCreate(), STATUSBAR_WMGetText(), STATUSBAR_WMSetText(), str_dup_upper(), Str_GetPtrW(), Str_SetPtrW(), str_to_buffer(), str_to_wire(), StrCatBuffW(), StrCatChainW(), strcatW(), strdupW(), StrDupW(), StrFromTimeIntervalW(), strip_spaces(), StrNCatW(), StrRChrIW(), StrRChrW(), StrRetToBufW(), StrRStrIW(), StrStrIW(), StrStrNIW(), StrStrNW(), StrToOleStrW(), StrTrimW(), substrz(), SymMatchFileNameW(), SYSLINK_AppendDocItem(), SYSLINK_ParseText(), taskdialog_add_control(), taskdialog_get_text_extent(), TEXT_Ellipsify(), TEXT_PathEllipsify(), TOOLBAR_AddStringW(), TOOLBAR_GetButtonText(), TOOLBAR_GetStringW(), TOOLBAR_MapAccelerator(), TOOLBAR_MeasureString(), TOOLBAR_TTGetDispInfo(), TOOLTIPS_GetTextLength(), TOOLTIPS_OnWMGetText(), TOOLTIPS_SetTitleT(), TREEVIEW_Command(), TREEVIEW_ComputeTextWidth(), TREEVIEW_CreateDragImage(), TREEVIEW_DrawItem(), TREEVIEW_EditLabel(), Typelib_EnumResNameProc(), UnDecorateSymbolNameW(), URL_ApplyDefault(), URL_CreateFromPath(), URL_GuessScheme(), url_matches(), URL_ParseUrl(), urlcache_create_file_pathW(), UrlCanonicalizeW(), UrlCombineW(), UrlCompareW(), UrlIsW(), wcscpy_s(), wcsncat_s(), wcsncpy_s(), wcsrtombs_l(), wine_fold_string(), winhttp_request_SetRequestHeader(), WinHttpCrackUrl(), WinHttpCreateUrl(), WinHttpSendRequest(), WinHttpSetDefaultProxyConfiguration(), WININET_GetAuthRealm(), WININET_GetSetPassword(), write_output_buffer(), WritePrivateProfileSectionW(), WritePwrScheme(), wstrbuf_append_node(), and xml_elem_cmp().

◆ strlwrW()

WINE_UNICODE_INLINE WCHAR* strlwrW ( WCHAR str)

Definition at line 281 of file unicode.h.

282 {
283  WCHAR *ret = str;
284  while ((*str = tolowerW(*str))) str++;
285  return ret;
286 }
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180
WINE_UNICODE_INLINE WCHAR tolowerW(WCHAR ch)
Definition: unicode.h:135
int ret

Referenced by CharLowerW(), and ListBoxWndProc_common().

◆ strncmpiW()

int strncmpiW ( const WCHAR str1,
const WCHAR str2,
int  n 
)

Definition at line 43 of file string.c.

44 {
45  int ret = 0;
46  for ( ; n > 0; n--, str1++, str2++)
47  if ((ret = tolowerW(*str1) - tolowerW(*str2)) || !*str1) break;
48  return ret;
49 }
GLdouble n
Definition: glext.h:7729
WINE_UNICODE_INLINE WCHAR tolowerW(WCHAR ch)
Definition: unicode.h:135
int ret

Referenced by StrStrNIW().

◆ strncmpW()

◆ strpbrkW()

WINE_UNICODE_INLINE WCHAR* strpbrkW ( const WCHAR str,
const WCHAR accept 
)

Definition at line 261 of file unicode.h.

262 {
263  for ( ; *str; str++) if (strchrW( accept, *str )) return (WCHAR *)(ULONG_PTR)str;
264  return NULL;
265 }
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
SOCKET WSAAPI accept(IN SOCKET s, OUT LPSOCKADDR addr, OUT INT FAR *addrlen)
Definition: socklife.c:23
#define ULONG_PTR
Definition: config.h:101

Referenced by processRegLinesW(), StrPBrkW(), and UrlCombineW().

◆ strrchrW()

WINE_UNICODE_INLINE WCHAR* strrchrW ( const WCHAR str,
WCHAR  ch 
)

Definition at line 254 of file unicode.h.

255 {
256  WCHAR *ret = NULL;
257  do { if (*str == ch) ret = (WCHAR *)(ULONG_PTR)str; } while (*str++);
258  return ret;
259 }
uint32_t ULONG_PTR
Definition: typedefs.h:64
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret

Referenced by ACTION_AppSearchComponents(), ACTION_CustomAction(), ACTION_ProcessComponents(), add_wildcard(), BrsFolder_Treeview_Rename(), cabinet_copy_file(), compareExt(), copy_install_file(), create_full_pathW(), CreateDeviceInfo(), CreateInfFileDetails(), CRYPT_FileNameOpenStoreW(), dde_connect(), delete_key(), DIALOG_DlgDirListW(), escape_url(), extract_cabinet_file(), FTP_FtpFindFirstFileW(), get_duplicate_filename(), get_file_type(), get_inf_dir(), get_link_file(), get_uri_path(), HANDLE_CustomType23(), handle_redirect(), HTTP_ProcessCookies(), InfIsFromOEMLocation(), ITERATE_InstallODBCDriver(), ITERATE_InstallODBCTranslator(), ITERATE_MoveFiles(), ITERATE_RegisterFonts(), ITERATE_UnpublishIcon(), ITERATE_UnregisterFonts(), ITERATE_WriteEnvironmentString(), lookup_winsxs(), MCI_GetDevTypeFromFileName(), MLLoadLibraryW(), move_files_wildcard(), msi_apply_transforms(), msi_create_full_path(), msi_import_stream_filename(), MSI_InstallPackage(), MSI_OpenPackageW(), msi_publish_sourcelist(), msi_set_sourcedir_props(), MsiSourceListGetInfoW(), processRegEntry(), promptdisk_browse(), ready_media(), RtlCreateActivationContext(), set_cookies(), SetLocaleInfoW(), SetupQueryInfOriginalFileInformationW(), SHGetNewLinkInfoW(), taskdialog_get_exe_name(), TEXT_PathEllipsify(), UrlCanonicalizeW(), UrlCombineW(), wildcard_to_file(), and WININET_GetAuthRealm().

◆ strspnW()

WINE_UNICODE_INLINE size_t strspnW ( const WCHAR str,
const WCHAR accept 
)

Definition at line 267 of file unicode.h.

268 {
269  const WCHAR *ptr;
270  for (ptr = str; *ptr; ptr++) if (!strchrW( accept, *ptr )) break;
271  return ptr - str;
272 }
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
static PVOID ptr
Definition: dispmode.c:27
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180
SOCKET WSAAPI accept(IN SOCKET s, OUT LPSOCKADDR addr, OUT INT FAR *addrlen)
Definition: socklife.c:23

Referenced by StrSpnW().

◆ strstrW()

WCHAR* strstrW ( const WCHAR str,
const WCHAR sub 
)

Definition at line 59 of file string.c.

60 {
61  while (*str)
62  {
63  const WCHAR *p1 = str, *p2 = sub;
64  while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; }
65  if (!*p2) return (WCHAR *)str;
66  str++;
67  }
68  return NULL;
69 }
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by StrStrW().

◆ strtolW()

long int strtolW ( const WCHAR nptr,
WCHAR **  endptr,
int  base 
)

Definition at line 74 of file string.c.

75 {
76  int negative;
77  register unsigned long int cutoff;
78  register unsigned int cutlim;
79  register unsigned long int i;
80  register const WCHAR *s;
81  register WCHAR c;
82  const WCHAR *save, *end;
83  int overflow;
84 
85  if (base < 0 || base == 1 || base > 36) return 0;
86 
87  save = s = nptr;
88 
89  /* Skip white space. */
90  while (isspaceW (*s))
91  ++s;
92  if (!*s) goto noconv;
93 
94  /* Check for a sign. */
95  negative = 0;
96  if (*s == '-')
97  {
98  negative = 1;
99  ++s;
100  }
101  else if (*s == '+')
102  ++s;
103 
104  /* Recognize number prefix and if BASE is zero, figure it out ourselves. */
105  if (*s == '0')
106  {
107  if ((base == 0 || base == 16) && toupperW(s[1]) == 'X')
108  {
109  s += 2;
110  base = 16;
111  }
112  else if (base == 0)
113  base = 8;
114  }
115  else if (base == 0)
116  base = 10;
117 
118  /* Save the pointer so we can check later if anything happened. */
119  save = s;
120  end = NULL;
121 
122  cutoff = ULONG_MAX / (unsigned long int) base;
123  cutlim = ULONG_MAX % (unsigned long int) base;
124 
125  overflow = 0;
126  i = 0;
127  c = *s;
128  for (;c != '\0'; c = *++s)
129  {
130  if (s == end)
131  break;
132  if (c >= '0' && c <= '9')
133  c -= '0';
134  else if (isalphaW (c))
135  c = toupperW (c) - 'A' + 10;
136  else
137  break;
138  if ((int) c >= base)
139  break;
140  /* Check for overflow. */
141  if (i > cutoff || (i == cutoff && c > cutlim))
142  overflow = 1;
143  else
144  {
145  i *= (unsigned long int) base;
146  i += c;
147  }
148  }
149 
150  /* Check if anything actually happened. */
151  if (s == save)
152  goto noconv;
153 
154  /* Store in ENDPTR the address of one character
155  past the last character we converted. */
156  if (endptr != NULL)
157  *endptr = (WCHAR *)s;
158 
159  /* Check for a value that is within the range of
160  `unsigned LONG int', but outside the range of `LONG int'. */
161  if (overflow == 0
162  && i > (negative
163  ? -((unsigned long int) (LONG_MIN + 1)) + 1
164  : (unsigned long int) LONG_MAX))
165  overflow = 1;
166 
167  if (overflow)
168  {
169  errno = ERANGE;
170  return negative ? LONG_MIN : LONG_MAX;
171  }
172 
173  /* Return the result of the appropriate sign. */
174  return negative ? -i : i;
175 
176 noconv:
177  /* We must handle a special case here: the base is 0 or 16 and the
178  first two characters are '0' and 'x', but the rest are not
179  hexadecimal digits. This is no error case. We return 0 and
180  ENDPTR points to the `x`. */
181  if (endptr != NULL)
182  {
183  if (save - nptr >= 2 && toupperW (save[-1]) == 'X'
184  && save[-2] == '0')
185  *endptr = (WCHAR *)&save[-1];
186  else
187  /* There was no number to convert. */
188  *endptr = (WCHAR *)nptr;
189  }
190 
191  return 0L;
192 }
WINE_UNICODE_INLINE int isspaceW(WCHAR wc)
Definition: unicode.h:165
GLuint GLuint end
Definition: gl.h:1545
int errno
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLuint base
Definition: 3dtext.c:35
smooth NULL
Definition: ftsmooth.c:416
WINE_UNICODE_INLINE WCHAR toupperW(WCHAR ch)
Definition: unicode.h:141
__wchar_t WCHAR
Definition: xmlstorage.h:180
const GLubyte * c
Definition: glext.h:8905
#define LONG_MAX
Definition: limits.h:43
#define ERANGE
Definition: acclib.h:92
static const WCHAR L[]
Definition: oid.c:1250
GLdouble s
Definition: gl.h:2039
static char int
Definition: string.c:71
#define c
Definition: ke_i.h:80
#define LONG_MIN
Definition: limits.h:42
WINE_UNICODE_INLINE int isalphaW(WCHAR wc)
Definition: unicode.h:195
#define ULONG_MAX
Definition: limits.h:44

Referenced by atolW().

◆ strtoulW()

unsigned long int strtoulW ( const WCHAR nptr,
WCHAR **  endptr,
int  base 
)

Definition at line 195 of file string.c.

196 {
197  int negative;
198  register unsigned long int cutoff;
199  register unsigned int cutlim;
200  register unsigned long int i;
201  register const WCHAR *s;
202  register WCHAR c;
203  const WCHAR *save, *end;
204  int overflow;
205 
206  if (base < 0 || base == 1 || base > 36) return 0;
207 
208  save = s = nptr;
209 
210  /* Skip white space. */
211  while (isspaceW (*s))
212  ++s;
213  if (!*s) goto noconv;
214 
215  /* Check for a sign. */
216  negative = 0;
217  if (*s == '-')
218  {
219  negative = 1;
220  ++s;
221  }
222  else if (*s == '+')
223  ++s;
224 
225  /* Recognize number prefix and if BASE is zero, figure it out ourselves. */
226  if (*s == '0')
227  {
228  if ((base == 0 || base == 16) && toupperW(s[1]) == 'X')
229  {
230  s += 2;
231  base = 16;
232  }
233  else if (base == 0)
234  base = 8;
235  }
236  else if (base == 0)
237  base = 10;
238 
239  /* Save the pointer so we can check later if anything happened. */
240  save = s;
241  end = NULL;
242 
243  cutoff = ULONG_MAX / (unsigned long int) base;
244  cutlim = ULONG_MAX % (unsigned long int) base;
245 
246  overflow = 0;
247  i = 0;
248  c = *s;
249  for (;c != '\0'; c = *++s)
250  {
251  if (s == end)
252  break;
253  if (c >= '0' && c <= '9')
254  c -= '0';
255  else if (isalphaW (c))
256  c = toupperW (c) - 'A' + 10;
257  else
258  break;
259  if ((int) c >= base)
260  break;
261  /* Check for overflow. */
262  if (i > cutoff || (i == cutoff && c > cutlim))
263  overflow = 1;
264  else
265  {
266  i *= (unsigned long int) base;
267  i += c;
268  }
269  }
270 
271  /* Check if anything actually happened. */
272  if (s == save)
273  goto noconv;
274 
275  /* Store in ENDPTR the address of one character
276  past the last character we converted. */
277  if (endptr != NULL)
278  *endptr = (WCHAR *)s;
279 
280  if (overflow)
281  {
282  errno = ERANGE;
283  return ULONG_MAX;
284  }
285 
286  /* Return the result of the appropriate sign. */
287  return negative ? -i : i;
288 
289 noconv:
290  /* We must handle a special case here: the base is 0 or 16 and the
291  first two characters are '0' and 'x', but the rest are not
292  hexadecimal digits. This is no error case. We return 0 and
293  ENDPTR points to the `x`. */
294  if (endptr != NULL)
295  {
296  if (save - nptr >= 2 && toupperW (save[-1]) == 'X'
297  && save[-2] == '0')
298  *endptr = (WCHAR *)&save[-1];
299  else
300  /* There was no number to convert. */
301  *endptr = (WCHAR *)nptr;
302  }
303 
304  return 0L;
305 }
WINE_UNICODE_INLINE int isspaceW(WCHAR wc)
Definition: unicode.h:165
GLuint GLuint end
Definition: gl.h:1545
int errno
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLuint base
Definition: 3dtext.c:35
smooth NULL
Definition: ftsmooth.c:416
WINE_UNICODE_INLINE WCHAR toupperW(WCHAR ch)
Definition: unicode.h:141
__wchar_t WCHAR
Definition: xmlstorage.h:180
const GLubyte * c
Definition: glext.h:8905
#define ERANGE
Definition: acclib.h:92
static const WCHAR L[]
Definition: oid.c:1250
GLdouble s
Definition: gl.h:2039
static char int
Definition: string.c:71
#define c
Definition: ke_i.h:80
WINE_UNICODE_INLINE int isalphaW(WCHAR wc)
Definition: unicode.h:195
#define ULONG_MAX
Definition: limits.h:44

◆ struprW()

WINE_UNICODE_INLINE WCHAR* struprW ( WCHAR str)

Definition at line 288 of file unicode.h.

289 {
290  WCHAR *ret = str;
291  while ((*str = toupperW(*str))) str++;
292  return ret;
293 }
const WCHAR * str
WINE_UNICODE_INLINE WCHAR toupperW(WCHAR ch)
Definition: unicode.h:141
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret

Referenced by CharUpperW(), ListBoxWndProc_common(), and msi_parse_command_line().

◆ tolowerW()

◆ toupperW()

◆ vsnprintfW()

int vsnprintfW ( WCHAR str,
size_t  len,
const WCHAR format,
va_list  valist 
)

Definition at line 363 of file string.c.

364 {
365  unsigned int written = 0;
366  const WCHAR *iter = format;
367  char bufa[512], fmtbufa[64], *fmta;
368 
369  while (*iter)
370  {
371  while (*iter && *iter != '%')
372  {
373  if (written++ < len)
374  *str++ = *iter;
375  iter++;
376  }
377  if (*iter == '%')
378  {
379  if (iter[1] == '%')
380  {
381  if (written++ < len)
382  *str++ = '%'; /* "%%"->'%' */
383  iter += 2;
384  continue;
385  }
386 
387  fmta = fmtbufa;
388  *fmta++ = *iter++;
389  while (*iter == '0' ||
390  *iter == '+' ||
391  *iter == '-' ||
392  *iter == ' ' ||
393  *iter == '*' ||
394  *iter == '#')
395  {
396  if (*iter == '*')
397  {
398  char *buffiter = bufa;
399  int fieldlen = va_arg(valist, int);
400  sprintf(buffiter, "%d", fieldlen);
401  while (*buffiter)
402  *fmta++ = *buffiter++;
403  }
404  else
405  *fmta++ = *iter;
406  iter++;
407  }
408 
409  while (isdigit(*iter))
410  *fmta++ = *iter++;
411 
412  if (*iter == '.')
413  {
414  *fmta++ = *iter++;
415  if (*iter == '*')
416  {
417  char *buffiter = bufa;
418  int fieldlen = va_arg(valist, int);
419  sprintf(buffiter, "%d", fieldlen);
420  while (*buffiter)
421  *fmta++ = *buffiter++;
422  iter++;
423  }
424  else
425  while (isdigit(*iter))
426  *fmta++ = *iter++;
427  }
428  if (*iter == 'h' || *iter == 'l')
429  *fmta++ = *iter++;
430 
431  switch (*iter)
432  {
433  case 's':
434  {
435  static const WCHAR none[] = { '(','n','u','l','l',')',0 };
436  const WCHAR *wstr = va_arg(valist, const WCHAR *);
437  size_t remaining = written < len ? len - written : 0;
438  size_t count;
439 
440  *fmta++ = 's';
441  *fmta = 0;
442  count = format_string( str, remaining, fmtbufa, wstr ? wstr : none, -1 );
443  str += min( count, remaining );
444  written += count;
445  iter++;
446  break;
447  }
448 
449  case 'c':
450  {
451  WCHAR wstr;
452  size_t remaining = written < len ? len - written : 0;
453  size_t count;
454 
455  wstr = va_arg(valist, int);
456  *fmta++ = 's';
457  *fmta = 0;
458  count = format_string( str, remaining, fmtbufa, &wstr, 1 );
459  str += min( count, remaining );
460  written += count;
461  iter++;
462  break;
463  }
464 
465  default:
466  {
467  /* For non wc types, use system sprintf and append to wide char output */
468  /* FIXME: for unrecognised types, should ignore % when printing */
469  char *bufaiter = bufa;
470  if (*iter == 'p')
471 #ifdef __REACTOS__
472  sprintf(bufaiter, "%p", va_arg(valist, void*));
473 #else
474  sprintf(bufaiter, "%0*lX", 2 * (int)sizeof(void*),
475  (unsigned long)va_arg(valist, void *));
476 #endif
477  else
478  {
479  *fmta++ = *iter;
480  *fmta = '\0';
481  if (*iter == 'a' || *iter == 'A' ||
482  *iter == 'e' || *iter == 'E' ||
483  *iter == 'f' || *iter == 'F' ||
484  *iter == 'g' || *iter == 'G')
485  sprintf(bufaiter, fmtbufa, va_arg(valist, double));
486  else
487  {
488  /* FIXME: On 32 bit systems this doesn't handle int 64's. */
489  sprintf(bufaiter, fmtbufa, va_arg(valist, void *));
490  }
491  }
492  while (*bufaiter)
493  {
494  if (written++ < len)
495  *str++ = *bufaiter;
496  bufaiter++;
497  }
498  iter++;
499  break;
500  }
501  }
502  }
503  }
504  if (len)
505  {
506  if (written >= len)
507  str--;
508  *str++ = 0;
509  }
510 
511  /* FIXME: POSIX [v]snprintf() returns the equivalent of written, not -1, on short buffer. */
512  return written < len ? (int)written : -1;
513 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define sprintf(buf, format,...)
Definition: sprintf.c:55
const WCHAR * str
#define isdigit(c)
Definition: acclib.h:68
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLenum GLsizei len
Definition: glext.h:6722
#define va_arg(ap, T)
Definition: acmsvcex.h:89
static char int
Definition: string.c:71
#define min(a, b)
Definition: monoChain.cc:55
static size_t const unsigned char size_t count
Definition: string.c:63
static __ms_va_list valist
Definition: printf.c:64
static size_t format_string(WCHAR *buffer, size_t len, const char *format, const WCHAR *str, int str_len)
Definition: string.c:309

Referenced by snprintfW(), sprintfW(), and vsprintfW().

◆ vsprintfW()

int vsprintfW ( WCHAR str,
const WCHAR format,
va_list  valist 
)

Definition at line 515 of file string.c.

516 {
517  return vsnprintfW( str, INT_MAX, format, valist );
518 }
#define INT_MAX
Definition: limits.h:40
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
const WCHAR * str
static __ms_va_list valist
Definition: printf.c:64
int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist)
Definition: string.c:363

◆ wine_compare_string()

int wine_compare_string ( int  flags,
const WCHAR str1,
int  len1,
const WCHAR str2,
int  len2 
)

Definition at line 358 of file sortkey.c.

360 {
361  int ret;
362 
363  ret = compare_unicode_weights(flags, str1, len1, str2, len2);
364  if (!ret)
365  {
366  if (!(flags & NORM_IGNORENONSPACE))
367  ret = compare_diacritic_weights(flags, str1, len1, str2, len2);
368  if (!ret && !(flags & NORM_IGNORECASE))
369  ret = compare_case_weights(flags, str1, len1, str2, len2);
370  }
371  return ret;
372 }
static int compare_diacritic_weights(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
Definition: sortkey.c:240
static int compare_unicode_weights(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
Definition: sortkey.c:159
#define NORM_IGNORECASE
Definition: winnls.h:173
static int compare_case_weights(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
Definition: sortkey.c:299
GLbitfield flags
Definition: glext.h:7161
int ret
#define NORM_IGNORENONSPACE
Definition: winnls.h:175

◆ wine_cp_enum_table()

const union cptable* wine_cp_enum_table ( unsigned int  index)

Definition at line 203 of file cptable.c.

204 {
205  if (index >= ARRAY_SIZE( cptables )) return NULL;
206  return cptables[index];
207 }
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
#define index(s, c)
Definition: various.h:29
static const union cptable *const cptables[73]
Definition: cptable.c:105
#define ARRAY_SIZE(x)
Definition: cptable.c:26

◆ wine_cp_get_table()

const union cptable* wine_cp_get_table ( unsigned int  codepage)

Definition at line 192 of file cptable.c.

193 {
194  const union cptable **res;
195 
197  sizeof(cptables[0]), cmp_codepage ))) return NULL;
198  return *res;
199 }
int codepage
Definition: win_iconv.c:156
smooth NULL
Definition: ftsmooth.c:416
static const union cptable *const cptables[73]
Definition: cptable.c:105
static int cmp_codepage(const void *codepage, const void *entry)
Definition: cptable.c:185
GLuint res
Definition: glext.h:9613
#define ARRAY_SIZE(x)
Definition: cptable.c:26
#define bsearch

◆ wine_cp_mbstowcs()

int wine_cp_mbstowcs ( const union cptable table,
int  flags,
const char src,
int  srclen,
WCHAR dst,
int  dstlen 
)

Definition at line 265 of file mbtowc.c.

268 {
269  const unsigned char *src = (const unsigned char*) s;
270 
271  if (table->info.char_size == 1)
272  {
274  {
275  if (check_invalid_chars_sbcs( &table->sbcs, flags, src, srclen )) return -2;
276  }
277  if (!(flags & MB_COMPOSITE))
278  {
279  if (!dstlen) return srclen;
280  return mbstowcs_sbcs( &table->sbcs, flags, src, srclen, dst, dstlen );
281  }
282  return mbstowcs_sbcs_decompose( &table->sbcs, flags, src, srclen, dst, dstlen );
283  }
284  else /* mbcs */
285  {
287  {
288  if (check_invalid_chars_dbcs( &table->dbcs, src, srclen )) return -2;
289  }
290  if (!(flags & MB_COMPOSITE))
291  return mbstowcs_dbcs( &table->dbcs, src, srclen, dst, dstlen );
292  else
293  return mbstowcs_dbcs_decompose( &table->dbcs, src, srclen, dst, dstlen );
294  }
295 }
static int mbstowcs_sbcs(const struct sbcs_table *table, int flags, const unsigned char *src, unsigned int srclen, WCHAR *dst, unsigned int dstlen)
Definition: mbtowc.c:54
#define MB_ERR_INVALID_CHARS
Definition: unicode.h:41
static int check_invalid_chars_sbcs(const struct sbcs_table *table, int flags, const unsigned char *src, unsigned int srclen)
Definition: mbtowc.c:35
#define MB_COMPOSITE
Definition: unicode.h:40
static int check_invalid_chars_dbcs(const struct dbcs_table *table, const unsigned char *src, unsigned int srclen)
Definition: mbtowc.c:162
static int mbstowcs_dbcs(const struct dbcs_table *table, const unsigned char *src, unsigned int srclen, WCHAR *dst, unsigned int dstlen)
Definition: mbtowc.c:191
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:51
GLbitfield flags
Definition: glext.h:7161
static int mbstowcs_sbcs_decompose(const struct sbcs_table *table, int flags, const unsigned char *src, unsigned int srclen, WCHAR *dst, unsigned int dstlen)
Definition: mbtowc.c:117
GLdouble s
Definition: gl.h:2039
GLenum src
Definition: glext.h:6340
static int mbstowcs_dbcs_decompose(const struct dbcs_table *table, const unsigned char *src, unsigned int srclen, WCHAR *dst, unsigned int dstlen)
Definition: mbtowc.c:218
static DWORD dstlen
Definition: directory.c:51
GLenum GLenum dst
Definition: glext.h:6340

◆ wine_cp_wcstombs()

int wine_cp_wcstombs ( const union cptable table,
int  flags,
const WCHAR src,
int  srclen,
char dst,
int  dstlen,
const char defchar,
int used 
)

Definition at line 411 of file wctomb.c.

414 {
415  if (table->info.char_size == 1)
416  {
417  if (flags || defchar || used)
418  {
419  if (!dstlen) return get_length_sbcs( &table->sbcs, flags, src, srclen, used );
420  return wcstombs_sbcs_slow( &table->sbcs, flags, src, srclen,
421  dst, dstlen, defchar, used );
422  }
423  if (!dstlen) return srclen;
424  return wcstombs_sbcs( &table->sbcs, src, srclen, dst, dstlen );
425  }
426  else /* mbcs */
427  {
428  if (!dstlen) return get_length_dbcs( &table->dbcs, flags, src, srclen, defchar, used );
429  if (flags || defchar || used)
430  return wcstombs_dbcs_slow( &table->dbcs, flags, src, srclen,
431  dst, dstlen, defchar, used );
432  return wcstombs_dbcs( &table->dbcs, src, srclen, dst, dstlen );
433  }
434 }
static int wcstombs_dbcs_slow(const struct dbcs_table *table, int flags, const WCHAR *src, unsigned int srclen, char *dst, unsigned int dstlen, const char *defchar, int *used)
Definition: wctomb.c:341
static int wcstombs_sbcs_slow(const struct sbcs_table *table, int flags, const WCHAR *src, unsigned int srclen, char *dst, unsigned int dstlen, const char *defchar, int *used)
Definition: wctomb.c:156
c used
Definition: write.c:2857
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:51
static int get_length_dbcs(const struct dbcs_table *table, int flags, const WCHAR *src, unsigned int srclen, const char *defchar, int *used)
Definition: wctomb.c:249
GLbitfield flags
Definition: glext.h:7161
static int wcstombs_dbcs(const struct dbcs_table *table, const WCHAR *src, unsigned int srclen, char *dst, unsigned int dstlen)
Definition: wctomb.c:317
GLenum src
Definition: glext.h:6340
static int wcstombs_sbcs(const struct sbcs_table *table, const WCHAR *src, unsigned int srclen, char *dst, unsigned int dstlen)
Definition: wctomb.c:92
static DWORD dstlen
Definition: directory.c:51
GLenum GLenum dst
Definition: glext.h:6340
static int get_length_sbcs(const struct sbcs_table *table, int flags, const WCHAR *src, unsigned int srclen, int *used)
Definition: wctomb.c:40

◆ wine_cpsymbol_mbstowcs()

int wine_cpsymbol_mbstowcs ( const char src,
int  srclen,
WCHAR dst,
int  dstlen 
)

◆ wine_cpsymbol_wcstombs()

int wine_cpsymbol_wcstombs ( const WCHAR src,
int  srclen,
char dst,
int  dstlen 
)

◆ wine_fold_string()

int wine_fold_string ( int  flags,
const WCHAR src,
int  srclen,
WCHAR dst,
int  dstlen 
)

Definition at line 118 of file fold.c.

119 {
120  WCHAR *dstbase = dst;
121  const WCHAR *expand;
122  int i;
123 
124  if (srclen == -1)
125  srclen = strlenW(src) + 1; /* Include terminating NUL in count */
126 
127  if (!dstlen)
128  {
129  /* Calculate the required size for dst */
130  dstlen = srclen;
131 
132  if (flags & MAP_EXPAND_LIGATURES)
133  {
134  while (srclen--)
135  {
137  src++;
138  }
139  }
140  else if (flags & MAP_COMPOSITE)
141  {
142  /* FIXME */
143  }
144  else if (flags & MAP_PRECOMPOSED)
145  {
146  /* FIXME */
147  }
148  return dstlen;
149  }
150 
151  if (srclen > dstlen)
152  return 0;
153 
154  dstlen -= srclen;
155 
156  /* Actually perform the mapping(s) specified */
157  for (i = 0; i < srclen; i++)
158  {
159  WCHAR ch = *src;
160 
161  if (flags & MAP_EXPAND_LIGATURES)
162  {
163  expand = get_ligature(ch);
164  if (expand[0])
165  {
166  if (!dstlen--)
167  return 0;
168  dst[0] = expand[0];
169  if (expand[2])
170  {
171  if (!dstlen--)
172  return 0;
173  *++dst = expand[1];
174  ch = expand[2];
175  }
176  else
177  ch = expand[1];
178  dst++;
179  }
180  }
181  else if (flags & MAP_COMPOSITE)
182  {
183  /* FIXME */
184  }
185  else if (flags & MAP_PRECOMPOSED)
186  {
187  /* FIXME */
188  }
189  if (flags & MAP_FOLDDIGITS)
190  ch = to_unicode_digit(ch);
191  if (flags & MAP_FOLDCZONE)
192  ch = to_unicode_native(ch);
193 
194  *dst++ = ch;
195  src++;
196  }
197  return dst - dstbase;
198 }
#define MAP_FOLDDIGITS
Definition: winnls.h:211
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define MAP_COMPOSITE
Definition: winnls.h:213
#define MAP_FOLDCZONE
Definition: winnls.h:210
static const WCHAR * get_ligature(WCHAR wc)
Definition: fold.c:100
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static WCHAR to_unicode_native(WCHAR ch)
Definition: fold.c:29
#define MAP_PRECOMPOSED
Definition: winnls.h:212
static BOOL expand(LPINT ac, LPTSTR **arg, LPCTSTR pattern)
Definition: misc.c:214
static int get_ligature_len(WCHAR wc)
Definition: fold.c:84
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:51
GLbitfield flags
Definition: glext.h:7161
GLenum src
Definition: glext.h:6340
static DWORD dstlen
Definition: directory.c:51
GLenum GLenum dst
Definition: glext.h:6340
static WCHAR to_unicode_digit(WCHAR ch)
Definition: fold.c:23

◆ wine_get_sortkey()

int wine_get_sortkey ( int  flags,
const WCHAR src,
int  srclen,
char dst,
int  dstlen 
)

Definition at line 33 of file sortkey.c.

34 {
35  WCHAR dummy[4]; /* no decomposition is larger than 4 chars */
36  int key_len[4];
37  char *key_ptr[4];
38  const WCHAR *src_save = src;
39  int srclen_save = srclen;
40 
41  key_len[0] = key_len[1] = key_len[2] = key_len[3] = 0;
42  for (; srclen; srclen--, src++)
43  {
44  unsigned int i, decomposed_len = 1;/*wine_decompose(*src, dummy, 4);*/
45  dummy[0] = *src;
46  if (decomposed_len)
47  {
48  for (i = 0; i < decomposed_len; i++)
49  {
50  WCHAR wch = dummy[i];
51  unsigned int ce;
52 
53  /* tests show that win2k just ignores NORM_IGNORENONSPACE,
54  * and skips white space and punctuation characters for
55  * NORM_IGNORESYMBOLS.
56  */
58  continue;
59 
60  if (flags & NORM_IGNORECASE) wch = tolowerW(wch);
61 
62  ce = collation_table[collation_table[wch >> 8] + (wch & 0xff)];
63  if (ce != (unsigned int)-1)
64  {
65  if (ce >> 16) key_len[0] += 2;
66  if ((ce >> 8) & 0xff) key_len[1]++;
67  if ((ce >> 4) & 0x0f) key_len[2]++;
68  if (ce & 1)
69  {
70  if (wch >> 8) key_len[3]++;
71  key_len[3]++;
72  }
73  }
74  else
75  {
76  key_len[0] += 2;
77  if (wch >> 8) key_len[0]++;
78  if (wch & 0xff) key_len[0]++;
79  }
80  }
81  }
82  }
83 
84  if (!dstlen) /* compute length */
85  /* 4 * '\1' + 1 * '\0' + key length */
86  return key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4 + 1;
87 
88  if (dstlen < key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4 + 1)
89  return 0; /* overflow */
90 
91  src = src_save;
92  srclen = srclen_save;
93 
94  key_ptr[0] = dst;
95  key_ptr[1] = key_ptr[0] + key_len[0] + 1;
96  key_ptr[2] = key_ptr[1] + key_len[1] + 1;
97  key_ptr[3] = key_ptr[2] + key_len[2] + 1;
98 
99  for (; srclen; srclen--, src++)
100  {
101  unsigned int i, decomposed_len = 1;/*wine_decompose(*src, dummy, 4);*/
102  dummy[0] = *src;
103  if (decomposed_len)
104  {
105  for (i = 0; i < decomposed_len; i++)
106  {
107  WCHAR wch = dummy[i];
108  unsigned int ce;
109 
110  /* tests show that win2k just ignores NORM_IGNORENONSPACE,
111  * and skips white space and punctuation characters for
112  * NORM_IGNORESYMBOLS.
113  */
114  if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE)))
115  continue;
116 
117  if (flags & NORM_IGNORECASE) wch = tolowerW(wch);
118 
119  ce = collation_table[collation_table[wch >> 8] + (wch & 0xff)];
120  if (ce != (unsigned int)-1)
121  {
122  WCHAR key;
123  if ((key = ce >> 16))
124  {
125  *key_ptr[0]++ = key >> 8;
126  *key_ptr[0]++ = key & 0xff;
127  }
128  /* make key 1 start from 2 */
129  if ((key = (ce >> 8) & 0xff)) *key_ptr[1]++ = key + 1;
130  /* make key 2 start from 2 */
131  if ((key = (ce >> 4) & 0x0f)) *key_ptr[2]++ = key + 1;
132  /* key 3 is always a character code */
133  if (ce & 1)
134  {
135  if (wch >> 8) *key_ptr[3]++ = wch >> 8;
136  if (wch & 0xff) *key_ptr[3]++ = wch & 0xff;
137  }
138  }
139  else
140  {
141  *key_ptr[0]++ = 0xff;
142  *key_ptr[0]++ = 0xfe;
143  if (wch >> 8) *key_ptr[0]++ = wch >> 8;
144  if (wch & 0xff) *key_ptr[0]++ = wch & 0xff;
145  }
146  }
147  }
148  }
149 
150  *key_ptr[0] = '\1';
151  *key_ptr[1] = '\1';
152  *key_ptr[2] = '\1';
153  *key_ptr[3]++ = '\1';
154  *key_ptr[3] = 0;
155 
156  return key_ptr[3] - dst;
157 }
#define NORM_IGNORESYMBOLS
Definition: winnls.h:176
#define NORM_IGNORECASE
Definition: winnls.h:173
const unsigned int collation_table[]
Definition: collation.c:5
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:51
WINE_UNICODE_INLINE WCHAR tolowerW(WCHAR ch)
Definition: unicode.h:135
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149
GLbitfield flags
Definition: glext.h:7161
#define C1_PUNCT
Definition: unicode.h:35
HKEY key
Definition: reg.c:42
GLenum src
Definition: glext.h:6340
static DWORD dstlen
Definition: directory.c:51
GLenum GLenum dst
Definition: glext.h:6340
#define C1_SPACE
Definition: unicode.h:34
Definition: path.c:41

◆ wine_is_dbcs_leadbyte()

WINE_UNICODE_INLINE int wine_is_dbcs_leadbyte ( const union cptable table,
unsigned char  ch 
)

Definition at line 130 of file unicode.h.

131 {
132  return (table->info.char_size == 2) && (table->dbcs.cp2uni_leadbytes[ch]);
133 }

◆ wine_utf8_mbstowcs()

int wine_utf8_mbstowcs ( int  flags,
const char src,
int  srclen,
WCHAR dst,
int  dstlen 
)

Definition at line 304 of file utf8.c.

305 {
306  unsigned int res;
307  const char *srcend = src + srclen;
308  WCHAR *dstend = dst + dstlen;
309 
311 
312  if (!dstlen) return get_length_mbs_utf8( flags, src, srclen );
313 
314  while ((dst < dstend) && (src < srcend))
315  {
316  unsigned char ch = *src++;
317  if (ch < 0x80) /* special fast case for 7-bit ASCII */
318  {
319  *dst++ = ch;
320  continue;
321  }
322  if ((res = decode_utf8_char( ch, &src, srcend )) <= 0xffff)
323  {
324  *dst++ = res;
325  }
326  else if (res <= 0x10ffff) /* we need surrogates */
327  {
328  if (dst == dstend - 1) return -1; /* overflow */
329  res -= 0x10000;
330  *dst++ = 0xd800 | (res >> 10);
331  *dst++ = 0xdc00 | (res & 0x3ff);
332  }
333  else if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */
334  /* otherwise ignore it */
335  }
336  if (src < srcend) return -1; /* overflow */
337  return dstlen - (dstend - dst);
338 }
#define MB_ERR_INVALID_CHARS
Definition: unicode.h:41
#define MB_COMPOSITE
Definition: unicode.h:40
static int get_length_mbs_utf8(int flags, const char *src, int srclen)
Definition: utf8.c:277
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:51
GLbitfield flags
Definition: glext.h:7161
GLenum src
Definition: glext.h:6340
static DWORD dstlen
Definition: directory.c:51
GLenum GLenum dst
Definition: glext.h:6340
GLuint res
Definition: glext.h:9613
static unsigned int decode_utf8_char(unsigned char ch, const char **str, const char *strend)
Definition: utf8.c:161
static int utf8_mbstowcs_compose(int flags, const char *src, int srclen, WCHAR *dst, int dstlen)
Definition: utf8.c:229

◆ wine_utf8_wcstombs()

int wine_utf8_wcstombs ( int  flags,
const WCHAR src,
int  srclen,
char dst,
int  dstlen 
)

Definition at line 98 of file utf8.c.

99 {
100  int len;
101 
102  if (!dstlen) return get_length_wcs_utf8( flags, src, srclen );
103 
104  for (len = dstlen; srclen; srclen--, src++)
105  {
106  WCHAR ch = *src;
107  unsigned int val;
108 
109  if (ch < 0x80) /* 0x00-0x7f: 1 byte */
110  {
111  if (!len--) return -1; /* overflow */
112  *dst++ = ch;
113  continue;
114  }
115 
116  if (ch < 0x800) /* 0x80-0x7ff: 2 bytes */
117  {
118  if ((len -= 2) < 0) return -1; /* overflow */
119  dst[1] = 0x80 | (ch & 0x3f);
120  ch >>= 6;
121  dst[0] = 0xc0 | ch;
122  dst += 2;
123  continue;
124  }
125 
126  if (!(val = get_surrogate_value( src, srclen )))
127  {
128  if (flags & WC_ERR_INVALID_CHARS) return -2;
129  continue;
130  }
131 
132  if (val < 0x10000) /* 0x800-0xffff: 3 bytes */
133  {
134  if ((len -= 3) < 0) return -1; /* overflow */
135  dst[2] = 0x80 | (val & 0x3f);
136  val >>= 6;
137  dst[1] = 0x80 | (val & 0x3f);
138  val >>= 6;
139  dst[0] = 0xe0 | val;
140  dst += 3;
141  }
142  else /* 0x10000-0x10ffff: 4 bytes */
143  {
144  if ((len -= 4) < 0) return -1; /* overflow */
145  dst[3] = 0x80 | (val & 0x3f);
146  val >>= 6;
147  dst[2] = 0x80 | (val & 0x3f);
148  val >>= 6;
149  dst[1] = 0x80 | (val & 0x3f);
150  val >>= 6;
151  dst[0] = 0xf0 | val;
152  dst += 4;
153  src++;
154  srclen--;
155  }
156  }
157  return dstlen - len;
158 }
static unsigned int get_surrogate_value(const WCHAR *src, unsigned int srclen)
Definition: utf8.c:48
GLuint GLfloat * val
Definition: glext.h:7180
static int get_length_wcs_utf8(int flags, const WCHAR *src, unsigned int srclen)
Definition: utf8.c:62
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:51
#define WC_ERR_INVALID_CHARS
Definition: unicode.h:47
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei len
Definition: glext.h:6722
GLenum src
Definition: glext.h:6340
static DWORD dstlen
Definition: directory.c:51
GLenum GLenum dst
Definition: glext.h:6340