diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-04-05 21:27:03 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-04-05 21:27:03 +0000 |
commit | 37e731f0bd81249f8b43bada12adaa611b7a595b (patch) | |
tree | 99e477a2cd57a94782ae182b8c5e2c0024751356 /Build/source/libs/freetype2/freetype-src/builds/windows/ftsystem.c | |
parent | 7c200a413ce80d2d09a0dda338e9407bba0d3855 (diff) |
freetype2 : revert
git-svn-id: svn://tug.org/texlive/trunk@62919 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/builds/windows/ftsystem.c')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/builds/windows/ftsystem.c | 92 |
1 files changed, 14 insertions, 78 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/builds/windows/ftsystem.c b/Build/source/libs/freetype2/freetype-src/builds/windows/ftsystem.c index 4f4ac15f331..1ebadd49ff8 100644 --- a/Build/source/libs/freetype2/freetype-src/builds/windows/ftsystem.c +++ b/Build/source/libs/freetype2/freetype-src/builds/windows/ftsystem.c @@ -4,7 +4,7 @@ * * Windows-specific FreeType low-level system interface (body). * - * Copyright (C) 2021-2022 by + * Copyright (C) 2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -196,78 +196,19 @@ } - /* non-desktop Universal Windows Platform */ -#if defined( WINAPI_FAMILY_PARTITION ) && \ - !WINAPI_FAMILY_PARTITION( WINAPI_PARTITION_DESKTOP ) - -#define PACK_DWORD64( hi, lo ) ( ( (DWORD64)(hi) << 32 ) | (DWORD)(lo) ) - -#define CreateFileMapping( a, b, c, d, e, f ) \ - CreateFileMappingFromApp( a, b, c, PACK_DWORD64( d, e ), f ) -#define MapViewOfFile( a, b, c, d, e ) \ - MapViewOfFileFromApp( a, b, PACK_DWORD64( c, d ), e ) +#ifdef _WIN32_WCE FT_LOCAL_DEF( HANDLE ) - CreateFileA( LPCSTR lpFileName, - DWORD dwDesiredAccess, - DWORD dwShareMode, - LPSECURITY_ATTRIBUTES lpSecurityAttributes, - DWORD dwCreationDisposition, - DWORD dwFlagsAndAttributes, - HANDLE hTemplateFile ) + CreateFileA( LPCSTR lpFileName, + DWORD dwDesiredAccess, + DWORD dwShareMode, + LPSECURITY_ATTRIBUTES lpSecurityAttributes, + DWORD dwCreationDisposition, + DWORD dwFlagsAndAttributes, + HANDLE hTemplateFile ) { - int len; - LPWSTR lpFileNameW; - - CREATEFILE2_EXTENDED_PARAMETERS createExParams = { - sizeof ( CREATEFILE2_EXTENDED_PARAMETERS ), - dwFlagsAndAttributes & 0x0000FFFF, - dwFlagsAndAttributes & 0xFFF00000, - dwFlagsAndAttributes & 0x000F0000, - lpSecurityAttributes, - hTemplateFile }; - - - /* allocate memory space for converted path name */ - len = MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS, - lpFileName, -1, NULL, 0 ); - - lpFileNameW = (LPWSTR)_alloca( len * sizeof ( WCHAR ) ); - - if ( !len || !lpFileNameW ) - { - FT_ERROR(( "FT_Stream_Open: cannot convert file name to LPWSTR\n" )); - return INVALID_HANDLE_VALUE; - } - - /* now it is safe to do the translation */ - MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS, - lpFileName, -1, lpFileNameW, len ); - - /* open the file */ - return CreateFile2( lpFileNameW, dwDesiredAccess, dwShareMode, - dwCreationDisposition, &createExParams ); - } - -#endif - - -#if defined( _WIN32_WCE ) - - /* malloc.h provides implementation of alloca()/_alloca() */ - #include <malloc.h> - - FT_LOCAL_DEF( HANDLE ) - CreateFileA( LPCSTR lpFileName, - DWORD dwDesiredAccess, - DWORD dwShareMode, - LPSECURITY_ATTRIBUTES lpSecurityAttributes, - DWORD dwCreationDisposition, - DWORD dwFlagsAndAttributes, - HANDLE hTemplateFile ) - { - int len; - LPWSTR lpFileNameW; + int len; + LPWSTR lpFileNameW; /* allocate memory space for converted path name */ @@ -292,15 +233,10 @@ dwFlagsAndAttributes, hTemplateFile ); } -#endif - - -#if defined( _WIN32_WCE ) || defined ( _WIN32_WINDOWS ) || \ - !defined( _WIN32_WINNT ) || _WIN32_WINNT <= 0x0400 FT_LOCAL_DEF( BOOL ) - GetFileSizeEx( HANDLE hFile, - PLARGE_INTEGER lpFileSize ) + GetFileSizeEx( HANDLE hFile, + PLARGE_INTEGER lpFileSize ) { lpFileSize->u.LowPart = GetFileSize( hFile, (DWORD *)&lpFileSize->u.HighPart ); @@ -312,7 +248,7 @@ return TRUE; } -#endif +#endif /* _WIN32_WCE */ /* documentation is in ftobjs.h */ |