mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:12:57 +00:00
clean up : move EngWideCharToMultiByte from stubs.c to eng.c and mark it as implement
svn path=/trunk/; revision=29195
This commit is contained in:
parent
9b2a7bf67c
commit
92b7462fcb
2 changed files with 56 additions and 64 deletions
|
@ -2282,9 +2282,6 @@ CreateBitmap(INT Width,
|
||||||
return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
|
return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -2296,30 +2293,6 @@ EngGetDriverName(HDEV hdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
INT STDCALL
|
|
||||||
EngWideCharToMultiByte( UINT CodePage,
|
|
||||||
LPWSTR WideCharString,
|
|
||||||
INT BytesInWideCharString,
|
|
||||||
LPSTR MultiByteString,
|
|
||||||
INT BytesInMultiByteString)
|
|
||||||
{
|
|
||||||
return WideCharToMultiByte(
|
|
||||||
CodePage,
|
|
||||||
0,
|
|
||||||
WideCharString,
|
|
||||||
(BytesInWideCharString/sizeof(WCHAR)), /* Bytes to (in WCHARs) */
|
|
||||||
MultiByteString,
|
|
||||||
BytesInMultiByteString,
|
|
||||||
NULL,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,6 +19,52 @@ EngAcquireSemaphore ( IN HSEMAPHORE hsem )
|
||||||
RtlEnterCriticalSection((PRTL_CRITICAL_SECTION)hsem);
|
RtlEnterCriticalSection((PRTL_CRITICAL_SECTION)hsem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
copy_my_glyphset( FD_GLYPHSET *dst_glyphset , FD_GLYPHSET * src_glyphset, ULONG Size)
|
||||||
|
{
|
||||||
|
BOOL retValue = FALSE;
|
||||||
|
|
||||||
|
memcpy(src_glyphset, dst_glyphset, Size);
|
||||||
|
if (src_glyphset->cRuns == 0)
|
||||||
|
{
|
||||||
|
retValue = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME copy wrun */
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
FD_GLYPHSET* STDCALL
|
||||||
|
EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars)
|
||||||
|
{
|
||||||
|
FD_GLYPHSET * ntfd_glyphset;
|
||||||
|
FD_GLYPHSET * myfd_glyphset = NULL;
|
||||||
|
|
||||||
|
ntfd_glyphset = NtGdiEngComputeGlyphSet(nCodePage,nFirstChar,cChars);
|
||||||
|
|
||||||
|
if (!ntfd_glyphset)
|
||||||
|
{
|
||||||
|
if (ntfd_glyphset->cjThis)
|
||||||
|
{
|
||||||
|
myfd_glyphset = GlobalAlloc(0,ntfd_glyphset->cjThis);
|
||||||
|
|
||||||
|
if (!myfd_glyphset)
|
||||||
|
{
|
||||||
|
if (copy_my_glyphset(myfd_glyphset,ntfd_glyphset,ntfd_glyphset->cjThis) == FALSE)
|
||||||
|
{
|
||||||
|
GlobalFree(myfd_glyphset);
|
||||||
|
myfd_glyphset = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return myfd_glyphset;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -160,47 +206,20 @@ EngReleaseSemaphore ( IN HSEMAPHORE hsem )
|
||||||
RtlLeaveCriticalSection( (PRTL_CRITICAL_SECTION) hsem);
|
RtlLeaveCriticalSection( (PRTL_CRITICAL_SECTION) hsem);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
|
||||||
copy_my_glyphset( FD_GLYPHSET *dst_glyphset , FD_GLYPHSET * src_glyphset, ULONG Size)
|
|
||||||
{
|
|
||||||
BOOL retValue = FALSE;
|
|
||||||
|
|
||||||
memcpy(src_glyphset, dst_glyphset, Size);
|
|
||||||
if (src_glyphset->cRuns == 0)
|
|
||||||
{
|
|
||||||
retValue = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME copy wrun */
|
|
||||||
return retValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
FD_GLYPHSET* STDCALL
|
INT
|
||||||
EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars)
|
STDCALL
|
||||||
|
EngWideCharToMultiByte( UINT CodePage,
|
||||||
|
LPWSTR WideCharString,
|
||||||
|
INT BytesInWideCharString,
|
||||||
|
LPSTR MultiByteString,
|
||||||
|
INT BytesInMultiByteString)
|
||||||
{
|
{
|
||||||
FD_GLYPHSET * ntfd_glyphset;
|
return WideCharToMultiByte(CodePage, 0, WideCharString, (BytesInWideCharString/sizeof(WCHAR)),
|
||||||
FD_GLYPHSET * myfd_glyphset = NULL;
|
MultiByteString, BytesInMultiByteString, NULL, NULL);
|
||||||
|
|
||||||
ntfd_glyphset = NtGdiEngComputeGlyphSet(nCodePage,nFirstChar,cChars);
|
|
||||||
|
|
||||||
if (!ntfd_glyphset)
|
|
||||||
{
|
|
||||||
if (ntfd_glyphset->cjThis)
|
|
||||||
{
|
|
||||||
myfd_glyphset = GlobalAlloc(0,ntfd_glyphset->cjThis);
|
|
||||||
|
|
||||||
if (!myfd_glyphset)
|
|
||||||
{
|
|
||||||
if (copy_my_glyphset(myfd_glyphset,ntfd_glyphset,ntfd_glyphset->cjThis) == FALSE)
|
|
||||||
{
|
|
||||||
GlobalFree(myfd_glyphset);
|
|
||||||
myfd_glyphset = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return myfd_glyphset;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue