mirror of
https://github.com/reactos/reactos.git
synced 2025-06-29 02:49:42 +00:00
[CMAKE]
- Sync with trunk 50501 - fix a couple of merge artifacts (indentation) svn path=/branches/cmake-bringup/; revision=50505
This commit is contained in:
parent
e2b7eacdd5
commit
8191f95396
40 changed files with 844 additions and 1333 deletions
|
@ -2,6 +2,8 @@
|
||||||
set_unicode()
|
set_unicode()
|
||||||
add_definitions(-D__USE_W32_SOCKETS)
|
add_definitions(-D__USE_W32_SOCKETS)
|
||||||
|
|
||||||
|
set_unicode()
|
||||||
|
|
||||||
add_executable(ping ping.c ping.rc)
|
add_executable(ping ping.c ping.rc)
|
||||||
|
|
||||||
set_module_type(ping win32cui)
|
set_module_type(ping win32cui)
|
||||||
|
|
|
@ -381,7 +381,7 @@ static BOOL Setup(VOID)
|
||||||
sizeof(DontFragment)) == SOCKET_ERROR)
|
sizeof(DontFragment)) == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
FormatOutput(IDS_SETSOCKOPT_FAILED, WSAGetLastError());
|
FormatOutput(IDS_SETSOCKOPT_FAILED, WSAGetLastError());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setsockopt(IcmpSock,
|
if (setsockopt(IcmpSock,
|
||||||
|
@ -391,7 +391,7 @@ static BOOL Setup(VOID)
|
||||||
sizeof(TTLValue)) == SOCKET_ERROR)
|
sizeof(TTLValue)) == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
FormatOutput(IDS_SETSOCKOPT_FAILED, WSAGetLastError());
|
FormatOutput(IDS_SETSOCKOPT_FAILED, WSAGetLastError());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -736,7 +736,8 @@ int wmain(int argc, LPWSTR argv[])
|
||||||
/* Print statistics */
|
/* Print statistics */
|
||||||
FormatOutput(IDS_PING_STATISTICS, TargetIP);
|
FormatOutput(IDS_PING_STATISTICS, TargetIP);
|
||||||
FormatOutput(IDS_PACKETS_SENT_RECEIVED_LOST,\
|
FormatOutput(IDS_PACKETS_SENT_RECEIVED_LOST,\
|
||||||
SentCount, SentCount - LostCount, LostCount, Count);
|
SentCount, SentCount - LostCount, LostCount, Count);
|
||||||
|
|
||||||
|
|
||||||
/* Print approximate times or NO approximate times if 100% loss */
|
/* Print approximate times or NO approximate times if 100% loss */
|
||||||
if ((SentCount - LostCount) > 0)
|
if ((SentCount - LostCount) > 0)
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS TCP/IPv4 Win32 Ping\0"
|
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS TCP/IPv4 Win32 Ping\0"
|
||||||
#define REACTOS_STR_INTERNAL_NAME "ping\0"
|
#define REACTOS_STR_INTERNAL_NAME "ping\0"
|
||||||
#define REACTOS_STR_ORIGINAL_FILENAME "ping.exe\0"
|
#define REACTOS_STR_ORIGINAL_FILENAME "ping.exe\0"
|
||||||
#define REACTOS_STR_ORIGINAL_COPYRIGHT "Casper S. Hornstrup (chorns@users.sourceforge.net)\0"
|
#define REACTOS_STR_ORIGINAL_COPYRIGHT "Casper S. Hornstrup (chorns@users.sourceforge.net)\0"
|
||||||
#include <reactos/version.rc>
|
#include <reactos/version.rc>
|
||||||
|
|
||||||
#include "lang/de-DE.rc"
|
#include "lang/de-DE.rc"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-D_WINE
|
-D_WINE
|
||||||
|
-D_USE_MATH_DEFINES
|
||||||
-D_DLL -D__USE_CRTIMP)
|
-D_DLL -D__USE_CRTIMP)
|
||||||
|
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-D__WINESRC__
|
-D__WINESRC__
|
||||||
|
-D_USE_MATH_DEFINES
|
||||||
-DUSE_WIN32_OPENGL)
|
-DUSE_WIN32_OPENGL)
|
||||||
|
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
||||||
|
|
|
@ -23,6 +23,7 @@ add_library(avifil32 SHARED
|
||||||
tmpfile.c
|
tmpfile.c
|
||||||
wavfile.c
|
wavfile.c
|
||||||
rsrc.rc
|
rsrc.rc
|
||||||
|
rsrc-utf8.rc
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/avifil32.def)
|
${CMAKE_CURRENT_BINARY_DIR}/avifil32.def)
|
||||||
|
|
||||||
set_module_type(avifil32 win32dll)
|
set_module_type(avifil32 win32dll)
|
||||||
|
|
50
dll/win32/avifil32/rsrc-utf8.rc
Normal file
50
dll/win32/avifil32/rsrc-utf8.rc
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
/*
|
||||||
|
* Top level resource file for avifil32.dll
|
||||||
|
*
|
||||||
|
* Copyright 2002 Michael Günnewig
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "avifile_private.h"
|
||||||
|
|
||||||
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
|
#define WINE_OLESELFREGISTER
|
||||||
|
#define WINE_FILEDESCRIPTION_STR "Wine AVI file support library"
|
||||||
|
#define WINE_FILENAME_STR "avifil32.dll"
|
||||||
|
#define WINE_FILEVERSION 4,0,3,1998
|
||||||
|
#define WINE_FILEVERSION_STR "4.03.1998"
|
||||||
|
|
||||||
|
#include "wine/wine_common_ver.rc"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Everything specific to any language goes
|
||||||
|
* in one of the specific files.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* UTF-8 */
|
||||||
|
#include "avifile_Bg.rc"
|
||||||
|
#include "avifile_Da.rc"
|
||||||
|
#include "avifile_De.rc"
|
||||||
|
#include "avifile_Fr.rc"
|
||||||
|
#include "avifile_Ja.rc"
|
||||||
|
#include "avifile_Ko.rc"
|
||||||
|
#include "avifile_Lt.rc"
|
||||||
|
#include "avifile_Pt.rc"
|
||||||
|
#include "avifile_Ro.rc"
|
||||||
|
#include "avifile_Ru.rc"
|
||||||
|
#include "avifile_Si.rc"
|
||||||
|
#include "avifile_Zh.rc"
|
|
@ -46,16 +46,3 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
#include "avifile_Tr.rc"
|
#include "avifile_Tr.rc"
|
||||||
#include "avifile_Uk.rc"
|
#include "avifile_Uk.rc"
|
||||||
|
|
||||||
/* UTF-8 */
|
|
||||||
#include "avifile_Bg.rc"
|
|
||||||
#include "avifile_Da.rc"
|
|
||||||
#include "avifile_De.rc"
|
|
||||||
#include "avifile_Fr.rc"
|
|
||||||
#include "avifile_Ja.rc"
|
|
||||||
#include "avifile_Ko.rc"
|
|
||||||
#include "avifile_Lt.rc"
|
|
||||||
#include "avifile_Pt.rc"
|
|
||||||
#include "avifile_Ro.rc"
|
|
||||||
#include "avifile_Ru.rc"
|
|
||||||
#include "avifile_Si.rc"
|
|
||||||
#include "avifile_Zh.rc"
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-D__WINESRC__
|
-D__WINESRC__
|
||||||
|
-D_USE_MATH_DEFINES
|
||||||
-D_DLL -D__USE_CRTIMP)
|
-D_DLL -D__USE_CRTIMP)
|
||||||
|
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
||||||
|
|
|
@ -7,6 +7,7 @@ add_definitions(-D_WIN32_WINNT=0x600)
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-D__WINESRC__
|
-D__WINESRC__
|
||||||
|
-D_USE_MATH_DEFINES
|
||||||
-D_DLL
|
-D_DLL
|
||||||
-D__USE_CRTIMP)
|
-D__USE_CRTIMP)
|
||||||
|
|
||||||
|
|
|
@ -2294,16 +2294,16 @@ CONFIGRET WINAPI CM_Get_First_Log_Conf_Ex(
|
||||||
|
|
||||||
if (plcLogConf)
|
if (plcLogConf)
|
||||||
{
|
{
|
||||||
pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO));
|
pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO));
|
||||||
if (pLogConfInfo == NULL)
|
if (pLogConfInfo == NULL)
|
||||||
return CR_OUT_OF_MEMORY;
|
return CR_OUT_OF_MEMORY;
|
||||||
|
|
||||||
pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
||||||
pLogConfInfo->dnDevInst = dnDevInst;
|
pLogConfInfo->dnDevInst = dnDevInst;
|
||||||
pLogConfInfo->ulFlags = ulFlags;
|
pLogConfInfo->ulFlags = ulFlags;
|
||||||
pLogConfInfo->ulTag = ulTag;
|
pLogConfInfo->ulTag = ulTag;
|
||||||
|
|
||||||
*plcLogConf = (LOG_CONF)pLogConfInfo;
|
*plcLogConf = (LOG_CONF)pLogConfInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CR_SUCCESS;
|
return CR_SUCCESS;
|
||||||
|
|
|
@ -31,12 +31,12 @@ static HFONT hIconTitleFont;
|
||||||
const struct builtin_class_descr ICONTITLE_builtin_class =
|
const struct builtin_class_descr ICONTITLE_builtin_class =
|
||||||
{
|
{
|
||||||
WC_ICONTITLE, /* name */
|
WC_ICONTITLE, /* name */
|
||||||
0, /* style */
|
0, /* style */
|
||||||
NULL, /* procA (winproc is Unicode only) */
|
NULL, /* procA (winproc is Unicode only) */
|
||||||
IconTitleWndProc, /* procW */
|
IconTitleWndProc, /* procW */
|
||||||
0, /* extra */
|
0, /* extra */
|
||||||
IDC_ARROW, /* cursor */
|
IDC_ARROW, /* cursor */
|
||||||
0 /* brush */
|
0 /* brush */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -342,154 +342,154 @@ IntGetWndProc(PWND pWnd, BOOL Ansi)
|
||||||
static ULONG_PTR FASTCALL
|
static ULONG_PTR FASTCALL
|
||||||
IntGetClassLongA(PWND Wnd, PCLS Class, int nIndex)
|
IntGetClassLongA(PWND Wnd, PCLS Class, int nIndex)
|
||||||
{
|
{
|
||||||
ULONG_PTR Ret = 0;
|
ULONG_PTR Ret = 0;
|
||||||
|
|
||||||
if (nIndex >= 0)
|
if (nIndex >= 0)
|
||||||
{
|
{
|
||||||
if (nIndex + sizeof(ULONG_PTR) < nIndex ||
|
if (nIndex + sizeof(ULONG_PTR) < nIndex ||
|
||||||
nIndex + sizeof(ULONG_PTR) > Class->cbclsExtra)
|
nIndex + sizeof(ULONG_PTR) > Class->cbclsExtra)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ret = *(PULONG_PTR)((ULONG_PTR)(Class + 1) + nIndex);
|
Ret = *(PULONG_PTR)((ULONG_PTR)(Class + 1) + nIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (nIndex)
|
switch (nIndex)
|
||||||
{
|
{
|
||||||
case GCL_CBWNDEXTRA:
|
case GCL_CBWNDEXTRA:
|
||||||
Ret = (ULONG_PTR)Class->cbwndExtra;
|
Ret = (ULONG_PTR)Class->cbwndExtra;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCL_CBCLSEXTRA:
|
case GCL_CBCLSEXTRA:
|
||||||
Ret = (ULONG_PTR)Class->cbclsExtra;
|
Ret = (ULONG_PTR)Class->cbclsExtra;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCL_HBRBACKGROUND:
|
case GCL_HBRBACKGROUND:
|
||||||
Ret = (ULONG_PTR)Class->hbrBackground;
|
Ret = (ULONG_PTR)Class->hbrBackground;
|
||||||
if (Ret != 0 && Ret < 0x4000)
|
if (Ret != 0 && Ret < 0x4000)
|
||||||
Ret = (ULONG_PTR)GetSysColorBrush((ULONG)Ret - 1);
|
Ret = (ULONG_PTR)GetSysColorBrush((ULONG)Ret - 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCL_HMODULE:
|
case GCL_HMODULE:
|
||||||
//ERR("Cls 0x%x GCL_HMODULE 0x%x\n", Wnd->pcls, Class->hModule);
|
//ERR("Cls 0x%x GCL_HMODULE 0x%x\n", Wnd->pcls, Class->hModule);
|
||||||
Ret = (ULONG_PTR)Class->hModule;
|
Ret = (ULONG_PTR)Class->hModule;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCL_MENUNAME:
|
case GCL_MENUNAME:
|
||||||
Ret = (ULONG_PTR)Class->lpszClientAnsiMenuName;
|
Ret = (ULONG_PTR)Class->lpszClientAnsiMenuName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCL_STYLE:
|
case GCL_STYLE:
|
||||||
Ret = (ULONG_PTR)Class->style;
|
Ret = (ULONG_PTR)Class->style;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCW_ATOM:
|
case GCW_ATOM:
|
||||||
Ret = (ULONG_PTR)Class->atomClassName;
|
Ret = (ULONG_PTR)Class->atomClassName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_HCURSOR:
|
case GCLP_HCURSOR:
|
||||||
/* FIXME - get handle from pointer to CURSOR object */
|
/* FIXME - get handle from pointer to CURSOR object */
|
||||||
Ret = (ULONG_PTR)Class->hCursor;
|
Ret = (ULONG_PTR)Class->hCursor;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_HICON:
|
case GCLP_HICON:
|
||||||
/* FIXME - get handle from pointer to ICON object */
|
/* FIXME - get handle from pointer to ICON object */
|
||||||
Ret = (ULONG_PTR)Class->hIcon;
|
Ret = (ULONG_PTR)Class->hIcon;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_HICONSM:
|
case GCLP_HICONSM:
|
||||||
/* FIXME - get handle from pointer to ICON object */
|
/* FIXME - get handle from pointer to ICON object */
|
||||||
Ret = (ULONG_PTR)Class->hIconSm;
|
Ret = (ULONG_PTR)Class->hIconSm;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_WNDPROC:
|
case GCLP_WNDPROC:
|
||||||
Ret = IntGetClsWndProc(Wnd, Class, TRUE);
|
Ret = IntGetClsWndProc(Wnd, Class, TRUE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
SetLastError(ERROR_INVALID_INDEX);
|
SetLastError(ERROR_INVALID_INDEX);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG_PTR FASTCALL
|
static ULONG_PTR FASTCALL
|
||||||
IntGetClassLongW (PWND Wnd, PCLS Class, int nIndex)
|
IntGetClassLongW (PWND Wnd, PCLS Class, int nIndex)
|
||||||
{
|
{
|
||||||
ULONG_PTR Ret = 0;
|
ULONG_PTR Ret = 0;
|
||||||
|
|
||||||
if (nIndex >= 0)
|
if (nIndex >= 0)
|
||||||
{
|
{
|
||||||
if (nIndex + sizeof(ULONG_PTR) < nIndex ||
|
if (nIndex + sizeof(ULONG_PTR) < nIndex ||
|
||||||
nIndex + sizeof(ULONG_PTR) > Class->cbclsExtra)
|
nIndex + sizeof(ULONG_PTR) > Class->cbclsExtra)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ret = *(PULONG_PTR)((ULONG_PTR)(Class + 1) + nIndex);
|
Ret = *(PULONG_PTR)((ULONG_PTR)(Class + 1) + nIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (nIndex)
|
switch (nIndex)
|
||||||
{
|
{
|
||||||
case GCL_CBWNDEXTRA:
|
case GCL_CBWNDEXTRA:
|
||||||
Ret = (ULONG_PTR)Class->cbwndExtra;
|
Ret = (ULONG_PTR)Class->cbwndExtra;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCL_CBCLSEXTRA:
|
case GCL_CBCLSEXTRA:
|
||||||
Ret = (ULONG_PTR)Class->cbclsExtra;
|
Ret = (ULONG_PTR)Class->cbclsExtra;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_HBRBACKGROUND:
|
case GCLP_HBRBACKGROUND:
|
||||||
Ret = (ULONG_PTR)Class->hbrBackground;
|
Ret = (ULONG_PTR)Class->hbrBackground;
|
||||||
if (Ret != 0 && Ret < 0x4000)
|
if (Ret != 0 && Ret < 0x4000)
|
||||||
Ret = (ULONG_PTR)GetSysColorBrush((ULONG)Ret - 1);
|
Ret = (ULONG_PTR)GetSysColorBrush((ULONG)Ret - 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCL_HMODULE:
|
case GCL_HMODULE:
|
||||||
Ret = (ULONG_PTR)Class->hModule;
|
Ret = (ULONG_PTR)Class->hModule;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_MENUNAME:
|
case GCLP_MENUNAME:
|
||||||
Ret = (ULONG_PTR)Class->lpszClientUnicodeMenuName;
|
Ret = (ULONG_PTR)Class->lpszClientUnicodeMenuName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCL_STYLE:
|
case GCL_STYLE:
|
||||||
Ret = (ULONG_PTR)Class->style;
|
Ret = (ULONG_PTR)Class->style;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCW_ATOM:
|
case GCW_ATOM:
|
||||||
Ret = (ULONG_PTR)Class->atomClassName;
|
Ret = (ULONG_PTR)Class->atomClassName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_HCURSOR:
|
case GCLP_HCURSOR:
|
||||||
/* FIXME - get handle from pointer to CURSOR object */
|
/* FIXME - get handle from pointer to CURSOR object */
|
||||||
Ret = (ULONG_PTR)Class->hCursor;
|
Ret = (ULONG_PTR)Class->hCursor;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_HICON:
|
case GCLP_HICON:
|
||||||
/* FIXME - get handle from pointer to ICON object */
|
/* FIXME - get handle from pointer to ICON object */
|
||||||
Ret = (ULONG_PTR)Class->hIcon;
|
Ret = (ULONG_PTR)Class->hIcon;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_HICONSM:
|
case GCLP_HICONSM:
|
||||||
/* FIXME - get handle from pointer to ICON object */
|
/* FIXME - get handle from pointer to ICON object */
|
||||||
Ret = (ULONG_PTR)Class->hIconSm;
|
Ret = (ULONG_PTR)Class->hIconSm;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GCLP_WNDPROC:
|
case GCLP_WNDPROC:
|
||||||
Ret = IntGetClsWndProc(Wnd, Class, FALSE);
|
Ret = IntGetClsWndProc(Wnd, Class, FALSE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
SetLastError(ERROR_INVALID_INDEX);
|
SetLastError(ERROR_INVALID_INDEX);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -531,7 +531,7 @@ GetClassLongA(HWND hWnd, int nIndex)
|
||||||
default:
|
default:
|
||||||
Ret = IntGetClassLongA(Wnd, Class, nIndex);
|
Ret = IntGetClassLongA(Wnd, Class, nIndex);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Ret = IntGetClassLongA(Wnd, Class, nIndex);
|
Ret = IntGetClassLongA(Wnd, Class, nIndex);
|
||||||
#endif
|
#endif
|
||||||
|
@ -623,7 +623,7 @@ GetClassLongPtrA(HWND hWnd,
|
||||||
|
|
||||||
Wnd = ValidateHwnd(hWnd);
|
Wnd = ValidateHwnd(hWnd);
|
||||||
if (!Wnd)
|
if (!Wnd)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
|
@ -662,7 +662,7 @@ GetClassLongPtrW(HWND hWnd,
|
||||||
|
|
||||||
Wnd = ValidateHwnd(hWnd);
|
Wnd = ValidateHwnd(hWnd);
|
||||||
if (!Wnd)
|
if (!Wnd)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
|
|
|
@ -1176,7 +1176,7 @@ HICON WINAPI CreateIcon(
|
||||||
if (bPlanes * bBitsPixel > 1)
|
if (bPlanes * bBitsPixel > 1)
|
||||||
{
|
{
|
||||||
iinfo.hbmColor = CreateBitmap( nWidth, nHeight, bPlanes, bBitsPixel, lpXORbits );
|
iinfo.hbmColor = CreateBitmap( nWidth, nHeight, bPlanes, bBitsPixel, lpXORbits );
|
||||||
iinfo.hbmMask = CreateBitmap( nWidth, nHeight, 1, 1, lpANDbits );
|
iinfo.hbmMask = CreateBitmap( nWidth, nHeight, 1, 1, lpANDbits );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,10 +48,10 @@ EhciDefferedRoutine(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVO
|
||||||
PQUEUE_HEAD CompletedQH, NextQH;
|
PQUEUE_HEAD CompletedQH, NextQH;
|
||||||
PQUEUE_TRANSFER_DESCRIPTOR CompletedTD, NextTD;
|
PQUEUE_TRANSFER_DESCRIPTOR CompletedTD, NextTD;
|
||||||
|
|
||||||
/* AsyncListAddr Register will have the next QueueHead to execute */
|
/* AsyncListAddr Register will have the next QueueHead to execute */
|
||||||
CurrentAddr = GetAsyncListQueueRegister(hcd);
|
CurrentAddr = GetAsyncListQueueRegister(hcd);
|
||||||
|
|
||||||
/* Calculate the VA for the next QueueHead */
|
/* Calculate the VA for the next QueueHead */
|
||||||
OffSet = CurrentAddr - (ULONG)FdoDeviceExtension->hcd.CommonBufferPA.LowPart;
|
OffSet = CurrentAddr - (ULONG)FdoDeviceExtension->hcd.CommonBufferPA.LowPart;
|
||||||
NextQH = (PQUEUE_HEAD)((ULONG)FdoDeviceExtension->hcd.CommonBufferVA + OffSet);
|
NextQH = (PQUEUE_HEAD)((ULONG)FdoDeviceExtension->hcd.CommonBufferVA + OffSet);
|
||||||
|
|
||||||
|
@ -62,14 +62,14 @@ EhciDefferedRoutine(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVO
|
||||||
|
|
||||||
//DumpQueueHead(CompletedQH);
|
//DumpQueueHead(CompletedQH);
|
||||||
|
|
||||||
/* Free memory for the Descriptors */
|
/* Free memory for the Descriptors */
|
||||||
CompletedTD = CompletedQH->TransferDescriptor;
|
CompletedTD = CompletedQH->TransferDescriptor;
|
||||||
NextTD = CompletedTD;
|
NextTD = CompletedTD;
|
||||||
while (NextTD)
|
while (NextTD)
|
||||||
{
|
{
|
||||||
CompletedTD = NextTD;
|
CompletedTD = NextTD;
|
||||||
NextTD = NextTD->NextDescriptor;
|
NextTD = NextTD->NextDescriptor;
|
||||||
FreeDescriptor(CompletedTD);
|
FreeDescriptor(CompletedTD);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the Event is set then release waiter */
|
/* If the Event is set then release waiter */
|
||||||
|
@ -80,19 +80,19 @@ EhciDefferedRoutine(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVO
|
||||||
|
|
||||||
/* Free the Mdl if there was one */
|
/* Free the Mdl if there was one */
|
||||||
if(CompletedQH->MdlToFree)
|
if(CompletedQH->MdlToFree)
|
||||||
IoFreeMdl(CompletedQH->MdlToFree);
|
IoFreeMdl(CompletedQH->MdlToFree);
|
||||||
|
|
||||||
/* Is there an IRP that needs to be completed */
|
/* Is there an IRP that needs to be completed */
|
||||||
if (CompletedQH->IrpToComplete)
|
if (CompletedQH->IrpToComplete)
|
||||||
{
|
{
|
||||||
PIRP Irp;
|
PIRP Irp;
|
||||||
PIO_STACK_LOCATION Stack;
|
PIO_STACK_LOCATION Stack;
|
||||||
PURB Urb;
|
PURB Urb;
|
||||||
|
|
||||||
Irp = CompletedQH->IrpToComplete;
|
Irp = CompletedQH->IrpToComplete;
|
||||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
ASSERT(Stack);
|
ASSERT(Stack);
|
||||||
Urb = (PURB) Stack->Parameters.Others.Argument1;
|
Urb = (PURB) Stack->Parameters.Others.Argument1;
|
||||||
|
|
||||||
/* Check for error */
|
/* Check for error */
|
||||||
if (CStatus & EHCI_ERROR_INT)
|
if (CStatus & EHCI_ERROR_INT)
|
||||||
|
|
|
@ -538,7 +538,8 @@ NTSTATUS HandleUrbRequest(PPDO_DEVICE_EXTENSION PdoDeviceExtension, PIRP Irp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(PdoDeviceExtension->Ports[Urb->UrbControlVendorClassRequest.Index-1].PortStatus & 0x8000))
|
if (!(PdoDeviceExtension->Ports[Urb->UrbControlVendorClassRequest.Index-1].PortStatus & 0x8000))
|
||||||
CompletePendingURBRequest(PdoDeviceExtension);
|
CompletePendingURBRequest(PdoDeviceExtension);
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -635,19 +636,19 @@ CompletePendingURBRequest(PPDO_DEVICE_EXTENSION DeviceExtension)
|
||||||
KeReleaseSpinLock(&DeviceExtension->IrpQueueLock, oldIrql);
|
KeReleaseSpinLock(&DeviceExtension->IrpQueueLock, oldIrql);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NextIrp = RemoveHeadList(&DeviceExtension->IrpQueue);
|
NextIrp = RemoveHeadList(&DeviceExtension->IrpQueue);
|
||||||
Irp = CONTAINING_RECORD(NextIrp, IRP, Tail.Overlay.ListEntry);
|
Irp = CONTAINING_RECORD(NextIrp, IRP, Tail.Overlay.ListEntry);
|
||||||
|
|
||||||
if (!Irp)
|
if (!Irp)
|
||||||
{
|
{
|
||||||
DPRINT1("No Irp\n");
|
DPRINT1("No Irp\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IoSetCancelRoutine(Irp, NULL);
|
IoSetCancelRoutine(Irp, NULL);
|
||||||
KeReleaseSpinLock(&DeviceExtension->IrpQueueLock, oldIrql);
|
KeReleaseSpinLock(&DeviceExtension->IrpQueueLock, oldIrql);
|
||||||
|
|
||||||
HandleUrbRequest(DeviceExtension, Irp);
|
HandleUrbRequest(DeviceExtension, Irp);
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,18 +159,18 @@ SubmitControlTransfer(PEHCI_HOST_CONTROLLER hcd,
|
||||||
|
|
||||||
if (TransferBuffer)
|
if (TransferBuffer)
|
||||||
{
|
{
|
||||||
/* Allocate Mdl for Buffer */
|
/* Allocate Mdl for Buffer */
|
||||||
pMdl = IoAllocateMdl(TransferBuffer,
|
pMdl = IoAllocateMdl(TransferBuffer,
|
||||||
TransferBufferLength,
|
TransferBufferLength,
|
||||||
FALSE,
|
FALSE,
|
||||||
FALSE,
|
FALSE,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* Lock Physical Pages */
|
/* Lock Physical Pages */
|
||||||
MmBuildMdlForNonPagedPool(pMdl);
|
MmBuildMdlForNonPagedPool(pMdl);
|
||||||
//MmProbeAndLockPages(pMdl, KernelMode, IoReadAccess);
|
//MmProbeAndLockPages(pMdl, KernelMode, IoReadAccess);
|
||||||
|
|
||||||
MdlPhysicalAddr = MmGetPhysicalAddress((PVOID)TransferBuffer).LowPart;
|
MdlPhysicalAddr = MmGetPhysicalAddress((PVOID)TransferBuffer).LowPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
QueueHead = CreateQueueHead(hcd);
|
QueueHead = CreateQueueHead(hcd);
|
||||||
|
@ -187,8 +187,8 @@ SubmitControlTransfer(PEHCI_HOST_CONTROLLER hcd,
|
||||||
|
|
||||||
if (TransferBuffer)
|
if (TransferBuffer)
|
||||||
{
|
{
|
||||||
Descriptor[1] = CreateDescriptor(hcd,
|
Descriptor[1] = CreateDescriptor(hcd,
|
||||||
PID_CODE_IN_TOKEN,
|
PID_CODE_IN_TOKEN,
|
||||||
TransferBufferLength);
|
TransferBufferLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,10 +202,10 @@ SubmitControlTransfer(PEHCI_HOST_CONTROLLER hcd,
|
||||||
|
|
||||||
if (TransferBuffer)
|
if (TransferBuffer)
|
||||||
{
|
{
|
||||||
Descriptor[0]->NextDescriptor = Descriptor[1];
|
Descriptor[0]->NextDescriptor = Descriptor[1];
|
||||||
Descriptor[1]->NextDescriptor = Descriptor[2];
|
Descriptor[1]->NextDescriptor = Descriptor[2];
|
||||||
Descriptor[1]->PreviousDescriptor = Descriptor[0];
|
Descriptor[1]->PreviousDescriptor = Descriptor[0];
|
||||||
Descriptor[2]->PreviousDescriptor = Descriptor[1];
|
Descriptor[2]->PreviousDescriptor = Descriptor[1];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -218,8 +218,8 @@ SubmitControlTransfer(PEHCI_HOST_CONTROLLER hcd,
|
||||||
|
|
||||||
if (TransferBuffer)
|
if (TransferBuffer)
|
||||||
{
|
{
|
||||||
Descriptor[1]->BufferPointer[0] = MdlPhysicalAddr;
|
Descriptor[1]->BufferPointer[0] = MdlPhysicalAddr;
|
||||||
Descriptor[0]->NextPointer = Descriptor[1]->PhysicalAddr;
|
Descriptor[0]->NextPointer = Descriptor[1]->PhysicalAddr;
|
||||||
Descriptor[1]->NextPointer = Descriptor[2]->PhysicalAddr;
|
Descriptor[1]->NextPointer = Descriptor[2]->PhysicalAddr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <ntifs.h>
|
#include <ntifs.h>
|
||||||
#include <ntddk.h>
|
#include <ntddk.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <hubbusif.h>
|
#include <hubbusif.h>
|
||||||
#include <usbioctl.h>
|
#include <usbioctl.h>
|
||||||
|
@ -12,16 +12,17 @@
|
||||||
|
|
||||||
#define USB_POOL_TAG (ULONG)'ebsu'
|
#define USB_POOL_TAG (ULONG)'ebsu'
|
||||||
|
|
||||||
#define DEVICEINTIALIZED 0x01
|
#define DEVICEINTIALIZED 0x01
|
||||||
#define DEVICESTARTED 0x02
|
#define DEVICESTARTED 0x02
|
||||||
#define DEVICEBUSY 0x04
|
#define DEVICEBUSY 0x04
|
||||||
#define DEVICESTOPPED 0x08
|
#define DEVICESTOPPED 0x08
|
||||||
#define DEVICESTALLED 0x10
|
#define DEVICESTALLED 0x10
|
||||||
|
#define DEVICEREMOVED 0x20
|
||||||
#define DEVICEREMOVED 0x20
|
#define DEVICEREMOVED 0x20
|
||||||
|
|
||||||
|
|
||||||
#define MAX_USB_DEVICES 127
|
#define MAX_USB_DEVICES 127
|
||||||
#define EHCI_MAX_SIZE_TRANSFER 0x100000
|
#define EHCI_MAX_SIZE_TRANSFER 0x100000
|
||||||
|
|
||||||
#define C_HUB_LOCAL_POWER 0
|
#define C_HUB_LOCAL_POWER 0
|
||||||
#define C_HUB_OVER_CURRENT 1
|
#define C_HUB_OVER_CURRENT 1
|
||||||
|
|
|
@ -338,7 +338,7 @@ RemoveUsbDevice(PVOID BusContext, PUSB_DEVICE_HANDLE DeviceHandle, ULONG Flags)
|
||||||
case USBD_MARK_DEVICE_BUSY:
|
case USBD_MARK_DEVICE_BUSY:
|
||||||
UsbDevice->DeviceState |= DEVICEBUSY;
|
UsbDevice->DeviceState |= DEVICEBUSY;
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
case USBD_KEEP_DEVICE_DATA:
|
case USBD_KEEP_DEVICE_DATA:
|
||||||
UsbDevice->DeviceState |= DEVICEREMOVED;
|
UsbDevice->DeviceState |= DEVICEREMOVED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -469,9 +469,9 @@ QueryDeviceInformation(PVOID BusContext,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DeviceInfo->CurrentConfigurationValue = UsbDevice->ActiveConfig->ConfigurationDescriptor.bConfigurationValue;
|
DeviceInfo->CurrentConfigurationValue = UsbDevice->ActiveConfig->ConfigurationDescriptor.bConfigurationValue;
|
||||||
/* FIXME: Use correct number of open pipes instead of all available */
|
/* FIXME: Use correct number of open pipes instead of all available */
|
||||||
DeviceInfo->NumberOfOpenPipes = UsbDevice->ActiveInterface->InterfaceDescriptor.bNumEndpoints;
|
DeviceInfo->NumberOfOpenPipes = UsbDevice->ActiveInterface->InterfaceDescriptor.bNumEndpoints;
|
||||||
DeviceInfo->PortNumber = UsbDevice->Port;
|
DeviceInfo->PortNumber = UsbDevice->Port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,179 +40,167 @@ extern "C" {
|
||||||
#define _UNDERFLOW 4
|
#define _UNDERFLOW 4
|
||||||
#define _TLOSS 5
|
#define _TLOSS 5
|
||||||
#define _PLOSS 6
|
#define _PLOSS 6
|
||||||
|
|
||||||
#define EDOM 33
|
#define EDOM 33
|
||||||
#define ERANGE 34
|
#define ERANGE 34
|
||||||
|
|
||||||
_CRTIMP extern double _HUGE;
|
_CRTIMP extern double _HUGE;
|
||||||
|
|
||||||
#define HUGE_VAL _HUGE
|
#define HUGE_VAL _HUGE
|
||||||
|
#define _matherrl _matherr
|
||||||
|
|
||||||
#ifndef _CRT_ABS_DEFINED
|
#ifndef _CRT_ABS_DEFINED
|
||||||
#define _CRT_ABS_DEFINED
|
#define _CRT_ABS_DEFINED
|
||||||
int __cdecl abs(int _X);
|
int __cdecl abs(int x);
|
||||||
long __cdecl labs(long _X);
|
long __cdecl labs(long x);
|
||||||
#endif
|
#endif
|
||||||
double __cdecl acos(double _X);
|
double __cdecl acos(double x);
|
||||||
double __cdecl asin(double _X);
|
double __cdecl asin(double x);
|
||||||
double __cdecl atan(double _X);
|
double __cdecl atan(double x);
|
||||||
double __cdecl atan2(double _Y,double _X);
|
double __cdecl atan2(double y, double x);
|
||||||
#ifndef _SIGN_DEFINED
|
double __cdecl cos(double x);
|
||||||
#define _SIGN_DEFINED
|
double __cdecl cosh(double x);
|
||||||
_CRTIMP double __cdecl _copysign (double _Number,double _Sign);
|
double __cdecl exp(double x);
|
||||||
_CRTIMP double __cdecl _chgsign (double _X);
|
double __cdecl fabs(double x);
|
||||||
#endif
|
double __cdecl fmod(double x, double y);
|
||||||
double __cdecl cos(double _X);
|
double __cdecl log(double x);
|
||||||
double __cdecl cosh(double _X);
|
double __cdecl log10(double x);
|
||||||
double __cdecl exp(double _X);
|
double __cdecl pow(double x, double y);
|
||||||
double expm1(double _X);
|
double __cdecl sin(double x);
|
||||||
double __cdecl fabs(double _X);
|
double __cdecl sinh(double x);
|
||||||
double __cdecl fmod(double _X,double _Y);
|
double __cdecl sqrt(double x);
|
||||||
double __cdecl log(double _X);
|
double __cdecl tan(double x);
|
||||||
double __cdecl log10(double _X);
|
double __cdecl tanh(double x);
|
||||||
double __cdecl pow(double _X,double _Y);
|
|
||||||
double __cdecl sin(double _X);
|
|
||||||
double __cdecl sinh(double _X);
|
|
||||||
double __cdecl tan(double _X);
|
|
||||||
double __cdecl tanh(double _X);
|
|
||||||
double __cdecl sqrt(double _X);
|
|
||||||
#ifndef _CRT_ATOF_DEFINED
|
|
||||||
#define _CRT_ATOF_DEFINED
|
|
||||||
double __cdecl atof(const char *_String);
|
|
||||||
double __cdecl _atof_l(const char *_String,_locale_t _Locale);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_CRTIMP double __cdecl _cabs(struct _complex _ComplexA);
|
|
||||||
_CRTIMP double __cdecl ceil(double _X);
|
|
||||||
_CRTIMP double __cdecl floor(double _X);
|
|
||||||
_CRTIMP double __cdecl frexp(double _X,int *_Y);
|
|
||||||
_CRTIMP double __cdecl _hypot(double _X,double _Y);
|
|
||||||
_CRTIMP double __cdecl _j0(double _X);
|
|
||||||
_CRTIMP double __cdecl _j1(double _X);
|
|
||||||
_CRTIMP double __cdecl _jn(int _X,double _Y);
|
|
||||||
_CRTIMP double __cdecl ldexp(double _X,int _Y);
|
|
||||||
#ifndef _CRT_MATHERR_DEFINED
|
#ifndef _CRT_MATHERR_DEFINED
|
||||||
#define _CRT_MATHERR_DEFINED
|
#define _CRT_MATHERR_DEFINED
|
||||||
int __cdecl _matherr(struct _exception *_Except);
|
int __cdecl _matherr(struct _exception *except);
|
||||||
#endif
|
#endif
|
||||||
_CRTIMP double __cdecl modf(double _X,double *_Y);
|
|
||||||
_CRTIMP double __cdecl _y0(double _X);
|
#ifndef _CRT_ATOF_DEFINED
|
||||||
_CRTIMP double __cdecl _y1(double _X);
|
#define _CRT_ATOF_DEFINED
|
||||||
_CRTIMP double __cdecl _yn(int _X,double _Y);
|
_CRTIMP double __cdecl atof(const char *str);
|
||||||
|
_CRTIMP double __cdecl _atof_l(const char *str ,_locale_t locale);
|
||||||
|
#endif
|
||||||
|
#ifndef _SIGN_DEFINED
|
||||||
|
#define _SIGN_DEFINED
|
||||||
|
_CRTIMP double __cdecl _copysign(double x,double sgn);
|
||||||
|
_CRTIMP double __cdecl _chgsign(double x);
|
||||||
|
#endif
|
||||||
|
_CRTIMP double __cdecl _cabs(struct _complex a);
|
||||||
|
_CRTIMP double __cdecl ceil(double x);
|
||||||
|
_CRTIMP double __cdecl floor(double x);
|
||||||
|
_CRTIMP double __cdecl frexp(double x, int *y);
|
||||||
|
_CRTIMP double __cdecl _hypot(double x, double y);
|
||||||
|
_CRTIMP double __cdecl _j0(double x);
|
||||||
|
_CRTIMP double __cdecl _j1(double x);
|
||||||
|
_CRTIMP double __cdecl _jn(int x, double y);
|
||||||
|
_CRTIMP double __cdecl ldexp(double x, int y);
|
||||||
|
_CRTIMP double __cdecl modf(double x, double *y);
|
||||||
|
_CRTIMP double __cdecl _y0(double x);
|
||||||
|
_CRTIMP double __cdecl _y1(double x);
|
||||||
|
_CRTIMP double __cdecl _yn(int x, double y);
|
||||||
|
_CRTIMP float __cdecl _hypotf(float x, float y);
|
||||||
|
|
||||||
#if defined(__i386__) || defined(_M_IX86)
|
#if defined(__i386__) || defined(_M_IX86)
|
||||||
_CRTIMP int __cdecl _set_SSE2_enable(int _Flag);
|
_CRTIMP int __cdecl _set_SSE2_enable(int flag);
|
||||||
/* from libmingwex */
|
|
||||||
float __cdecl _hypotf(float _X,float _Y);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float frexpf(float _X,int *_Y);
|
#if defined(__x86_64) || defined(_M_AMD64)
|
||||||
float __cdecl ldexpf(float _X,int _Y);
|
_CRTIMP float __cdecl _copysignf(float x, float sgn);
|
||||||
long double __cdecl ldexpl(long double _X,int _Y);
|
_CRTIMP float __cdecl _chgsignf(float x);
|
||||||
float __cdecl acosf(float _X);
|
_CRTIMP float __cdecl _logbf(float x);
|
||||||
float __cdecl asinf(float _X);
|
_CRTIMP float __cdecl _nextafterf(float x,float y);
|
||||||
float __cdecl atanf(float _X);
|
_CRTIMP int __cdecl _finitef(float x);
|
||||||
float __cdecl atan2f(float _X,float _Y);
|
_CRTIMP int __cdecl _isnanf(float x);
|
||||||
float __cdecl cosf(float _X);
|
_CRTIMP int __cdecl _fpclassf(float x);
|
||||||
float __cdecl sinf(float _X);
|
|
||||||
float __cdecl tanf(float _X);
|
|
||||||
float __cdecl coshf(float _X);
|
|
||||||
float __cdecl sinhf(float _X);
|
|
||||||
float __cdecl tanhf(float _X);
|
|
||||||
float __cdecl expf(float _X);
|
|
||||||
float expm1f(float _X);
|
|
||||||
float __cdecl logf(float _X);
|
|
||||||
float __cdecl log10f(float _X);
|
|
||||||
float __cdecl modff(float _X,float *_Y);
|
|
||||||
float __cdecl powf(float _X,float _Y);
|
|
||||||
float __cdecl sqrtf(float _X);
|
|
||||||
float __cdecl ceilf(float _X);
|
|
||||||
float __cdecl floorf(float _X);
|
|
||||||
float __cdecl fmodf(float _X,float _Y);
|
|
||||||
float __cdecl _hypotf(float _X,float _Y);
|
|
||||||
float __cdecl fabsf(float _X);
|
|
||||||
#if !defined(__ia64__) && !defined(_M_IA64)
|
|
||||||
/* from libmingwex */
|
|
||||||
float __cdecl _copysignf (float _Number,float _Sign);
|
|
||||||
float __cdecl _chgsignf (float _X);
|
|
||||||
float __cdecl _logbf(float _X);
|
|
||||||
float __cdecl _nextafterf(float _X,float _Y);
|
|
||||||
int __cdecl _finitef(float _X);
|
|
||||||
int __cdecl _isnanf(float _X);
|
|
||||||
int __cdecl _fpclassf(float _X);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__ia64__) || defined (_M_IA64)
|
||||||
|
_CRTIMP float __cdecl fabsf(float x);
|
||||||
#define __fabs(x, res) \
|
_CRTIMP float __cdecl ldexpf(float x, int y);
|
||||||
__asm__ ("fabs;" : "=t" (res) : "0" (x))
|
_CRTIMP long double __cdecl tanl(long double x);
|
||||||
|
#else
|
||||||
#elif defined(_MSC_VER)
|
__CRT_INLINE float __cdecl fabsf(float x) { return ((float)fabs((double)x)); }
|
||||||
|
__CRT_INLINE float __cdecl ldexpf(float x, int expn) { return (float)ldexp (x, expn); }
|
||||||
#define __fabs(x, res) \
|
__CRT_INLINE long double tanl(long double x) { return (tan((double)x)); }
|
||||||
__asm { fld [(x)] } \
|
|
||||||
__asm { fabs } \
|
|
||||||
__asm { fstp [(res)] }
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__CRT_INLINE long double __cdecl fabsl (long double x)
|
#if defined(__x86_64) || defined(_M_AMD64) || \
|
||||||
{
|
defined (__ia64__) || defined (_M_IA64)
|
||||||
long double res;
|
_CRTIMP float __cdecl acosf(float x);
|
||||||
__fabs(x, res);
|
_CRTIMP float __cdecl asinf(float x);
|
||||||
return res;
|
_CRTIMP float __cdecl atanf(float x);
|
||||||
}
|
_CRTIMP float __cdecl atan2f(float x, float y);
|
||||||
|
_CRTIMP float __cdecl ceilf(float x);
|
||||||
__CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign((double)(_Number)); }
|
_CRTIMP float __cdecl cosf(float x);
|
||||||
__CRT_INLINE long double _copysignl(long double _Number,long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); }
|
_CRTIMP float __cdecl coshf(float x);
|
||||||
__CRT_INLINE long double _hypotl(long double _X,long double _Y) { return _hypot((double)(_X),(double)(_Y)); }
|
_CRTIMP float __cdecl expf(float x);
|
||||||
__CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); }
|
_CRTIMP float __cdecl floorf(float x);
|
||||||
|
_CRTIMP float __cdecl fmodf(float x, float y);
|
||||||
#if !defined (__ia64__) && !defined (_M_IA64)
|
_CRTIMP float __cdecl logf(float x);
|
||||||
__CRT_INLINE float __cdecl fabsf (float x)
|
_CRTIMP float __cdecl log10f(float x);
|
||||||
{
|
_CRTIMP float __cdecl modff(float x, float *y);
|
||||||
float res;
|
_CRTIMP float __cdecl powf(float b, float e);
|
||||||
__fabs(x, res);
|
_CRTIMP float __cdecl sinf(float x);
|
||||||
return res;
|
_CRTIMP float __cdecl sinhf(float x);
|
||||||
}
|
_CRTIMP float __cdecl sqrtf(float x);
|
||||||
|
_CRTIMP float __cdecl tanf(float x);
|
||||||
__CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp (x, expn); }
|
_CRTIMP float __cdecl tanhf(float x);
|
||||||
#endif
|
#else
|
||||||
|
__CRT_INLINE float acosf(float x) { return ((float)acos((double)x)); }
|
||||||
#define _matherrl _matherr
|
__CRT_INLINE float asinf(float x) { return ((float)asin((double)x)); }
|
||||||
|
__CRT_INLINE float atanf(float x) { return ((float)atan((double)x)); }
|
||||||
__CRT_INLINE long double modfl(long double _X,long double *_Y) {
|
__CRT_INLINE float atan2f(float x,float y) { return ((float)atan2((double)x,(double)y)); }
|
||||||
double _Di,_Df = modf((double)_X,&_Di);
|
__CRT_INLINE float ceilf(float x) { return ((float)ceil((double)x)); }
|
||||||
*_Y = (long double)_Di;
|
__CRT_INLINE float cosf(float x) { return ((float)cos((double)x)); }
|
||||||
return (_Df);
|
__CRT_INLINE float coshf(float x) { return ((float)cosh((double)x)); }
|
||||||
}
|
__CRT_INLINE float expf(float x) { return ((float)exp((double)x)); }
|
||||||
|
__CRT_INLINE float floorf(float x) { return ((float)floor((double)x)); }
|
||||||
#if !defined(__x86_64) && !defined(_M_AMD64)
|
__CRT_INLINE float fmodf(float x,float y) { return ((float)fmod((double)x,(double)y)); }
|
||||||
__CRT_INLINE float acosf(float _X) { return ((float)acos((double)_X)); }
|
__CRT_INLINE float logf(float x) { return ((float)log((double)x)); }
|
||||||
__CRT_INLINE float asinf(float _X) { return ((float)asin((double)_X)); }
|
__CRT_INLINE float log10f(float x) { return ((float)log10((double)x)); }
|
||||||
__CRT_INLINE float atanf(float _X) { return ((float)atan((double)_X)); }
|
__CRT_INLINE float modff(float x,float *y) {
|
||||||
__CRT_INLINE float atan2f(float _X,float _Y) { return ((float)atan2((double)_X,(double)_Y)); }
|
double _Di,_Df = modf((double)x,&_Di);
|
||||||
__CRT_INLINE float ceilf(float _X) { return ((float)ceil((double)_X)); }
|
*y = (float)_Di;
|
||||||
__CRT_INLINE float cosf(float _X) { return ((float)cos((double)_X)); }
|
|
||||||
__CRT_INLINE float coshf(float _X) { return ((float)cosh((double)_X)); }
|
|
||||||
__CRT_INLINE float expf(float _X) { return ((float)exp((double)_X)); }
|
|
||||||
__CRT_INLINE float floorf(float _X) { return ((float)floor((double)_X)); }
|
|
||||||
__CRT_INLINE float fmodf(float _X,float _Y) { return ((float)fmod((double)_X,(double)_Y)); }
|
|
||||||
__CRT_INLINE float logf(float _X) { return ((float)log((double)_X)); }
|
|
||||||
__CRT_INLINE float log10f(float _X) { return ((float)log10((double)_X)); }
|
|
||||||
__CRT_INLINE float modff(float _X,float *_Y) {
|
|
||||||
double _Di,_Df = modf((double)_X,&_Di);
|
|
||||||
*_Y = (float)_Di;
|
|
||||||
return ((float)_Df);
|
return ((float)_Df);
|
||||||
}
|
}
|
||||||
__CRT_INLINE float powf(float _X,float _Y) { return ((float)pow((double)_X,(double)_Y)); }
|
__CRT_INLINE float powf(float x,float y) { return ((float)pow((double)x,(double)y)); }
|
||||||
__CRT_INLINE float sinf(float _X) { return ((float)sin((double)_X)); }
|
__CRT_INLINE float sinf(float x) { return ((float)sin((double)x)); }
|
||||||
__CRT_INLINE float sinhf(float _X) { return ((float)sinh((double)_X)); }
|
__CRT_INLINE float sinhf(float x) { return ((float)sinh((double)x)); }
|
||||||
__CRT_INLINE float sqrtf(float _X) { return ((float)sqrt((double)_X)); }
|
__CRT_INLINE float sqrtf(float x) { return ((float)sqrt((double)x)); }
|
||||||
__CRT_INLINE float tanf(float _X) { return ((float)tan((double)_X)); }
|
__CRT_INLINE float tanf(float x) { return ((float)tan((double)x)); }
|
||||||
__CRT_INLINE float tanhf(float _X) { return ((float)tanh((double)_X)); }
|
__CRT_INLINE float tanhf(float x) { return ((float)tanh((double)x)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
__CRT_INLINE long double acosl(long double x) { return (acos((double)x)); }
|
||||||
|
__CRT_INLINE long double asinl(long double x) { return (asin((double)x)); }
|
||||||
|
__CRT_INLINE long double atanl(long double x) { return (atan((double)x)); }
|
||||||
|
__CRT_INLINE long double atan2l(long double y, long double x) { return (atan2((double)y, (double)x)); }
|
||||||
|
__CRT_INLINE long double ceill(long double x) { return (ceil((double)x)); }
|
||||||
|
__CRT_INLINE long double cosl(long double x) { return (cos((double)x)); }
|
||||||
|
__CRT_INLINE long double coshl(long double x) { return (cosh((double)x)); }
|
||||||
|
__CRT_INLINE long double expl(long double x) { return (exp((double)x)); }
|
||||||
|
__CRT_INLINE long double floorl(long double x) { return (floor((double)x)); }
|
||||||
|
__CRT_INLINE long double fmodl(long double x, long double y) { return (fmod((double)x, (double)y)); }
|
||||||
|
__CRT_INLINE long double frexpl(long double x, int *y) { return (frexp((double)x, y)); }
|
||||||
|
__CRT_INLINE long double logl(long double x) { return (log((double)x)); }
|
||||||
|
__CRT_INLINE long double log10l(long double x) { return (log10((double)x)); }
|
||||||
|
__CRT_INLINE long double powl(long double x, long double y) { return (pow((double)x, (double)y)); }
|
||||||
|
__CRT_INLINE long double sinl(long double x) { return (sin((double)x)); }
|
||||||
|
__CRT_INLINE long double sinhl(long double x) { return (sinh((double)x)); }
|
||||||
|
__CRT_INLINE long double sqrtl(long double x) { return (sqrt((double)x)); }
|
||||||
|
__CRT_INLINE long double tanhl(long double x) {return (tanh((double)x)); }
|
||||||
|
__CRT_INLINE long double __cdecl fabsl(long double x) { return fabs((double)x); }
|
||||||
|
__CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign((double)(_Number)); }
|
||||||
|
__CRT_INLINE long double _copysignl(long double _Number, long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); }
|
||||||
|
__CRT_INLINE long double _hypotl(long double x,long double y) { return _hypot((double)(x),(double)(y)); }
|
||||||
|
__CRT_INLINE float frexpf(float x, int *y) { return ((float)frexp((double)x,y)); }
|
||||||
|
__CRT_INLINE long double ldexpl(long double x, int y) { return ldexp((double)x, y); }
|
||||||
|
__CRT_INLINE long double modfl(long double x,long double *y) {
|
||||||
|
double _Di,_Df = modf((double)x,&_Di);
|
||||||
|
*y = (long double)_Di;
|
||||||
|
return (_Df);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NO_OLDNAMES
|
#ifndef NO_OLDNAMES
|
||||||
#define DOMAIN _DOMAIN
|
#define DOMAIN _DOMAIN
|
||||||
#define SING _SING
|
#define SING _SING
|
||||||
|
@ -221,540 +209,29 @@ extern "C" {
|
||||||
#define TLOSS _TLOSS
|
#define TLOSS _TLOSS
|
||||||
#define PLOSS _PLOSS
|
#define PLOSS _PLOSS
|
||||||
#define matherr _matherr
|
#define matherr _matherr
|
||||||
|
#define HUGE _HUGE
|
||||||
#define HUGE _HUGE
|
// _CRTIMP double __cdecl cabs(struct _complex x);
|
||||||
/* double __cdecl cabs(struct _complex _X); */
|
#define cabs _cabs
|
||||||
double __cdecl hypot(double _X,double _Y);
|
_CRTIMP double __cdecl hypot(double x,double y);
|
||||||
__CRT_INLINE float __cdecl hypotf (float x, float y)
|
_CRTIMP double __cdecl j0(double x);
|
||||||
{ return (float) hypot (x, y);}
|
_CRTIMP double __cdecl j1(double x);
|
||||||
_CRTIMP double __cdecl j0(double _X);
|
_CRTIMP double __cdecl jn(int x,double y);
|
||||||
_CRTIMP double __cdecl j1(double _X);
|
_CRTIMP double __cdecl y0(double x);
|
||||||
_CRTIMP double __cdecl jn(int _X,double _Y);
|
_CRTIMP double __cdecl y1(double x);
|
||||||
_CRTIMP double __cdecl y0(double _X);
|
_CRTIMP double __cdecl yn(int x,double y);
|
||||||
_CRTIMP double __cdecl y1(double _X);
|
__CRT_INLINE float __cdecl hypotf(float x, float y) { return (float) hypot (x, y); }
|
||||||
_CRTIMP double __cdecl yn(int _X,double _Y);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __NO_ISOCEXT
|
|
||||||
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|
|
||||||
|| !defined __STRICT_ANSI__ || defined __GLIBCPP__
|
|
||||||
|
|
||||||
#if !defined(_MSC_VER)
|
|
||||||
#define NAN (0.0F/0.0F)
|
|
||||||
#define HUGE_VALF (1.0F/0.0F)
|
|
||||||
#define HUGE_VALL (1.0L/0.0L)
|
|
||||||
#define INFINITY (1.0F/0.0F)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define FP_NAN 0x0100
|
|
||||||
#define FP_NORMAL 0x0400
|
|
||||||
#define FP_INFINITE (FP_NAN | FP_NORMAL)
|
|
||||||
#define FP_ZERO 0x4000
|
|
||||||
#define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
|
|
||||||
/* 0x0200 is signbit mask */
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
|
|
||||||
#define __fxam(x, sw) \
|
|
||||||
__asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x))
|
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
|
|
||||||
#define __fxam(x, sw) \
|
|
||||||
__asm { fld [(x)] } \
|
|
||||||
__asm { fxam } \
|
|
||||||
__asm { wait } \
|
|
||||||
__asm { fnstsw [(sw)] } \
|
|
||||||
__asm { fstp st(0) }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
We can't __CRT_INLINE float or double, because we want to ensure truncation
|
|
||||||
to semantic type before classification.
|
|
||||||
(A normal long double value might become subnormal when
|
|
||||||
converted to double, and zero when converted to float.)
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern int __cdecl __fpclassifyf (float);
|
|
||||||
extern int __cdecl __fpclassify (double);
|
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __fpclassifyl (long double x){
|
|
||||||
unsigned short sw;
|
|
||||||
__fxam(x, sw);
|
|
||||||
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __fpclassify (double x){
|
|
||||||
return __fpclassifyl((long double)x);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) \
|
|
||||||
: sizeof (x) == sizeof (double) ? __fpclassify (x) \
|
|
||||||
: __fpclassifyl (x))
|
|
||||||
|
|
||||||
/* 7.12.3.2 */
|
|
||||||
#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
|
|
||||||
|
|
||||||
/* 7.12.3.3 */
|
|
||||||
/* #define isinf(x) (fpclassify(x) == FP_INFINITE) */
|
|
||||||
|
|
||||||
/* we don't have fpclassify */
|
|
||||||
__CRT_INLINE int isinf (double d) {
|
|
||||||
int expon = 0;
|
|
||||||
double val = frexp (d, &expon);
|
|
||||||
if (expon == 1025) {
|
|
||||||
if (val == 0.5) {
|
|
||||||
return 1;
|
|
||||||
} else if (val == -0.5) {
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 7.12.3.4 */
|
|
||||||
/* We don't need to worry about truncation here:
|
|
||||||
A NaN stays a NaN. */
|
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __isnan (double _x)
|
|
||||||
{
|
|
||||||
unsigned short sw;
|
|
||||||
__fxam(_x, sw);
|
|
||||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
|
||||||
== FP_NAN;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __isnanf (float _x)
|
|
||||||
{
|
|
||||||
unsigned short sw;
|
|
||||||
__fxam(_x, sw);
|
|
||||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
|
||||||
== FP_NAN;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __isnanl (long double _x)
|
|
||||||
{
|
|
||||||
unsigned short sw;
|
|
||||||
__fxam(_x, sw);
|
|
||||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
|
||||||
== FP_NAN;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) \
|
|
||||||
: sizeof (x) == sizeof (double) ? __isnan (x) \
|
|
||||||
: __isnanl (x))
|
|
||||||
|
|
||||||
/* 7.12.3.5 */
|
|
||||||
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
|
|
||||||
|
|
||||||
/* 7.12.3.6 The signbit macro */
|
|
||||||
__CRT_INLINE int __cdecl __signbit (double x) {
|
|
||||||
unsigned short stw;
|
|
||||||
__fxam(x, stw);
|
|
||||||
return stw & 0x0200;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __signbitf (float x) {
|
|
||||||
unsigned short stw;
|
|
||||||
__fxam(x, stw);
|
|
||||||
return stw & 0x0200;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __signbitl (long double x) {
|
|
||||||
unsigned short stw;
|
|
||||||
__fxam(x, stw);
|
|
||||||
return stw & 0x0200;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) \
|
|
||||||
: sizeof (x) == sizeof (double) ? __signbit (x) \
|
|
||||||
: __signbitl (x))
|
|
||||||
|
|
||||||
extern double __cdecl exp2(double);
|
|
||||||
extern float __cdecl exp2f(float);
|
|
||||||
extern long double __cdecl exp2l(long double);
|
|
||||||
|
|
||||||
#define FP_ILOGB0 ((int)0x80000000)
|
|
||||||
#define FP_ILOGBNAN ((int)0x80000000)
|
|
||||||
extern int __cdecl ilogb (double);
|
|
||||||
extern int __cdecl ilogbf (float);
|
|
||||||
extern int __cdecl ilogbl (long double);
|
|
||||||
|
|
||||||
extern double __cdecl log1p(double);
|
|
||||||
extern float __cdecl log1pf(float);
|
|
||||||
extern long double __cdecl log1pl(long double);
|
|
||||||
|
|
||||||
extern double __cdecl log2 (double);
|
|
||||||
extern float __cdecl log2f (float);
|
|
||||||
extern long double __cdecl log2l (long double);
|
|
||||||
|
|
||||||
extern double __cdecl logb (double);
|
|
||||||
extern float __cdecl logbf (float);
|
|
||||||
extern long double __cdecl logbl (long double);
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
|
|
||||||
#define __fxtract(x, res) \
|
|
||||||
__asm__ ("fxtract\n\t" \
|
|
||||||
"fstp %%st" : "=t" (res) : "0" (x))
|
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
|
|
||||||
#define __fxtract(x, res) \
|
|
||||||
__asm { fld [(x)] } \
|
|
||||||
__asm { fxtract } \
|
|
||||||
__asm { fstp st(0) } \
|
|
||||||
__asm { fstp [(res)] }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__CRT_INLINE double __cdecl logb (double x)
|
|
||||||
{
|
|
||||||
double res;
|
|
||||||
__fxtract(x, res);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE float __cdecl logbf (float x)
|
|
||||||
{
|
|
||||||
float res;
|
|
||||||
__fxtract(x, res);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE long double __cdecl logbl (long double x)
|
|
||||||
{
|
|
||||||
long double res;
|
|
||||||
__fxtract(x, res);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 7.12.6.13 */
|
|
||||||
extern double __cdecl scalbn (double, int);
|
|
||||||
extern float __cdecl scalbnf (float, int);
|
|
||||||
extern long double __cdecl scalbnl (long double, int);
|
|
||||||
|
|
||||||
extern double __cdecl scalbln (double, long);
|
|
||||||
extern float __cdecl scalblnf (float, long);
|
|
||||||
extern long double __cdecl scalblnl (long double, long);
|
|
||||||
|
|
||||||
/* 7.12.7.1 */
|
|
||||||
/* Implementations adapted from Cephes versions */
|
|
||||||
extern double __cdecl cbrt (double);
|
|
||||||
extern float __cdecl cbrtf (float);
|
|
||||||
extern long double __cdecl cbrtl (long double);
|
|
||||||
|
|
||||||
extern long double __cdecl hypotl (long double, long double);
|
|
||||||
|
|
||||||
extern long double __cdecl powl (long double, long double);
|
|
||||||
extern long double __cdecl expl(long double);
|
|
||||||
extern long double expm1l(long double);
|
|
||||||
extern long double __cdecl coshl(long double);
|
|
||||||
extern long double __cdecl acosl(long double);
|
|
||||||
extern long double __cdecl asinl(long double);
|
|
||||||
extern long double __cdecl atanl(long double);
|
|
||||||
extern long double __cdecl atan2l(long double,long double);
|
|
||||||
extern long double __cdecl sinhl(long double);
|
|
||||||
extern long double __cdecl tanhl(long double);
|
|
||||||
|
|
||||||
/* 7.12.8.1 The erf functions */
|
|
||||||
extern double __cdecl erf (double);
|
|
||||||
extern float __cdecl erff (float);
|
|
||||||
/* TODO
|
|
||||||
extern long double __cdecl erfl (long double);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* 7.12.8.2 The erfc functions */
|
|
||||||
extern double __cdecl erfc (double);
|
|
||||||
extern float __cdecl erfcf (float);
|
|
||||||
/* TODO
|
|
||||||
extern long double __cdecl erfcl (long double);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* 7.12.8.3 The lgamma functions */
|
|
||||||
extern double __cdecl lgamma (double);
|
|
||||||
extern float __cdecl lgammaf (float);
|
|
||||||
extern long double __cdecl lgammal (long double);
|
|
||||||
|
|
||||||
/* 7.12.8.4 The tgamma functions */
|
|
||||||
extern double __cdecl tgamma (double);
|
|
||||||
extern float __cdecl tgammaf (float);
|
|
||||||
extern long double __cdecl tgammal (long double);
|
|
||||||
|
|
||||||
extern long double __cdecl ceill (long double);
|
|
||||||
extern long double __cdecl floorl (long double);
|
|
||||||
extern long double __cdecl frexpl(long double,int *);
|
|
||||||
extern long double __cdecl log10l(long double);
|
|
||||||
extern long double __cdecl logl(long double);
|
|
||||||
extern long double __cdecl cosl(long double);
|
|
||||||
extern long double __cdecl sinl(long double);
|
|
||||||
extern long double __cdecl tanl(long double);
|
|
||||||
extern long double sqrtl(long double);
|
|
||||||
|
|
||||||
/* 7.12.9.3 */
|
|
||||||
extern double __cdecl nearbyint ( double);
|
|
||||||
extern float __cdecl nearbyintf (float);
|
|
||||||
extern long double __cdecl nearbyintl (long double);
|
|
||||||
|
|
||||||
/* 7.12.9.4 */
|
|
||||||
/* round, using fpu control word settings */
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
|
|
||||||
#define __frndint(x, res) \
|
|
||||||
__asm__ ("fabs;" : "=t" (res) : "0" (x))
|
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
|
|
||||||
#define __frndint(x, res) \
|
|
||||||
__asm { fld [(x)] } \
|
|
||||||
__asm { frndint } \
|
|
||||||
__asm { fstp [(res)] }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__CRT_INLINE double __cdecl rint (double x)
|
|
||||||
{
|
|
||||||
double retval;
|
|
||||||
__frndint(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE float __cdecl rintf (float x)
|
|
||||||
{
|
|
||||||
float retval;
|
|
||||||
__frndint(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE long double __cdecl rintl (long double x)
|
|
||||||
{
|
|
||||||
long double retval;
|
|
||||||
__frndint(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 7.12.9.5 */
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
|
|
||||||
#define __fistpl(x, res) \
|
|
||||||
__asm__ __volatile__("fistpl %0" : "=m" (res) : "t" (x) : "st")
|
|
||||||
|
|
||||||
#define __fistpll(x, res) \
|
|
||||||
__asm__ __volatile__("fistpll %0" : "=m" (res) : "t" (x) : "st")
|
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
|
|
||||||
#define __fistpl(x, res) \
|
|
||||||
__asm { fld [(x)] } \
|
|
||||||
__asm { fistp [(res)] }
|
|
||||||
|
|
||||||
#define __fistpll(x, res) \
|
|
||||||
__asm { fld [(x)] } \
|
|
||||||
__asm { fistp [(res)] }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__CRT_INLINE long __cdecl lrint (double x)
|
|
||||||
{
|
|
||||||
long retval;
|
|
||||||
__fistpl(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE long __cdecl lrintf (float x)
|
|
||||||
{
|
|
||||||
long retval;
|
|
||||||
__fistpl(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
__CRT_INLINE long __cdecl lrintl (long double x)
|
|
||||||
{
|
|
||||||
long retval;
|
|
||||||
__fistpl(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
__MINGW_EXTENSION __CRT_INLINE long long __cdecl llrint (double x)
|
|
||||||
{
|
|
||||||
__MINGW_EXTENSION long long retval;
|
|
||||||
__fistpll(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
__MINGW_EXTENSION __CRT_INLINE long long __cdecl llrintf (float x)
|
|
||||||
{
|
|
||||||
__MINGW_EXTENSION long long retval;
|
|
||||||
__fistpll(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
__MINGW_EXTENSION __CRT_INLINE long long __cdecl llrintl (long double x)
|
|
||||||
{
|
|
||||||
__MINGW_EXTENSION long long retval;
|
|
||||||
__fistpll(x, retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 7.12.9.6 */
|
|
||||||
/* round away from zero, regardless of fpu control word settings */
|
|
||||||
extern double __cdecl round (double);
|
|
||||||
extern float __cdecl roundf (float);
|
|
||||||
extern long double __cdecl roundl (long double);
|
|
||||||
|
|
||||||
/* 7.12.9.7 */
|
|
||||||
extern long __cdecl lround (double);
|
|
||||||
extern long __cdecl lroundf (float);
|
|
||||||
extern long __cdecl lroundl (long double);
|
|
||||||
|
|
||||||
__MINGW_EXTENSION extern long long __cdecl llround (double);
|
|
||||||
__MINGW_EXTENSION extern long long __cdecl llroundf (float);
|
|
||||||
__MINGW_EXTENSION extern long long __cdecl llroundl (long double);
|
|
||||||
|
|
||||||
/* 7.12.9.8 */
|
|
||||||
/* round towards zero, regardless of fpu control word settings */
|
|
||||||
extern double __cdecl trunc (double);
|
|
||||||
extern float __cdecl truncf (float);
|
|
||||||
extern long double __cdecl truncl (long double);
|
|
||||||
|
|
||||||
extern long double __cdecl fmodl (long double, long double);
|
|
||||||
|
|
||||||
/* 7.12.10.2 */
|
|
||||||
extern double __cdecl remainder (double, double);
|
|
||||||
extern float __cdecl remainderf (float, float);
|
|
||||||
extern long double __cdecl remainderl (long double, long double);
|
|
||||||
|
|
||||||
/* 7.12.10.3 */
|
|
||||||
extern double __cdecl remquo(double, double, int *);
|
|
||||||
extern float __cdecl remquof(float, float, int *);
|
|
||||||
extern long double __cdecl remquol(long double, long double, int *);
|
|
||||||
|
|
||||||
/* 7.12.11.1 */
|
|
||||||
extern double __cdecl copysign (double, double); /* in libmoldname.a */
|
|
||||||
extern float __cdecl copysignf (float, float);
|
|
||||||
extern long double __cdecl copysignl (long double, long double);
|
|
||||||
|
|
||||||
/* 7.12.11.2 Return a NaN */
|
|
||||||
extern double __cdecl nan(const char *tagp);
|
|
||||||
extern float __cdecl nanf(const char *tagp);
|
|
||||||
extern long double __cdecl nanl(const char *tagp);
|
|
||||||
|
|
||||||
#ifndef __STRICT_ANSI__
|
|
||||||
#define _nan() nan("")
|
|
||||||
#define _nanf() nanf("")
|
|
||||||
#define _nanl() nanl("")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* 7.12.11.3 */
|
|
||||||
extern double __cdecl nextafter (double, double); /* in libmoldname.a */
|
|
||||||
extern float __cdecl nextafterf (float, float);
|
|
||||||
extern long double __cdecl nextafterl (long double, long double);
|
|
||||||
|
|
||||||
/* 7.12.11.4 The nexttoward functions: TODO */
|
|
||||||
|
|
||||||
/* 7.12.12.1 */
|
|
||||||
/* x > y ? (x - y) : 0.0 */
|
|
||||||
extern double __cdecl fdim (double x, double y);
|
|
||||||
extern float __cdecl fdimf (float x, float y);
|
|
||||||
extern long double __cdecl fdiml (long double x, long double y);
|
|
||||||
|
|
||||||
/* fmax and fmin.
|
|
||||||
NaN arguments are treated as missing data: if one argument is a NaN
|
|
||||||
and the other numeric, then these functions choose the numeric
|
|
||||||
value. */
|
|
||||||
|
|
||||||
/* 7.12.12.2 */
|
|
||||||
extern double __cdecl fmax (double, double);
|
|
||||||
extern float __cdecl fmaxf (float, float);
|
|
||||||
extern long double __cdecl fmaxl (long double, long double);
|
|
||||||
|
|
||||||
/* 7.12.12.3 */
|
|
||||||
extern double __cdecl fmin (double, double);
|
|
||||||
extern float __cdecl fminf (float, float);
|
|
||||||
extern long double __cdecl fminl (long double, long double);
|
|
||||||
|
|
||||||
/* 7.12.13.1 */
|
|
||||||
/* return x * y + z as a ternary op */
|
|
||||||
extern double __cdecl fma (double, double, double);
|
|
||||||
extern float __cdecl fmaf (float, float, float);
|
|
||||||
extern long double __cdecl fmal (long double, long double, long double);
|
|
||||||
|
|
||||||
|
|
||||||
/* 7.12.14 */
|
|
||||||
/*
|
|
||||||
* With these functions, comparisons involving quiet NaNs set the FP
|
|
||||||
* condition code to "unordered". The IEEE floating-point spec
|
|
||||||
* dictates that the result of floating-point comparisons should be
|
|
||||||
* false whenever a NaN is involved, with the exception of the != op,
|
|
||||||
* which always returns true: yes, (NaN != NaN) is true).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
|
||||||
|
|
||||||
#define isgreater(x, y) __builtin_isgreater(x, y)
|
|
||||||
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
|
|
||||||
#define isless(x, y) __builtin_isless(x, y)
|
|
||||||
#define islessequal(x, y) __builtin_islessequal(x, y)
|
|
||||||
#define islessgreater(x, y) __builtin_islessgreater(x, y)
|
|
||||||
#define isunordered(x, y) __builtin_isunordered(x, y)
|
|
||||||
|
|
||||||
#else
|
|
||||||
/* helper */
|
|
||||||
__CRT_INLINE int __cdecl
|
|
||||||
__fp_unordered_compare (long double x, long double y){
|
|
||||||
unsigned short retval;
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
__asm__ ("fucom %%st(1);"
|
|
||||||
"fnstsw;": "=a" (retval) : "t" (x), "u" (y));
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
__asm {
|
|
||||||
fld [x]
|
|
||||||
fld [y]
|
|
||||||
fxch st(1)
|
|
||||||
fucom st(1)
|
|
||||||
fnstsw [retval]
|
|
||||||
fstp st(0)
|
|
||||||
fstp st(0)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
|
|
||||||
& 0x4500) == 0)
|
|
||||||
#define isless(x, y) ((__fp_unordered_compare (y, x) \
|
|
||||||
& 0x4500) == 0)
|
|
||||||
#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
|
|
||||||
& FP_INFINITE) == 0)
|
|
||||||
#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
|
|
||||||
& FP_INFINITE) == 0)
|
|
||||||
#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
|
|
||||||
& FP_SUBNORMAL) == 0)
|
|
||||||
#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
|
|
||||||
& 0x4500) == 0x4500)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __STDC_VERSION__ >= 199901L */
|
|
||||||
#endif /* __NO_ISOCEXT */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
extern "C++" {
|
extern "C++" {
|
||||||
template<class _Ty> inline _Ty _Pow_int(_Ty _X,int _Y) {
|
template<class _Ty> inline _Ty _Pow_int(_Ty x,int y) {
|
||||||
unsigned int _N;
|
unsigned int _N;
|
||||||
if(_Y >= 0) _N = (unsigned int)_Y;
|
if(y >= 0) _N = (unsigned int)y;
|
||||||
else _N = (unsigned int)(-_Y);
|
else _N = (unsigned int)(-y);
|
||||||
for(_Ty _Z = _Ty(1);;_X *= _X) {
|
for(_Ty _Z = _Ty(1);;x *= x) {
|
||||||
if((_N & 1)!=0) _Z *= _X;
|
if((_N & 1)!=0) _Z *= x;
|
||||||
if((_N >>= 1)==0) return (_Y < 0 ? _Ty(1) / _Z : _Z);
|
if((_N >>= 1)==0) return (y < 0 ? _Ty(1) / _Z : _Z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -762,7 +239,9 @@ extern "C++" {
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
#if !defined(__STRICT_ANSI__) && !defined(_MATH_DEFINES_DEFINED)
|
#endif /* !_INC_MATH */
|
||||||
|
|
||||||
|
#if defined(_USE_MATH_DEFINES) && !defined(_MATH_DEFINES_DEFINED)
|
||||||
#define _MATH_DEFINES_DEFINED
|
#define _MATH_DEFINES_DEFINED
|
||||||
|
|
||||||
#define M_E 2.71828182845904523536
|
#define M_E 2.71828182845904523536
|
||||||
|
@ -778,20 +257,5 @@ extern "C++" {
|
||||||
#define M_2_SQRTPI 1.12837916709551257390
|
#define M_2_SQRTPI 1.12837916709551257390
|
||||||
#define M_SQRT2 1.41421356237309504880
|
#define M_SQRT2 1.41421356237309504880
|
||||||
#define M_SQRT1_2 0.707106781186547524401
|
#define M_SQRT1_2 0.707106781186547524401
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __MINGW_FPCLASS_DEFINED
|
#endif /* _USE_MATH_DEFINES */
|
||||||
#define __MINGW_FPCLASS_DEFINED 1
|
|
||||||
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
|
|
||||||
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
|
|
||||||
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
|
|
||||||
#define _FPCLASS_NN 0x0008 /* Negative Normal */
|
|
||||||
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
|
|
||||||
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
|
|
||||||
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
|
|
||||||
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
|
|
||||||
#define _FPCLASS_PN 0x0100 /* Positive Normal */
|
|
||||||
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
|
|
||||||
#endif /* __MINGW_FPCLASS_DEFINED */
|
|
||||||
|
|
||||||
#endif /* !_INC_MATH */
|
|
||||||
|
|
4
lib/3rdparty/libsamplerate/CMakeLists.txt
vendored
4
lib/3rdparty/libsamplerate/CMakeLists.txt
vendored
|
@ -1,8 +1,4 @@
|
||||||
|
|
||||||
add_definitions(
|
|
||||||
-DHAVE_LRINT
|
|
||||||
-DHAVE_LRINTF)
|
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
samplerate.c
|
samplerate.c
|
||||||
src_linear.c
|
src_linear.c
|
||||||
|
|
|
@ -442,10 +442,12 @@ add_pch(crt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${CRT_SOURCE})
|
||||||
add_dependencies(crt psdk buildno_header asm)
|
add_dependencies(crt psdk buildno_header asm)
|
||||||
|
|
||||||
list(APPEND LIBCNTPR_SOURCE
|
list(APPEND LIBCNTPR_SOURCE
|
||||||
|
float/isnan.c
|
||||||
math/abs.c
|
math/abs.c
|
||||||
math/div.c
|
math/div.c
|
||||||
math/labs.c
|
math/labs.c
|
||||||
math/rand_nt.c
|
math/rand_nt.c
|
||||||
|
mbstring/mbstrlen.c
|
||||||
mem/memccpy.c
|
mem/memccpy.c
|
||||||
mem/memcmp.c
|
mem/memcmp.c
|
||||||
mem/memicmp.c
|
mem/memicmp.c
|
||||||
|
@ -526,6 +528,7 @@ if(ARCH MATCHES i386)
|
||||||
math/i386/ftol_asm.s
|
math/i386/ftol_asm.s
|
||||||
math/i386/ftol2_asm.s
|
math/i386/ftol2_asm.s
|
||||||
math/i386/log_asm.s
|
math/i386/log_asm.s
|
||||||
|
math/i386/log10_asm.s
|
||||||
math/i386/pow_asm.s
|
math/i386/pow_asm.s
|
||||||
math/i386/sin_asm.s
|
math/i386/sin_asm.s
|
||||||
math/i386/sqrt_asm.s
|
math/i386/sqrt_asm.s
|
||||||
|
@ -634,4 +637,4 @@ add_library(user32_wsprintf
|
||||||
printf/wvsnprintfA.c
|
printf/wvsnprintfA.c
|
||||||
printf/wvsnprintfW.c
|
printf/wvsnprintfW.c
|
||||||
string/mbstowcs_nt.c
|
string/mbstowcs_nt.c
|
||||||
string/wcstombs_nt.c)
|
string/wcstombs_nt.c)
|
||||||
|
|
|
@ -42,7 +42,7 @@ int CDECL MSVCRT_I10_OUTPUT(long double ld, int prec, int flag, struct _I10_OUTP
|
||||||
} else
|
} else
|
||||||
data->sign = ' ';
|
data->sign = ' ';
|
||||||
|
|
||||||
if(isinf(d)) {
|
if(!_finite(d)) {
|
||||||
data->pos = 1;
|
data->pos = 1;
|
||||||
data->len = 5;
|
data->len = 5;
|
||||||
memcpy(data->str, inf_str, sizeof(inf_str));
|
memcpy(data->str, inf_str, sizeof(inf_str));
|
||||||
|
@ -50,7 +50,7 @@ int CDECL MSVCRT_I10_OUTPUT(long double ld, int prec, int flag, struct _I10_OUTP
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isnan(d)) {
|
if(_isnan(d)) {
|
||||||
data->pos = 1;
|
data->pos = 1;
|
||||||
data->len = 6;
|
data->len = 6;
|
||||||
memcpy(data->str, nan_str, sizeof(nan_str));
|
memcpy(data->str, nan_str, sizeof(nan_str));
|
||||||
|
|
|
@ -217,7 +217,7 @@ format_float(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (precision > 0 || flags & FLAG_SPECIAL)
|
if (precision > 0 || flags & FLAG_SPECIAL)
|
||||||
*--(*string) = _T('.');
|
*--(*string) = _T('.');
|
||||||
|
|
||||||
/* Digits before the decimal point */
|
/* Digits before the decimal point */
|
||||||
do
|
do
|
||||||
|
@ -422,7 +422,7 @@ streamout(FILE *stream, const TCHAR *format, va_list argptr)
|
||||||
/* Check if this is the 2nd 'l' in a row */
|
/* Check if this is the 2nd 'l' in a row */
|
||||||
if (format[-2] == 'l') flags |= FLAG_INT64;
|
if (format[-2] == 'l') flags |= FLAG_INT64;
|
||||||
else flags |= FLAG_LONG;
|
else flags |= FLAG_LONG;
|
||||||
}
|
}
|
||||||
else if (chr == _T('I'))
|
else if (chr == _T('I'))
|
||||||
{
|
{
|
||||||
if (format[0] == _T('3') && format[1] == _T('2'))
|
if (format[0] == _T('3') && format[1] == _T('2'))
|
||||||
|
|
|
@ -43,9 +43,9 @@ PULONG MmGetPageDirectory(VOID);
|
||||||
#define MiPdeToPte(PDE) ((PMMPTE)MiPteToAddress(PDE))
|
#define MiPdeToPte(PDE) ((PMMPTE)MiPteToAddress(PDE))
|
||||||
#define MiPteToPde(PTE) ((PMMPDE)MiAddressToPte(PTE))
|
#define MiPteToPde(PTE) ((PMMPDE)MiAddressToPte(PTE))
|
||||||
|
|
||||||
#define ADDR_TO_PAGE_TABLE(v) (((ULONG)(v)) / (1024 * PAGE_SIZE))
|
#define ADDR_TO_PAGE_TABLE(v) (((ULONG)(v)) / (1024 * PAGE_SIZE))
|
||||||
#define ADDR_TO_PDE_OFFSET(v) (((ULONG)(v)) / (1024 * PAGE_SIZE))
|
#define ADDR_TO_PDE_OFFSET(v) (((ULONG)(v)) / (1024 * PAGE_SIZE))
|
||||||
#define ADDR_TO_PTE_OFFSET(v) ((((ULONG)(v)) % (1024 * PAGE_SIZE)) / PAGE_SIZE)
|
#define ADDR_TO_PTE_OFFSET(v) ((((ULONG)(v)) % (1024 * PAGE_SIZE)) / PAGE_SIZE)
|
||||||
|
|
||||||
#define MiGetPdeOffset ADDR_TO_PDE_OFFSET
|
#define MiGetPdeOffset ADDR_TO_PDE_OFFSET
|
||||||
|
|
||||||
|
|
|
@ -109,43 +109,43 @@ MiReserveAlignedSystemPtes(IN ULONG NumberOfPtes,
|
||||||
NextPte = MmSystemPteBase + PreviousPte->u.List.NextEntry;
|
NextPte = MmSystemPteBase + PreviousPte->u.List.NextEntry;
|
||||||
ClusterSize = MI_GET_CLUSTER_SIZE(NextPte);
|
ClusterSize = MI_GET_CLUSTER_SIZE(NextPte);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check if this cluster contains enough PTEs
|
// Check if this cluster contains enough PTEs
|
||||||
//
|
//
|
||||||
if (NumberOfPtes <= ClusterSize)
|
if (NumberOfPtes <= ClusterSize)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//
|
//
|
||||||
// On to the next cluster
|
// On to the next cluster
|
||||||
//
|
//
|
||||||
PreviousPte = NextPte;
|
PreviousPte = NextPte;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make sure we didn't reach the end of the cluster list
|
// Make sure we didn't reach the end of the cluster list
|
||||||
//
|
//
|
||||||
if (PreviousPte->u.List.NextEntry == MM_EMPTY_LIST)
|
if (PreviousPte->u.List.NextEntry == MM_EMPTY_LIST)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Release the System PTE lock and return failure
|
// Release the System PTE lock and return failure
|
||||||
//
|
//
|
||||||
KeReleaseQueuedSpinLock(LockQueueSystemSpaceLock, OldIrql);
|
KeReleaseQueuedSpinLock(LockQueueSystemSpaceLock, OldIrql);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Unlink the cluster
|
// Unlink the cluster
|
||||||
//
|
//
|
||||||
PreviousPte->u.List.NextEntry = NextPte->u.List.NextEntry;
|
PreviousPte->u.List.NextEntry = NextPte->u.List.NextEntry;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check if the reservation spans the whole cluster
|
// Check if the reservation spans the whole cluster
|
||||||
//
|
//
|
||||||
if (ClusterSize == NumberOfPtes)
|
if (ClusterSize == NumberOfPtes)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Return the first PTE of this cluster
|
// Return the first PTE of this cluster
|
||||||
//
|
//
|
||||||
ReturnPte = NextPte;
|
ReturnPte = NextPte;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -155,41 +155,41 @@ MiReserveAlignedSystemPtes(IN ULONG NumberOfPtes,
|
||||||
{
|
{
|
||||||
NextPte->u.Long = 0;
|
NextPte->u.Long = 0;
|
||||||
NextPte++;
|
NextPte++;
|
||||||
}
|
}
|
||||||
NextPte->u.Long = 0;
|
NextPte->u.Long = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Divide the cluster into two parts
|
// Divide the cluster into two parts
|
||||||
//
|
//
|
||||||
ClusterSize -= NumberOfPtes;
|
ClusterSize -= NumberOfPtes;
|
||||||
ReturnPte = NextPte + ClusterSize;
|
ReturnPte = NextPte + ClusterSize;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set the size of the first cluster, zero the second if needed
|
// Set the size of the first cluster, zero the second if needed
|
||||||
//
|
//
|
||||||
if (ClusterSize == 1)
|
if (ClusterSize == 1)
|
||||||
{
|
{
|
||||||
NextPte->u.List.OneEntry = 1;
|
NextPte->u.List.OneEntry = 1;
|
||||||
ReturnPte->u.Long = 0;
|
ReturnPte->u.Long = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NextPte++;
|
NextPte++;
|
||||||
NextPte->u.List.NextEntry = ClusterSize;
|
NextPte->u.List.NextEntry = ClusterSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Step through the cluster list to find out where to insert the first
|
// Step through the cluster list to find out where to insert the first
|
||||||
//
|
//
|
||||||
PreviousPte = &MmFirstFreeSystemPte[SystemPtePoolType];
|
PreviousPte = &MmFirstFreeSystemPte[SystemPtePoolType];
|
||||||
|
|
||||||
while (PreviousPte->u.List.NextEntry != MM_EMPTY_LIST)
|
while (PreviousPte->u.List.NextEntry != MM_EMPTY_LIST)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Get the next cluster
|
// Get the next cluster
|
||||||
//
|
//
|
||||||
NextPte = MmSystemPteBase + PreviousPte->u.List.NextEntry;
|
NextPte = MmSystemPteBase + PreviousPte->u.List.NextEntry;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -202,30 +202,30 @@ MiReserveAlignedSystemPtes(IN ULONG NumberOfPtes,
|
||||||
// On to the next cluster
|
// On to the next cluster
|
||||||
//
|
//
|
||||||
PreviousPte = NextPte;
|
PreviousPte = NextPte;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Retrieve the first cluster and link it back into the cluster list
|
// Retrieve the first cluster and link it back into the cluster list
|
||||||
//
|
//
|
||||||
NextPte = ReturnPte - ClusterSize;
|
NextPte = ReturnPte - ClusterSize;
|
||||||
|
|
||||||
NextPte->u.List.NextEntry = PreviousPte->u.List.NextEntry;
|
NextPte->u.List.NextEntry = PreviousPte->u.List.NextEntry;
|
||||||
PreviousPte->u.List.NextEntry = NextPte - MmSystemPteBase;
|
PreviousPte->u.List.NextEntry = NextPte - MmSystemPteBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Decrease availability
|
// Decrease availability
|
||||||
//
|
//
|
||||||
MmTotalFreeSystemPtes[SystemPtePoolType] -= NumberOfPtes;
|
MmTotalFreeSystemPtes[SystemPtePoolType] -= NumberOfPtes;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Release the System PTE lock
|
// Release the System PTE lock
|
||||||
//
|
//
|
||||||
KeReleaseQueuedSpinLock(LockQueueSystemSpaceLock, OldIrql);
|
KeReleaseQueuedSpinLock(LockQueueSystemSpaceLock, OldIrql);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Flush the TLB
|
// Flush the TLB
|
||||||
//
|
//
|
||||||
KeFlushProcessTb();
|
KeFlushProcessTb();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -309,23 +309,23 @@ MiReleaseSystemPtes(IN PMMPTE StartingPte,
|
||||||
NextPte = MmSystemPteBase + PreviousPte->u.List.NextEntry;
|
NextPte = MmSystemPteBase + PreviousPte->u.List.NextEntry;
|
||||||
ClusterSize = MI_GET_CLUSTER_SIZE(NextPte);
|
ClusterSize = MI_GET_CLUSTER_SIZE(NextPte);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check if this cluster is adjacent to the PTEs being released
|
// Check if this cluster is adjacent to the PTEs being released
|
||||||
//
|
//
|
||||||
if ((NextPte + ClusterSize == StartingPte) ||
|
if ((NextPte + ClusterSize == StartingPte) ||
|
||||||
(StartingPte + NumberOfPtes == NextPte))
|
(StartingPte + NumberOfPtes == NextPte))
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Add the PTEs in the cluster to the PTEs being released
|
// Add the PTEs in the cluster to the PTEs being released
|
||||||
//
|
//
|
||||||
NumberOfPtes += ClusterSize;
|
NumberOfPtes += ClusterSize;
|
||||||
|
|
||||||
if (NextPte < StartingPte)
|
if (NextPte < StartingPte)
|
||||||
StartingPte = NextPte;
|
StartingPte = NextPte;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Unlink this cluster and zero it
|
// Unlink this cluster and zero it
|
||||||
//
|
//
|
||||||
PreviousPte->u.List.NextEntry = NextPte->u.List.NextEntry;
|
PreviousPte->u.List.NextEntry = NextPte->u.List.NextEntry;
|
||||||
|
|
||||||
if (NextPte->u.List.OneEntry == 0)
|
if (NextPte->u.List.OneEntry == 0)
|
||||||
|
@ -335,55 +335,55 @@ MiReleaseSystemPtes(IN PMMPTE StartingPte,
|
||||||
}
|
}
|
||||||
NextPte->u.Long = 0;
|
NextPte->u.Long = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Invalidate the previously found insertion location, if any
|
// Invalidate the previously found insertion location, if any
|
||||||
//
|
//
|
||||||
InsertPte = NULL;
|
InsertPte = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Check if the insertion location is right before this cluster
|
// Check if the insertion location is right before this cluster
|
||||||
//
|
//
|
||||||
if ((InsertPte == NULL) && (NumberOfPtes <= ClusterSize))
|
if ((InsertPte == NULL) && (NumberOfPtes <= ClusterSize))
|
||||||
InsertPte = PreviousPte;
|
InsertPte = PreviousPte;
|
||||||
|
|
||||||
//
|
//
|
||||||
// On to the next cluster
|
// On to the next cluster
|
||||||
//
|
//
|
||||||
PreviousPte = NextPte;
|
PreviousPte = NextPte;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If no insertion location was found, use the tail of the list
|
// If no insertion location was found, use the tail of the list
|
||||||
//
|
//
|
||||||
if (InsertPte == NULL)
|
if (InsertPte == NULL)
|
||||||
InsertPte = PreviousPte;
|
InsertPte = PreviousPte;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a new cluster using the PTEs being released
|
// Create a new cluster using the PTEs being released
|
||||||
//
|
//
|
||||||
if (NumberOfPtes != 1)
|
if (NumberOfPtes != 1)
|
||||||
{
|
{
|
||||||
StartingPte->u.List.OneEntry = 0;
|
StartingPte->u.List.OneEntry = 0;
|
||||||
|
|
||||||
NextPte = StartingPte + 1;
|
NextPte = StartingPte + 1;
|
||||||
NextPte->u.List.NextEntry = NumberOfPtes;
|
NextPte->u.List.NextEntry = NumberOfPtes;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
StartingPte->u.List.OneEntry = 1;
|
StartingPte->u.List.OneEntry = 1;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Link the new cluster into the cluster list at the insertion location
|
// Link the new cluster into the cluster list at the insertion location
|
||||||
//
|
//
|
||||||
StartingPte->u.List.NextEntry = InsertPte->u.List.NextEntry;
|
StartingPte->u.List.NextEntry = InsertPte->u.List.NextEntry;
|
||||||
InsertPte->u.List.NextEntry = StartingPte - MmSystemPteBase;
|
InsertPte->u.List.NextEntry = StartingPte - MmSystemPteBase;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Release the System PTE lock
|
// Release the System PTE lock
|
||||||
//
|
//
|
||||||
KeReleaseQueuedSpinLock(LockQueueSystemSpaceLock, OldIrql);
|
KeReleaseQueuedSpinLock(LockQueueSystemSpaceLock, OldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
|
@ -145,16 +145,16 @@ SepPrivilegeCheck(PTOKEN Token,
|
||||||
|
|
||||||
/* Check if the privilege is enabled */
|
/* Check if the privilege is enabled */
|
||||||
if (Token->Privileges[j].Attributes & SE_PRIVILEGE_ENABLED)
|
if (Token->Privileges[j].Attributes & SE_PRIVILEGE_ENABLED)
|
||||||
{
|
{
|
||||||
Privileges[i].Attributes |= SE_PRIVILEGE_USED_FOR_ACCESS;
|
Privileges[i].Attributes |= SE_PRIVILEGE_USED_FOR_ACCESS;
|
||||||
Required--;
|
Required--;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Leave the inner loop */
|
/* Leave the inner loop */
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Return whether we found all required privileges */
|
/* Return whether we found all required privileges */
|
||||||
return (Required == 0);
|
return (Required == 0);
|
||||||
|
|
|
@ -52,247 +52,247 @@
|
||||||
|
|
||||||
/* Official tags */
|
/* Official tags */
|
||||||
#define GDITAG_ATM_FONT 'ebdA'
|
#define GDITAG_ATM_FONT 'ebdA'
|
||||||
#define GDITAG_BMP_FONT 'dfmB'
|
#define GDITAG_BMP_FONT 'dfmB'
|
||||||
#define GDITAG_ENG_EVENT 'msfD'
|
#define GDITAG_ENG_EVENT 'msfD'
|
||||||
#define GDITAG_DWM_HWND_LOOKUP 'LmwD'
|
#define GDITAG_DWM_HWND_LOOKUP 'LmwD'
|
||||||
#define GDITAG_DWM_VALIDATION 'vMWD'
|
#define GDITAG_DWM_VALIDATION 'vMWD'
|
||||||
#define GDITAG_LOCKED_PRIMARY 'ddxD'
|
#define GDITAG_LOCKED_PRIMARY 'ddxD'
|
||||||
#define GDITAG_DC_COLOR_TRANSFORM 'bdaG'
|
#define GDITAG_DC_COLOR_TRANSFORM 'bdaG'
|
||||||
#define GDITAG_DC_FONT 'ddaG'
|
#define GDITAG_DC_FONT 'ddaG'
|
||||||
#define GDITAG_ALPHABLEND 'plaG'
|
#define GDITAG_ALPHABLEND 'plaG'
|
||||||
#define GDITAG_BRUSH_FREELIST 'fabG'
|
#define GDITAG_BRUSH_FREELIST 'fabG'
|
||||||
#define GDITAG_ICM_DIB_LIST 'ldbG'
|
#define GDITAG_ICM_DIB_LIST 'ldbG'
|
||||||
#define GDITAG_FONTCACHE 'cacG'
|
#define GDITAG_FONTCACHE 'cacG'
|
||||||
#define GDITAG_SCRIPTS 'lscG'
|
#define GDITAG_SCRIPTS 'lscG'
|
||||||
#define GDITAG_CHAR_TO_WIDE_CHAR 'cwcG'
|
#define GDITAG_CHAR_TO_WIDE_CHAR 'cwcG'
|
||||||
#define GDITAG_RBRUSH 'rbdG'
|
#define GDITAG_RBRUSH 'rbdG'
|
||||||
#define GDITAG_DC_FREELIST 'fcdG'
|
#define GDITAG_DC_FREELIST 'fcdG'
|
||||||
#define GDITAG_DWMSTATE 'scDG'
|
#define GDITAG_DWMSTATE 'scDG'
|
||||||
#define GDITAG_DEVMODE 'vedG'
|
#define GDITAG_DEVMODE 'vedG'
|
||||||
#define GDITAG_PDEV 'veDG'
|
#define GDITAG_PDEV 'veDG'
|
||||||
#define GDITAG_HGLYPH_ARRAY 'mfdG'
|
#define GDITAG_HGLYPH_ARRAY 'mfdG'
|
||||||
#define GDITAG_DRVSUP 'srdG'
|
#define GDITAG_DRVSUP 'srdG'
|
||||||
#define GDITAG_CLIPOBJ 'vrdG'
|
#define GDITAG_CLIPOBJ 'vrdG'
|
||||||
#define GDITAG_SEMAPHORE_VALIDATE 'dtdG'
|
#define GDITAG_SEMAPHORE_VALIDATE 'dtdG'
|
||||||
#define GDITAG_WATCHDOG 'dwdG'
|
#define GDITAG_WATCHDOG 'dwdG'
|
||||||
#define GDITAG_ENGBRUSH 'rbeG'
|
#define GDITAG_ENGBRUSH 'rbeG'
|
||||||
#define GDITAG_ENUM_DISPLAY_DEVICES 'ddeG'
|
#define GDITAG_ENUM_DISPLAY_DEVICES 'ddeG'
|
||||||
#define GDITAG_EDGE 'gdeG'
|
#define GDITAG_EDGE 'gdeG'
|
||||||
#define GDITAG_TRIANGLEDATA 'gdEg'
|
#define GDITAG_TRIANGLEDATA 'gdEg'
|
||||||
#define GDITAG_TEXTOUT 'oteG'
|
#define GDITAG_TEXTOUT 'oteG'
|
||||||
#define GDITAG_FONT_DEFAULT_FAMILY 'fdfG'
|
#define GDITAG_FONT_DEFAULT_FAMILY 'fdfG'
|
||||||
#define GDITAG_FONTFILEVIEW 'vffG'
|
#define GDITAG_FONTFILEVIEW 'vffG'
|
||||||
#define GDITAG_UNIVERSAL_FONT_ID 'difG'
|
#define GDITAG_UNIVERSAL_FONT_ID 'difG'
|
||||||
#define GDITAG_FILEPATH 'liFG'
|
#define GDITAG_FILEPATH 'liFG'
|
||||||
#define GDITAG_MAPFILE 'lifG'
|
#define GDITAG_MAPFILE 'lifG'
|
||||||
#define GDITAG_FLOODFILL 'dlFG'
|
#define GDITAG_FLOODFILL 'dlFG'
|
||||||
#define GDITAG_RFONT 'tnfG'
|
#define GDITAG_RFONT 'tnfG'
|
||||||
#define GDITAG_FONT_SUB 'bsfG'
|
#define GDITAG_FONT_SUB 'bsfG'
|
||||||
#define GDITAG_FONT_STOCKFONT 'fsfG'
|
#define GDITAG_FONT_STOCKFONT 'fsfG'
|
||||||
#define GDITAG_FAST_MUTEX 'msfG'
|
#define GDITAG_FAST_MUTEX 'msfG'
|
||||||
#define GDITAG_FULLSCREEN 'lufG'
|
#define GDITAG_FULLSCREEN 'lufG'
|
||||||
#define GDITAG_FONTVICTIM 'ivfG'
|
#define GDITAG_FONTVICTIM 'ivfG'
|
||||||
#define GDITAG_GLYPHBLOCK ' bgG'
|
#define GDITAG_GLYPHBLOCK ' bgG'
|
||||||
#define GDITAG_GDEVICE 'vdgG'
|
#define GDITAG_GDEVICE 'vdgG'
|
||||||
#define GDITAG_GLYPHSET 'slgG'
|
#define GDITAG_GLYPHSET 'slgG'
|
||||||
#define GDITAG_HGLYPH 'ylgG'
|
#define GDITAG_HGLYPH 'ylgG'
|
||||||
#define GDITAG_HMGR_LFONT_TYPE ':?hG'
|
#define GDITAG_HMGR_LFONT_TYPE ':?hG'
|
||||||
#define GDITAG_HMGR_RFONT_TYPE ';?hG'
|
#define GDITAG_HMGR_RFONT_TYPE ';?hG'
|
||||||
#define GDITAG_HMGR_BRUSH_TYPE '@?hG'
|
#define GDITAG_HMGR_BRUSH_TYPE '@?hG'
|
||||||
#define GDITAG_HMGR_ICMCXF_TYPE '>?hG'
|
#define GDITAG_HMGR_ICMCXF_TYPE '>?hG'
|
||||||
#define GDITAG_HMGR_DEF_TYPE '0?hG'
|
#define GDITAG_HMGR_DEF_TYPE '0?hG'
|
||||||
#define GDITAG_HMGR_DC_TYPE '1?hG'
|
#define GDITAG_HMGR_DC_TYPE '1?hG'
|
||||||
#define GDITAG_HMGR_RGN_TYPE '4?hG'
|
#define GDITAG_HMGR_RGN_TYPE '4?hG'
|
||||||
#define GDITAG_HMGR_SURF_TYPE '5?hG'
|
#define GDITAG_HMGR_SURF_TYPE '5?hG'
|
||||||
#define GDITAG_HMGR_CLIENTOBJ_TYPE '6?hG'
|
#define GDITAG_HMGR_CLIENTOBJ_TYPE '6?hG'
|
||||||
#define GDITAG_HMGR_PATH_TYPE '7?hG'
|
#define GDITAG_HMGR_PATH_TYPE '7?hG'
|
||||||
#define GDITAG_HMGR_PAL_TYPE '8?hG'
|
#define GDITAG_HMGR_PAL_TYPE '8?hG'
|
||||||
#define GDITAG_HMGR_ICMLCS_TYPE '9?hG'
|
#define GDITAG_HMGR_ICMLCS_TYPE '9?hG'
|
||||||
#define GDITAG_HMGR_UMPD_TYPE 'A?hG'
|
#define GDITAG_HMGR_UMPD_TYPE 'A?hG'
|
||||||
#define GDITAG_HMGR_HLSURF_TYPE 'B?hG'
|
#define GDITAG_HMGR_HLSURF_TYPE 'B?hG'
|
||||||
#define GDITAG_HMGR_META_TYPE 'E?hG'
|
#define GDITAG_HMGR_META_TYPE 'E?hG'
|
||||||
#define GDITAG_HMGR_DRVOBJ_TYPE 'L?hG'
|
#define GDITAG_HMGR_DRVOBJ_TYPE 'L?hG'
|
||||||
#define GDITAG_HMGR_SPRITE_TYPE '??hG'
|
#define GDITAG_HMGR_SPRITE_TYPE '??hG'
|
||||||
#define GDITAG_HMGR_START '00hG'
|
#define GDITAG_HMGR_START '00hG'
|
||||||
#define GDITAG_PFE_HASHBUCKET 'bahG'
|
#define GDITAG_PFE_HASHBUCKET 'bahG'
|
||||||
#define GDITAG_PFE_HASHTABLE 'sahG'
|
#define GDITAG_PFE_HASHTABLE 'sahG'
|
||||||
#define GDITAG_HMGR_LOCK 'lmhG'
|
#define GDITAG_HMGR_LOCK 'lmhG'
|
||||||
#define GDITAG_HALFTONE_COLORTRIAD 'cthG'
|
#define GDITAG_HALFTONE_COLORTRIAD 'cthG'
|
||||||
#define GDITAG_HMGR_TEMP 'mthG'
|
#define GDITAG_HMGR_TEMP 'mthG'
|
||||||
#define GDITAG_DDCCI 'c2iG'
|
#define GDITAG_DDCCI 'c2iG'
|
||||||
#define GDITAG_ICM 'mciG'
|
#define GDITAG_ICM 'mciG'
|
||||||
#define GDITAG_KMODE_BITMAP 'mbkG'
|
#define GDITAG_KMODE_BITMAP 'mbkG'
|
||||||
#define GDITAG_HMGR_LOOKASIDE_LFONT_TYPE ':alG'
|
#define GDITAG_HMGR_LOOKASIDE_LFONT_TYPE ':alG'
|
||||||
#define GDITAG_HMGR_LOOKASIDE_RFONT_TYPE ';alG'
|
#define GDITAG_HMGR_LOOKASIDE_RFONT_TYPE ';alG'
|
||||||
#define GDITAG_HMGR_LOOKASIDE_BRUSH_TYPE '@alG'
|
#define GDITAG_HMGR_LOOKASIDE_BRUSH_TYPE '@alG'
|
||||||
#define GDITAG_HMGR_LOOKASIDE_START '0alG'
|
#define GDITAG_HMGR_LOOKASIDE_START '0alG'
|
||||||
#define GDITAG_HMGR_LOOKASIDE_DC_TYPE '1alG'
|
#define GDITAG_HMGR_LOOKASIDE_DC_TYPE '1alG'
|
||||||
#define GDITAG_HMGR_LOOKASIDE_RGN_TYPE '4alG'
|
#define GDITAG_HMGR_LOOKASIDE_RGN_TYPE '4alG'
|
||||||
#define GDITAG_HMGR_LOOKASIDE_SURF_TYPE '5alG'
|
#define GDITAG_HMGR_LOOKASIDE_SURF_TYPE '5alG'
|
||||||
#define GDITAG_HMGR_LOOKASIDE_PAL_TYPE '8alG'
|
#define GDITAG_HMGR_LOOKASIDE_PAL_TYPE '8alG'
|
||||||
#define GDITAG_LDEV 'vdlG'
|
#define GDITAG_LDEV 'vdlG'
|
||||||
#define GDITAG_LOCALEINFO 'dilG'
|
#define GDITAG_LOCALEINFO 'dilG'
|
||||||
#define GDITAG_PFE_LINK 'knlG'
|
#define GDITAG_PFE_LINK 'knlG'
|
||||||
#define GDITAG_FONT_MAPPER 'pamG'
|
#define GDITAG_FONT_MAPPER 'pamG'
|
||||||
#define GDITAG_DISPURF_SORT 'osmG'
|
#define GDITAG_DISPURF_SORT 'osmG'
|
||||||
#define GDITAG_MULTIFONT 'lumG'
|
#define GDITAG_MULTIFONT 'lumG'
|
||||||
#define GDITAG_NLS 'slnG'
|
#define GDITAG_NLS 'slnG'
|
||||||
#define GDITAG_OPENGL 'lgoG'
|
#define GDITAG_OPENGL 'lgoG'
|
||||||
#define GDITAG_OPM 'MPOG'
|
#define GDITAG_OPM 'MPOG'
|
||||||
#define GDITAG_PALETTE 'laPG'
|
#define GDITAG_PALETTE 'laPG'
|
||||||
#define GDITAG_PANNING_PDEV 'napG'
|
#define GDITAG_PANNING_PDEV 'napG'
|
||||||
#define GDITAG_PATHOBJ 'tapG'
|
#define GDITAG_PATHOBJ 'tapG'
|
||||||
#define GDITAG_PFF_INDEXES 'efpG'
|
#define GDITAG_PFF_INDEXES 'efpG'
|
||||||
#define GDITAG_PFF 'ffpG'
|
#define GDITAG_PFF 'ffpG'
|
||||||
#define GDITAG_PFT 'tfpG'
|
#define GDITAG_PFT 'tfpG'
|
||||||
#define GDITAG_PLGBLT_DATA 'bgpG'
|
#define GDITAG_PLGBLT_DATA 'bgpG'
|
||||||
#define GDITAG_PRINTCLIENTID 'dipG'
|
#define GDITAG_PRINTCLIENTID 'dipG'
|
||||||
#define GDITAG_CLIP_PATHOBJ 'oppG'
|
#define GDITAG_CLIP_PATHOBJ 'oppG'
|
||||||
#define GDITAG_PROXYPORT 'tppG'
|
#define GDITAG_PROXYPORT 'tppG'
|
||||||
#define GDITAG_PRESENT 'erpG'
|
#define GDITAG_PRESENT 'erpG'
|
||||||
#define GDITAG_LFONT_QUICKLOOKUP 'knqG'
|
#define GDITAG_LFONT_QUICKLOOKUP 'knqG'
|
||||||
#define GDITAG_PALETTE_RGB_XLATE 'bgrG'
|
#define GDITAG_PALETTE_RGB_XLATE 'bgrG'
|
||||||
#define GDITAG_REGION 'ngrG'
|
#define GDITAG_REGION 'ngrG'
|
||||||
#define GDITAG_SEMAPHORE 'mesG'
|
#define GDITAG_SEMAPHORE 'mesG'
|
||||||
#define GDITAG_SPRITE ' psG'
|
#define GDITAG_SPRITE ' psG'
|
||||||
#define GDITAG_METASPRITE 'mpsG'
|
#define GDITAG_METASPRITE 'mpsG'
|
||||||
#define GDITAG_SPRITESCAN 'rpsG'
|
#define GDITAG_SPRITESCAN 'rpsG'
|
||||||
#define GDITAG_STACKTRACE 'atsG'
|
#define GDITAG_STACKTRACE 'atsG'
|
||||||
#define GDITAG_STRETCHBLT 'htsG'
|
#define GDITAG_STRETCHBLT 'htsG'
|
||||||
#define GDITAG_PENSTYLE 'ytsG'
|
#define GDITAG_PENSTYLE 'ytsG'
|
||||||
#define GDITAG_SFM 'xusG'
|
#define GDITAG_SFM 'xusG'
|
||||||
#define GDITAG_TEMP 'pmtG'
|
#define GDITAG_TEMP 'pmtG'
|
||||||
#define GDITAG_TEMP_THREADLOCK 'pmTG'
|
#define GDITAG_TEMP_THREADLOCK 'pmTG'
|
||||||
#define GDITAG_TEXTMETRICS 'wmtG'
|
#define GDITAG_TEXTMETRICS 'wmtG'
|
||||||
#define GDITAG_PFF_DATA 'pvtG'
|
#define GDITAG_PFF_DATA 'pvtG'
|
||||||
#define GDITAG_TRIANGLE_MESH 'tvtG'
|
#define GDITAG_TRIANGLE_MESH 'tvtG'
|
||||||
#define GDITAG_TEXT 'txtG'
|
#define GDITAG_TEXT 'txtG'
|
||||||
#define GDITAG_UMODE_BITMAP 'mbuG'
|
#define GDITAG_UMODE_BITMAP 'mbuG'
|
||||||
#define GDITAG_ENG_USER_MEM_ALLOC_TABLE 'amUG'
|
#define GDITAG_ENG_USER_MEM_ALLOC_TABLE 'amUG'
|
||||||
#define GDITAG_UMPD 'pmuG'
|
#define GDITAG_UMPD 'pmuG'
|
||||||
#define GDITAG_HDEV 'sdvG'
|
#define GDITAG_HDEV 'sdvG'
|
||||||
#define GDITAG_VDEV 'vdVG'
|
#define GDITAG_VDEV 'vdVG'
|
||||||
#define GDITAG_MULTISAVEBITS 'smVG'
|
#define GDITAG_MULTISAVEBITS 'smVG'
|
||||||
#define GDITAG_MDSURF 'fsVG'
|
#define GDITAG_MDSURF 'fsVG'
|
||||||
#define GDITAG_WNDOBJ 'dnwG'
|
#define GDITAG_WNDOBJ 'dnwG'
|
||||||
#define GDITAG_PXLATE 'tlxG'
|
#define GDITAG_PXLATE 'tlxG'
|
||||||
#define GDITAG_UMPDOBJ 'dpxG'
|
#define GDITAG_UMPDOBJ 'dpxG'
|
||||||
#define GDITAG_FONT_LINK 'flnk'
|
#define GDITAG_FONT_LINK 'flnk'
|
||||||
#define GDITAG_PANNING_SURFACE 'fSAP'
|
#define GDITAG_PANNING_SURFACE 'fSAP'
|
||||||
#define GDITAG_PANNING_SHADOWLOCK 'olSP'
|
#define GDITAG_PANNING_SHADOWLOCK 'olSP'
|
||||||
#define GDITAG_SINGLEREADERLOCK 'lrsS'
|
#define GDITAG_SINGLEREADERLOCK 'lrsS'
|
||||||
#define GDITAG_TT_FONT_CACHE 'CFTT'
|
#define GDITAG_TT_FONT_CACHE 'CFTT'
|
||||||
#define GDITAG_TT_FONT 'dftT'
|
#define GDITAG_TT_FONT 'dftT'
|
||||||
#define GDITAG_VF_FONT 'dftV'
|
#define GDITAG_VF_FONT 'dftV'
|
||||||
#define GDITAG_W32PIDLOCK 'l23W'
|
#define GDITAG_W32PIDLOCK 'l23W'
|
||||||
#define GDITAG_HANDLEPUSHLOCK 'lpHG'
|
#define GDITAG_HANDLEPUSHLOCK 'lpHG'
|
||||||
|
|
||||||
#define USERTAG_SERVICE_TABLE 'lacU'
|
#define USERTAG_SERVICE_TABLE 'lacU'
|
||||||
#define USERTAG_MONITOR_MARGIN 'mamU'
|
#define USERTAG_MONITOR_MARGIN 'mamU'
|
||||||
#define USERTAG_REDIRECT 'rdrU'
|
#define USERTAG_REDIRECT 'rdrU'
|
||||||
#define USERTAG_ACCEL 'casU'
|
#define USERTAG_ACCEL 'casU'
|
||||||
#define USERTAG_ATTACHINFO 'iasU'
|
#define USERTAG_ATTACHINFO 'iasU'
|
||||||
#define USERTAG_ALTTAB 'lasU'
|
#define USERTAG_ALTTAB 'lasU'
|
||||||
#define USERTAG_DEBUG 'gbsU'
|
#define USERTAG_DEBUG 'gbsU'
|
||||||
#define USERTAG_CLIPBOARD 'bcsU'
|
#define USERTAG_CLIPBOARD 'bcsU'
|
||||||
#define USERTAG_CALLBACK 'ccsU'
|
#define USERTAG_CALLBACK 'ccsU'
|
||||||
#define USERTAG_COMPOSITIONPROP 'dcsU'
|
#define USERTAG_COMPOSITIONPROP 'dcsU'
|
||||||
#define USERTAG_CLIENTTHREADINFO 'icsU'
|
#define USERTAG_CLIENTTHREADINFO 'icsU'
|
||||||
#define USERTAG_CLASS 'lcsU'
|
#define USERTAG_CLASS 'lcsU'
|
||||||
#define USERTAG_SCANCODEMAP 'mcsU'
|
#define USERTAG_SCANCODEMAP 'mcsU'
|
||||||
#define USERTAG_CLIPBOARDPALETTE 'pcsU'
|
#define USERTAG_CLIPBOARDPALETTE 'pcsU'
|
||||||
#define USERTAG_COLORS 'rcsU'
|
#define USERTAG_COLORS 'rcsU'
|
||||||
#define USERTAG_CHECKPT 'tcsU'
|
#define USERTAG_CHECKPT 'tcsU'
|
||||||
#define USERTAG_CURSOR 'ucsU'
|
#define USERTAG_CURSOR 'ucsU'
|
||||||
#define USERTAG_COLORVALUES 'vcsU'
|
#define USERTAG_COLORVALUES 'vcsU'
|
||||||
#define USERTAG_DDE1 '1dsU'
|
#define USERTAG_DDE1 '1dsU'
|
||||||
#define USERTAG_DDE2 '2dsU'
|
#define USERTAG_DDE2 '2dsU'
|
||||||
#define USERTAG_DDE4 '4dsU'
|
#define USERTAG_DDE4 '4dsU'
|
||||||
#define USERTAG_DDE5 '5dsU'
|
#define USERTAG_DDE5 '5dsU'
|
||||||
#define USERTAG_DDE6 '6dsU'
|
#define USERTAG_DDE6 '6dsU'
|
||||||
#define USERTAG_DDE7 '7dsU'
|
#define USERTAG_DDE7 '7dsU'
|
||||||
#define USERTAG_DDE8 '8dsU'
|
#define USERTAG_DDE8 '8dsU'
|
||||||
#define USERTAG_DDE9 '9dsU'
|
#define USERTAG_DDE9 '9dsU'
|
||||||
#define USERTAG_DDEa 'AdsU'
|
#define USERTAG_DDEa 'AdsU'
|
||||||
#define USERTAG_DDEb 'BdsU'
|
#define USERTAG_DDEb 'BdsU'
|
||||||
#define USERTAG_DCE 'cdsU'
|
#define USERTAG_DCE 'cdsU'
|
||||||
#define USERTAG_DDEd 'DdsU'
|
#define USERTAG_DDEd 'DdsU'
|
||||||
#define USERTAG_DDE 'EdsU'
|
#define USERTAG_DDE 'EdsU'
|
||||||
#define USERTAG_DEVICEINFO 'IDsU'
|
#define USERTAG_DEVICEINFO 'IDsU'
|
||||||
#define USERTAG_DISPLAYINFO 'idsU'
|
#define USERTAG_DISPLAYINFO 'idsU'
|
||||||
#define USERTAG_DRAGDROP 'sdsU'
|
#define USERTAG_DRAGDROP 'sdsU'
|
||||||
#define USERTAG_DEVICECHANGE 'vdsU'
|
#define USERTAG_DEVICECHANGE 'vdsU'
|
||||||
#define USERTAG_WSEXCOMPINVALID 'CEsU'
|
#define USERTAG_WSEXCOMPINVALID 'CEsU'
|
||||||
#define USERTAG_ERESOURCE 'resU'
|
#define USERTAG_ERESOURCE 'resU'
|
||||||
#define USERTAG_EVENT 'vesU'
|
#define USERTAG_EVENT 'vesU'
|
||||||
#define USERTAG_FORWARDTOUCHMESSAGE 'tfsU'
|
#define USERTAG_FORWARDTOUCHMESSAGE 'tfsU'
|
||||||
#define USERTAG_GRANTEDHANDLES 'hgsU'
|
#define USERTAG_GRANTEDHANDLES 'hgsU'
|
||||||
#define USERTAG_GESTUREINFO 'igsU'
|
#define USERTAG_GESTUREINFO 'igsU'
|
||||||
#define USERTAG_GLOBALTHREADLOCK 'lgsU'
|
#define USERTAG_GLOBALTHREADLOCK 'lgsU'
|
||||||
#define USERTAG_GHOST 'tgsU'
|
#define USERTAG_GHOST 'tgsU'
|
||||||
#define USERTAG_HIDDATA 'ahsU'
|
#define USERTAG_HIDDATA 'ahsU'
|
||||||
#define USERTAG_HIDDESC 'DhsU'
|
#define USERTAG_HIDDESC 'DhsU'
|
||||||
#define USERTAG_HOTKEY 'khsU'
|
#define USERTAG_HOTKEY 'khsU'
|
||||||
#define USERTAG_IMEHOTKEY 'hisU'
|
#define USERTAG_IMEHOTKEY 'hisU'
|
||||||
#define USERTAG_IME 'misU'
|
#define USERTAG_IME 'misU'
|
||||||
#define USERTAG_W32JOB 'bjsU'
|
#define USERTAG_W32JOB 'bjsU'
|
||||||
#define USERTAG_W32JOBEXTRA 'xjsU'
|
#define USERTAG_W32JOBEXTRA 'xjsU'
|
||||||
#define USERTAG_KBDLAYOUT 'bksU'
|
#define USERTAG_KBDLAYOUT 'bksU'
|
||||||
#define USERTAG_KBDEXID 'eksU'
|
#define USERTAG_KBDEXID 'eksU'
|
||||||
#define USERTAG_KBDFILE 'fksU'
|
#define USERTAG_KBDFILE 'fksU'
|
||||||
#define USERTAG_KBDSTATE 'sksU'
|
#define USERTAG_KBDSTATE 'sksU'
|
||||||
#define USERTAG_KBDTABLE 'tksU'
|
#define USERTAG_KBDTABLE 'tksU'
|
||||||
#define USERTAG_LOOKASIDE 'alsU'
|
#define USERTAG_LOOKASIDE 'alsU'
|
||||||
#define USERTAG_LOGDESKTOP 'dlsU'
|
#define USERTAG_LOGDESKTOP 'dlsU'
|
||||||
#define USERTAG_LOCKRECORD 'rlsU'
|
#define USERTAG_LOCKRECORD 'rlsU'
|
||||||
#define USERTAG_MAGNIFICATION 'gmsU'
|
#define USERTAG_MAGNIFICATION 'gmsU'
|
||||||
#define USERTAG_MIRROR 'imsU'
|
#define USERTAG_MIRROR 'imsU'
|
||||||
#define USERTAG_MESSAGE_FILTER 'lmsU'
|
#define USERTAG_MESSAGE_FILTER 'lmsU'
|
||||||
#define USERTAG_MONITORRECTS 'rmsU'
|
#define USERTAG_MONITORRECTS 'rmsU'
|
||||||
#define USERTAG_MOVESIZE 'smsU'
|
#define USERTAG_MOVESIZE 'smsU'
|
||||||
#define USERTAG_MENUSTATE 'tmsU'
|
#define USERTAG_MENUSTATE 'tmsU'
|
||||||
#define USERTAG_NKAPC 'ansU'
|
#define USERTAG_NKAPC 'ansU'
|
||||||
#define USERTAG_NOTIFY 'ynsU'
|
#define USERTAG_NOTIFY 'ynsU'
|
||||||
#define USERTAG_POWERBROADCAST 'bpsU'
|
#define USERTAG_POWERBROADCAST 'bpsU'
|
||||||
#define USERTAG_PROCESSINFO 'ipsU'
|
#define USERTAG_PROCESSINFO 'ipsU'
|
||||||
#define USERTAG_POPUPMENU 'mpsU'
|
#define USERTAG_POPUPMENU 'mpsU'
|
||||||
#define USERTAG_PROFILEUSERNAME 'npsU'
|
#define USERTAG_PROFILEUSERNAME 'npsU'
|
||||||
#define USERTAG_POWER 'opsU'
|
#define USERTAG_POWER 'opsU'
|
||||||
#define USERTAG_PNP 'ppsU'
|
#define USERTAG_PNP 'ppsU'
|
||||||
#define USERTAG_PROFILE 'rpsU'
|
#define USERTAG_PROFILE 'rpsU'
|
||||||
#define USERTAG_WINDOWARRAY 'wpsU'
|
#define USERTAG_WINDOWARRAY 'wpsU'
|
||||||
#define USERTAG_SQM 'mqsU'
|
#define USERTAG_SQM 'mqsU'
|
||||||
#define USERTAG_QMSG 'mqsU'
|
#define USERTAG_QMSG 'mqsU'
|
||||||
#define USERTAG_Q 'uqsU'
|
#define USERTAG_Q 'uqsU'
|
||||||
#define USERTAG_RTL 'trsU'
|
#define USERTAG_RTL 'trsU'
|
||||||
#define USERTAG_SMS_ASYNC 'assU'
|
#define USERTAG_SMS_ASYNC 'assU'
|
||||||
#define USERTAG_SPB 'bssU'
|
#define USERTAG_SPB 'bssU'
|
||||||
#define USERTAG_SMS_CAPTURE 'cssU'
|
#define USERTAG_SMS_CAPTURE 'cssU'
|
||||||
#define USERTAG_SHADOW 'dssU'
|
#define USERTAG_SHADOW 'dssU'
|
||||||
#define USERTAG_SECURITY 'essU'
|
#define USERTAG_SECURITY 'essU'
|
||||||
#define USERTAG_SENDINPUT 'issU'
|
#define USERTAG_SENDINPUT 'issU'
|
||||||
#define USERTAG_SENDTOUCHINPUT 'jssU'
|
#define USERTAG_SENDTOUCHINPUT 'jssU'
|
||||||
#define USERTAG_SMS 'mssU'
|
#define USERTAG_SMS 'mssU'
|
||||||
#define USERTAG_SMS_STRING 'sssU'
|
#define USERTAG_SMS_STRING 'sssU'
|
||||||
#define USERTAG_SCROLLTRACK 'tssU'
|
#define USERTAG_SCROLLTRACK 'tssU'
|
||||||
#define USERTAG_SWP 'wssU'
|
#define USERTAG_SWP 'wssU'
|
||||||
#define USERTAG_SYSTEM 'yssU'
|
#define USERTAG_SYSTEM 'yssU'
|
||||||
#define USERTAG_TRACKDESKTOP 'dtsU'
|
#define USERTAG_TRACKDESKTOP 'dtsU'
|
||||||
#define USERTAG_THREADINFO 'itsU'
|
#define USERTAG_THREADINFO 'itsU'
|
||||||
#define USERTAG_STACK 'ktsU'
|
#define USERTAG_STACK 'ktsU'
|
||||||
#define USERTAG_TIMER 'mtsU'
|
#define USERTAG_TIMER 'mtsU'
|
||||||
#define USERTAG_TOKEN 'otsU'
|
#define USERTAG_TOKEN 'otsU'
|
||||||
#define USERTAG_SECTION 'stsU'
|
#define USERTAG_SECTION 'stsU'
|
||||||
#define USERTAG_TEXT 'xtsU'
|
#define USERTAG_TEXT 'xtsU'
|
||||||
#define USERTAG_TEXT2 'ytsU'
|
#define USERTAG_TEXT2 'ytsU'
|
||||||
#define USERTAG_TOUCHINPUTINFO 'ztsU'
|
#define USERTAG_TOUCHINPUTINFO 'ztsU'
|
||||||
#define USERTAG_UNICODEBUFFER 'busU'
|
#define USERTAG_UNICODEBUFFER 'busU'
|
||||||
#define USERTAG_UIPI_SQM 'susU'
|
#define USERTAG_UIPI_SQM 'susU'
|
||||||
#define USERTAG_VISRGN 'ivsU'
|
#define USERTAG_VISRGN 'ivsU'
|
||||||
#define USERTAG_VWPL 'lvsU'
|
#define USERTAG_VWPL 'lvsU'
|
||||||
#define USERTAG_WINDOW 'dwsU'
|
#define USERTAG_WINDOW 'dwsU'
|
||||||
#define USERTAG_WINEVENT 'ewsU'
|
#define USERTAG_WINEVENT 'ewsU'
|
||||||
#define USERTAG_WINDOWLIST 'lwsU'
|
#define USERTAG_WINDOWLIST 'lwsU'
|
||||||
#define USERTAG_WOWTDB 'owsU'
|
#define USERTAG_WOWTDB 'owsU'
|
||||||
#define USERTAG_WOWPROCESSINFO 'pwsU'
|
#define USERTAG_WOWPROCESSINFO 'pwsU'
|
||||||
#define USERTAG_WOWTHREADINFO 'twsU'
|
#define USERTAG_WOWTHREADINFO 'twsU'
|
||||||
|
|
|
@ -36,29 +36,29 @@ XFORMOBJ_pmx(
|
||||||
ULONG
|
ULONG
|
||||||
INTERNAL_CALL
|
INTERNAL_CALL
|
||||||
XFORMOBJ_iSetXform(
|
XFORMOBJ_iSetXform(
|
||||||
OUT XFORMOBJ *pxo,
|
OUT XFORMOBJ *pxo,
|
||||||
IN const XFORML *pxform);
|
IN const XFORML *pxform);
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
INTERNAL_CALL
|
INTERNAL_CALL
|
||||||
XFORMOBJ_iCombine(
|
XFORMOBJ_iCombine(
|
||||||
IN XFORMOBJ *pxo,
|
IN XFORMOBJ *pxo,
|
||||||
IN XFORMOBJ *pxo1,
|
IN XFORMOBJ *pxo1,
|
||||||
IN XFORMOBJ *pxo2);
|
IN XFORMOBJ *pxo2);
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
INTERNAL_CALL
|
INTERNAL_CALL
|
||||||
XFORMOBJ_iCombineXform(
|
XFORMOBJ_iCombineXform(
|
||||||
IN XFORMOBJ *pxo,
|
IN XFORMOBJ *pxo,
|
||||||
IN XFORMOBJ *pxo1,
|
IN XFORMOBJ *pxo1,
|
||||||
IN XFORML *pxform,
|
IN XFORML *pxform,
|
||||||
IN BOOL bLeftMultiply);
|
IN BOOL bLeftMultiply);
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
INTERNAL_CALL
|
INTERNAL_CALL
|
||||||
XFORMOBJ_iInverse(
|
XFORMOBJ_iInverse(
|
||||||
OUT XFORMOBJ *pxoDst,
|
OUT XFORMOBJ *pxoDst,
|
||||||
IN XFORMOBJ *pxoSrc);
|
IN XFORMOBJ *pxoSrc);
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
APIENTRY
|
APIENTRY
|
||||||
|
|
|
@ -1681,7 +1681,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
||||||
Cs->dwExStyle |= WS_EX_LAYOUTRTL;
|
Cs->dwExStyle |= WS_EX_LAYOUTRTL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Automatically add WS_EX_WINDOWEDGE */
|
/* Automatically add WS_EX_WINDOWEDGE */
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -194,7 +194,7 @@ NtGdiCreateBitmap(
|
||||||
|
|
||||||
if (pUnsafeBits && hbmp)
|
if (pUnsafeBits && hbmp)
|
||||||
{
|
{
|
||||||
PSURFACE psurf = SURFACE_LockSurface(hbmp);
|
PSURFACE psurf = SURFACE_LockSurface(hbmp);
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
ProbeForRead(pUnsafeBits, cjSize, 1);
|
ProbeForRead(pUnsafeBits, cjSize, 1);
|
||||||
|
@ -202,13 +202,13 @@ NtGdiCreateBitmap(
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
SURFACE_UnlockSurface(psurf);
|
SURFACE_UnlockSurface(psurf);
|
||||||
SURFACE_FreeSurfaceByHandle(hbmp);
|
SURFACE_FreeSurfaceByHandle(hbmp);
|
||||||
_SEH2_YIELD(return NULL;)
|
_SEH2_YIELD(return NULL;)
|
||||||
}
|
}
|
||||||
_SEH2_END
|
_SEH2_END
|
||||||
|
|
||||||
SURFACE_UnlockSurface(psurf);
|
SURFACE_UnlockSurface(psurf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return hbmp;
|
return hbmp;
|
||||||
|
|
|
@ -149,9 +149,9 @@ IntGdiCombineTransform(
|
||||||
BOOL
|
BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtGdiCombineTransform(
|
NtGdiCombineTransform(
|
||||||
LPXFORM UnsafeXFormResult,
|
LPXFORM UnsafeXFormResult,
|
||||||
LPXFORM Unsafexform1,
|
LPXFORM Unsafexform1,
|
||||||
LPXFORM Unsafexform2)
|
LPXFORM Unsafexform2)
|
||||||
{
|
{
|
||||||
BOOL Ret;
|
BOOL Ret;
|
||||||
|
|
||||||
|
|
|
@ -1036,19 +1036,19 @@ NtGdiStretchDIBitsInternal(
|
||||||
if (!Bits || !BitsInfo)
|
if (!Bits || !BitsInfo)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
safeBits = ExAllocatePoolWithTag(PagedPool, cjMaxBits, TAG_DIB);
|
safeBits = ExAllocatePoolWithTag(PagedPool, cjMaxBits, TAG_DIB);
|
||||||
if(!safeBits)
|
if(!safeBits)
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(pdc = DC_LockDc(hDC)))
|
if (!(pdc = DC_LockDc(hDC)))
|
||||||
{
|
{
|
||||||
ExFreePoolWithTag(safeBits, TAG_DIB);
|
ExFreePoolWithTag(safeBits, TAG_DIB);
|
||||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
|
@ -1059,7 +1059,7 @@ NtGdiStretchDIBitsInternal(
|
||||||
DPRINT1("Invalid bitmap\n");
|
DPRINT1("Invalid bitmap\n");
|
||||||
_SEH2_YIELD(goto cleanup;)
|
_SEH2_YIELD(goto cleanup;)
|
||||||
}
|
}
|
||||||
RtlCopyMemory(safeBits, Bits, cjMaxBits);
|
RtlCopyMemory(safeBits, Bits, cjMaxBits);
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
|
@ -1085,44 +1085,44 @@ NtGdiStretchDIBitsInternal(
|
||||||
ret = IntGdiGetObject(hBitmap, sizeof(bmp), &bmp) == sizeof(bmp);
|
ret = IntGdiGetObject(hBitmap, sizeof(bmp), &bmp) == sizeof(bmp);
|
||||||
if (ret &&
|
if (ret &&
|
||||||
bmp.bmBitsPixel == bpp &&
|
bmp.bmBitsPixel == bpp &&
|
||||||
bmp.bmWidth == SrcWidth &&
|
bmp.bmWidth == SrcWidth &&
|
||||||
bmp.bmHeight == SrcHeight &&
|
bmp.bmHeight == SrcHeight &&
|
||||||
bmp.bmPlanes == planes)
|
bmp.bmPlanes == planes)
|
||||||
{
|
{
|
||||||
/* fast path */
|
/* fast path */
|
||||||
ret = IntSetDIBits(pdc, hBitmap, 0, height, safeBits, BitsInfo, Usage);
|
ret = IntSetDIBits(pdc, hBitmap, 0, height, safeBits, BitsInfo, Usage);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* slow path - need to use StretchBlt */
|
/* slow path - need to use StretchBlt */
|
||||||
|
|
||||||
hdcMem = NtGdiCreateCompatibleDC(hDC);
|
hdcMem = NtGdiCreateCompatibleDC(hDC);
|
||||||
hBitmap = DIB_CreateDIBSection(pdc, BitsInfo, Usage, &pvBits, NULL, 0, 0);
|
hBitmap = DIB_CreateDIBSection(pdc, BitsInfo, Usage, &pvBits, NULL, 0, 0);
|
||||||
if(!hBitmap)
|
if(!hBitmap)
|
||||||
{
|
{
|
||||||
DPRINT1("Error, failed to create a DIB section\n");
|
DPRINT1("Error, failed to create a DIB section\n");
|
||||||
NtGdiDeleteObjectApp(hdcMem);
|
NtGdiDeleteObjectApp(hdcMem);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlCopyMemory(pvBits, safeBits, cjMaxBits);
|
RtlCopyMemory(pvBits, safeBits, cjMaxBits);
|
||||||
hOldBitmap = NtGdiSelectBitmap(hdcMem, hBitmap);
|
hOldBitmap = NtGdiSelectBitmap(hdcMem, hBitmap);
|
||||||
|
|
||||||
/* Origin for DIBitmap may be bottom left (positive biHeight) or top
|
/* Origin for DIBitmap may be bottom left (positive biHeight) or top
|
||||||
left (negative biHeight) */
|
left (negative biHeight) */
|
||||||
ret = NtGdiStretchBlt(hDC, XDest, YDest, DestWidth, DestHeight,
|
ret = NtGdiStretchBlt(hDC, XDest, YDest, DestWidth, DestHeight,
|
||||||
hdcMem, XSrc, abs(height) - SrcHeight - YSrc,
|
hdcMem, XSrc, abs(height) - SrcHeight - YSrc,
|
||||||
SrcWidth, SrcHeight, ROP, 0);
|
SrcWidth, SrcHeight, ROP, 0);
|
||||||
|
|
||||||
if(ret)
|
if(ret)
|
||||||
ret = SrcHeight;
|
ret = SrcHeight;
|
||||||
NtGdiSelectBitmap(hdcMem, hOldBitmap);
|
NtGdiSelectBitmap(hdcMem, hOldBitmap);
|
||||||
NtGdiDeleteObjectApp(hdcMem);
|
NtGdiDeleteObjectApp(hdcMem);
|
||||||
GreDeleteObject(hBitmap);
|
GreDeleteObject(hBitmap);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
ExFreePoolWithTag(safeBits, TAG_DIB);
|
ExFreePoolWithTag(safeBits, TAG_DIB);
|
||||||
DC_UnlockDc(pdc);
|
DC_UnlockDc(pdc);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,8 @@ SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -107,12 +107,12 @@ GreGetCharacterPlacementW(
|
||||||
|
|
||||||
DPRINT1("GreGCPW Start\n");
|
DPRINT1("GreGCPW Start\n");
|
||||||
|
|
||||||
if (!pgcpw)
|
if (!pgcpw)
|
||||||
{
|
{
|
||||||
if (GreGetTextExtentW( hdc, pwsz, nCount, &Size, 1))
|
if (GreGetTextExtentW( hdc, pwsz, nCount, &Size, 1))
|
||||||
return MAKELONG(Size.cx, Size.cy);
|
return MAKELONG(Size.cx, Size.cy);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("GreGCPW 1\n");
|
DPRINT1("GreGCPW 1\n");
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ GreGetCharacterPlacementW(
|
||||||
&Size,
|
&Size,
|
||||||
0) )
|
0) )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("GreGCPW 2\n");
|
DPRINT1("GreGCPW 2\n");
|
||||||
|
@ -814,7 +814,7 @@ NtGdiGetKerningPairs(HDC hDC,
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
Count = 0;
|
Count = 0;
|
||||||
}
|
}
|
||||||
ExFreePoolWithTag(pKP,GDITAG_TEXT);
|
ExFreePoolWithTag(pKP,GDITAG_TEXT);
|
||||||
}
|
}
|
||||||
return Count;
|
return Count;
|
||||||
|
|
|
@ -44,13 +44,13 @@ NtGdiCreateMetafileDC(IN HDC hdc)
|
||||||
{ // Not sure this is right for getting the HDEV handle, maybe Timo could help or just if'ed it out.
|
{ // Not sure this is right for getting the HDEV handle, maybe Timo could help or just if'ed it out.
|
||||||
ret = IntGdiCreateDisplayDC(pDc->ppdev->BaseObject.hHmgr, DC_TYPE_INFO, TRUE);
|
ret = IntGdiCreateDisplayDC(pDc->ppdev->BaseObject.hHmgr, DC_TYPE_INFO, TRUE);
|
||||||
DC_UnlockDc(pDc);
|
DC_UnlockDc(pDc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret = UserGetDesktopDC(DC_TYPE_INFO, TRUE, FALSE);
|
ret = UserGetDesktopDC(DC_TYPE_INFO, TRUE, FALSE);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
#include "math.h"
|
#define _USE_MATH_DEFINES
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -97,14 +97,14 @@ HintFromAccel(ULONG flAccel)
|
||||||
{
|
{
|
||||||
switch (flAccel & (MX_NOTRANSLATE | MX_IDENTITYSCALE | MX_SCALE))
|
switch (flAccel & (MX_NOTRANSLATE | MX_IDENTITYSCALE | MX_SCALE))
|
||||||
{
|
{
|
||||||
case (MX_SCALE | MX_IDENTITYSCALE | MX_NOTRANSLATE):
|
case (MX_SCALE | MX_IDENTITYSCALE | MX_NOTRANSLATE):
|
||||||
return GX_IDENTITY;
|
return GX_IDENTITY;
|
||||||
case (MX_SCALE | MX_IDENTITYSCALE):
|
case (MX_SCALE | MX_IDENTITYSCALE):
|
||||||
return GX_OFFSET;
|
return GX_OFFSET;
|
||||||
case MX_SCALE:
|
case MX_SCALE:
|
||||||
return GX_SCALE;
|
return GX_SCALE;
|
||||||
default:
|
default:
|
||||||
return GX_GENERAL;
|
return GX_GENERAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,25 +124,25 @@ XFORMOBJ_UpdateAccel(
|
||||||
pmx->flAccel = 0;
|
pmx->flAccel = 0;
|
||||||
|
|
||||||
if (FLOATOBJ_Equal0(&pmx->efDx) &&
|
if (FLOATOBJ_Equal0(&pmx->efDx) &&
|
||||||
FLOATOBJ_Equal0(&pmx->efDy))
|
FLOATOBJ_Equal0(&pmx->efDy))
|
||||||
{
|
{
|
||||||
pmx->flAccel |= MX_NOTRANSLATE;
|
pmx->flAccel |= MX_NOTRANSLATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FLOATOBJ_Equal0(&pmx->efM12) &&
|
if (FLOATOBJ_Equal0(&pmx->efM12) &&
|
||||||
FLOATOBJ_Equal0(&pmx->efM21))
|
FLOATOBJ_Equal0(&pmx->efM21))
|
||||||
{
|
{
|
||||||
pmx->flAccel |= MX_SCALE;
|
pmx->flAccel |= MX_SCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FLOATOBJ_Equal1(&pmx->efM11) &&
|
if (FLOATOBJ_Equal1(&pmx->efM11) &&
|
||||||
FLOATOBJ_Equal1(&pmx->efM22))
|
FLOATOBJ_Equal1(&pmx->efM22))
|
||||||
{
|
{
|
||||||
pmx->flAccel |= MX_IDENTITYSCALE;
|
pmx->flAccel |= MX_IDENTITYSCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FLOATOBJ_IsLong(&pmx->efM11) && FLOATOBJ_IsLong(&pmx->efM12) &&
|
if (FLOATOBJ_IsLong(&pmx->efM11) && FLOATOBJ_IsLong(&pmx->efM12) &&
|
||||||
FLOATOBJ_IsLong(&pmx->efM21) && FLOATOBJ_IsLong(&pmx->efM22))
|
FLOATOBJ_IsLong(&pmx->efM21) && FLOATOBJ_IsLong(&pmx->efM22))
|
||||||
{
|
{
|
||||||
pmx->flAccel |= MX_INTEGER;
|
pmx->flAccel |= MX_INTEGER;
|
||||||
}
|
}
|
||||||
|
@ -308,42 +308,42 @@ XFORMOBJ_bXformFixPoints(
|
||||||
{
|
{
|
||||||
if (flAccel & MX_IDENTITYSCALE)
|
if (flAccel & MX_IDENTITYSCALE)
|
||||||
{
|
{
|
||||||
/* 1-scale integer transform */
|
/* 1-scale integer transform */
|
||||||
i = cPoints - 1;
|
i = cPoints - 1;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
LONG x = pptIn[i].x + pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21);
|
LONG x = pptIn[i].x + pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21);
|
||||||
LONG y = pptIn[i].y + pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12);
|
LONG y = pptIn[i].y + pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12);
|
||||||
pptOut[i].y = y;
|
pptOut[i].y = y;
|
||||||
pptOut[i].x = x;
|
pptOut[i].x = x;
|
||||||
}
|
}
|
||||||
while (--i >= 0);
|
while (--i >= 0);
|
||||||
}
|
}
|
||||||
else if (flAccel & MX_SCALE)
|
else if (flAccel & MX_SCALE)
|
||||||
{
|
{
|
||||||
/* Diagonal integer transform */
|
/* Diagonal integer transform */
|
||||||
i = cPoints - 1;
|
i = cPoints - 1;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
pptOut[i].x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11);
|
pptOut[i].x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11);
|
||||||
pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22);
|
pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22);
|
||||||
}
|
}
|
||||||
while (--i >= 0);
|
while (--i >= 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Full integer transform */
|
/* Full integer transform */
|
||||||
i = cPoints - 1;
|
i = cPoints - 1;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
LONG x;
|
LONG x;
|
||||||
x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11);
|
x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11);
|
||||||
x += pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21);
|
x += pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21);
|
||||||
pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22);
|
pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22);
|
||||||
pptOut[i].y += pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12);
|
pptOut[i].y += pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12);
|
||||||
pptOut[i].x = x;
|
pptOut[i].x = x;
|
||||||
}
|
}
|
||||||
while (--i >= 0);
|
while (--i >= 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (flAccel & MX_IDENTITYSCALE)
|
else if (flAccel & MX_IDENTITYSCALE)
|
||||||
|
@ -468,11 +468,11 @@ XFORMOBJ_iGetFloatObjXform(
|
||||||
BOOL
|
BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
XFORMOBJ_bApplyXform(
|
XFORMOBJ_bApplyXform(
|
||||||
IN XFORMOBJ *pxo,
|
IN XFORMOBJ *pxo,
|
||||||
IN ULONG iMode,
|
IN ULONG iMode,
|
||||||
IN ULONG cPoints,
|
IN ULONG cPoints,
|
||||||
IN PVOID pvIn,
|
IN PVOID pvIn,
|
||||||
OUT PVOID pvOut)
|
OUT PVOID pvOut)
|
||||||
{
|
{
|
||||||
MATRIX mx;
|
MATRIX mx;
|
||||||
XFORMOBJ xoInv;
|
XFORMOBJ xoInv;
|
||||||
|
|
|
@ -70,10 +70,6 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
|
||||||
|
|
||||||
/* Undocumented stuff */
|
/* Undocumented stuff */
|
||||||
typedef DRIVEROBJ *PDRIVEROBJ;
|
typedef DRIVEROBJ *PDRIVEROBJ;
|
||||||
#ifndef M_PI
|
|
||||||
#define M_PI 3.14159265358979323846f
|
|
||||||
#define M_PI_2 1.57079632679489661923
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* User heap */
|
/* User heap */
|
||||||
extern HANDLE GlobalUserHeap;
|
extern HANDLE GlobalUserHeap;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue