ReactOS 0.4.15-dev-7953-g1f49173
stralign.h File Reference
Include dependency graph for stralign.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _STRALIGN_USE_SECURE_CRT   0
 
#define WSTR_ALIGNED(s)   (((DWORD_PTR)(s) & 1) == 0)
 
#define __UA_WCSLEN   ua_wcslen
 
#define __UA_WSTRSIZE(s)   ((__UA_WCSLEN(s)+1)*sizeof(WCHAR))
 
#define __UA_STACKCOPY(p, s)   memcpy(_alloca(s),p,s)
 
#define WSTR_ALIGNED_STACK_COPY(d, s)   { PCUWSTR __ua_src; ULONG __ua_size; PWSTR __ua_dst; __ua_src = (s); if(WSTR_ALIGNED(__ua_src)) { __ua_dst = (PWSTR)__ua_src; } else { __ua_size = __UA_WSTRSIZE(__ua_src); __ua_dst = (PWSTR)_alloca(__ua_size); memcpy(__ua_dst,__ua_src,__ua_size); } *(d) = (PCWSTR)__ua_dst; }
 
#define ASTR_ALIGNED_STACK_COPY(d, s)   (*(d) = (PCSTR)(s))
 
#define __UA_STRUC_ALIGNED(t, s)   (((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1))==0)
 
#define STRUC_ALIGNED_STACK_COPY(t, s)   __UA_STRUC_ALIGNED(t,s) ? ((t const *)(s)) : ((t const *)__UA_STACKCOPY((s),sizeof(t)))
 
#define TSTR_ALIGNED_STACK_COPY(d, s)   ASTR_ALIGNED_STACK_COPY(d,s)
 
#define TSTR_ALIGNED(x)   TRUE
 
#define ua_CharUpper   CharUpperA
 
#define ua_lstrcmp   lstrcmpA
 
#define ua_lstrcmpi   lstrcmpiA
 
#define ua_lstrlen   lstrlenA
 
#define ua_tcscpy   strcpy
 

Functions

LPUWSTR WINAPI uaw_CharUpperW (LPUWSTR String)
 
int WINAPI uaw_lstrcmpW (PCUWSTR String1, PCUWSTR String2)
 
int WINAPI uaw_lstrcmpiW (PCUWSTR String1, PCUWSTR String2)
 
int WINAPI uaw_lstrlenW (LPCUWSTR String)
 
PUWSTR __cdecl uaw_wcschr (PCUWSTR String, WCHAR Character)
 
PUWSTR __cdecl uaw_wcscpy (PUWSTR Destination, PCUWSTR Source)
 
int __cdecl uaw_wcsicmp (PCUWSTR String1, PCUWSTR String2)
 
size_t __cdecl uaw_wcslen (PCUWSTR String)
 
PUWSTR __cdecl uaw_wcsrchr (PCUWSTR String, WCHAR Character)
 
int ua_wcsicmp (LPCUWSTR String1, LPCUWSTR String2)
 

Macro Definition Documentation

◆ __UA_STACKCOPY

#define __UA_STACKCOPY (   p,
  s 
)    memcpy(_alloca(s),p,s)

Definition at line 166 of file stralign.h.

◆ __UA_STRUC_ALIGNED

#define __UA_STRUC_ALIGNED (   t,
  s 
)    (((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1))==0)

Definition at line 177 of file stralign.h.

◆ __UA_WCSLEN

#define __UA_WCSLEN   ua_wcslen

Definition at line 162 of file stralign.h.

◆ __UA_WSTRSIZE

#define __UA_WSTRSIZE (   s)    ((__UA_WCSLEN(s)+1)*sizeof(WCHAR))

Definition at line 165 of file stralign.h.

◆ _STRALIGN_USE_SECURE_CRT

#define _STRALIGN_USE_SECURE_CRT   0

This file has no copyright assigned and is placed in the Public Domain. This file is part of the mingw-w64 runtime package. No warranty is given; refer to the file DISCLAIMER.PD within this package.

Definition at line 10 of file stralign.h.

◆ ASTR_ALIGNED_STACK_COPY

#define ASTR_ALIGNED_STACK_COPY (   d,
  s 
)    (*(d) = (PCSTR)(s))

Definition at line 174 of file stralign.h.

◆ STRUC_ALIGNED_STACK_COPY

#define STRUC_ALIGNED_STACK_COPY (   t,
  s 
)    __UA_STRUC_ALIGNED(t,s) ? ((t const *)(s)) : ((t const *)__UA_STACKCOPY((s),sizeof(t)))

Definition at line 178 of file stralign.h.

◆ TSTR_ALIGNED

#define TSTR_ALIGNED (   x)    TRUE

Definition at line 193 of file stralign.h.

◆ TSTR_ALIGNED_STACK_COPY

#define TSTR_ALIGNED_STACK_COPY (   d,
  s 
)    ASTR_ALIGNED_STACK_COPY(d,s)

Definition at line 192 of file stralign.h.

◆ ua_CharUpper

#define ua_CharUpper   CharUpperA

Definition at line 194 of file stralign.h.

◆ ua_lstrcmp

#define ua_lstrcmp   lstrcmpA

Definition at line 195 of file stralign.h.

◆ ua_lstrcmpi

#define ua_lstrcmpi   lstrcmpiA

Definition at line 196 of file stralign.h.

◆ ua_lstrlen

#define ua_lstrlen   lstrlenA

Definition at line 197 of file stralign.h.

◆ ua_tcscpy

#define ua_tcscpy   strcpy

Definition at line 198 of file stralign.h.

◆ WSTR_ALIGNED

#define WSTR_ALIGNED (   s)    (((DWORD_PTR)(s) & 1) == 0)

Definition at line 21 of file stralign.h.

◆ WSTR_ALIGNED_STACK_COPY

#define WSTR_ALIGNED_STACK_COPY (   d,
  s 
)    { PCUWSTR __ua_src; ULONG __ua_size; PWSTR __ua_dst; __ua_src = (s); if(WSTR_ALIGNED(__ua_src)) { __ua_dst = (PWSTR)__ua_src; } else { __ua_size = __UA_WSTRSIZE(__ua_src); __ua_dst = (PWSTR)_alloca(__ua_size); memcpy(__ua_dst,__ua_src,__ua_size); } *(d) = (PCWSTR)__ua_dst; }

Definition at line 171 of file stralign.h.

Function Documentation

◆ ua_wcsicmp()

__CRT_INLINE int ua_wcsicmp ( LPCUWSTR  String1,
LPCUWSTR  String2 
)

Definition at line 153 of file stralign.h.

153 {
154 if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2))
155 return _wcsicmp((LPCWSTR)String1,(LPCWSTR)String2);
156 return uaw_wcsicmp(String1,String2);
157 }
_In_ const STRING * String2
Definition: rtlfuncs.h:2357
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define WSTR_ALIGNED(s)
Definition: stralign.h:21
int __cdecl uaw_wcsicmp(PCUWSTR String1, PCUWSTR String2)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ uaw_CharUpperW()

LPUWSTR WINAPI uaw_CharUpperW ( LPUWSTR  String)

◆ uaw_lstrcmpiW()

int WINAPI uaw_lstrcmpiW ( PCUWSTR  String1,
PCUWSTR  String2 
)

◆ uaw_lstrcmpW()

int WINAPI uaw_lstrcmpW ( PCUWSTR  String1,
PCUWSTR  String2 
)

◆ uaw_lstrlenW()

int WINAPI uaw_lstrlenW ( LPCUWSTR  String)

◆ uaw_wcschr()

PUWSTR __cdecl uaw_wcschr ( PCUWSTR  String,
WCHAR  Character 
)

◆ uaw_wcscpy()

PUWSTR __cdecl uaw_wcscpy ( PUWSTR  Destination,
PCUWSTR  Source 
)

◆ uaw_wcsicmp()

int __cdecl uaw_wcsicmp ( PCUWSTR  String1,
PCUWSTR  String2 
)

Referenced by ua_wcsicmp().

◆ uaw_wcslen()

size_t __cdecl uaw_wcslen ( PCUWSTR  String)

◆ uaw_wcsrchr()

PUWSTR __cdecl uaw_wcsrchr ( PCUWSTR  String,
WCHAR  Character 
)