- Implemented EngSaveFloatingPointState and EngRestoreFloatingState.

svn path=/trunk/; revision=8650
This commit is contained in:
David Welch 2004-03-11 21:38:58 +00:00
parent 0581a7d1a6
commit 2f596c1ce8
3 changed files with 87 additions and 23 deletions

View file

@ -0,0 +1,85 @@
/*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: float.c,v 1.1 2004/03/11 21:38:58 dwelch Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Engine floating point functions
* FILE: subsys/win32k/eng/float.c
* PROGRAMER: Jason Filby
* REVISION HISTORY:
*/
#include <ddk/ntddk.h>
#include <ddk/winddi.h>
#include <win32k/dc.h>
#include <win32k/gdiobj.h>
#include <include/dib.h>
#include <include/object.h>
#include <include/paint.h>
#include "handle.h"
#include "../dib/dib.h"
#define NDEBUG
#include <win32k/debug1.h>
BOOL
STDCALL
EngRestoreFloatingPointState ( IN VOID *Buffer )
{
NTSTATUS Status;
Status = KeRestoreFloatingPointState((PKFLOATING_SAVE)Buffer);
if (Status != STATUS_SUCCESS)
{
return FALSE;
}
return TRUE;
}
BOOL
STDCALL
EngSaveFloatingPointState(OUT VOID *Buffer,
IN ULONG BufferSize)
{
KFLOATING_SAVE TempBuffer;
NTSTATUS Status;
if (Buffer == NULL || BufferSize == 0)
{
/* Check for floating point support. */
Status = KeSaveFloatingPointState(&TempBuffer);
if (Status != STATUS_SUCCESS)
{
return(0);
}
KeRestoreFloatingPointState(&TempBuffer);
return(sizeof(KFLOATING_SAVE));
}
if (BufferSize < sizeof(KFLOATING_SAVE))
{
return(0);
}
Status = KeSaveFloatingPointState((PKFLOATING_SAVE)Buffer);
if (!NT_SUCCESS(Status))
{
return FALSE;
}
return TRUE;
}

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.95 2004/03/08 07:04:56 dwelch Exp $
# $Id: makefile,v 1.96 2004/03/11 21:38:58 dwelch Exp $
PATH_TO_TOP = ../..
@ -42,7 +42,7 @@ ENG_OBJECTS= eng/debug.o eng/error.o eng/mem.o eng/brush.o eng/bitblt.o \
eng/clip.o eng/copybits.o eng/device.o eng/handle.o eng/lineto.o \
eng/paint.o eng/palette.o eng/perfcnt.o eng/semaphor.o eng/surface.o \
eng/xlate.o eng/transblt.o eng/mouse.o eng/misc.o eng/nls.o eng/sort.o \
eng/gradient.o eng/event.o
eng/gradient.o eng/event.o eng/float.o
MAIN_OBJECTS = main/dllmain.o main/svctabm.o

View file

@ -506,27 +506,6 @@ EngQueryPalette(
return 0;
}
BOOL
STDCALL
EngRestoreFloatingPointState ( IN VOID *pBuffer )
{
// www.osr.com/ddk/graphics/gdifncs_9l0n.htm
UNIMPLEMENTED;
return FALSE;
}
ULONG
STDCALL
EngSaveFloatingPointState(
OUT VOID *pBuffer,
IN ULONG cjBufferSize
)
{
// www.osr.com/ddk/graphics/gdifncs_9tif.htm
UNIMPLEMENTED;
return 0;
}
BOOL
STDCALL
EngSetPointerTag(