ReactOS 0.4.16-dev-2279-gc890759
utils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HIGH_SURROGATE_MIN   0xD800U
 
#define HIGH_SURROGATE_MAX   0xDBFFU
 
#define LOW_SURROGATE_MIN   0xDC00U
 
#define LOW_SURROGATE_MAX   0xDFFFU
 
#define IS_HIGH_SURROGATE(ch0)   (HIGH_SURROGATE_MIN <= (ch0) && (ch0) <= HIGH_SURROGATE_MAX)
 
#define IS_LOW_SURROGATE(ch1)   (LOW_SURROGATE_MIN <= (ch1) && (ch1) <= LOW_SURROGATE_MAX)
 

Functions

SIZE_T SZZ_GetSize (_In_ PCZZWSTR pszz)
 
LONG IntNormalizeAngle (_In_ LONG nTenthsOfDegrees)
 
LPCWSTR FASTCALL IntNameFromCharSet (_In_ BYTE CharSet)
 
BYTE IntCharSetFromLangID (_In_ LANGID LangID)
 
VOID IntSwapEndian (_Inout_ LPVOID pvData, _In_ DWORD Size)
 
PWSTR PathFindFileNameW (_In_ PCWSTR pszPath)
 
BOOL PathIsRelativeW (_In_ LPCWSTR lpszPath)
 
VOID IntRebaseList (_Inout_ PLIST_ENTRY pNewHead, _Inout_ PLIST_ENTRY pOldHead)
 
VOID IntUnicodeStringToBuffer (_Out_ LPWSTR pszBuffer, _In_ SIZE_T cbBuffer, _In_ const UNICODE_STRING *pString)
 
NTSTATUS IntDuplicateUnicodeString (_In_ PCUNICODE_STRING Source, _Out_ PUNICODE_STRING Destination)
 
static DWORD Utf32FromSurrogatePair (_In_ DWORD ch0, _In_ DWORD ch1)
 
VOID FASTCALL IntEngFillBox (IN OUT PDC dc, IN INT X, IN INT Y, IN INT Width, IN INT Height, IN BRUSHOBJ *BrushObj)
 
VOID APIENTRY IntEngFillPolygon (IN OUT PDC dc, IN POINTL *pPoints, IN UINT cPoints, IN BRUSHOBJ *BrushObj)
 
static LONG ScaleLong (LONG lValue, PFLOATOBJ pef)
 

Variables

POINTL g_PointZero
 
UNICODE_STRING g_FontRegPath
 

Macro Definition Documentation

◆ HIGH_SURROGATE_MAX

#define HIGH_SURROGATE_MAX   0xDBFFU

Definition at line 39 of file utils.h.

◆ HIGH_SURROGATE_MIN

#define HIGH_SURROGATE_MIN   0xD800U

Definition at line 38 of file utils.h.

◆ IS_HIGH_SURROGATE

#define IS_HIGH_SURROGATE (   ch0)    (HIGH_SURROGATE_MIN <= (ch0) && (ch0) <= HIGH_SURROGATE_MAX)

Definition at line 43 of file utils.h.

◆ IS_LOW_SURROGATE

#define IS_LOW_SURROGATE (   ch1)    (LOW_SURROGATE_MIN <= (ch1) && (ch1) <= LOW_SURROGATE_MAX)

Definition at line 44 of file utils.h.

◆ LOW_SURROGATE_MAX

#define LOW_SURROGATE_MAX   0xDFFFU

Definition at line 41 of file utils.h.

◆ LOW_SURROGATE_MIN

#define LOW_SURROGATE_MIN   0xDC00U

Definition at line 40 of file utils.h.

Function Documentation

◆ IntCharSetFromLangID()

BYTE IntCharSetFromLangID ( _In_ LANGID  LangID)

Definition at line 82 of file utils.c.

83{
84 /* FIXME: Add more and fix if wrong */
85 switch (PRIMARYLANGID(LangID))
86 {
87 case LANG_CHINESE:
88 switch (SUBLANGID(LangID))
89 {
93 default:
94 break;
95 }
96 return GB2312_CHARSET;
97
98 case LANG_CZECH: case LANG_HUNGARIAN: case LANG_POLISH:
100 return EASTEUROPE_CHARSET;
101
103 case LANG_SERBIAN: case LANG_UKRAINIAN:
104 return RUSSIAN_CHARSET;
105
106 case LANG_ARABIC: return ARABIC_CHARSET;
107 case LANG_GREEK: return GREEK_CHARSET;
108 case LANG_HEBREW: return HEBREW_CHARSET;
109 case LANG_JAPANESE: return SHIFTJIS_CHARSET;
110 case LANG_KOREAN: return JOHAB_CHARSET;
111 case LANG_TURKISH: return TURKISH_CHARSET;
112 case LANG_THAI: return THAI_CHARSET;
113 case LANG_LATVIAN: return BALTIC_CHARSET;
115
116 case LANG_ENGLISH: case LANG_BASQUE: case LANG_CATALAN:
117 case LANG_DANISH: case LANG_DUTCH: case LANG_FINNISH:
118 case LANG_FRENCH: case LANG_GERMAN: case LANG_ITALIAN:
120 case LANG_SWEDISH: default:
121 return ANSI_CHARSET;
122 }
123}
#define LANG_THAI
Definition: nls.h:132
#define LANG_NORWEGIAN
Definition: nls.h:102
#define SUBLANGID(l)
Definition: nls.h:17
#define LANG_TURKISH
Definition: nls.h:136
#define LANG_DANISH
Definition: nls.h:48
#define LANG_SPANISH
Definition: nls.h:123
#define LANG_POLISH
Definition: nls.h:107
#define LANG_GERMAN
Definition: nls.h:62
#define LANG_HEBREW
Definition: nls.h:67
#define LANG_UKRAINIAN
Definition: nls.h:139
#define LANG_BULGARIAN
Definition: nls.h:40
#define LANG_FINNISH
Definition: nls.h:57
#define LANG_GREEK
Definition: nls.h:63
#define LANG_BASQUE
Definition: nls.h:34
#define LANG_MACEDONIAN
Definition: nls.h:91
#define LANG_ENGLISH
Definition: nls.h:52
#define LANG_ROMANIAN
Definition: nls.h:111
#define SUBLANG_CHINESE_TRADITIONAL
Definition: nls.h:208
#define LANG_DUTCH
Definition: nls.h:51
#define SUBLANG_CHINESE_SIMPLIFIED
Definition: nls.h:209
#define LANG_RUSSIAN
Definition: nls.h:113
#define LANG_VIETNAMESE
Definition: nls.h:143
#define LANG_CZECH
Definition: nls.h:47
#define LANG_HUNGARIAN
Definition: nls.h:69
#define LANG_SWEDISH
Definition: nls.h:125
#define LANG_ARABIC
Definition: nls.h:29
#define LANG_CHINESE
Definition: nls.h:42
#define LANG_SERBIAN
Definition: nls.h:116
#define LANG_JAPANESE
Definition: nls.h:76
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define LANG_LATVIAN
Definition: nls.h:87
#define LANG_SLOVAK
Definition: nls.h:120
#define LANG_KOREAN
Definition: nls.h:84
#define LANG_SLOVENIAN
Definition: nls.h:121
#define LANG_FRENCH
Definition: nls.h:58
#define LANG_ITALIAN
Definition: nls.h:75
#define LANG_PORTUGUESE
Definition: nls.h:108
#define LANG_CATALAN
Definition: nls.h:41
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
Definition: wdfusb.h:1083
#define RUSSIAN_CHARSET
Definition: wingdi.h:396
#define ARABIC_CHARSET
Definition: wingdi.h:394
#define THAI_CHARSET
Definition: wingdi.h:397
#define GREEK_CHARSET
Definition: wingdi.h:391
#define JOHAB_CHARSET
Definition: wingdi.h:401
#define CHINESEBIG5_CHARSET
Definition: wingdi.h:390
#define ANSI_CHARSET
Definition: wingdi.h:383
#define VIETNAMESE_CHARSET
Definition: wingdi.h:402
#define HEBREW_CHARSET
Definition: wingdi.h:393
#define SHIFTJIS_CHARSET
Definition: wingdi.h:386
#define EASTEUROPE_CHARSET
Definition: wingdi.h:399
#define GB2312_CHARSET
Definition: wingdi.h:389
#define BALTIC_CHARSET
Definition: wingdi.h:395
#define TURKISH_CHARSET
Definition: wingdi.h:392

Referenced by GetFontPenalty().

◆ IntDuplicateUnicodeString()

NTSTATUS IntDuplicateUnicodeString ( _In_ PCUNICODE_STRING  Source,
_Out_ PUNICODE_STRING  Destination 
)

