ReactOS 0.4.16-dev-1292-g1ece139
clipboard.c
Go to the documentation of this file.
1/*
2 * Richedit clipboard handling
3 *
4 * Copyright (C) 2006 Kevin Koltzau
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "editor.h"
22
24
25static UINT cfRTF = 0;
26
27typedef struct DataObjectImpl {
30
31 FORMATETC *fmtetc;
33
37
38typedef struct EnumFormatImpl {
41
42 FORMATETC *fmtetc;
44
47
48static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT size, LPENUMFORMATETC *lplpformatetc);
49
51{
52 return CONTAINING_RECORD(iface, DataObjectImpl, IDataObject_iface);
53}
54
56{
57 return CONTAINING_RECORD(iface, EnumFormatImpl, IEnumFORMATETC_iface);
58}
59
61{
63 TRACE("%p %s\n", This, debugstr_guid(riid));
64
66 IEnumFORMATETC_AddRef(iface);
67 *ppvObj = &This->IEnumFORMATETC_iface;
68 return S_OK;
69 }
70 *ppvObj = NULL;
71 return E_NOINTERFACE;
72}
73
75{
78 TRACE("(%p) ref=%ld\n", This, ref);
79 return ref;
80}
81
83{
86 TRACE("(%p) ref=%ld\n", This, ref);
87
88 if(!ref) {
89 GlobalFree(This->fmtetc);
90 free(This);
91 }
92
93 return ref;
94}
95
97 FORMATETC *rgelt, ULONG *pceltFetched)
98{
100 ULONG count = 0;
101 TRACE("(%p)->(%ld %p %p)\n", This, celt, rgelt, pceltFetched);
102
103 if(!rgelt)
104 return E_INVALIDARG;
105
106 count = min(celt, This->fmtetc_cnt-This->cur);
107 if(count > 0) {
108 memcpy(rgelt, This->fmtetc+This->cur, count*sizeof(FORMATETC));
109 This->cur += count;
110 }
111 if(pceltFetched)
112 *pceltFetched = count;
113 return count == celt ? S_OK : S_FALSE;
114}
115
117{
119 ULONG count = 0;
120 TRACE("(%p)->(%ld)\n", This, celt);
121
122 count = min(celt, This->fmtetc_cnt-This->cur);
123 This->cur += count;
124 return count == celt ? S_OK : S_FALSE;
125}
126
128{
130 TRACE("(%p)\n", This);
131
132 This->cur = 0;
133 return S_OK;
134}
135
137{
139 HRESULT hr;
140 TRACE("(%p)->(%p)\n", This, ppenum);
141
142 if(!ppenum)
143 return E_INVALIDARG;
144 hr = EnumFormatImpl_Create(This->fmtetc, This->fmtetc_cnt, ppenum);
145 if(SUCCEEDED(hr))
146 hr = IEnumFORMATETC_Skip(*ppenum, This->cur);
147 return hr;
148}
149
150static const IEnumFORMATETCVtbl VT_EnumFormatImpl = {
158};
159
160static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt,
161 IEnumFORMATETC **formatetc)
162{
164 TRACE("\n");
165
166 ret = malloc(sizeof(EnumFormatImpl));
167 ret->IEnumFORMATETC_iface.lpVtbl = &VT_EnumFormatImpl;
168 ret->ref = 1;
169 ret->cur = 0;
170 ret->fmtetc_cnt = fmtetc_cnt;
171 ret->fmtetc = GlobalAlloc(GMEM_ZEROINIT, fmtetc_cnt*sizeof(FORMATETC));
172 memcpy(ret->fmtetc, fmtetc, fmtetc_cnt*sizeof(FORMATETC));
173 *formatetc = &ret->IEnumFORMATETC_iface;
174 return S_OK;
175}
176
178{
180 TRACE("(%p)->(%s)\n", This, debugstr_guid(riid));
181
183 IDataObject_AddRef(iface);
184 *ppvObj = &This->IDataObject_iface;
185 return S_OK;
186 }
187 *ppvObj = NULL;
188 return E_NOINTERFACE;
189}
190
192{
195 TRACE("(%p) ref=%ld\n", This, ref);
196 return ref;
197}
198
200{
203 TRACE("(%p) ref=%ld\n",This, ref);
204
205 if(!ref) {
206 if(This->unicode) GlobalFree(This->unicode);
207 if(This->rtf) GlobalFree(This->rtf);
208 if(This->fmtetc) GlobalFree(This->fmtetc);
209 free(This);
210 }
211
212 return ref;
213}
214
215static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium)
216{
218 TRACE("(%p)->(fmt=0x%08x tym=0x%08lx)\n", This, pformatetc->cfFormat, pformatetc->tymed);
219
220 if(pformatetc->lindex != -1)
221 return DV_E_LINDEX;
222
223 if(!(pformatetc->tymed & TYMED_HGLOBAL))
224 return DV_E_TYMED;
225
226 if(This->unicode && pformatetc->cfFormat == CF_UNICODETEXT)
227 pmedium->hGlobal = This->unicode;
228 else if(This->rtf && pformatetc->cfFormat == cfRTF)
229 pmedium->hGlobal = This->rtf;
230 else
231 return DV_E_FORMATETC;
232
233 pmedium->tymed = TYMED_HGLOBAL;
234 pmedium->pUnkForRelease = (LPUNKNOWN)iface;
235 IUnknown_AddRef(pmedium->pUnkForRelease);
236 return S_OK;
237}
238
239static HRESULT WINAPI DataObjectImpl_GetDataHere(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium)
240{
242 FIXME("(%p): stub\n", This);
243 return E_NOTIMPL;
244}
245
246static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject* iface, FORMATETC *pformatetc)
247{
249 UINT i;
250 BOOL foundFormat = FALSE;
251 TRACE("(%p)->(fmt=0x%08x tym=0x%08lx)\n", This, pformatetc->cfFormat, pformatetc->tymed);
252
253 if(pformatetc->lindex != -1)
254 return DV_E_LINDEX;
255
256 for(i=0; i<This->fmtetc_cnt; i++) {
257 if(This->fmtetc[i].cfFormat == pformatetc->cfFormat) {
258 foundFormat = TRUE;
259 if(This->fmtetc[i].tymed == pformatetc->tymed)
260 return S_OK;
261 }
262 }
263 return foundFormat?DV_E_FORMATETC:DV_E_TYMED;
264}
265
266static HRESULT WINAPI DataObjectImpl_GetCanonicalFormatEtc(IDataObject* iface, FORMATETC *pformatetcIn,
267 FORMATETC *pformatetcOut)
268{
270 TRACE("(%p)->(%p,%p)\n", This, pformatetcIn, pformatetcOut);
271
272 if(pformatetcOut) {
273 *pformatetcOut = *pformatetcIn;
274 pformatetcOut->ptd = NULL;
275 }
277}
278
279static HRESULT WINAPI DataObjectImpl_SetData(IDataObject* iface, FORMATETC *pformatetc,
280 STGMEDIUM *pmedium, BOOL fRelease)
281{
283 FIXME("(%p): stub\n", This);
284 return E_NOTIMPL;
285}
286
288 IEnumFORMATETC **ppenumFormatEtc)
289{
291 TRACE("(%p)->(%ld)\n", This, dwDirection);
292
293 if(dwDirection != DATADIR_GET) {
294 FIXME("Unsupported direction: %ld\n", dwDirection);
295 /* WinXP riched20 also returns E_NOTIMPL in this case */
296 *ppenumFormatEtc = NULL;
297 return E_NOTIMPL;
298 }
299 return EnumFormatImpl_Create(This->fmtetc, This->fmtetc_cnt, ppenumFormatEtc);
300}
301
302static HRESULT WINAPI DataObjectImpl_DAdvise(IDataObject* iface, FORMATETC *pformatetc, DWORD advf,
303 IAdviseSink *pAdvSink, DWORD *pdwConnection)
304{
306 FIXME("(%p): stub\n", This);
307 return E_NOTIMPL;
308}
309
311{
313 FIXME("(%p): stub\n", This);
314 return E_NOTIMPL;
315}
316
318{
320 FIXME("(%p): stub\n", This);
321 return E_NOTIMPL;
322}
323
324static const IDataObjectVtbl VT_DataObjectImpl =
325{
338};
339
340static HGLOBAL get_unicode_text(ME_TextEditor *editor, const ME_Cursor *start, int nChars)
341{
342 int pars = 0;
343 WCHAR *data;
344 HANDLE ret;
345 ME_Paragraph *para;
346 int nEnd = ME_GetCursorOfs(start) + nChars;
347
348 /* count paragraphs in range */
349 para = start->para;
350 while ((para = para_next( para )) && para->nCharOfs <= nEnd)
351 pars++;
352
353 ret = GlobalAlloc(GMEM_MOVEABLE, sizeof(WCHAR) * (nChars + pars + 1));
355 ME_GetTextW(editor, data, nChars + pars, start, nChars, TRUE, FALSE);
357 return ret;
358}
359
361{
365
367{
369 int nMaxSize;
370 BYTE *pDest;
371
372 nMaxSize = GlobalSize(pData->hData);
373 if (pData->nLength+cb+1 >= cb) {
374 /* round up to 2^17 */
375 int nNewSize = (((nMaxSize+cb+1)|0x1FFFF)+1) & 0xFFFE0000;
376 pData->hData = GlobalReAlloc(pData->hData, nNewSize, GMEM_MOVEABLE);
377 }
378 pDest = GlobalLock(pData->hData);
379 memcpy(pDest + pData->nLength, lpBuff, cb);
380 pData->nLength += cb;
381 pDest[pData->nLength] = '\0';
382 GlobalUnlock(pData->hData);
383 *pcb = cb;
384
385 return 0;
386}
387
388static HGLOBAL get_rtf_text(ME_TextEditor *editor, const ME_Cursor *start, int nChars)
389{
392
394 gds.nLength = 0;
395 es.dwCookie = (DWORD_PTR)&gds;
396 es.pfnCallback = ME_AppendToHGLOBAL;
397 ME_StreamOutRange(editor, SF_RTF, start, nChars, &es);
399 return gds.hData;
400}
401
403 IDataObject **dataobj)
404{
406 TRACE("(%p,%d,%d)\n", editor, ME_GetCursorOfs(start), nChars);
407
408 obj = malloc(sizeof(DataObjectImpl));
409 if(cfRTF == 0)
410 cfRTF = RegisterClipboardFormatA("Rich Text Format");
411
413 obj->ref = 1;
414 obj->unicode = get_unicode_text(editor, start, nChars);
415 obj->rtf = NULL;
416
417 obj->fmtetc_cnt = 1;
418 if(editor->mode & TM_RICHTEXT)
419 obj->fmtetc_cnt++;
420 obj->fmtetc = GlobalAlloc(GMEM_ZEROINIT, obj->fmtetc_cnt*sizeof(FORMATETC));
421 InitFormatEtc(obj->fmtetc[0], CF_UNICODETEXT, TYMED_HGLOBAL);
422 if(editor->mode & TM_RICHTEXT) {
423 obj->rtf = get_rtf_text(editor, start, nChars);
424 InitFormatEtc(obj->fmtetc[1], cfRTF, TYMED_HGLOBAL);
425 }
426
427 *dataobj = &obj->IDataObject_iface;
428 return S_OK;
429}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define CF_UNICODETEXT
Definition: constants.h:408
#define FIXME(fmt,...)
Definition: precomp.h:53
const GUID IID_IUnknown
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CALLBACK
Definition: compat.h:35
static snapshot * impl_from_IDataObject(IDataObject *iface)
Definition: clipboard.c:159
static enum_fmtetc * impl_from_IEnumFORMATETC(IEnumFORMATETC *iface)
Definition: clipboard.c:238
int ME_GetCursorOfs(const ME_Cursor *cursor)
Definition: caret.c:923
struct EnumFormatImpl EnumFormatImpl
static ULONG WINAPI EnumFormatImpl_AddRef(IEnumFORMATETC *iface)
Definition: clipboard.c:74
static HRESULT WINAPI DataObjectImpl_GetDataHere(IDataObject *iface, FORMATETC *pformatetc, STGMEDIUM *pmedium)
Definition: clipboard.c:239
static HGLOBAL get_unicode_text(ME_TextEditor *editor, const ME_Cursor *start, int nChars)
Definition: clipboard.c:340
static ULONG WINAPI DataObjectImpl_AddRef(IDataObject *iface)
Definition: clipboard.c:191
static HRESULT WINAPI EnumFormatImpl_Skip(IEnumFORMATETC *iface, ULONG celt)
Definition: clipboard.c:116
static HGLOBAL get_rtf_text(ME_TextEditor *editor, const ME_Cursor *start, int nChars)
Definition: clipboard.c:388
static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT size, LPENUMFORMATETC *lplpformatetc)
static ULONG WINAPI EnumFormatImpl_Release(IEnumFORMATETC *iface)
Definition: clipboard.c:82
static const IDataObjectVtbl VT_DataObjectImpl
Definition: clipboard.c:324
static UINT cfRTF
Definition: clipboard.c:25
static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject *iface, FORMATETC *pformatetc)
Definition: clipboard.c:246
static HRESULT WINAPI EnumFormatImpl_Next(IEnumFORMATETC *iface, ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched)
Definition: clipboard.c:96
static DWORD CALLBACK ME_AppendToHGLOBAL(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG cb, LONG *pcb)
Definition: clipboard.c:366
static HRESULT WINAPI DataObjectImpl_DAdvise(IDataObject *iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
Definition: clipboard.c:302
static HRESULT WINAPI DataObjectImpl_QueryInterface(IDataObject *iface, REFIID riid, LPVOID *ppvObj)
Definition: clipboard.c:177
static HRESULT WINAPI DataObjectImpl_DUnadvise(IDataObject *iface, DWORD dwConnection)
Definition: clipboard.c:310
static HRESULT WINAPI DataObjectImpl_EnumFormatEtc(IDataObject *iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
Definition: clipboard.c:287
static ULONG WINAPI DataObjectImpl_Release(IDataObject *iface)
Definition: clipboard.c:199
static HRESULT WINAPI DataObjectImpl_GetData(IDataObject *iface, FORMATETC *pformatetc, STGMEDIUM *pmedium)
Definition: clipboard.c:215
static HRESULT WINAPI DataObjectImpl_GetCanonicalFormatEtc(IDataObject *iface, FORMATETC *pformatetcIn, FORMATETC *pformatetcOut)
Definition: clipboard.c:266
struct tagME_GlobalDestStruct ME_GlobalDestStruct
static HRESULT WINAPI EnumFormatImpl_Clone(IEnumFORMATETC *iface, IEnumFORMATETC **ppenum)
Definition: clipboard.c:136
static HRESULT WINAPI DataObjectImpl_EnumDAdvise(IDataObject *iface, IEnumSTATDATA **ppenumAdvise)
Definition: clipboard.c:317
static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFIID riid, LPVOID *ppvObj)
Definition: clipboard.c:60
HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start, int nChars, IDataObject **dataobj)
Definition: clipboard.c:402
static HRESULT WINAPI DataObjectImpl_SetData(IDataObject *iface, FORMATETC *pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
Definition: clipboard.c:279
static HRESULT WINAPI EnumFormatImpl_Reset(IEnumFORMATETC *iface)
Definition: clipboard.c:127
struct DataObjectImpl DataObjectImpl
static const IEnumFORMATETCVtbl VT_EnumFormatImpl
Definition: clipboard.c:150
int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, const ME_Cursor *start, int srcChars, BOOL bCRLF, BOOL bEOP)
Definition: editor.c:4325
LRESULT ME_StreamOutRange(ME_TextEditor *editor, DWORD dwFormat, const ME_Cursor *start, int nChars, EDITSTREAM *stream)
Definition: writer.c:1177
#define InitFormatEtc(fe, cf, med)
Definition: editor.h:32
ME_Paragraph * para_next(ME_Paragraph *para)
Definition: para.c:57
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint start
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
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
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
HGLOBAL NTAPI GlobalReAlloc(HGLOBAL hMem, SIZE_T dwBytes, UINT uFlags)
Definition: heapmem.c:825
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090
#define es
Definition: i386-dis.c:440
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define debugstr_guid
Definition: kernel32.h:35
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
static LPUNKNOWN
Definition: ndr_ole.c:49
interface IEnumFORMATETC * LPENUMFORMATETC
Definition: objfwd.h:24
const GUID IID_IEnumFORMATETC
const GUID IID_IDataObject
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define TM_RICHTEXT
Definition: richedit.h:1029
#define SF_RTF
Definition: richedit.h:721
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
HANDLE rtf
Definition: clipboard.c:35
HANDLE unicode
Definition: clipboard.c:34
FORMATETC * fmtetc
Definition: clipboard.c:31
IDataObject IDataObject_iface
Definition: clipboard.c:28
UINT fmtetc_cnt
Definition: clipboard.c:32
IEnumFORMATETC IEnumFORMATETC_iface
Definition: clipboard.c:39
FORMATETC * fmtetc
Definition: clipboard.c:42
UINT fmtetc_cnt
Definition: clipboard.c:43
IDataObject IDataObject_iface
Definition: usrmarshal.c:1273
Definition: send.c:48
#define DWORD_PTR
Definition: treelist.c:76
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
int ret
#define GMEM_ZEROINIT
Definition: winbase.h:339
#define GMEM_MOVEABLE
Definition: winbase.h:327
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define DV_E_TYMED
Definition: winerror.h:2638
#define DV_E_FORMATETC
Definition: winerror.h:2633
#define DV_E_LINDEX
Definition: winerror.h:2637
#define DATA_S_SAMEFORMATETC
Definition: winerror.h:2674
UINT WINAPI RegisterClipboardFormatA(_In_ LPCSTR)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193