Definition at line 183 of file utils.c.

186{
188 UNICODE_STRING Tmp;
189
190 Tmp.Buffer = ExAllocatePoolWithTag(PagedPool, Source->MaximumLength, TAG_USTR);
191 if (Tmp.Buffer)
192 {
193 Tmp.MaximumLength = Source->MaximumLength;
194 Tmp.Length = 0;
196
200
202 }
203
204 return Status;
205}
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
#define TAG_USTR
Definition: libsupp.c:997
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
Status
Definition: gdiplustypes.h:25
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3051
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
#define STATUS_SUCCESS
Definition: shellext.h:65
USHORT MaximumLength
Definition: env_spec_w32.h:370

◆ IntEngFillBox()

VOID FASTCALL IntEngFillBox ( IN OUT PDC  dc,
IN INT  X,
IN INT  Y,
IN INT  Width,
IN INT  Height,
IN BRUSHOBJ BrushObj 
)

Definition at line 209 of file utils.c.

216{
217 RECTL DestRect;
218 SURFACE *psurf = dc->dclevel.pSurface;
219
221 ASSERT(psurf != NULL);
222
223 if (Width < 0)
224 {
225 X += Width;
226 Width = -Width;
227 }
228
229 if (Height < 0)
230 {
231 Y += Height;
232 Height = -Height;
233 }
234
235 DestRect.left = X;
236 DestRect.right = X + Width;
237 DestRect.top = Y;
238 DestRect.bottom = Y + Height;
239
240 IntEngBitBlt(&psurf->SurfObj,
241 NULL,
242 NULL,
243 (CLIPOBJ *)&dc->co,
244 NULL,
245 &DestRect,
246 NULL,
247 NULL,
248 BrushObj,
251}
HDC dc
Definition: cylfrac.c:34
#define ASSERT_DC_PREPARED(pdc)
Definition: dc.h:300
#define NULL
Definition: types.h:112
#define Y(I)
#define X(b, s)
#define ROP4_FROM_INDEX(index)
Definition: inteng.h:42
@ R3_OPINDEX_PATCOPY
Definition: inteng.h:35
#define ASSERT(a)
Definition: mode.c:44
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
SURFOBJ SurfObj
Definition: surface.h:8
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
BOOL APIENTRY IntEngBitBlt(SURFOBJ *psoTrg, SURFOBJ *psoSrc, SURFOBJ *psoMask, CLIPOBJ *pco, XLATEOBJ *pxlo, RECTL *prclTrg, POINTL *pptlSrc, POINTL *pptlMask, BRUSHOBJ *pbo, POINTL *pptlBrush, ROP4 Rop4)
Definition: bitblt.c:656
POINTL g_PointZero
Definition: utils.c:12

Referenced by IntExtTextOutW().

◆ IntEngFillPolygon()

VOID APIENTRY IntEngFillPolygon ( IN OUT PDC  dc,
IN POINTL pPoints,
IN UINT  cPoints,
IN BRUSHOBJ BrushObj 
)

Definition at line 254 of file utils.c.

259{
260 SURFACE *psurf = dc->dclevel.pSurface;
261 RECT Rect;
262 UINT i;
263 INT x, y;
264
266 ASSERT(psurf != NULL);
267
268 Rect.left = Rect.right = pPoints[0].x;
269 Rect.top = Rect.bottom = pPoints[0].y;
270 for (i = 1; i < cPoints; ++i)
271 {
272 x = pPoints[i].x;
273 if (x < Rect.left)
274 Rect.left = x;
275 else if (Rect.right < x)
276 Rect.right = x;
277
278 y = pPoints[i].y;
279 if (y < Rect.top)
280 Rect.top = y;
281 else if (Rect.bottom < y)
282 Rect.bottom = y;
283 }
284
285 IntFillPolygon(dc, dc->dclevel.pSurface, BrushObj, pPoints, cPoints, Rect, &g_PointZero);
286}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
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
unsigned int UINT
Definition: ndis.h:50
BOOL FASTCALL IntFillPolygon(PDC dc, SURFACE *psurf, BRUSHOBJ *BrushObj, CONST PPOINT Points, int Count, RECTL DestRect, POINTL *BrushOrigin)
Definition: polyfill.c:590
int32_t INT
Definition: typedefs.h:58

Referenced by IntExtTextOutW().

◆ IntNameFromCharSet()

LPCWSTR FASTCALL IntNameFromCharSet ( _In_ BYTE  CharSet)

Definition at line 54 of file utils.c.

55{
56 switch (CharSet)
57 {
58 case ANSI_CHARSET: return L"ANSI";
59 case DEFAULT_CHARSET: return L"Default";
60 case SYMBOL_CHARSET: return L"Symbol";
61 case SHIFTJIS_CHARSET: return L"Shift_JIS";
62 case HANGUL_CHARSET: return L"Hangul";
63 case GB2312_CHARSET: return L"GB 2312";
64 case CHINESEBIG5_CHARSET: return L"Chinese Big5";
65 case OEM_CHARSET: return L"OEM";
66 case JOHAB_CHARSET: return L"Johab";
67 case HEBREW_CHARSET: return L"Hebrew";
68 case ARABIC_CHARSET: return L"Arabic";
69 case GREEK_CHARSET: return L"Greek";
70 case TURKISH_CHARSET: return L"Turkish";
71 case VIETNAMESE_CHARSET: return L"Vietnamese";
72 case THAI_CHARSET: return L"Thai";
73 case EASTEUROPE_CHARSET: return L"Eastern European";
74 case RUSSIAN_CHARSET: return L"Russian";
75 case MAC_CHARSET: return L"Mac";
76 case BALTIC_CHARSET: return L"Baltic";
77 default: return L"Unknown";
78 }
79}
static void CharSet(RTF_Info *info)
Definition: reader.c:2400
#define L(x)
Definition: resources.c:13
#define HANGUL_CHARSET
Definition: wingdi.h:388
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define OEM_CHARSET
Definition: wingdi.h:400
#define MAC_CHARSET
Definition: wingdi.h:403
#define SYMBOL_CHARSET
Definition: wingdi.h:385

Referenced by IntGdiAddFontResourceSingle().

◆ IntNormalizeAngle()

LONG IntNormalizeAngle ( _In_ LONG  nTenthsOfDegrees)

Definition at line 46 of file utils.c.

47{
48 nTenthsOfDegrees %= 360 * 10;
49 if (nTenthsOfDegrees >= 0)
50 return nTenthsOfDegrees;
51 return nTenthsOfDegrees + 360 * 10;
52}

Referenced by TextIntGetTextExtentPoint().

◆ IntRebaseList()

VOID IntRebaseList ( _Inout_ PLIST_ENTRY  pNewHead,
_Inout_ PLIST_ENTRY  pOldHead 
)

Definition at line 30 of file utils.c.

33{
35
36 ASSERT(pNewHead != pOldHead);
37
38 InitializeListHead(pNewHead);
39 while (!IsListEmpty(pOldHead))
40 {
41 Entry = RemoveTailList(pOldHead);
42 InsertHeadList(pNewHead, Entry);
43 }
44}
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define RemoveTailList(ListHead)
Definition: env_spec_w32.h:975
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
base of all file and directory entries
Definition: entries.h:83
Definition: typedefs.h:120

Referenced by FontLink_Chain_Finish(), and FontLink_Chain_Populate().

◆ IntSwapEndian()

VOID IntSwapEndian ( _Inout_ LPVOID  pvData,
_In_ DWORD  Size 
)

Definition at line 125 of file utils.c.

126{
127 BYTE b, *pb = pvData;
128 Size /= 2;
129 while (Size-- > 0)
130 {
131 b = pb[0];
132 pb[0] = pb[1];
133 pb[1] = b;
134 ++pb; ++pb;
135 }
136}
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define b
Definition: ke_i.h:79
_In_ LPWSTR _In_ DWORD _In_ LPCVOID pvData
Definition: netsh.h:116
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
unsigned char BYTE
Definition: xxhash.c:193

Referenced by IntGetFontLocalizedName().

◆ IntUnicodeStringToBuffer()

VOID IntUnicodeStringToBuffer ( _Out_ LPWSTR  pszBuffer,
_In_ SIZE_T  cbBuffer,
_In_ const UNICODE_STRING pString 
)

Definition at line 165 of file utils.c.

169{
170 SIZE_T cbLength = pString->Length;
171
172 if (cbBuffer < sizeof(UNICODE_NULL))
173 return;
174
175 if (cbLength > cbBuffer - sizeof(UNICODE_NULL))
176 cbLength = cbBuffer - sizeof(UNICODE_NULL);
177
178 RtlCopyMemory(pszBuffer, pString->Buffer, cbLength);
179 pszBuffer[cbLength / sizeof(WCHAR)] = UNICODE_NULL;
180}
__inline USHORT Length(VOID)
Definition: fxstring.hpp:85
__inline PWCHAR Buffer(VOID)
Definition: fxstring.hpp:144
FxString * pString
#define UNICODE_NULL
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by GetFontFamilyInfoForSubstitutes(), IntPopulateTextObj(), and SubstituteFontRecurse().

◆ PathFindFileNameW()

PWSTR PathFindFileNameW ( _In_ PCWSTR  pszPath)

Definition at line 139 of file utils.c.

140{
141 PCWSTR lastSlash = pszPath;
142 while (*pszPath)
143 {
144 if ((*pszPath == L'\\' || *pszPath == L'/' || *pszPath == L':') &&
145 pszPath[1] && pszPath[1] != '\\' && pszPath[1] != L'/')
146 {
147 lastSlash = pszPath + 1;
148 }
149 pszPath++;
150 }
151 return (PWSTR)lastSlash;
152}
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57

◆ PathIsRelativeW()

BOOL PathIsRelativeW ( _In_ LPCWSTR  lpszPath)

Definition at line 155 of file utils.c.

156{
157 if (!lpszPath || !*lpszPath)
158 return TRUE;
159 if (*lpszPath == L'\\' || (*lpszPath && lpszPath[1] == L':'))
160 return FALSE;
161 return TRUE;
162}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117

◆ ScaleLong()

static LONG ScaleLong ( LONG  lValue,
PFLOATOBJ  pef 
)
inlinestatic

Definition at line 71 of file utils.h.

72{
73 FLOATOBJ efTemp;
74
75 /* Check if we have scaling different from 1 */
76 if (!FLOATOBJ_Equal(pef, (PFLOATOBJ)&gef1))
77 {
78 /* Need to multiply */
79 FLOATOBJ_SetLong(&efTemp, lValue);
80 FLOATOBJ_Mul(&efTemp, pef);
81 lValue = FLOATOBJ_GetLong(&efTemp);
82 }
83
84 return lValue;
85}
static const FLOATOBJ gef1
Definition: floatobj.h:114
#define FLOATOBJ_Equal(pf, pf1)
Definition: winddi.h:2831
FLOAT * PFLOATOBJ
Definition: winddi.h:677
FLOAT FLOATOBJ
Definition: winddi.h:677
#define FLOATOBJ_Mul(pf, pf1)
Definition: winddi.h:2824
#define FLOATOBJ_GetLong(pf)
Definition: winddi.h:2817
#define FLOATOBJ_SetLong(pf, l)
Definition: winddi.h:2815

◆ SZZ_GetSize()

SIZE_T SZZ_GetSize ( _In_ PCZZWSTR  pszz)

Definition at line 15 of file utils.c.

16{
17 SIZE_T ret = 0, cch;
18 const WCHAR *pch = pszz;
19 while (*pch)
20 {
21 cch = wcslen(pch) + 1;
22 ret += cch;
23 pch += cch;
24 }
25 ++ret;
26 return ret * sizeof(WCHAR);
27}
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
return ret
Definition: mutex.c:146
#define pch(ap)
Definition: match.c:418
_In_ UINT _In_ UINT cch
Definition: shellapi.h:432

Referenced by FontLink_Chain_LoadReg().

◆ Utf32FromSurrogatePair()

static DWORD Utf32FromSurrogatePair ( _In_ DWORD  ch0,
_In_ DWORD  ch1 
)
inlinestatic

Definition at line 47 of file utils.h.

48{
49 return ((ch0 - HIGH_SURROGATE_MIN) << 10) + (ch1 - LOW_SURROGATE_MIN) + 0x10000;
50}
#define LOW_SURROGATE_MIN
Definition: utils.h:40
#define HIGH_SURROGATE_MIN
Definition: utils.h:38

Referenced by IntExtTextOutW(), IntGetTextDisposition(), and TextIntGetTextExtentPoint().

Variable Documentation

◆ g_FontRegPath

UNICODE_STRING g_FontRegPath
extern

◆ g_PointZero

POINTL g_PointZero
extern

Definition at line 12 of file utils.c.

Referenced by IntEngFillBox(), IntEngFillPolygon(), and IntExtTextOutW().